struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jose Ramon Diaz" <jose.d...@aranzadi.es>
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 frames.do 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"
src="frames.do?position=frameBottom&action=<session:attribute
name="next"/>">
    <frame name="bottomRight"
src="frames.do?position=frameTop&action=<session:attribute name="next"/>">
</frameset>

  And we have implemented the frames.do 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"
scope="request">
      <forward name="frameTop-next1" contextRelative="true"
path="/WEB-INF/jsp/jsp1.jsp"/>
      <forward name="frameTop-next2" contextRelative="true"
path="/WEB-INF/jsp/jsp2.jsp"/>c
	....


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

   Regards

         Jose R. Diaz


---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org


Mime
View raw message