struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jose Ramon Diaz" <>
Subject RE: Help with framesets
Date Tue, 04 Nov 2003 07:18:15 GMT

 I think the frames&Struts question is a bit more complicated. I write here
what I told in another message several days ago. (nobody tells me what they
think... so I continue posting it... :) if you use frames, please tell me
what you think)
 Imagine if one action may load the same frame set but you have to  load
hundred of different pages inside each frame.

> We use Frames in our application. We have had this problem a we use
different approach.
 We suppose the form data is ONLY needed for the action, so the action
executes and change the model as needed. The action decides which is the
next page, and if it can have frames it sets a variable "next" in session,
which indicates what the frames that must be loades in this way:

 Every frame in frameset is redirected to an special action with
two parameters: the place where the frame is loaded and the "next" variable.
For example:

<frameset ID="vis" cols="261,*" border="0" framespacing="1">
    <frame name="bottomLeft"
    <frame name="bottomRight"
src="<session:attribute name="next"/>">

  And we have implemented the action to know which JSP must be
loaded, with parameters position and next. In fact, the page that must be
loaded is written in struts-config.xml in this way:

   <action path="/frames" type="package.FramesAction" name="framesForm"
      <forward name="frameTop-next1" contextRelative="true"
      <forward name="frameTop-next2" contextRelative="true"

	So the makes a forward to the String created with "position+next"
(the two parameter of and we can establish the JSP in the xml


         Jose R. Diaz

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message