forked from Coded/SIPRP
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
79 lines
1.7 KiB
79 lines
1.7 KiB
/*
|
|
* To change this template, choose Tools | Templates
|
|
* and open the template in the editor.
|
|
*/
|
|
|
|
package pagination;
|
|
|
|
import com.sun.webui.jsf.component.Hyperlink;
|
|
import javax.faces.context.FacesContext;
|
|
|
|
/**
|
|
*
|
|
* @author lluis
|
|
*/
|
|
public class Pagina extends Hyperlink{
|
|
private Integer risco_id;
|
|
private Integer page_nr;
|
|
private Boolean previous = false;
|
|
private Boolean next = false;
|
|
|
|
public Pagina(){
|
|
super();
|
|
}
|
|
|
|
public Object saveState(FacesContext context)
|
|
{
|
|
Object values[] = new Object[7];
|
|
values[0] = super.saveState(context);
|
|
values[1] = getRisco_id();
|
|
values[2] = getPage_nr();
|
|
values[3] = isPrevious();
|
|
values[4] = isNext();
|
|
// values[2] = getId();
|
|
return ((Object) (values));
|
|
}
|
|
|
|
public void restoreState(FacesContext context, Object state)
|
|
{
|
|
Object values[] = (Object[])state;
|
|
super.restoreState(context, values[0]);
|
|
risco_id = (Integer)values[1];
|
|
page_nr = (Integer)values[2];
|
|
previous = (Boolean)values[3];
|
|
next = (Boolean)values[4];
|
|
}
|
|
|
|
public Integer getRisco_id() {
|
|
return risco_id;
|
|
}
|
|
|
|
public void setRisco_id(Integer risco_id) {
|
|
this.risco_id = risco_id;
|
|
}
|
|
|
|
public Boolean isPrevious() {
|
|
return previous;
|
|
}
|
|
|
|
public void setPrevious(Boolean previous) {
|
|
this.previous = previous;
|
|
}
|
|
|
|
public Boolean isNext() {
|
|
return next;
|
|
}
|
|
|
|
public void setNext(Boolean next) {
|
|
this.next = next;
|
|
}
|
|
|
|
public Integer getPage_nr() {
|
|
return page_nr;
|
|
}
|
|
|
|
public void setPage_nr(Integer page_nr) {
|
|
this.page_nr = page_nr;
|
|
}
|
|
}
|