samedi 21 mars 2015

How to identify backing bean properties needed for any given JSF component?



I'm just starting out with JSF so I apologize if this is a n00b question, but: How do you identify what backing bean properties will be needed for a JSF component? Here's a component use case from the RichFaces library, for example:



<rich:calendar value="#{calendarBean.selectedDate}" id="calendar" locale="#{calendarBean.locale}"
popup="#{calendarBean.popup}" datePattern="#{calendarBean.pattern}"
showApplyButton="#{calendarBean.showApply}" cellWidth="24px" cellHeight="22px" style="width:200px"
disabled="#{calendarBean.disabled}">
</rich:calendar>


Do I need ALL the control properties in my backing bean, or just the six that are referenced in this particular usage? Is there a pre-built backing bean that I can subclass that has all this stuff in it already? The documentation seems a little sparse in this area, not just for RichFaces but all over the JSF world.




Aucun commentaire:

Enregistrer un commentaire