You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@myfaces.apache.org by Stephen More <st...@gmail.com> on 2012/04/16 15:30:40 UTC
Programmaticly adding composite component with myfaces
Here is an example how Mojarra can add composite components
programmaticly:
http://maven-examples.googlecode.com/svn/trunk/jsf-dynamic-component/
( Built from http://stackoverflow.com/questions/5370184/how-to-programmatically-or-dynamically-create-a-composite-component-in-jsf-2
)
Can this same process be done in MyFaces ? If so is there any code
snippets I could use to build a working example ?
-Thanks
Re: Programmaticly adding composite component with myfaces
Posted by Leonardo Uribe <lu...@gmail.com>.
Hi
That is outside JSF 2.0 spec, so it is implementation specific.
The problem with that strategy is PSS algorithm. It is better to use
<ui:include src="#{}"> or <c:if ...> or <c:when ...> to achieve some
dynamic behavior over component tree, and let MyFaces take care of the
details behind PSS algorithm (mark initial state, store information
about dynamic behavior, ....).
regards,
Leonardo Uribe
2012/4/16 Stephen More <st...@gmail.com>:
> Here is an example how Mojarra can add composite components
> programmaticly:
> http://maven-examples.googlecode.com/svn/trunk/jsf-dynamic-component/
> ( Built from http://stackoverflow.com/questions/5370184/how-to-programmatically-or-dynamically-create-a-composite-component-in-jsf-2
> )
>
> Can this same process be done in MyFaces ? If so is there any code
> snippets I could use to build a working example ?
>
>
> -Thanks