Package javax.faces.component

Examples of javax.faces.component.UIComponent


    int i = 0;
    for (UIComponent child : (List<UIComponent>) data.getChildren()) {
      if (child instanceof UIColumnEvent) {
        UIColumnEvent columnEvent = (UIColumnEvent) child;
        if (columnEvent.isRendered()) {
          UIComponent selectionChild = (UIComponent) child.getChildren().get(0);
          if (selectionChild != null && selectionChild instanceof UICommand && selectionChild.isRendered()) {
            UICommand action = (UICommand) selectionChild;
            if ("click".equals(columnEvent.getEvent())) {
              clickAction = action;
            }
            if ("dblclick".equals(columnEvent.getEvent())) {
              dblClickAction = action;
            }
          }
        }
      } else if (child instanceof UIColumnSelector) {
        columnSelectorIndex = i;
      }
      i++;
    }

    renderSheet(facesContext, data, (clickAction != null || dblClickAction != null));

    writer.endElement(HtmlConstants.DIV);

    ResourceManager resourceManager = ResourceManagerFactory.getResourceManager(facesContext);
    UIViewRoot viewRoot = facesContext.getViewRoot();
    String contextPath = facesContext.getExternalContext().getRequestContextPath();

    String unchecked = contextPath + resourceManager.getImage(viewRoot, "image/sheetUnchecked.gif");
    String checked = contextPath + resourceManager.getImage(viewRoot, "image/sheetChecked.gif");
    boolean ajaxEnabled = TobagoConfig.getInstance(facesContext).isAjaxEnabled();

    final String[] styles = new String[]{"style/tobago-sheet.css"};
    final String[] scripts = new String[]{"script/tobago-sheet.js"};
    Integer frequency = null;
    UIComponent facetReload = data.getFacet(TobagoConstants.FACET_RELOAD);
    if (facetReload != null && facetReload instanceof UIReload && facetReload.isRendered()) {
      UIReload update = (UIReload) facetReload;
      frequency = update.getFrequency();
    }
    final String[] cmds = {
        "new Tobago.Sheet(\"" + sheetId + "\", " + ajaxEnabled
View Full Code Here


     */
    protected UIForm getForm(
        final FacesContext context,
        final UIComponent component)
    {
        UIComponent parent = component.getParent();
        while (parent != null)
        {
            if (parent instanceof UIForm)
            {
                break;
            }
            parent = parent.getParent();
        }
        return (UIForm)parent;
    }
View Full Code Here

        }
        if (event == null)
        {
            throw new NullPointerException();
        }
        UIComponent parent = getParent();
        if (parent == null)
        {
            throw new IllegalStateException();
        }
        parent.queueEvent(event);
    }
View Full Code Here

        }
        if (event == null)
        {
            throw new NullPointerException();
        }
        UIComponent parent = getParent();
        if (parent == null)
        {
            throw new IllegalStateException();
        }
        parent.queueEvent(event);
    }
View Full Code Here

    }

    public static UIComponent findComponent(final FacesContext context, final String componentId)
        throws ValidatorException
    {
        UIComponent component = null;
        final int index = componentId.indexOf(':');
        if (index != -1)
        {
            final String parentId = componentId.substring(0, index);
            UIComponent parent = context.getViewRoot().findComponent(parentId);
            if (parent == null)
            {
                throw new ValidatorException("No component with id: " + parentId + " could be found on view!");
            }
            final String restOfId = componentId.substring(index + 1, componentId.length());
View Full Code Here

    private static final char COMPONENT_NAME_SEPERATOR = ':';

    public static UIComponent findComponent(final FacesContext context, final UIComponent parent, String componentId)
    {
        UIComponent component = null;
        final int index = componentId.indexOf(COMPONENT_NAME_SEPERATOR);
        if (index != -1)
        {
            final String firstId = componentId.substring(0, index);
            component = findChildComponent(parent, firstId);
View Full Code Here

        return component;
    }

    public static UIComponent findChildComponent(final UIComponent component, final String id)
    {
        UIComponent child = null;
        if (component != null && component.getId().equals(id))
        {
            child = component;
        }
        else
View Full Code Here

                }
            }
        }
        for (final Iterator iterator = component.getFacetsAndChildren(); iterator.hasNext();)
        {
            final UIComponent childComponent = (UIComponent)iterator.next();
            this.findValidators(
                childComponent,
                context,
                form);
        }
View Full Code Here

        if (component != null)
        {
            canValidate = component.isRendered();
            if (canValidate)
            {
                final UIComponent parent = component.getParent();
                if (parent != null)
                {
                    canValidate = canValidate(parent);
                }
            }
View Full Code Here

     */
    private final Collection forms = new ArrayList();

    private UIComponent findForm(final String id)
    {
        UIComponent form = null;
        UIComponent validator = null;
        try
        {
            validator = this.findComponent(id);
        }
        catch (NullPointerException exception)
        {
            // ignore - means we couldn't find the component
        }
        if (validator instanceof JSFValidatorComponent)
        {
            final UIComponent parent = validator.getParent();
            if (parent instanceof UIComponent)
            {
                form = (UIComponent)parent;
            }
        }
View Full Code Here

TOP

Related Classes of javax.faces.component.UIComponent

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.