webtier@glassfish.java.net

Re: [webtier] Re: JSF application Design Clarification

From: <webtier_at_javadesktop.org>
Date: Tue, 09 Sep 2008 09:24:27 PDT

Looks like I have confused the question.

Let me try again.

If I have a Form submit functionality with 4 or 5 screens (Form is so big, so we have to do it in 4 pages), each screen has few buttons (Next or back etc) and some validations, then should we have to follow One JSF tied one Backing Bean class for the UI / Control layer which means in my example I have to create 4 JSPs and 4 backing beans? or should we have to create 4 JSPs and One Backing Bean and One Controller class?

I have designed to go with the second approach.

Reasons.

1. Form submission is one single functiona though it has multiple screens.
2. Keep all the controlling (next or back)) / listening logic (Value change) in one place..Even though FacesServlet is the controller in JSF, we extend that functionality by writing some Action methods and some listener methods which decides the Navigation.
3. Keep all the setter getter methods in a seperate Bean.
4. Keep all the validation / Exception logic seperate

Which will give 4 JSFs, 1 Controller Class and 1 Backing Bean for this entire function.

I would appreciate any recommendations from Designers or Architects

Thanks,
Lalith
[Message sent by forum member 'lvaka' (lvaka)]

http://forums.java.net/jive/thread.jspa?messageID=298126