<politely>I think you're still missing something.</politely>

Now you have the tiles named in the tiles-config file,
you can name them as the input or forward in the struts-config
file. You don't have to have a page that does nothing but
include other pages. There may be some page generated
on your behalf, but you don't have to write it - just name the
appropriate content="" (if that's what you called it in your
tiles-config file) and IT does the include for you.

-jeff

On Tuesday, June 3, 2003, at 09:00 AM, Nimish Chourey , Tidel Park - Chennai wrote:

Hi I agree with you .. But see ..below you have created a definition
"doc.login" .. So your content (body) JSP is "login.jsp" .
Count this as one .
Now You need a JSP to insert this definition . .. Say index.jsp ..
My index.jsp will look something like this ..

<%@ page language="java" %>
<%@ taglib uri="/WEB-INF/struts-tiles.tld" prefix="tiles" %>

<tiles:insert definition="doc.login" flush="true" />

Now Count this JSP as number 2 ..


Hence to build the whole page I m using Two JSP .. Hope I have made my question clear ..

And If still I m missing some thing .. Let me know ..






-----Original Message----- From: Bailey, Shane C. [mailto:[EMAIL PROTECTED] Sent: Tuesday, June 03, 2003 7:07 PM To: 'Struts Users Mailing List' Subject: RE: Tiles Two JSP's for Displaying One Form .




Content of tiles-defs.xml: <!-- ======================================================= --> <!-- View page Templates --> <!-- ======================================================= --> <definition name="doc.Layout1" path="/view/main/plain_layout.jsp"> <put name="title" value="ACINT21" /> <put name="header" value="/view/main/header.jsp" /> <put name="body" value="/view/main/body.jsp" /> <put name="footer" value="/view/main/footer.jsp" /> </definition>

  <!-- =======================================================  -->
  <!-- View page definitions                                 -->
  <!-- =======================================================  -->
  <!-- Login Page -->
  <definition name="doc.login" extends="doc.Layout1">
          <put name="title"  value="Login" />
          <put name="body"   value="/view/login/login.jsp" />
  </definition>
  <!-- Welcome (after successful login) Page -->
  <definition name="doc.welcome" extends="doc.Layout1">
          <put name="title"  value="Welcome Here" />
          <put name="body"   value="/view/main/welcome.jsp" />
  </definition>
  <definition name="doc.welcome2" extends="doc.Layout1">
          <put name="title"  value="Welcome Here2" />
          <put name="body"   value="/view/main/welcome2.jsp" />
  </definition>
  <definition name="doc.welcome3" extends="doc.Layout1">
          <put name="title"  value="Welcome Here3" />
          <put name="body"   value="/view/main/welcome3.jsp" />
  </definition>

Then in the action mapping in struts config you forward to "doc.login" etc.

With a few extra pages, for the layout, header, footer; I only need a single
page (the body) for every new def. So the overhead may be two or 3
Pages at first but then it grows by one for ever new def. This is just one
way and it works for me. I'm sure there are more efficient (less pages) but
this way seems to be easy to understand and small after the original
overhead.


-----Original Message-----
From: Nimish Chourey , Tidel Park - Chennai
[mailto:[EMAIL PROTECTED]
Sent: Tuesday, June 03, 2003 9:15 AM
To: Struts Users Mailing List
Subject: RE: Tiles Two JSP's for Displaying One Form .

And you need to have 40 JSP's  to insert those 40 Definintions ...
Isnt it ??

Fine You have one JSp for the Body content .. Then you extend from the
master page to make a new definition in the XML file .
But then I require another JSP which actually inserts that definition ...



-----Original Message----- From: Jeff Kyser [mailto:[EMAIL PROTECTED] Sent: Tuesday, June 03, 2003 6:24 PM To: Struts Users Mailing List Subject: Re: Tiles Two JSP's for Displaying One Form .


No, it should be more like 40 + 1 per re-usable tile component


I set up a 'master page' with the basic layout,
and perhaps a 'menu' include containing my menu buttons / links,
and then the tiles definition just inserts the content into a definition
derived from the master page layout. And that is all done in
the tiles-config.xml file


So you might have 40 definitions in your tiles config + 40 body content
JSPs,
but certainly not 80 JSPs.

or at least that's my way of thinking on the matter

-jeff

On Tuesday, June 3, 2003, at 07:41  AM, Nimish Chourey , Tidel Park -
Chennai wrote:

Hi ,
        In my application there may be around 40 forms . I am using the
classic layout for the application .
the body changes for every page , I mean I have a different JSP's for
these
forms .
Each form is submitted and a result page is desplayed .
Now my question is if I have 40 forms , so do I need to create total
of 80
JSP (Excluding the result page) ??
I mean one JSP having the body content and the other one to integrate
all
tiles .
The second option could be using one JSP having all the insert Tags
with the
Body content .

Is there any better option available ??
This question is not for the results page as I know the result page
can be
directly called from the action .

Nimish


---------------------------------------------------------------------
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