Пример #1
0
  @Override
  public void processUpdates(FacesContext context) {
    beforeUpdateValuesPhase = false;
    super.processUpdates(context);

    if (incomingGroupingRules != null) {
      acceptNewGroupingRules(incomingGroupingRules);
      incomingGroupingRules = null;
    }
    if (groupingRules != null && ValueBindings.set(this, "groupingRules", groupingRules))
      groupingRules = null;

    ValueExpression expansionStateExpression = getValueExpression("expansionState");
    if (expansionStateExpression != null)
      expansionStateExpression.setValue(context.getELContext(), expansionState);
  }
Пример #2
0
  @Override
  public void restoreState(FacesContext context, Object stateObj) {
    Object[] state = (Object[]) stateObj;
    int i = 0;
    super.restoreState(context, state[i++]);
    groupingRules = (List<GroupingRule>) restoreAttachedState(context, state[i++]);
    columnHeaderVar = (String) state[i++];
    groupingValueVar = (String) state[i++];
    groupingValueStringVar = (String) state[i++];
    groupOnHeaderClick = (Boolean) state[i++];
    hideGroupingColumns = (Boolean) state[i++];
    expansionState = (ExpansionState) state[i++];
    selectionMode = (RowGroupingSelectionMode) state[i++];
    inGroupFootersCollapsible = (Boolean) state[i++];
    groupFootersCollapsible = (Boolean) state[i++];

    groupHeaderRowStyle = (String) state[i++];
    groupHeaderRowClass = (String) state[i++];
    groupFooterRowStyle = (String) state[i++];
    groupFooterRowClass = (String) state[i++];

    beforeUpdateValuesPhase = true;
    incomingGroupingRules = null;
  }