PDA

View Full Version : Designing a complex view


gilad_panda
May 21st, 2007, 02:01 PM
I have a view(jsp) that should include several other views(jsp).
Each inner view has its own contoller (SimpleFormController).
However, a particular inner jsp (view A) changes all the time
(each time a different controller creates view A).
My question is, what is the best way to implement this?
If anyone had a similar situation, or has any ideas, I would appriciate any assistance.

Also, an important issue is how to cause different independent views to know/have access to other view's domain object.
This is becuase they need to pass parameters between them.
(and not just one or two params...)

P.S.
If anyone has a reference to common design patterns in Spring MVC...

tnx.
Gilad.

dr_pompeii
May 21st, 2007, 04:54 PM
hello Gilad.

i am wondered of your case, pls what is exactly your requeriment to try to resolve your problem in your way already posted?

regards

Jörg Heinicke
May 21st, 2007, 07:14 PM
I have a view(jsp) that should include several other views(jsp).
Each inner view has its own contoller (SimpleFormController).

I wonder how this should work. You'd need a new request for every JSP. This works only with Iframes or some Ajax stuff. Otherwise it's not the view that drives the controller, but the other way around.

Jörg

gilad_panda
May 22nd, 2007, 01:32 AM
Hi all,
I've attached an example of how the screen should look like.
In view X, whenever we change the value in listbox X1
It should decide which view should be included in view A.
(listbox value in view X = option 1 then in view A show view A1,
listbox value in view X = option 2 then in view A show view A2)

The second thing is that the fields in view X are required in order to do the logic inside view A business. So View A should have access to View X domain object.

Finally, each view in the screen was implemented independently.
(View X, View Y, View A1, View A2, View A3 are all independent SimpleFormController)

Tnx,
Gilad.

Jörg Heinicke
May 22nd, 2007, 03:53 AM
In view X, whenever we change the value in listbox X1 It should decide which view should be included in view A.

onchange="submit()" on the listbox.

The second thing is that the fields in view X are required in order to do the logic inside view A business. So View A should have access to View X domain object.

That's a problem of state management on the server, e.g. storing the domain object in the session.

Jörg

gilad_panda
May 23rd, 2007, 01:04 AM
Thanks a lot.