Package com.sun.jsftemplating.component

Examples of com.sun.jsftemplating.component.ComponentUtil


// FIXME: Add support for other hyperlink properties??

  // Create Hyperlink
  // NOTE: Last attribute "content" will be the facet named used.
  FacesContext ctx = FacesContext.getCurrentInstance();
  ComponentUtil compUtil = ComponentUtil.getInstance(ctx);
  UIComponent imageLink = compUtil.getChild(
      comp, "imagelink",
      "com.sun.jsftemplating.component.factory.sun.ImageHyperlinkFactory",
      props, "image");

  // Force HTML renderer so we can use dynafaces safely.
  imageLink.setRendererType("com.sun.webui.jsf.ImageHyperlink");

  // We don't want the imageHyperlink to have the following property, so
  // set it after creating it
  setProperty(props, "text", comp.getAttributes().get("text"));
  UIComponent link = compUtil.getChild(
      comp, "link",
      "com.sun.jsftemplating.component.factory.sun.HyperlinkFactory",
      props, "content");

  // Force HTML renderer so we can use dynafaces safely.
View Full Code Here


// FIXME: Add support for other hyperlink properties??

  // Create Hyperlink
  // NOTE: Last attribute "content" will be the facet named used.
  FacesContext ctx = FacesContext.getCurrentInstance();
  ComponentUtil compUtil = ComponentUtil.getInstance(ctx);
  UIComponent imageLink = compUtil.getChild(
      comp, "imagelink",
      "com.sun.jsftemplating.component.factory.sun.ImageHyperlinkFactory",
      props, "image");

  // Force HTML renderer so we can use dynafaces safely.
  imageLink.setRendererType("com.sun.webui.jsf.ImageHyperlink");

  // We don't want the imageHyperlink to have the following property, so
  // set it after creating it
  setProperty(props, "text", comp.getAttributes().get("text"));
  UIComponent link = compUtil.getChild(
      comp, "link",
      "com.sun.jsftemplating.component.factory.sun.HyperlinkFactory",
      props, "content");

  // Force HTML renderer so we can use dynafaces safely.
View Full Code Here

// FIXME: Add support for other hyperlink properties??

  // Create Hyperlink
  // NOTE: Last attribute "content" will be the facet named used.
  FacesContext ctx = FacesContext.getCurrentInstance();
  ComponentUtil compUtil = ComponentUtil.getInstance(ctx);
  UIComponent imageLink = compUtil.getChild(
      comp, "imagelink",
      "com.sun.jsftemplating.component.factory.sun.ImageHyperlinkFactory",
      props, "image");

  // Force HTML renderer so we can use dynafaces safely.
  imageLink.setRendererType("com.sun.webui.jsf.ImageHyperlink");

  // We don't want the imageHyperlink to have the following property, so
  // set it after creating it
  setProperty(props, "text", comp.getAttributes().get("text"));
  UIComponent link = compUtil.getChild(
      comp, "link",
      "com.sun.jsftemplating.component.factory.sun.HyperlinkFactory",
      props, "content");

  // Force HTML renderer so we can use dynafaces safely.
View Full Code Here

        // FIXME: Add support for other hyperlink properties??

        // Create Hyperlink
        // NOTE: Last attribute "content" will be the facet named used.
        FacesContext ctx = FacesContext.getCurrentInstance();
        ComponentUtil compUtil = ComponentUtil.getInstance(ctx);
        UIComponent link = compUtil.getChild(comp, "link",
                "com.sun.jsftemplating.component.factory.sun.HyperlinkFactory",
                props, "content");

        // Check to see if we have a childURL, evalute it here (after component
        // is created, before rendered) so we can use the link itself to define
View Full Code Here

  // Set all the attributes / properties
  setOptions(context, descriptor, comp);

  // Check to see if the user is passing in Lists to be converted to a
  // List of Option objects for the "items" property.
  ComponentUtil compUtil = ComponentUtil.getInstance(context);
  Object labels = compUtil.resolveValue(
    context, descriptor, comp, descriptor.getOption("labels"));
  if (labels != null) {
      List optionList = new ArrayList();
      Object values = compUtil.resolveValue(
        context, descriptor, comp, descriptor.getOption("values"));
      if (values == null) {
    values = labels;
      }
View Full Code Here

  // First pull off the id from the descriptor
  String id = this.getId(context, parent);

  // We have an id, use it to search for an already-created child
  ComponentUtil compUtil = ComponentUtil.getInstance(context);
  childComponent = compUtil.findChild(parent, id, id);
  if (childComponent != null) {
      return childComponent;
  }

  // Invoke "beforeCreate" handlers
  this.beforeCreate(context, parent);

  // Create UIComponent
  childComponent = compUtil.createChildComponent(context, this, parent);

  // Invoke "afterCreate" handlers
  this.afterCreate(context, childComponent);

  // Return the newly created UIComponent
View Full Code Here

  // Set all the attributes / properties
  setOptions(context, descriptor, comp);

  // Handle "data" option specially...
  ComponentUtil compUtil = ComponentUtil.getInstance(context);
  Object data = compUtil.resolveValue(
    context, descriptor, comp, descriptor.getOption("data"));
  if (data != null) {
      // Create a DataProvider
      if (!(data instanceof List)) {
    throw new IllegalArgumentException("TableRowGroupFactory "
View Full Code Here

  UIComponent columnComp = null;
  String value = null;
  Object eventVal = null;
  values = getColumnPropertyValues(ctx, desc, COLUMN_VALUE_KEY, parent);
  int idx = 0;
  ComponentUtil compUtil = ComponentUtil.getInstance(ctx);
  for (LayoutComponent columnDesc : columns) {
      columnComp = compUtil.createChildComponent(
        ctx, columnDesc, comp);

      value = "" + values.get(idx++);
      eventVal = desc.dispatchHandlers(ctx,
        CreateChildEvent.EVENT_TYPE,
        new CreateChildEvent(columnComp, value));

      if ((eventVal != null) && (eventVal instanceof UIComponent)) {
    // Add the child created during the event.
    columnComp.getChildren().add((UIComponent) eventVal);
      } else {
    // Create the column (value) child
    // The child of each TableColumn will be a LayoutStaticText for now...
    compUtil.createChildComponent(ctx,
      new LayoutStaticText(columnDesc,
          columnDesc.getUnevaluatedId() + CHILD_SUFFIX, value),
      columnComp);
      }
  }
View Full Code Here

TOP

Related Classes of com.sun.jsftemplating.component.ComponentUtil

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.