Package javax.faces.component

Examples of javax.faces.component.UIViewRoot.createUniqueId()


  protected void onComponentCreated(FaceletContext faceletContext, UIComponent menuCommand, UIComponent parent) {

    Application application = faceletContext.getFacesContext().getApplication();
    UIViewRoot root = ComponentSupport.getViewRoot(faceletContext, parent);
    UIComponent component = application.createComponent(getSubComponentType());
    component.setId(root.createUniqueId());
    component.setRendererType(null);
    setAttributes(faceletContext, component);
    menuCommand.getFacets().put(TobagoConstants.FACET_ITEMS, component);
  }
View Full Code Here


            {
                UIViewRoot root = facesContext.getViewRoot();
                root.getAttributes().put(RESOURCE_DEPENDENCY_UNIQUE_ID_KEY, Boolean.TRUE);
                try
                {
                    String uid = root.createUniqueId(facesContext, null);
                    component.setId(uid);
                }
                finally
                {
                    root.getAttributes().put(RESOURCE_DEPENDENCY_UNIQUE_ID_KEY, Boolean.FALSE);
View Full Code Here

                    }
                    if (state.length == 3)
                    {
                        if (view.getId() == null)
                        {
                            view.setId(view.createUniqueId(context, null));
                        }
                        //Jump to where the count is
                        view.getAttributes().put(UNIQUE_ID_COUNTER_KEY, state[2]);
                    }
                }
View Full Code Here

      Application application = faceletContext.getFacesContext().getApplication();
      UIViewRoot root = ComponentSupport.getViewRoot(faceletContext, parent);

      UIForm form = (UIForm) application.createComponent(UIForm.COMPONENT_TYPE);
      form.setRendererType(RendererTypes.FORM);
      form.setId(formIdAttribute != null ? formIdAttribute.getValue(faceletContext) : root.createUniqueId());
      panel.getChildren().add(form);

      UIDatePicker picker = (UIDatePicker) application.createComponent(UIDatePicker.COMPONENT_TYPE);
      picker.setRendererType(RendererTypes.DATE_PICKER);
      picker.setFor("@auto");
View Full Code Here

      panel.getChildren().add(form);

      UIDatePicker picker = (UIDatePicker) application.createComponent(UIDatePicker.COMPONENT_TYPE);
      picker.setRendererType(RendererTypes.DATE_PICKER);
      picker.setFor("@auto");
      picker.setId(pickerIdAttribute != null ? pickerIdAttribute.getValue(faceletContext) : root.createUniqueId());
      if (picker.getAttributes().get(OnComponentCreated.MARKER) == null) {
        picker.getAttributes().put(OnComponentCreated.MARKER, Boolean.TRUE);
        picker.onComponentCreated(faceletContext.getFacesContext(), panel);
      }
      form.getChildren().add(picker);
View Full Code Here

    addLabel(faceletContext, (UIPanel) panel, root);
    String uid;
    if (fieldIdAttribute !=  null) {
      uid = fieldIdAttribute.getValue(faceletContext);
    } else {
      uid = root.createUniqueId();
    }
    if (checkForAlreadyCreated(panel, uid)) {
      return;
    }
View Full Code Here

    UIComponent component = application.createComponent(getSubComponentType());
    final String uid;
    if (fieldIdAttribute !=  null) {
      uid = fieldIdAttribute.getValue(faceletContext);
    } else {
      uid = root.createUniqueId();
    }
    component.setId(uid);
    component.setRendererType(getSubRendererType());
    setSubComponentAttributes(faceletContext, component);
    menuCommand.getFacets().put(getFacetName(), component);
View Full Code Here

                            }
                        }
                    }
                    if (view.getId() == null)
                    {
                        view.setId(view.createUniqueId(context, null));
                    }
                    if (faceletViewState != null)
                    {
                        view.getAttributes().put(ComponentSupport.FACELET_STATE_INSTANCE,  faceletViewState);
                    }
View Full Code Here

            {
                UIViewRoot root = facesContext.getViewRoot();
                root.getAttributes().put(RESOURCE_DEPENDENCY_UNIQUE_ID_KEY, Boolean.TRUE);
                try
                {
                    String uid = root.createUniqueId(facesContext, null);
                    component.setId(uid);
                }
                finally
                {
                    root.getAttributes().put(RESOURCE_DEPENDENCY_UNIQUE_ID_KEY, Boolean.FALSE);
View Full Code Here

            {
                UIViewRoot root = facesContext.getViewRoot();
                root.getAttributes().put(RESOURCE_DEPENDENCY_UNIQUE_ID_KEY, Boolean.TRUE);
                try
                {
                    String uid = root.createUniqueId(facesContext, null);
                    component.setId(uid);
                }
                finally
                {
                    root.getAttributes().put(RESOURCE_DEPENDENCY_UNIQUE_ID_KEY, Boolean.FALSE);
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.