Package com.sun.jsftemplating.layout.descriptors

Examples of com.sun.jsftemplating.layout.descriptors.ComponentType


     *      defined so that it can be used implicitly.</p>
     */
    private ComponentType ensureMarkupType(LayoutElement elt) {
  // See if it is defined
  LayoutDefinition ld = elt.getLayoutDefinition();
  ComponentType type = null;
  try {
      type = getComponentType(elt, MARKUP_ELEMENT);
  } catch (IllegalArgumentException ex) {
      // Nope, define it...
      type = new ComponentType(MARKUP_ELEMENT, MARKUP_FACTORY_CLASS);
      ld.addComponentType(type);
  }

  // Return the type
  return type;
View Full Code Here


     *
     *  @return The {@link ComponentType}.
     */
    public ComponentType getComponentType(LayoutElement elt, String type) {
  // Find the ComponentType
  ComponentType compType =
      elt.getLayoutDefinition().getComponentType(type);
  if (compType == null) {
      // Check global component types (defined via @annotations).  This
      // is now the preferred way to define types, however, locally
      // defined types should have precedence
View Full Code Here

     *      {@link LayoutComponent}.
     *  @param  type  The type of component to create.
     */
    public LayoutComponent createLayoutComponent(LayoutElement parent, boolean nested, String type) throws IOException {
  // Ensure type is defined
  ComponentType componentType = LayoutDefinitionManager.
    getGlobalComponentType(null, type);
  if (componentType == null) {
      // Look for local mapping...
      String mappedType = getMappedType(type);
      if (mappedType != null) {
View Full Code Here

     *
     *  @return  A ComponentType instance for <code>factoryClass</code>.
     */
    private ComponentType getComponentType(String factoryClass) {
  // Check the cache
  ComponentType type = (ComponentType) _types.get(factoryClass);
  if (type == null) {
      // Not in the cache... add it...
      type = new ComponentType(factoryClass, factoryClass);
      Map<String, ComponentType> newMap =
        new HashMap<String, ComponentType>(_types);
      newMap.put(factoryClass, type);
      _types = newMap;
  }
View Full Code Here

    ctx, desc, colAttKeys.get(0), parent);
  int size = values.size();

  // Create the LC's for the columns
  List<LayoutComponent> columns = new ArrayList<LayoutComponent>(size);
  ComponentType colType =
      LayoutDefinitionManager.getGlobalComponentType(ctx, COLUMN_TYPE);
  for (int idx = 0; idx < size; idx++) {
      LayoutComponent column = new LayoutComponent(
    desc, id + COLUMN_SEPERATOR + idx, colType);
      columns.add(column);
View Full Code Here

                        is = url.openStream();
                        props.load(is);
                        for (Map.Entry<Object, Object> entry : props.entrySet()) {
                            // Add each property entry (key, ComponentType)
                            id = (String) entry.getKey();
                            types.put(id, new ComponentType(id, (String) entry.getValue()));
                        }
                    } finally {
                        Util.closeStream(is);
                    }
                }
View Full Code Here

    Node node = nl.item(i);
    String tagName = xpath.evaluate("f:tag-name", node);
    String componentType = xpath.evaluate("f:component/f:component-type", node);
    String id = nameSpace + ":" + tagName;
    types.put(id,
      new ComponentType(id, GenericFactory.class.getName(), componentType));
      }
  } catch (Exception e) {
      if (LogUtil.severeEnabled()) {
    LogUtil.severe(e.getMessage());
      }
View Full Code Here

TOP

Related Classes of com.sun.jsftemplating.layout.descriptors.ComponentType

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.