Package org.apache.myfaces.trinidadinternal.metadata.RegionMetadata

Examples of org.apache.myfaces.trinidadinternal.metadata.RegionMetadata.ComponentMetaData


processRegion:
    {
      _LOG.finest("componentType is:{0}", regionType);
      RegionMetadata rmd =
        RegionMetadata.getRegionMetadata(getFacesContext());
      ComponentMetaData cmd = (ComponentMetaData) rmd.getRegionConfig(regionType);
      if (cmd == null)
      {
        _LOG.severe("Could not find metadata for componentType:{0} in region-metadata",
          regionType);
        break processRegion;
      }

      boolean hasErrors = _typeConvertAndDefaultAttrs(regionType, cmd);
      if (hasErrors)
        break processRegion;

      String page = cmd.getJspUIDef();

      _LOG.finest("Including page:{0}", page);

      try
      {
View Full Code Here


processRegion:
    {
      _LOG.finest("componentType is:{0}", regionType);
      RegionMetadata rmd =
        RegionMetadata.getRegionMetadata(getFacesContext());
      ComponentMetaData cmd = (ComponentMetaData) rmd.getRegionConfig(regionType);
      if (cmd == null)
      {
        _LOG.severe("CANNOT_FIND_COMPONENTTYPE_METADATA_IN_REGION_METADATA", regionType);
        break processRegion;
      }

      boolean hasErrors = _typeConvertAndDefaultAttrs(regionType, cmd);
      if (hasErrors)
        break processRegion;

      String page = cmd.getJspUIDef();

      _LOG.finest("Including page:{0}", page);

      try
      {
View Full Code Here

processRegion:
    {
      _LOG.finest("componentType is:{0}", regionType);
      RegionMetadata rmd =
        RegionMetadata.getRegionMetadata(getFacesContext());
      ComponentMetaData cmd = (ComponentMetaData) rmd.getRegionConfig(regionType);
      if (cmd == null)
      {
        _LOG.severe("CANNOT_FIND_COMPONENTTYPE_METADATA_IN_REGION_METADATA", regionType);
        break processRegion;
      }

      boolean hasErrors = _typeConvertAndDefaultAttrs(regionType, cmd);
      if (hasErrors)
        break processRegion;

      String page = cmd.getJspUIDef();

      _LOG.finest("Including page:{0}", page);

      try
      {
View Full Code Here

  private void _testRegionMetadata(FacesContext context)
  {
    RegionMetadata rmd = RegionMetadata.getRegionMetadata(context);

    ComponentMetaData comp =
      (ComponentMetaData) rmd.getRegionConfig("org.apache.myfaces.trinidad.view.test.TestRegion1");
    assertEquals("/regions/testRegion1.jspx", comp.getJspUIDef());
    List<AttributeMetaData> attrs = comp.getAttributes();
    assertEquals(2, attrs.size());

    AttributeMetaData attr = attrs.get(0);
    assertEquals("stock", attr.getAttrName());
    assertEquals(Integer.class, attr.getAttrClass());
    assertTrue(attr.isRequired());
    assertNull(attr.getDefaultValue());

    attr = attrs.get(1);
    assertEquals("desc", attr.getAttrName());
    assertEquals(String.class, attr.getAttrClass());
    assertFalse(attr.isRequired());
    assertEquals("Test", attr.getDefaultValue());

    comp = (ComponentMetaData) rmd.getRegionConfig("org.apache.myfaces.trinidad.view.test.TestRegion2");
    assertEquals("/regions/testRegion2.jspx", comp.getJspUIDef());
    attrs = comp.getAttributes();
    assertEquals(0, attrs.size());

    comp = (ComponentMetaData) rmd.getRegionConfig("org.apache.myfaces.trinidad.view.test.TestRegion3");
    assertEquals("/regions/testRegion3.jspx", comp.getJspUIDef());
    attrs = comp.getAttributes();
    assertEquals(0, attrs.size());
  }
View Full Code Here

processRegion:
    {
      _LOG.finest("componentType is:{0}", regionType);
      RegionMetadata rmd =
        RegionMetadata.getRegionMetadata(getFacesContext());
      ComponentMetaData cmd = (ComponentMetaData) rmd.getRegionConfig(regionType);
      if (cmd == null)
      {
        _LOG.severe("CANNOT_FIND_COMPONENTTYPE_METADATA_IN_REGION_METADATA", regionType);
        break processRegion;
      }

      boolean hasErrors = _typeConvertAndDefaultAttrs(regionType, cmd);
      if (hasErrors)
        break processRegion;

      String page = cmd.getJspUIDef();

      _LOG.finest("Including page:{0}", page);

      try
      {
View Full Code Here

TOP

Related Classes of org.apache.myfaces.trinidadinternal.metadata.RegionMetadata.ComponentMetaData

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.