Package org.apache.myfaces.trinidad.change

Examples of org.apache.myfaces.trinidad.change.ComponentChange


    if (changeIter == null)
      return;
    while (changeIter.hasNext())
    {
      ComponentChange change = changeIter.next();

      //pu: If we did not create the component during tag execution, do not
      //  apply any AttributeChange. This is because we do not have enough
      //  mechanism to take care of such cases for now. Users could always apply
      //  such Changes explicitly in their backing bean after creating component.
      boolean isChangeApplicable =
        ( (change instanceof AttributeComponentChange) && !isCreated) ? false:true;

      if (isChangeApplicable)
      {
        change.changeComponent(uiComponent);
      }

      //pu: In case this Change has added a new component/facet, the added
      //  component could have its own Changes, that may need to be applied here.
      if (change instanceof AddComponentChange)
View Full Code Here


    newChild.setInlineStyle("height: 100px, width: 120px");
    newChild.setSource(
      "http://homepage.mac.com/awiner/.Pictures/WindyHill/PaleSwallowtail.jpg")
    uic.getChildren().add(newChild);

    ComponentChange aca = new AddChildComponentChange(newChild);

    ChangeManager apm = RequestContext.getCurrentInstance().getChangeManager();
    apm.addComponentChange(fc, uic, aca);
  }
View Full Code Here

    newFacetComponent.setStyleUsage("inContextBranding" );
    newFacetComponent.setValue(
      "Customer Company - Menlo Park");
    uic.getFacets().put("brandingAppContextual", newFacetComponent);

    ComponentChange afa = new SetFacetChildComponentChange("brandingAppContextual", newFacetComponent);

    ChangeManager apm = RequestContext.getCurrentInstance().getChangeManager();
    apm.addComponentChange(fc, uic, afa);
  }
View Full Code Here

    for(UIComponent child : children)
    {
      reorderedChildIdList.add(child.getId());
    }
   
    ComponentChange ra = new ReorderChildrenComponentChange(reorderedChildIdList);

    FacesContext fc = FacesContext.getCurrentInstance();
    ChangeManager apm = RequestContext.getCurrentInstance().getChangeManager();
    apm.addComponentChange(fc, uic, ra);
  }
View Full Code Here

    for (int i=0; i<removableFacetNames.length; i++)
    {
      if (facets.get(removableFacetNames[i]) != null)
      {
        facets.remove(removableFacetNames[i]);
        ComponentChange rfa = new RemoveFacetComponentChange(removableFacetNames[i]);
        FacesContext fc = FacesContext.getCurrentInstance();
        ChangeManager apm = RequestContext.getCurrentInstance().getChangeManager();
        apm.addComponentChange(fc, uic, rfa);
      }
    }
View Full Code Here

    UIComponent removableChild = _findChildById(uic, removableChildId);
    if (removableChild != null)
    {
      List<UIComponent> children = uic.getChildren();
      children.remove(removableChild);
      ComponentChange rca = new RemoveChildComponentChange(removableChildId);
      FacesContext fc = FacesContext.getCurrentInstance();
      ChangeManager apm = RequestContext.getCurrentInstance().getChangeManager();
      apm.addComponentChange(fc, uic, rca);
    }
  }
View Full Code Here

    Object attribValue
    )
  {
    FacesContext fc = FacesContext.getCurrentInstance();
    ChangeManager apm = RequestContext.getCurrentInstance().getChangeManager();
    ComponentChange aa = new AttributeComponentChange(attribName, attribValue);
    apm.addComponentChange(fc, uic, aa);
  }
View Full Code Here

    if (changeIter == null)
      return;
    while (changeIter.hasNext())
    {
      ComponentChange change = changeIter.next();
     
      change.changeComponent(uiComponent);
     
      //pu: In case this Change has added a new component/facet, the added
      //  component could have its own Changes, that may need to be applied here.
      if (change instanceof AddComponentChange)
      {
View Full Code Here

    if (changeIter == null)
      return;
    while (changeIter.hasNext())
    {
      ComponentChange change = changeIter.next();
     
      change.changeComponent(uiComponent);
     
      //pu: In case this Change has added a new component/facet, the added
      //  component could have its own Changes, that may need to be applied here.
      if (change instanceof AddComponentChange)
      {
View Full Code Here

    if (changeIter == null)
      return;
    while (changeIter.hasNext())
    {
      ComponentChange change = changeIter.next();
     
      change.changeComponent(uiComponent);
     
      //pu: In case this Change has added a new component/facet, the added
      //  component could have its own Changes, that may need to be applied here.
      if (change instanceof AddComponentChange)
      {
View Full Code Here

TOP

Related Classes of org.apache.myfaces.trinidad.change.ComponentChange

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.