thank you Frank for your answer and your explanations!



---------- Initial Header -----------

>From      : "Frank W. Zammetti" [EMAIL PROTECTED]
To          : "Struts Users Mailing List" user@struts.apache.org
Cc          : "user" user@struts.apache.org
Date      : Wed, 7 Sep 2005 09:31:44 -0400 (EDT)
Subject : Re: Problem with a Frameset and Struts (replacing frameset with  
tiles?)







> Tiles and frames are not at all equivalent, so it's not a simple either-or
> answer.  It really depends on what your application needs are.
>
> I have done a lot of work with frames and am completely comfortable
> developing with them.  This is not so for everyone, and there are some
> good reasons for it.  Given my affection (well, acceptance anyway!) of
> frames, I would *still* say that if you don't truly need what they give
> you then you probably *don't* want to use them.  There are indeed added
> complexities with frames, and sometimes some very subtle problems come up
> that will give you fits if you don't have a lot of experience with frames,
> so if you don't truly need them, Tiles will probably be the better choice.
>
> Of course, you probably should ask whether you need Tiles or not too...
> Tiles does have some benefits, but it also adds complexity.  I don't want
> to overstate it, Tiles is *not* difficult, but you may not even ned that
> added complexity, however little it may be.
>
> --
> Frank W. Zammetti
> Founder and Chief Software Architect
> Omnytex Technologies
> http://www.omnytex.com
>
> On Wed, September 7, 2005 2:13 am, gollinger said:
> > Hi!
> >
> > thank you very much for your answer.
> > Do you think it would generally be better
> > to use Tiles instead of frameset?
> > We would like to use the validador-framework
> > but when we have to use javascript in any case
> > do you think it would be better not to do this?
> >
> > Ciao
> >
> >
> >
> >
> >
> >
> > ---------- Initial Header -----------
> >
> >>From      : "Frank W. Zammetti" [EMAIL PROTECTED]
> > To          : "Struts Users Mailing List" user@struts.apache.org
> > Cc          : "user" user@struts.apache.org
> > Date      : Tue, 6 Sep 2005 10:21:08 -0400 (EDT)
> > Subject : Re: Problem with a Frameset and Struts
> >
> >
> >
> >
> >
> >
> >
> >> Hi,
> >>
> >> This isn't really a Struts issue per se, it's a frames issue.
> >>
> >> When you set the target of the form to display, the response from the
> >> server is going to go into the bottom frame, regardless of what the
> >> outcome is (i.e., whether there are errors or not).  This is just how
> >> frames work.
> >>
> >> You can do what you want, but it will require client-side coding.
> >>
> >> I would suggest having a third frame with a size of 0 (making it hidden)
> >> and direct your response to it.  Add some Javascript to the page that is
> >> returned that fires in response to the onLoad event.  If errors came
> >> back,
> >> copy them over to the search frame, otherwise copy the whole page to
> >> display.  Let's assume you call the hidden frame "hiddenFrame", and
> >> let's
> >> assume there is a <div> with an ID of "errorDiv" in both the returned
> >> page
> >> and what's in the search frame... Here's what I would do:
> >>
> >> <html>
> >> <head>
> >> <script>
> >>  function loadHandler() {
> >>   if (errorDiv.innerHTML != '') {
> >>    window.top.search.errorDiv.innerHTML >
> >> window.top.hiddenFrame.errorDiv.innerTML;
> >>   } else {
> >>    window.top.display.document.open();
> >>     window.top.display.document.write(
> >>      window.top.hiddenFrame.document.documentElement.outerHTML);
> >>    window.top.display.document.close();
> >>   }
> >> </script>
> >> </head>
> >> <body onLoad="loadHandler();">
> >> ...
> >> </body></html>
> >>
> >> So, if errors are present in the <div> on the returned page, they will
> >> be
> >> copied over to the <div> in the search frame.  If the <div> is empty on
> >> the returned page, meaning no errors occurred, the entire page is copied
> >> over to the display frame.
> >>
> >> I'm not sure this is 100% cross-browser, you probably need to use
> >> getElementById() to make it so, but the basic theory works (I know
> >> because
> >> I do this in a prod app I have).
> >>
> >> --
> >> Frank W. Zammetti
> >> Founder and Chief Software Architect
> >> Omnytex Technologies
> >> http://www.omnytex.com
> >>
> >> On Tue, September 6, 2005 8:32 am, gollinger said:
> >> > I have a frameset with two included jsp's.
> >> >
> >> > <frameset rows="15%,85%">
> >> >   <html:frame frameName="search" page="/jsp/awp/search.jsp" />
> >> >   <html:frame frameName="display" page="/jsp/awp/empty.jsp" />
> >> > </frameset>
> >> > </head>
> >> > </html>
> >> >
> >> >
> >> > this is the first jsp inside the frameset with validation
> >> >
> >> > and errors should be displayed there:
> >> >
> >> > <html:form action="/show" target="display" >
> >> >     <tr>
> >> >       <td width="100">
> >> >         <html:link page="/jsp/index.jsp">Home</html:link>
> >> >       </td>
> >> >       <td colspan="3" align="center"><b>show group</b></td>
> >> >     </tr>
> >> >     <tr>
> >> >       <td><html:text property="abt_id" size="3" value="32"/>
> >> >       </td>
> >> >       <td><html:submit/></td>
> >> >     </tr>
> >> >     <html:errors/>
> >> >   </html:form>
> >> >
> >> > the large problem that I have is that I want the errors to be
> >> displayed in
> >> > the first jsp (in the part of the frameset above),
> >> > where the submit button original is!
> >> > But the effect is that the original page gets duplicated on the screen
> >> und
> >> > the errors were displayed there!
> >> >
> >> >
> >> > Who can give me an advice?
> >> >
> >> > Thanks Antonio
> >> >
> >> >
> >> >
> >> >
> >> >
> >> >
> >> >
> >> >
> >> > ____________________________________________________________
> >> > 6X velocizzare la tua navigazione a 56k? 6X Web Accelerator di Libero!
> >> > Scaricalo su INTERNET GRATIS 6X http://www.libero.it
> >> >
> >> >
> >> >
> >> > ---------------------------------------------------------------------
> >> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> >> > For additional commands, e-mail: [EMAIL PROTECTED]
> >> >
> >> >
> >>
> >>
> >> ---------------------------------------------------------------------
> >> To unsubscribe, e-mail: [EMAIL PROTECTED]
> >> For additional commands, e-mail: [EMAIL PROTECTED]
> >>
> >>
> >
> >
> >
> > ____________________________________________________________
> > Libero Flat, sempre a 4 Mega a 19,95 euro al mese!
> > Abbonati subito su http://www.libero.it
> >
> >
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> >
> >
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to