Win a copy of Cross-Platform Desktop Applications: Using Node, Electron, and NW.js this week in the JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

JSF data driven select boxes  RSS feed

 
Bill Dornbush
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am developing my first JSF application. I found "JavaServer Faces in Action," by Kito Mann, to be a great help in getting started.

The application includes a directory listing for families and individuals, and supports multiple organizations. One feature is attribute tables by organization, so that a person can indicate their attributes chosen from a list supplied by the organization. Standard JSF seems to only support fixed contents of list boxes, but I need to be able to include the drop-down content driven by the organization that a person is part of. Can AJAX help me with this? Are there other approaches that would also work, or would be preferred?
 
John Fallows
Author
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Bill,

Take a look at the <f:selectItems> tag in the standard JSF core tag library. This will allow you to specify a data-driven list of select items for any of the <h:selectOne*> or <h:selectMany*> component tags.

Using Ajax to further enhance this type of select-one or select-many component would allow you to update the displayed options at the browser without requiring a traditional full-page submit.

Kind Regards.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!