[ 
https://issues.apache.org/jira/browse/MYFACES-2310?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12741522#action_12741522
 ] 

Leonardo Uribe commented on MYFACES-2310:
-----------------------------------------

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.

> Implement Composite Component feature
> -------------------------------------
>
>                 Key: MYFACES-2310
>                 URL: https://issues.apache.org/jira/browse/MYFACES-2310
>             Project: MyFaces Core
>          Issue Type: Task
>          Components: JSR-314
>            Reporter: Leonardo Uribe
>
> This issue contains all changes or subtasks needed to be done. This include 
> related tag handlers and code in other places.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to