wood burning stoves 2.0*
The moose likes JSF and the fly likes Dynamically create component from namespace and tag name Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » JSF
Bookmark "Dynamically create component from namespace and tag name" Watch "Dynamically create component from namespace and tag name" New topic
Author

Dynamically create component from namespace and tag name

Barney Barumba
Greenhorn

Joined: Dec 07, 2010
Posts: 1
Is there any way to create a component in Java based on the namespace and tag name, as entered in a .xhtml page? For example, to create a basic input text component I can do this:
But that requires me to do the mapping manually, and would not appear to work for composite components ("http://java.sun.com/jsf/composite"), which do not appear to have a registered component type. What I'd like to do is something like this: And have the framework do the work for me.

Cheers,

Barney
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Dynamically create component from namespace and tag name
 
Similar Threads
create component with ajax and listener behavior in java
Mystified by JSF 2 composition components
Can't render custom facelet component in IceFaces
JSF 1.2 Input Custom Component.
Using ValueExpression's in a validator tag