/** * <p>Return the number of rows to be displayed, or zero for all remaining * rows in the table. The default value of this property is zero.</p> * * @return the number of rows. */ public int getRows() { return (Integer) getStateHelper().eval(PropertyKeys.rows, 0); }
/** * <p>Return the request-scope attribute under which the data object for the * current row will be exposed when iterating. This property is * <strong>not</strong> enabled for value binding expressions.</p> * * @return he request-scope attribute. */ public String getVar() { return (String) getStateHelper().get(PropertyKeys.var); }
/** * <p>Return the zero-relative row number of the first row to be * displayed.</p> * * @return the row number. */ public int getFirst() { return (Integer) getStateHelper().eval(PropertyKeys.first, 0); }
/** * <p>Set the request-scope attribute under which the data object for the * current row wil be exposed when iterating.</p> * * @param var The new request-scope attribute name */ public void setVar(String var) { getStateHelper().put(PropertyKeys.var, var); }
/** * <p>Return the zero-relative row number of the first row to be * displayed.</p> */ public int getFirst() { return (Integer) getStateHelper().eval(PropertyKeys.first, 0); }
/** * <p>Return the zero-relative index of the currently selected row. If we * are not currently positioned on a row, return -1. This property is * <strong>not</strong> enabled for value binding expressions.</p> * * @return the row index. * * @throws FacesException if an error occurs getting the row index */ public int getRowIndex() { return (Integer) getStateHelper().eval(PropertyKeys.rowIndex, -1); }
@Override public String createUniqueId(FacesContext context, String seed) { Integer i = (Integer) getStateHelper().get(PropertyKeys.lastId); int lastId = ((i != null) ? i : 0); getStateHelper().put(PropertyKeys.lastId, ++lastId); return UIViewRoot.UNIQUE_ID_PREFIX + (seed == null ? lastId : seed); }
/** * <p>Return the number of rows to be displayed, or zero for all remaining * rows in the table. The default value of this property is zero.</p> */ public int getRows() { return (Integer) getStateHelper().eval(PropertyKeys.rows, 0); }
/** * <p>Return the request-scope attribute under which the data object for the * current row will be exposed when iterating. This property is * <strong>not</strong> enabled for value binding expressions.</p> */ public String getVar() { return (String) getStateHelper().get(PropertyKeys.var); }
/** * <p class="changed_added_2_1">Return the value of the * <code>rowStatePreserved</code> JavaBeans property. See * {@link #setRowStatePreserved}.</p> * * @since 2.1 */ public boolean isRowStatePreserved() { Boolean b = (Boolean) getStateHelper().get(PropertyKeys.rowStatePreserved); return b == null ? false : b.booleanValue(); }
public String createUniqueId(FacesContext context, String seed) { Integer i = (Integer) getStateHelper().get(PropertyKeys.lastId); int lastId = ((i != null) ? i : 0); getStateHelper().put(PropertyKeys.lastId, ++lastId); return UIViewRoot.UNIQUE_ID_PREFIX + (seed == null ? lastId : seed); }
/** * <p>Set the request-scope attribute under which the data object for the * current row wil be exposed when iterating.</p> * * @param var The new request-scope attribute name */ public void setVar(String var) { getStateHelper().put(PropertyKeys.var, var); }
/** * <p>Return the zero-relative index of the currently selected row. If we * are not currently positioned on a row, return -1. This property is * <strong>not</strong> enabled for value binding expressions.</p> * * @throws FacesException if an error occurs getting the row index */ public int getRowIndex() { return (Integer) getStateHelper().eval(PropertyKeys.rowIndex, -1); }
public void setFirst(int first) { if (first < 0) { throw new IllegalArgumentException("Illegal value for first row: " + first); } getStateHelper().put(PropertyKeys.first, first ); }
private void preDecode(FacesContext context) { setDataModel(null); // Re-evaluate even with server-side state saving Map<String, SavedState> saved = (Map<String, SavedState>) getStateHelper().get(PropertyKeys.saved); if (null == saved || !keepSaved(context)) { //noinspection CollectionWithoutInitialCapacity getStateHelper().remove(PropertyKeys.saved); } }
/** * <p>Set the value of the <code>UIData</code>. This value must either be * be of type {@link DataModel}, or a type that can be adapted into a {@link * DataModel}.</p> * * @param value the new value */ public void setValue(Object value) { setDataModel(null); getStateHelper().put(PropertyKeys.value, value); }
/** * <p>Set the value of the <code>UIData</code>. This value must either be * be of type {@link DataModel}, or a type that can be adapted into a {@link * DataModel}.</p> * * @param value the new value */ public void setValue(Object value) { setDataModel(null); getStateHelper().put(PropertyKeys.value, value); }
private void preDecode(FacesContext context) { setDataModel(null); // Re-evaluate even with server-side state saving Map<String, SavedState> saved = (Map<String, SavedState>) getStateHelper().get(PropertyKeys.saved); if (null == saved || !keepSaved(context)) { //noinspection CollectionWithoutInitialCapacity getStateHelper().remove(PropertyKeys.saved); } }
/** * Defines the maximum number of rows of data to be displayed. * <p> * Specify zero to display all rows from the "first" row to the end of available data. * </p> */ @JSFProperty public int getRows() { return (Integer) getStateHelper().eval(PropertyKeys.rows,0); }
private void preEncode(FacesContext context) { setDataModel(null); // re-evaluate even with server-side state saving if (!keepSaved(context)) { ////noinspection CollectionWithoutInitialCapacity //saved = new HashMap<String, SavedState>(); getStateHelper().remove(PropertyKeys.saved); } }