• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Need suggestion

 
Ranch Hand
Posts: 261
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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?
 
Simpson Kumar
Ranch Hand
Posts: 261
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
No reply ???
 
Saloon Keeper
Posts: 27764
196
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
Acetylsalicylic acid is aspirin. This could be handy too:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic