This week's book giveaway is in the OCMJEA forum.
We're giving away four copies of OCM Java EE 6 Enterprise Architect Exam Guide and have Paul Allen & Joseph Bambara on-line!
See this thread for details.
The moose likes JSF and the fly likes Need suggestion Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCM Java EE 6 Enterprise Architect Exam Guide this week in the OCMJEA forum!
JavaRanch » Java Forums » Java » JSF
Bookmark "Need suggestion" Watch "Need suggestion" New topic
Author

Need suggestion

Simpson Kumar
Ranch Hand

Joined: Mar 19, 2008
Posts: 261
We have a web project which drives attributes from properties file dynamically, i.e. one config file with the attributes list and each attribute's view (either text box, textarea, radio, checkbox,etc) on UI page will be decided from that config file, so there is no static fields on the UI side.

I can do it with JSP and Servlets, but I need to write lot of code to load those properties and display them. Is there any chance we can do it from JSF? can any other solutions to do it? please give me the way to do it from JSF/other?


Thanks,
Kumar
Simpson Kumar
Ranch Hand

Joined: Mar 19, 2008
Posts: 261
No reply ???
Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 16020
    
  20

Yes, you can generate JSF views dynamically. All of the view objects have corresponding classes. For example, the <h:inputText> control is implemented via the HtmlInputText class.

You have to build up the view as a tree, and the easiest way to do that is to put as much of the page as possible into static JSF page elements (CSS skinning may help), then construct the rest from Java code.

It's not exactly a trivial task, but we do it often.


Customer surveys are for companies who didn't pay proper attention to begin with.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Need suggestion