Hi,

Trying to understand the logic behind jsf calling getters and setters on the 
properties of the backing bean.  Seems like sometimes it calls a setter, and 
sometimes a getter.  Is there a pattern to it described anywhere?  Could 
someone please point me in the right direction or give an explanation.

I'm attaching a faces-config.xml file along with the jsp page for your 
reference.  By looking at the log that my app generates, it seems that before 
postback, very first time around, if out of 2 managed-property beans 
(reportingPeriod and categories) registered in faces-config.xml one is a 
regular bean and another one is a map (like 'categories' in my case), then JSF 
on its parent bean's initialization  calls a setter property, whereas if a 
managed-property is a map then the parent initialization is calling 
the getter instead.  



 <<search.jsp>>  <<maintenance-faces-config-beans.xml>> 

Here is an excerpt from the log file:

14:41:42,125  INFO SearchHandler:? - Entering Constructor...
14:41:42,125 DEBUG SearchHandler:? - getPeriod(): null
14:41:42,125 DEBUG SearchHandler:? - getPeriod(): MNTH
14:41:42,141 DEBUG SwitchContextFactory:? - swiss permitted access: false
14:41:42,141 DEBUG SwitchContextFactory:? - full singapore permitted access: 
false
14:41:42,141 DEBUG SwitchContextFactory:? - partial singapore permitted access: 
false
14:41:42,141 DEBUG SearchHandler:? - setContext(): [EMAIL PROTECTED]
14:41:42,156 DEBUG SearchService:? - in parameterized constructor...
14:41:42,156  INFO DataSourceFactory:? - serving monthly non-swiss 
non-singapore datasource (02): [EMAIL PROTECTED]
14:41:42,172  INFO SearchHandler:? - Exiting Constructor...
14:41:42,219 DEBUG SearchHandler:? - entering setReportingPeriod()...
14:41:42,219 DEBUG SearchHandler:? - set reporting period to: [EMAIL PROTECTED]
14:41:42,219 DEBUG SearchHandler:? -    .rawDate is: null
14:41:42,235 DEBUG SearchHandler:? -    .reportingDate is: null
14:41:42,235 DEBUG SearchHandler:? -    .reportingDateDaily is: null
14:41:42,235 DEBUG SearchHandler:? -    .reportingDateMonthly is: null
14:41:42,235 DEBUG SearchHandler:? - exiting setReportingPeriod()...
14:41:42,235 DEBUG SearchHandler:? - entered getCategories()...
14:41:42,235 DEBUG SearchHandler:? - entered 
getReportingPeriodsSelectItemsControl()...
14:41:42,235 DEBUG SearchHandler:? - entered 
setReportingPeriodsSelectItemsControl()...
14:41:42,235 DEBUG SearchHandler:? - setting reportingPeriodsSelectItemsControl 
to be: [EMAIL PROTECTED]
14:41:42,235 DEBUG SearchHandler:? -    .itemLabel: null
14:41:42,250 DEBUG SearchHandler:? -    .itemValue: null
14:41:42,250 DEBUG SearchHandler:? - exiting 
setReportingPeriodsSelectItemsControl()...
14:41:42,485 DEBUG SearchHandler:? - getPeriod(): MNTH
14:41:42,531 DEBUG SearchService:? - getReportingPeriods(): context is: [EMAIL 
PROTECTED]
14:41:43,422 DEBUG SearchHandler:? - getReportingPeriod() is: [EMAIL PROTECTED]
14:41:43,422 DEBUG SearchHandler:? - with: 
14:41:43,422 DEBUG SearchHandler:? -     raw date: null
14:41:43,422 DEBUG SearchHandler:? -     reporting date: null
14:41:43,422 DEBUG SearchHandler:? -     reporting date daily: null
14:41:43,422 DEBUG SearchHandler:? -    raw reporting date monthly: null
14:41:43,438 DEBUG SearchHandler:? - getReportingPeriod() is: [EMAIL PROTECTED]
14:41:43,438 DEBUG SearchHandler:? - with: 
14:41:43,438 DEBUG SearchHandler:? -     raw date: null
14:41:43,438 DEBUG SearchHandler:? -     reporting date: null
14:41:43,438 DEBUG SearchHandler:? -     reporting date daily: null
14:41:43,438 DEBUG SearchHandler:? -    raw reporting date monthly: null
14:41:43,703 DEBUG GISWebPhaseListener:? - page: /jsp/maintenance/search.jsp 
AFTER - RENDER_RESPONSE(6)
14:41:43,703 DEBUG GISWebPhaseListener:? - DONE WITH 
REQUEST!/jsp/maintenance/search.jsp

Thank you in advance.
Simeon

==============================================================================
Please access the attached hyperlink for an important electronic communications 
disclaimer: 

http://www.credit-suisse.com/legal/en/disclaimer_email_ib.html
==============================================================================

Attachment: search.jsp
Description: Binary data

Attachment: maintenance-faces-config-beans.xml
Description: Binary data

Reply via email to