Package javax.faces.component

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


            if (parentUniqueIdVendor == null)
            {
                UIViewRoot viewRoot = context.getViewRoot();
                if (viewRoot != null)
                {
                    id = viewRoot.createUniqueId();
                }
                else
                {
                    // The RI throws a NPE
                    String location = getComponentLocation(this);
View Full Code Here


    Application application = facesContext.getApplication();
    UIViewRoot viewRoot = facesContext.getViewRoot();

    // previous
    UICommand previous = (UICommand) application.createComponent(UICommand.COMPONENT_TYPE);
    previous.setId(viewRoot.createUniqueId());
    previous.setRendererType(null);
    previous.getAttributes().put(Attributes.IMAGE, "image/tabPrev.gif");
    previous.setOmit(true); // avoid submit
    // next
    UICommand next = (UICommand) application.createComponent(UICommand.COMPONENT_TYPE);
View Full Code Here

    previous.setRendererType(null);
    previous.getAttributes().put(Attributes.IMAGE, "image/tabPrev.gif");
    previous.setOmit(true); // avoid submit
    // next
    UICommand next = (UICommand) application.createComponent(UICommand.COMPONENT_TYPE);
    next.setId(viewRoot.createUniqueId());
    next.setRendererType(null);
    next.getAttributes().put(Attributes.IMAGE, "image/tabNext.gif");
    next.setOmit(true); // avoid submit

    // all: sub menu to select any tab directly
View Full Code Here

    next.getAttributes().put(Attributes.IMAGE, "image/tabNext.gif");
    next.setOmit(true); // avoid submit

    // all: sub menu to select any tab directly
    UICommand all = (UICommand) CreateComponentUtils.createComponent(
        facesContext, UICommand.COMPONENT_TYPE, null, viewRoot.createUniqueId());
    all.setOmit(true); // avoid submit

    UIMenu menu = (UIMenu) CreateComponentUtils.createComponent(
        facesContext, UIMenu.COMPONENT_TYPE, RendererTypes.MENU, viewRoot.createUniqueId());
    menu.setTransient(true);
View Full Code Here

    UICommand all = (UICommand) CreateComponentUtils.createComponent(
        facesContext, UICommand.COMPONENT_TYPE, null, viewRoot.createUniqueId());
    all.setOmit(true); // avoid submit

    UIMenu menu = (UIMenu) CreateComponentUtils.createComponent(
        facesContext, UIMenu.COMPONENT_TYPE, RendererTypes.MENU, viewRoot.createUniqueId());
    menu.setTransient(true);
    ComponentUtils.addCurrentMarkup(menu, Markup.TOP);
    FacetUtils.setDropDownMenu(all, menu);
    int index = 0;
    for (UIComponent child : tabGroup.getChildren()) {
View Full Code Here

    for (UIComponent child : tabGroup.getChildren()) {
      if (child instanceof UITab) {
        UITab tab = (UITab) child;
        if (tab.isRendered()) {
          UIMenuCommand entry = (UIMenuCommand) CreateComponentUtils.createComponent(
              facesContext, UIMenuCommand.COMPONENT_TYPE, RendererTypes.MENU_COMMAND, viewRoot.createUniqueId());
          entry.setTransient(true);
          entry.setOmit(true); // avoid submit
          LabelWithAccessKey label = new LabelWithAccessKey(tab);
          entry.setLabel(label.getText());
          if (tab.isDisabled()) {
View Full Code Here

        }
        index++;
      }
    }
    UIToolBar toolBar = (UIToolBar) application.createComponent(UIToolBar.COMPONENT_TYPE);
    toolBar.setId(viewRoot.createUniqueId());
    toolBar.setRendererType("TabGroupToolBar");
    toolBar.setTransient(true);
    toolBar.getChildren().add(previous);
    toolBar.getChildren().add(next);
    toolBar.getChildren().add(all);
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();
        assertNotNull(root);

        UINamingContainer namingContainer = (UINamingContainer) application.createComponent("javax.faces.NamingContainer");
       
        namingContainer.setId(root.createUniqueId());
        root.getChildren().add(root.getChildCount(), namingContainer);

        //create a form 1
        UIComponent form1 = this.createForm("test1", namingContainer);
       
View Full Code Here

    final Application application = facesContext.getApplication();
    final UIViewRoot viewRoot = facesContext.getViewRoot();

    // previous
    final UICommand previous = (UICommand) application.createComponent(UICommand.COMPONENT_TYPE);
    previous.setId(viewRoot.createUniqueId());
    previous.setRendererType(null);
    previous.getAttributes().put(Attributes.IMAGE, "image/tabPrev.gif");
    previous.setOmit(true); // avoid submit
    ComponentUtils.putDataAttribute(previous, "tobago-tabgroup-toolbar-prev", "p");
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.