Examples of FacesBean


Examples of org.apache.myfaces.trinidad.bean.FacesBean

  }

  protected FacesBean createFacesBean(
    String rendererType)
  {
    FacesBean bean = FacesBeanFactory.createFacesBean(getClass(),
                                                      rendererType);
    UIXFacesBean uixBean = (UIXFacesBean) bean;
    uixBean.init(this, getBeanType());
    return uixBean;
  }
View Full Code Here

Examples of org.apache.myfaces.trinidad.bean.FacesBean

      return _id;
    }
    else
    {
      // unoptimized path
      FacesBean facesBean = getFacesBean();

      String id = (String)facesBean.getProperty(ID_KEY);

      // make sure that we always have an id
      if (id == null)
      {
        id = FacesContext.getCurrentInstance().getViewRoot().createUniqueId();

        facesBean.setProperty(ID_KEY, id);
      }

      return id;
    }
  }
View Full Code Here

Examples of org.apache.myfaces.trinidad.bean.FacesBean

   * </ul>
   */
  @Override
  public void setId(String id)
  {
    FacesBean facesBean = getFacesBean();

    // if we are using a FacesBeanImpl, then the FacesBean will
    // delegate all calls to set the id back to us and we can store
    // the value localy.  Otehrwise,w e need to store it in
    // the FacesBean
    if (_usesFacesBeanImpl)
    {
      // only validate if the id has actually changed
      if ((_id == null) || !_id.equals(id))
      {
        _validateId(id);
        _id = id;

        // if we're a NamingContainer then changing our id will invalidate the clientIds of all
        // of our children
        if ((_clientId != null) && (this instanceof NamingContainer))
        {
          clearCachedClientIds(this);
        }
      }
    }
    else
    {
      _validateId(id);
      facesBean.setProperty(ID_KEY, id);
    }

    _clientId = null;
  }
View Full Code Here

Examples of org.apache.myfaces.trinidad.bean.FacesBean

    if (componentListener == null)
    {
        throw new NullPointerException("componentListener required");
    }
   
    FacesBean bean = getFacesBean();
   
    AttachedObjects<Class<? extends SystemEvent>, SystemEventListener> eventStorage =
      (AttachedObjects<Class<? extends SystemEvent>, SystemEventListener>)bean.getProperty(_SYSTEM_EVENT_LISTENERS_KEY);
   
    if (eventStorage == null)
    {
      eventStorage = new AttachedObjects<Class<? extends SystemEvent>, SystemEventListener>();
      bean.setProperty(_SYSTEM_EVENT_LISTENERS_KEY, eventStorage);
    }
   
    eventStorage.addAttachedObject(eventClass, new ComponentSystemEventListenerWrapper(componentListener, this));
  }
View Full Code Here

Examples of org.apache.myfaces.trinidad.bean.FacesBean

    if (componentListener == null)
    {
        throw new NullPointerException("componentListener required");
    }
   
    FacesBean bean = getFacesBean();
   
    AttachedObjects<Class<? extends SystemEvent>, SystemEventListener> eventStorage =
      (AttachedObjects<Class<? extends SystemEvent>, SystemEventListener>)bean.getProperty(_SYSTEM_EVENT_LISTENERS_KEY);
   
    if (eventStorage == null)
    {
      return;
    }
View Full Code Here

Examples of org.apache.myfaces.trinidad.bean.FacesBean

  }
 
  @Override
  public List<SystemEventListener> getListenersForEventClass(Class<? extends SystemEvent> eventClass)
  {
    FacesBean bean = getFacesBean();
   
    AttachedObjects<Class<? extends SystemEvent>, SystemEventListener> eventStorage =
      (AttachedObjects<Class<? extends SystemEvent>, SystemEventListener>)bean.getProperty(_SYSTEM_EVENT_LISTENERS_KEY);
   
    if (eventStorage == null)
    {
      return Collections.emptyList();
    }
View Full Code Here

Examples of org.apache.myfaces.trinidad.bean.FacesBean

    if (!events.contains(eventName))
    {
      return;
    }

    FacesBean bean = getFacesBean();
   
    AttachedObjects<String, ClientBehavior> behaviors = (
            AttachedObjects<String, ClientBehavior>)bean.getProperty(_CLIENT_BEHAVIORS_KEY);
   
    if (behaviors == null)
    {
      behaviors = new AttachedObjects<String, ClientBehavior>();
      bean.setProperty(_CLIENT_BEHAVIORS_KEY, behaviors);
    }
   
    behaviors.addAttachedObject(eventName, behavior);
  }
View Full Code Here

Examples of org.apache.myfaces.trinidad.bean.FacesBean

  }

  private void _init(
    String rendererType)
  {
    FacesBean oldBean = _facesBean;
    FacesBean newBean = createFacesBean(rendererType);;

    if (oldBean != null)
      newBean.addAll(oldBean);

    _attributes = new ValueMap(newBean);

    _facesBean = newBean;

    // determine whether it is ok to store the attributes locally.  We cache the result since
    // this can be a little involved
    boolean usesFacesBeanImpl = false;

    if (newBean instanceof UIXFacesBeanImpl)
      usesFacesBeanImpl = true;
    else
    {
      // handle the wrapped case
      FacesBean currImpl = newBean;

      while (currImpl instanceof FacesBeanWrapper)
      {
        currImpl = ((FacesBeanWrapper)currImpl).getWrappedBean();
View Full Code Here

Examples of org.apache.myfaces.trinidad.bean.FacesBean

    {
      RenderingContext arc = RenderingContext.getCurrentInstance();
      if (arc == null)
        throw new IllegalStateException("No RenderingContext");
     
      FacesBean bean = getFacesBean(component);
      encodeBegin(context, arc, component, bean);
    }
  }
View Full Code Here

Examples of org.apache.myfaces.trinidad.bean.FacesBean

  {
    RenderingContext arc = RenderingContext.getCurrentInstance();
    if (arc == null)
      throw new IllegalStateException("No RenderingContext");

    FacesBean bean = getFacesBean(component);
    if (getRendersChildren())
    {
      encodeAll(context, arc, component, bean);
    }
    else
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.