• 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

JSF getter called on continue button on a page when needs to redirect url

 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator


used above way to build a datatable, for the first time mybean.prerender method never calls and first call goes to gettermethod panelGroup and i had continue button same page the bean.continue method doesnt invoke and instead it goes to getter method above panelgroup. IS it the way it should work ?. Thanks for your help.
 
Saloon Keeper
Posts: 27762
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
Welcome to the JavaRanch, Jagadesh!

Binding is actually not used/required very often in JSF. You can get a false impression that it is thanks to the fact that obsolete documentation can often crowd out more recent stuff on the Internet and that some of the less polite IDEs used it as a cheat to make their proprietary functions work, but in actuality, I only have one webapp that uses it and even it probably shouldn't have.

What binding does is bind the JSF internal component object directly to the backing bean. You only actually need to do this if you are dynamically modifying the component tree or have very unique requirements to access JSF's internals. Most of JSF is designed to work on POJOs, so the more JSF-specific code you have, the more likely you've made a design mistake.

A lot of people think you have to use dynamic component modification to show/hide elements or to change the size of a displayed table. In actuality, JSF has much simpler POJO mechanisms for that. To show/hide elements, you use the "rendered" element attribute. To change the number of rows in a table, you simply change the number of rows in the table's data model. If you have a limit on the actual number of displayed rows in your dataTable element definition, that particular property value (number of displayed rows) can be supplied from a backing bean POJO property via an EL expression.
reply
    Bookmark Topic Watch Topic
  • New Topic