aspose file tools
The moose likes Architect Certification (SCEA/OCMJEA) and the fly likes JSF Doubts Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of The Software Craftsman this week in the Agile forum!
JavaRanch » Java Forums » Certification » Architect Certification (SCEA/OCMJEA)
Bookmark "JSF Doubts" Watch "JSF Doubts" New topic
Forums: JSF Architect Certification (SCEA/OCMJEA)

JSF Doubts

guru prasanth
Ranch Hand

Joined: Aug 20, 2009
Posts: 96
In JSF can i write a cusomt validator for validating the business rules.Similarly i need to convert the ui components into
an xml or in to a java object.Can i use a custom convertors.Or should i use backing bean for both validation and conversion.
I know i can use both but which is better according to JSF Best practise.
Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 16540

None of the above.

Validators and Converters are used by the JSF Controllers as extensions to the Controller function. They shouldn't be handling business rules or conversions other that JSF-internal to/from HTML (text) form. The purpose of a Controller is to represent changes made to a Model in its corresponding View and to reflect changes made to the controls in the View back into the model.

Generally, the process of doing advanced business rule processing and conversion to/from data formats other than those directly addressed by the JSF MVC subsystem is something you handle in an Action method (or AJAX listener).

Customer surveys are for companies who didn't pay proper attention to begin with.
Bharath Kannan

Joined: Aug 04, 2013
Posts: 2

Can you please help me understand why the ManagedBeans are implementing Serializable?
There are arguments about the bean objects being used over network RMI/RPC, but im not really convinced.

Can you please help!
Have you tried LearnNowOnline?
subject: JSF Doubts