Details

    • Type: Task
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 2.0.0-alpha
    • Component/s: JSR-314
    • Labels:
      None

      Description

      This issue contains all changes or subtasks needed to be done. This include related tag handlers and code in other places.

        Issue Links

          Activity

          Hide
          lu4242 Leonardo Uribe added a comment -

          Some ideas to take as base for implement this feature:

          • This methods have something to do with it:

          Resource.COMPONENT_RESOURCE_KEY (used to associate the Resource instance used to create a composite component in the component attribute map)
          Application.createComponent(FacesContext, Resource)
          UIComponent.CURRENT_COMPOSITE_COMPONENT
          UIComponent.BEANINFO_KEY
          UIComponent.FACETS_KEY
          UIComponent.COMPOSITE_COMPONENT_TYPE_KEY
          UIComponent.COMPOSITE_FACET_NAME
          UIComponent.getResourceBundleMap
          UIComponent.pushComponentToEL
          UIComponent.popComponentFromEL
          UIComponent.isCompositeComponent
          UIComponent.getCompositeComponentParent
          UIComponent.getCurrentCompositeComponent
          CompositeComponentExpressionHolder
          ViewDeclarationLanguage.getComponentMetadata
          ViewDeclarationLanguage.retargetAttachedObjects
          ViewDeclarationLanguage.retargetMethodExpressions
          All AttachedObjectTarget instances

          • The following tags are used to define composite component metadata:

          composite:interface
          composite:attribute
          composite:facet
          composite:valueHolder
          composite:editableValueHolder
          composite:actionSource
          composite:extension

          • The following tags are used to define composite component behavior on rendering time:

          composite:implementation
          composite:insertChildren
          composite:renderFacet
          composite:insertFacet
          (other jsf components)

          • composite libraries could be registered from facelets tag library xml with its own namespace

          <facelet-taglib>
          <namespace>http://some.domain.com/path</namespace>
          <composite-library-name>compositeLibName</composite-library-name>
          </facelet-taglib>

          Assumptions:

          • Each tag should have its own Tag Handler class
          • It is necessary to do two facelets Library instances, one for deal with "composite" namespace and the other one to deal with composite components itself.
          • One additional tag handler should be used for wrap composite component (returned by a library when a composite component is found).
          • It is necessary to do a implementation of BeanInfo for composite components.
          • Composite components should have a implementation per each AttachedObjectTarget class.
          • In facelets, ComponentTagHandlerDelegate is responsible from call Application.createComponent. But for composite components it is necessary to call Application.createComponent(FacesContext, Resource). The problem is that the only one who knows when and how we should to build a composite component is the delegate tag handler, so we should find a way to ask delegate tag handler when it is necessary to do that.
          • To create composite component metadata (this is done on ViewDeclarationLanguage.getComponentMetadata), it is necessary to "apply" the section part inside tag "composite:interface" inside a resource file. So, it is necessary some way to comunicate that we are building metadata during this method. Other "apply" code inside other tag handlers should be disabled or ignored, but really the only interesting part in this step is get the BeanInfo object.
          Show
          lu4242 Leonardo Uribe added a comment - Some ideas to take as base for implement this feature: This methods have something to do with it: Resource.COMPONENT_RESOURCE_KEY (used to associate the Resource instance used to create a composite component in the component attribute map) Application.createComponent(FacesContext, Resource) UIComponent.CURRENT_COMPOSITE_COMPONENT UIComponent.BEANINFO_KEY UIComponent.FACETS_KEY UIComponent.COMPOSITE_COMPONENT_TYPE_KEY UIComponent.COMPOSITE_FACET_NAME UIComponent.getResourceBundleMap UIComponent.pushComponentToEL UIComponent.popComponentFromEL UIComponent.isCompositeComponent UIComponent.getCompositeComponentParent UIComponent.getCurrentCompositeComponent CompositeComponentExpressionHolder ViewDeclarationLanguage.getComponentMetadata ViewDeclarationLanguage.retargetAttachedObjects ViewDeclarationLanguage.retargetMethodExpressions All AttachedObjectTarget instances The following tags are used to define composite component metadata: composite:interface composite:attribute composite:facet composite:valueHolder composite:editableValueHolder composite:actionSource composite:extension The following tags are used to define composite component behavior on rendering time: composite:implementation composite:insertChildren composite:renderFacet composite:insertFacet (other jsf components) composite libraries could be registered from facelets tag library xml with its own namespace <facelet-taglib> <namespace> http://some.domain.com/path </namespace> <composite-library-name>compositeLibName</composite-library-name> </facelet-taglib> Assumptions: Each tag should have its own Tag Handler class It is necessary to do two facelets Library instances, one for deal with "composite" namespace and the other one to deal with composite components itself. One additional tag handler should be used for wrap composite component (returned by a library when a composite component is found). It is necessary to do a implementation of BeanInfo for composite components. Composite components should have a implementation per each AttachedObjectTarget class. In facelets, ComponentTagHandlerDelegate is responsible from call Application.createComponent. But for composite components it is necessary to call Application.createComponent(FacesContext, Resource). The problem is that the only one who knows when and how we should to build a composite component is the delegate tag handler, so we should find a way to ask delegate tag handler when it is necessary to do that. To create composite component metadata (this is done on ViewDeclarationLanguage.getComponentMetadata), it is necessary to "apply" the section part inside tag "composite:interface" inside a resource file. So, it is necessary some way to comunicate that we are building metadata during this method. Other "apply" code inside other tag handlers should be disabled or ignored, but really the only interesting part in this step is get the BeanInfo object.

            People

            • Assignee:
              lu4242 Leonardo Uribe
              Reporter:
              lu4242 Leonardo Uribe
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development