Forums Register Login

JSF Doubts

+Pie Number of slices to send: Send
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.
+Pie Number of slices to send: Send
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).
+Pie Number of slices to send: Send
@Tim,

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!
Hoo hoo hoo! Looks like we got a live one! Here, wave this tiny ad at it:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com


reply
reply
This thread has been viewed 1153 times.
Similar Threads
Validation for included forms.
spring validation framework
using validations in JSF
how to access values in session from javascript
Q for Hans Bergsten : JSF & Struts integration
More...

All times above are in ranch (not your local) time.
The current ranch time is
Mar 28, 2024 05:05:54.