Package org.ajax4jsf.model

Examples of org.ajax4jsf.model.DataComponentState


        state.setFirst(getActualFirst());
        state.setRows(getActualRows());
    }

    protected void updateState() {
        DataComponentState localState = getLocalComponentState();
        if (localState instanceof SequenceState) {
            updateState((SequenceState) localState);
        }
    }
View Full Code Here


    public void walk(FacesContext faces, DataVisitor visitor, Object argument) {
        Object key = getRowKey();
        captureOrigValue(faces);

        Range range = null;
        DataComponentState componentState = getComponentState();

        if (componentState != null) {
            range = componentState.getRange();
        }

        getExtendedDataModel().walk(faces, visitor, range, argument);

        setRowKey(faces, key);
View Full Code Here

  /**
   * @return current state of this component.
   */
  public DataComponentState getComponentState() {
    DataComponentState state = null;
    if (this._currentState == null) {
      // Check for binding state to user bean.
      ValueExpression valueBinding = getValueExpression(UIDataAdaptor.COMPONENT_STATE_ATTRIBUTE);
      FacesContext facesContext = getFacesContext();
      ELContext elContext = facesContext.getELContext();
View Full Code Here

    // component not child of iterable )
    for (Iterator<Entry<String, PerIdState>> iter = state.componentStates.entrySet().iterator(); iter
        .hasNext();) {
      Entry<String, PerIdState> stateEntry = iter.next();
      PerIdState idState = stateEntry.getValue();
      DataComponentState compState;
      if (idState.stateInHolder) {
        // TODO - change RichFaces Tree component, for remove reference
        // to component from state.
        compState = createComponentState();
        ((StateHolder) compState).restoreState(faces,
View Full Code Here

//    this._statesMap.put(getBaseClientId(faces), this._currentState);
//    this._modelsMap.put(getBaseClientId(faces), this._currentModel);
    for (Iterator<Entry<String, DataComponentState>> iter = this._statesMap.entrySet().iterator(); iter
        .hasNext();) {
      Entry<String, DataComponentState> stateEntry = iter.next();
      DataComponentState dataComponentState = stateEntry.getValue();
      String stateKey = stateEntry.getKey();
      if (encodedIds.isEmpty() || encodedIds.contains(stateKey)) {
        PerIdState idState = new PerIdState();
        // Save component state , depended if implemented interfaces.
        if (null == dataComponentState) {
          idState.componentState = null;
        } else {
          if (dataComponentState instanceof Serializable) {
            idState.componentState = dataComponentState;
          } else if (dataComponentState instanceof StateHolder) {
            idState.componentState = ((StateHolder) dataComponentState)
                .saveState(faces);
            idState.stateInHolder = true;
          }
          ExtendedDataModel extendedDataModel = (ExtendedDataModel) this._modelsMap
              .get(stateKey);
          if (null != extendedDataModel) {
            idState.model = extendedDataModel
                .getSerializableModel(dataComponentState
                    .getRange());

          }
        }
        if (null != idState.model || null != idState.componentState) {
View Full Code Here

    this.responseData = responseData;
  }
 
  protected DataComponentState createComponentState() {
 
    return new DataComponentState(){
   
      public Range getRange() {
       
        int curentRow = getFirst();
View Full Code Here

 
  public void broadcast(FacesEvent event) throws AbortProcessingException {
    super.broadcast(event);
   
    DataComponentState componentState = getComponentState();
    if (componentState instanceof FacesListener) {
      FacesListener facesListener = (FacesListener) componentState;

      if (event.isAppropriateListener(facesListener)) {
        // we can safely open/close nodes here
View Full Code Here

    this.responseData = responseData;
  }
 
  protected DataComponentState createComponentState() {
 
    return new DataComponentState(){
   
      public Range getRange() {
       
        int curentRow = getFirst();
View Full Code Here

 
  public void broadcast(FacesEvent event) throws AbortProcessingException {
    super.broadcast(event);
   
    DataComponentState componentState = getComponentState();
    if (componentState instanceof FacesListener) {
      FacesListener facesListener = (FacesListener) componentState;

      if (event.isAppropriateListener(facesListener)) {
        // we can safely open/close nodes here
View Full Code Here

  /**
   * @return current state of this component.
   */
  public DataComponentState getComponentState() {
    DataComponentState state = null;
    if (this._currentState == null) {
      // Check for binding state to user bean.
      ValueBinding valueBinding = getValueBinding(UIDataAdaptor.COMPONENT_STATE_ATTRIBUTE);
      FacesContext facesContext = getFacesContext();
      if (null != valueBinding) {
View Full Code Here

TOP

Related Classes of org.ajax4jsf.model.DataComponentState

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.