Meaningless Drivel is fun!*
The moose likes JSF and the fly likes Instance variable in JSF Converter Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » JSF
Bookmark "Instance variable in JSF Converter" Watch "Instance variable in JSF Converter" New topic
Author

Instance variable in JSF Converter

Joshua Antony
Ranch Hand

Joined: Jun 05, 2006
Posts: 254
Hi,

getAsObject and getAsString are called on different instance of the date converter. Hence I am not able to store any state
in instance variable declared in the converter class.

Is there a way by which this can be achieved.

My exact scenario is as below:
We have a search screen where a user can be searched using his DOB in different format like DDMM, DDMMYYYY and so on.
Say, he does a search using DDMM, I set that pattern in getAsObject, and in getAsString use this pattern to format the date object.
But as mentioned, getAsObject and getAsString are called in different instance, the pattern information is getting lost.

Regards,
Joshua

SCJP,SCWCD, Into ATG now!
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Instance variable in JSF Converter
 
Similar Threads
inject DAO in JSF converter
Converter for h:selectOneMenu
getAsObject never called
Richfaces orderingLIst converter
checking validity of date with ddMM format