You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by "Struts Newsgroup (@Basebeans.com)" <st...@basebeans.com> on 2002/07/02 11:25:03 UTC

Question on implementation with frames

Subject: Question on implementation with frames
From: "Hu Ji Rong" <hu...@yahoo.com>
 ===
Hi,

I have a web page with 3 frames, a menu on top with three links to different
pages. When the links are clicked, the destination page will be displayed in
the middle frame. The bottom frame have a list of buttons like "save",
"cancel".

=======================
(Top Frame)
link1    link2    link3
=======================
(Middle Frame)
content of link1/link2/link3
=======================
(Bottom Frame)
Save/Clear/Print
=======================

Content of link1,2,3 are all forms with input fields and all fields are
actually belong to the same object such as "Airport". The purpose of this
app is to collection all the data fields of "Airport" which will be
displayed in content of link1,2,3 into database.

The reqirement is: when the user enter some fields in either link1,2 or 3,
these fields should be save in the memory(maybe an Airport object), the user
is allowed to navigate from link to link while these already entered fields
should display the entered data.

When "save" in the bottom frame is clicked, the program should check the
completion of mandatory field and save the object to db.

How can I implemented the action servlet? I am think about using one single
action class with parameters to know which link is clicked or "save" is
clicked, and use one single form bean to get all the fields. Will that work?

Thanks for reading such a long message.

JiRong



--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


RE: Question on implementation with frames

Posted by Rahul Kumar Saxena <ra...@wipro.com>.
Hi JiRong,

You can use single action class for all the three links and based on
link clikced you can forward the request to corresponding page. In order
to store the value accros the links, you have to store you form in
session. For that you can declare session scope in Struts-config. Apart
from that you may have to take care of removing the form from session
after save.
If different kind of mandatory validations are required for different
links then I would suggest you to use different action class with sngle
form object.

Rahul.

-----Original Message-----
From: Struts Newsgroup [mailto:@Basebeans.comstruts@basebeans.com] 
Sent: Tuesday, July 02, 2002 2:55 PM
To: struts-user@jakarta.apache.org
Subject: Question on implementation with frames


Subject: Question on implementation with frames
From: "Hu Ji Rong" <hu...@yahoo.com>
 ===
Hi,

I have a web page with 3 frames, a menu on top with three links to
different pages. When the links are clicked, the destination page will
be displayed in the middle frame. The bottom frame have a list of
buttons like "save", "cancel".

=======================
(Top Frame)
link1    link2    link3
=======================
(Middle Frame)
content of link1/link2/link3
=======================
(Bottom Frame)
Save/Clear/Print
=======================

Content of link1,2,3 are all forms with input fields and all fields are
actually belong to the same object such as "Airport". The purpose of
this app is to collection all the data fields of "Airport" which will be
displayed in content of link1,2,3 into database.

The reqirement is: when the user enter some fields in either link1,2 or
3, these fields should be save in the memory(maybe an Airport object),
the user is allowed to navigate from link to link while these already
entered fields should display the entered data.

When "save" in the bottom frame is clicked, the program should check the
completion of mandatory field and save the object to db.

How can I implemented the action servlet? I am think about using one
single action class with parameters to know which link is clicked or
"save" is clicked, and use one single form bean to get all the fields.
Will that work?

Thanks for reading such a long message.

JiRong



--
To unsubscribe, e-mail:
<ma...@jakarta.apache.org>
For additional commands, e-mail:
<ma...@jakarta.apache.org>