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]
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]
RE: Tiles Two JSP's for Displaying One Form .
Hi Nilesh, Better approach is use tiles definitions.. So u have those 40 jsps for 40 page contents..And one tiles definition xml file which assembles those.. HTH. regards, Shirish -Original Message- From: Nimish Chourey , Tidel Park - Chennai [mailto:[EMAIL PROTECTED] Sent: Tuesday, June 03, 2003 3:15 PM 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]
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]
Re: Tiles Two JSP's for Displaying One Form .
I don't think so, but here's an example from my tiles-config file: Master Page - the layout inserts a 'header' containing a logo/image has 'empty' slots for menu, body definition name=order_entry.masterPage path=/WEB-INF/pages/layout/torchHeaderLayout.jsp put name=title value= / put name=header value=/WEB-INF/pages/tiles/header.jsp / put name=menu value=/WEB-INF/pages/layout/emptyTile.jsp / put name=body value=/WEB-INF/pages/layout/emptyTile.jsp / put name=body-background value=../../../images/background.gif / /definition 'masterMenu' - just inserts the menu, to be used subsequently as a template for other pages that want a menu on them definition name=order_entry.masterMenu extends=order_entry.masterPage put name=menu value=/WEB-INF/pages/tiles/menu.jsp / /definition A typical page - extends the master Menu - only adds 1 jsp definition name=order_entry.accession.SearchByAccession extends=order_entry.masterMenu put name=title value=Search By Accession Number / put name=body value=/WEB-INF/pages/accession/SearchByAccessionNumber.jsp / /definition Sure, I had a few 'helper' JSP pages, but from now on, as long as they just use the master or menu Master, they just need to add 1 JSP + an entry in this tiles-config.xml file. -jeff On Tuesday, June 3, 2003, at 08:15 AM, Nimish Chourey , Tidel Park - Chennai wrote: 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]
RE: Tiles Two JSP's for Displaying One Form .
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]
RE: Tiles Two JSP's for Displaying One Form .
Please send email to [EMAIL PROTECTED] Thanks, Christine Keel Marine Life Cycle and Solutions Intergraph Corporation 170 Graphics Drive Madison, AL Phone: 256-730-7194 Email: [EMAIL PROTECTED] -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Tuesday, June 03, 2003 8:44 AM To: [EMAIL PROTECTED] Subject: RE: Tiles Two JSP's for Displaying One Form . Hi Nilesh, Better approach is use tiles definitions.. So u have those 40 jsps for 40 page contents..And one tiles definition xml file which assembles those.. HTH. regards, Shirish -Original Message- From: Nimish Chourey , Tidel Park - Chennai [mailto:[EMAIL PROTECTED] Sent: Tuesday, June 03, 2003 3:15 PM 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]
RE: Tiles Two JSP's for Displaying One Form .
Right, your index.jsp is my plain_layout.jsp. You only see it once right? And every page is built from that template. So, like I said, at first you have a few extra pages. Oh, looking closely I see... You don't need to insert a definition in a page. You use the definition in the mappings. Your index.jsp (I would name it better like I did) does the insert of the JSPs which are declared in your defs (which ones to insert). Your index.jsp should look like this: %@ page session=false contentType=text/html;charset=UTF-8 language=java buffer=64kb autoFlush=true % %@ taglib uri=/WEB-INF/struts-tiles.tld prefix=tiles % %-- Layout Tiles This layout render a header, body and footer. @param title String use in page title @param header Header tile (jsp url or definition name) @param body Body @param footer Footer --% html link href=/css/acint21.css type=text/css rel=stylesheet table width='100%' !-- Create a request scopt attribute -- tiles:useAttribute name=title scope=request/ !-- Insert page header into template -- trtd colspan='2' align='left' head tiles:insert attribute='header' !-- pass the title to the header -- tiles:put name=title beanName=title beanScope=request/ /tiles:insert /head /td/tr !-- Insert page title into template -- body bgcolor=#ff text=#00 link=#023264 alink=#023264 vlink=#023264 tr td class=pageTitle strongtiles:getAsString name=title //strong /td /tr trtd colspan='2' align='left' height='10' /td/tr !-- Insert page content into template -- tr align=middletd tiles:insert attribute='body' / /td /tr !-- Insert page footer into template -- trtd colspan='2' align='middle' tiles:insert attribute='footer' / /td/tr /table /body /html -Original Message- From: Nimish Chourey , Tidel Park - Chennai [mailto:[EMAIL PROTECTED] Sent: Tuesday, June 03, 2003 10:00 AM To: Struts Users Mailing List Subject: RE: Tiles Two JSP's for Displaying One Form . 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=21 / 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
Re: Tiles Two JSP's for Displaying One Form .
politelyI 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
RE: Tiles Two JSP's for Displaying One Form .
For ??? -Original Message- From: Keel, Christine C [mailto:[EMAIL PROTECTED] Sent: Tuesday, June 03, 2003 7:45 PM To: Struts Users Mailing List Subject: RE: Tiles Two JSP's for Displaying One Form . Please send email to [EMAIL PROTECTED] Thanks, Christine Keel Marine Life Cycle and Solutions Intergraph Corporation 170 Graphics Drive Madison, AL Phone: 256-730-7194 Email: [EMAIL PROTECTED] -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Tuesday, June 03, 2003 8:44 AM To: [EMAIL PROTECTED] Subject: RE: Tiles Two JSP's for Displaying One Form . Hi Nilesh, Better approach is use tiles definitions.. So u have those 40 jsps for 40 page contents..And one tiles definition xml file which assembles those.. HTH. regards, Shirish -Original Message- From: Nimish Chourey , Tidel Park - Chennai [mailto:[EMAIL PROTECTED] Sent: Tuesday, June 03, 2003 3:15 PM 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]
RE: Tiles Two JSP's for Displaying One Form .
OK, Im missing something. Doesn't matter. Every time I want new page I only create one JSP now that my template is set up. That's all I care about. And it works great. Usually people who are missing something don't have their stuff working. As far as I am concerned my stuff works. Thanks for your help though in helping me figure out that I am missing something! -Original Message- From: Jeff Kyser [mailto:[EMAIL PROTECTED] Sent: Tuesday, June 03, 2003 10:16 AM To: Struts Users Mailing List Subject: Re: Tiles Two JSP's for Displaying One Form . politelyI 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
RE: Tiles Two JSP's for Displaying One Form .
Sorry, sent to the wrong place. Thanks, Christine Keel Marine Life Cycle and Solutions Intergraph Corporation 170 Graphics Drive Madison, AL Phone: 256-730-7194 Email: [EMAIL PROTECTED] -Original Message- From: Nimish Chourey , Tidel Park - Chennai [mailto:[EMAIL PROTECTED] Sent: Tuesday, June 03, 2003 9:17 AM To: Struts Users Mailing List Subject: RE: Tiles Two JSP's for Displaying One Form . For ??? -Original Message- From: Keel, Christine C [mailto:[EMAIL PROTECTED] Sent: Tuesday, June 03, 2003 7:45 PM To: Struts Users Mailing List Subject: RE: Tiles Two JSP's for Displaying One Form . Please send email to [EMAIL PROTECTED] Thanks, Christine Keel Marine Life Cycle and Solutions Intergraph Corporation 170 Graphics Drive Madison, AL Phone: 256-730-7194 Email: [EMAIL PROTECTED] -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Tuesday, June 03, 2003 8:44 AM To: [EMAIL PROTECTED] Subject: RE: Tiles Two JSP's for Displaying One Form . Hi Nilesh, Better approach is use tiles definitions.. So u have those 40 jsps for 40 page contents..And one tiles definition xml file which assembles those.. HTH. regards, Shirish -Original Message- From: Nimish Chourey , Tidel Park - Chennai [mailto:[EMAIL PROTECTED] Sent: Tuesday, June 03, 2003 3:15 PM 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] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Tiles Two JSP's for Displaying One Form .
Yes .. now you exacly understand my problem .. See these form pages are direct links from the Menu and not result of some action .. I mean there is no form Submission and no action .. Just a link is clicked .. Can you give an example for that .. if possible ..I mean how I can avoid writing index.jsp ... Thanks for being so polite :)) -Original Message- From: Jeff Kyser [mailto:[EMAIL PROTECTED] Sent: Tuesday, June 03, 2003 7:46 PM To: Struts Users Mailing List Subject: Re: Tiles Two JSP's for Displaying One Form . politelyI 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
RE: Tiles Two JSP's for Displaying One Form .
Nope .. my index.jsp is not your plain_layout.jsp .. have a close look at it again .. -Original Message- From: Bailey, Shane C. [mailto:[EMAIL PROTECTED] Sent: Tuesday, June 03, 2003 7:39 PM To: 'Struts Users Mailing List' Subject: RE: Tiles Two JSP's for Displaying One Form . Right, your index.jsp is my plain_layout.jsp. You only see it once right? And every page is built from that template. So, like I said, at first you have a few extra pages. Oh, looking closely I see... You don't need to insert a definition in a page. You use the definition in the mappings. Your index.jsp (I would name it better like I did) does the insert of the JSPs which are declared in your defs (which ones to insert). Your index.jsp should look like this: %@ page session=false contentType=text/html;charset=UTF-8 language=java buffer=64kb autoFlush=true % %@ taglib uri=/WEB-INF/struts-tiles.tld prefix=tiles % %-- Layout Tiles This layout render a header, body and footer. @param title String use in page title @param header Header tile (jsp url or definition name) @param body Body @param footer Footer --% html link href=/css/acint21.css type=text/css rel=stylesheet table width='100%' !-- Create a request scopt attribute -- tiles:useAttribute name=title scope=request/ !-- Insert page header into template -- trtd colspan='2' align='left' head tiles:insert attribute='header' !-- pass the title to the header -- tiles:put name=title beanName=title beanScope=request/ /tiles:insert /head /td/tr !-- Insert page title into template -- body bgcolor=#ff text=#00 link=#023264 alink=#023264 vlink=#023264 tr td class=pageTitle strongtiles:getAsString name=title //strong /td /tr trtd colspan='2' align='left' height='10' /td/tr !-- Insert page content into template -- tr align=middletd tiles:insert attribute='body' / /td /tr !-- Insert page footer into template -- trtd colspan='2' align='middle' tiles:insert attribute='footer' / /td/tr /table /body /html -Original Message- From: Nimish Chourey , Tidel Park - Chennai [mailto:[EMAIL PROTECTED] Sent: Tuesday, June 03, 2003 10:00 AM To: Struts Users Mailing List Subject: RE: Tiles Two JSP's for Displaying One Form . 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=21 / 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
Re: Tiles Two JSP's for Displaying One Form .
No, Shane, not you! You're doing fine, or at least if not, then we're both missing the same thing! Sorry, I guess I replied to your e-mail rather than Nishish's -jeff On Tuesday, June 3, 2003, at 09:20 AM, Bailey, Shane C. wrote: OK, Im missing something. Doesn't matter. Every time I want new page I only create one JSP now that my template is set up. That's all I care about. And it works great. Usually people who are missing something don't have their stuff working. As far as I am concerned my stuff works. Thanks for your help though in helping me figure out that I am missing something! -Original Message- From: Jeff Kyser [mailto:[EMAIL PROTECTED] Sent: Tuesday, June 03, 2003 10:16 AM To: Struts Users Mailing List Subject: Re: Tiles Two JSP's for Displaying One Form . politelyI 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
RE: Tiles Two JSP's for Displaying One Form .
Hi, If you go by the tiles Definition approach, you just write one jsp per page and U dont need to write another jsp which will assemble all jsps together(in most of the cases). And the task of assembling the various portions for the page(In case of a classic layout, the header,footer,menu and content)is done by definition.This definition is done in an xml file(tiles-defs.xml.) And then from action mapping , u can directly call this definition as forward. Following is example. STEP 1: I have classic layout.So i will have one definition for classic layout as follows(in tiles.defs.xml..). !-- Master definition -- !-- Classic layout used as root for other pages -- !-- === -- definition name=eq.base.classicLayout path=/WEB-INF/jsp/tiles/classicLayout_template.jsp put name=headervalue=/WEB-INF/jsp/tiles/header.jsp / put name=navigationvalue=/WEB-INF/jsp/tiles/sidebar.jsp / put name=content value=specify content here./ put name=footervalue=/WEB-INF/jsp/tiles/footer.jsp / /definition STEP2: Then i need to create myHomePAge which will have classic layout but only the content portion has to be different.So i will add another definition as follows. definition name=eq.ps.homepage extends=eq.base.equateLayout put name=content value=/WEB-INF/jsp/pages/ps/myhomepage.jsp/ /definition As u can see, i have just overridden what i need to.rest is taken from the super definition. Step3: In the struts configiguration file, while defining the action mapping, instead of using the jsp name in the forward,use the definition name as follows. action path=/openHomepage type=HomepageOpenAction name=homepageForm scope=request forwardname=homepage path= eq.ps.homepage / /action Thats it.So if i need another page, i will add another definition extending the classicLayout definition.And refere to it directly from struts config file. Hope this clears al your doubts. regards, Shirish -Original Message- From: Nimish Chourey , Tidel Park - Chennai [mailto:[EMAIL PROTECTED] Sent: Tuesday, June 03, 2003 4:30 PM To: Struts Users Mailing List Subject: RE: Tiles Two JSP's for Displaying One Form . Yes .. now you exacly understand my problem .. See these form pages are direct links from the Menu and not result of some action .. I mean there is no form Submission and no action .. Just a link is clicked .. Can you give an example for that .. if possible ..I mean how I can avoid writing index.jsp ... Thanks for being so polite :)) -Original Message- From: Jeff Kyser [mailto:[EMAIL PROTECTED] Sent: Tuesday, June 03, 2003 7:46 PM To: Struts Users Mailing List Subject: Re: Tiles Two JSP's for Displaying One Form . politelyI 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
Re: Tiles Two JSP's for Displaying One Form .
So if it is just a link, can't you create a forward action that points to a definition in your tiles-config.xml? for example: action path=/catalog/ChooseCategory parameter=order_entry.catalog.ChooseCategory type=org.apache.struts.actions.ForwardAction /action where order_entry.catalog.ChooseCategory is mapped to a JSP in my tile-config.xml no? i think I need to throw in the towel :) -jeff On Tuesday, June 3, 2003, at 09:30 AM, Nimish Chourey , Tidel Park - Chennai wrote: Yes .. now you exacly understand my problem .. See these form pages are direct links from the Menu and not result of some action .. I mean there is no form Submission and no action .. Just a link is clicked .. Can you give an example for that .. if possible ..I mean how I can avoid writing index.jsp ... - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Tiles Two JSP's for Displaying One Form .
U can do that.. Create a globel forward(Because if you are using forwards with links, they have to be global forwards.) forward name=myLinkl path=/MyDefinitionAction.do/ Then create a action mapping for the path. action path=/MyDefinitionAction type=aa.ScreenForwardingAction name=SomeForm forward name=success path=tiles.definition/ /action Here the screen forwarding action does nothing but just does a forward to successTHis can be used any where just by defining different success forward. And that solves the problem. regards, Shirish -Original Message- From: Jeff Kyser [mailto:[EMAIL PROTECTED] Sent: Tuesday, June 03, 2003 4:48 PM To: Struts Users Mailing List Subject: Re: Tiles Two JSP's for Displaying One Form . So if it is just a link, can't you create a forward action that points to a definition in your tiles-config.xml? for example: action path=/catalog/ChooseCategory parameter=order_entry.catalog.ChooseCategory type=org.apache.struts.actions.ForwardAction /action where order_entry.catalog.ChooseCategory is mapped to a JSP in my tile-config.xml no? i think I need to throw in the towel :) -jeff On Tuesday, June 3, 2003, at 09:30 AM, Nimish Chourey , Tidel Park - Chennai wrote: Yes .. now you exacly understand my problem .. See these form pages are direct links from the Menu and not result of some action .. I mean there is no form Submission and no action .. Just a link is clicked .. Can you give an example for that .. if possible ..I mean how I can avoid writing index.jsp ... - 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]
RE: Tiles Two JSP's for Displaying One Form .
Jeff, I see we are in agreement. :) Anyway, if the guy thinks of a def as a JSP (which it is completed) then he shouldn't go to it directly from another JSP. It is Model 1 to do such things. So I just thought about how Tiles almost forces Model 2!! -Original Message- From: Jeff Kyser [mailto:[EMAIL PROTECTED] Sent: Tuesday, June 03, 2003 10:48 AM To: Struts Users Mailing List Subject: Re: Tiles Two JSP's for Displaying One Form . So if it is just a link, can't you create a forward action that points to a definition in your tiles-config.xml? for example: action path=/catalog/ChooseCategory parameter=order_entry.catalog.ChooseCategory type=org.apache.struts.actions.ForwardAction /action where order_entry.catalog.ChooseCategory is mapped to a JSP in my tile-config.xml no? i think I need to throw in the towel :) -jeff On Tuesday, June 3, 2003, at 09:30 AM, Nimish Chourey , Tidel Park - Chennai wrote: Yes .. now you exacly understand my problem .. See these form pages are direct links from the Menu and not result of some action .. I mean there is no form Submission and no action .. Just a link is clicked .. Can you give an example for that .. if possible ..I mean how I can avoid writing index.jsp ... - 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]
RE: Tiles Two JSP's for Displaying One Form .
concerning the homepage setup, i did this: - global-forwards forward name=home path=/home.do / - (home.def contains homepage body) action path=/home forward=home.def scope=request validate=false / - tiles did not seem to work with ForwardAction action path=/home type=orgForwardAction scope=request validate=false forward name=success path=home.def/ /action -Oorspronkelijk bericht- Van: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Verzonden: dinsdag 3 juni 2003 17:16 Aan: [EMAIL PROTECTED] Onderwerp: RE: Tiles Two JSP's for Displaying One Form . U can do that.. Create a globel forward(Because if you are using forwards with links, they have to be global forwards.) forward name=myLinkl path=/MyDefinitionAction.do/ Then create a action mapping for the path. action path=/MyDefinitionAction type=aa.ScreenForwardingAction name=SomeForm forward name=success path=tiles.definition/ /action Here the screen forwarding action does nothing but just does a forward to successTHis can be used any where just by defining different success forward. And that solves the problem. regards, Shirish -Original Message- From: Jeff Kyser [mailto:[EMAIL PROTECTED] Sent: Tuesday, June 03, 2003 4:48 PM To: Struts Users Mailing List Subject: Re: Tiles Two JSP's for Displaying One Form . So if it is just a link, can't you create a forward action that points to a definition in your tiles-config.xml? for example: action path=/catalog/ChooseCategory parameter=order_entry.catalog.ChooseCategory type=org.apache.struts.actions.ForwardAction /action where order_entry.catalog.ChooseCategory is mapped to a JSP in my tile-config.xml no? i think I need to throw in the towel :) -jeff On Tuesday, June 3, 2003, at 09:30 AM, Nimish Chourey , Tidel Park - Chennai wrote: Yes .. now you exacly understand my problem .. See these form pages are direct links from the Menu and not result of some action .. I mean there is no form Submission and no action .. Just a link is clicked .. Can you give an example for that .. if possible ..I mean how I can avoid writing index.jsp ... - 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] *** DISCLAIMER *** Dit e-mailbericht en alle bijgevoegde bestanden zijn vertrouwelijk, kunnen informatie bevatten die beschermd zijn door intellectuele eigendomsrechten, zijn gecontroleerd op computervirussen (wat niet garandeert dat deze bestanden er volledig vrij van zijn) en zijn uitsluitend bestemd voor gebruik door de geadresseerde. Elk gebruik van deze informatie (waaronder de geheel of gedeeltelijke reproductie of verspreiding onder elke vorm) door andere personen dan de geadresseerde(n) is verboden. Indien deze e-mail verkeerdelijk bij u terechtkomt, gelieve de afzender te verwittigen en deze bestanden van uw computer te verwijderen. Deze e-mail kan op geen enkele wijze een invloed hebben op de contractuele relaties tussen de VLM en de betrokken partij. De inhoud van deze e-mail en zijn bestanden zijn afkomstig van de auteur en verbindt niet noodzakelijk de VLM tenzij dit bevestigd wordt door middel van een terzake geldig ondertekend document van de VLM. Gelieve de afzender er zonder onnodig uitstel ervan te verwittigen indien u een bevestiging in origineel van dit bericht wenst te ontvangen. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Tiles Two JSP's for Displaying One Form .
thanks Especially to Jeff and Shane . I was looking for ForwardAction thing .. /thanks The ForwardAction does work .. -Original Message- From: Joris Docx [mailto:[EMAIL PROTECTED] Sent: Wednesday, June 04, 2003 3:17 PM To: Struts Users Mailing List Subject: RE: Tiles Two JSP's for Displaying One Form . concerning the homepage setup, i did this: - global-forwards forward name=home path=/home.do / - (home.def contains homepage body) action path=/home forward=home.def scope=request validate=false / - tiles did not seem to work with ForwardAction action path=/home type=orgForwardAction scope=request validate=false forward name=success path=home.def/ /action -Oorspronkelijk bericht- Van: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Verzonden: dinsdag 3 juni 2003 17:16 Aan: [EMAIL PROTECTED] Onderwerp: RE: Tiles Two JSP's for Displaying One Form . U can do that.. Create a globel forward(Because if you are using forwards with links, they have to be global forwards.) forward name=myLinkl path=/MyDefinitionAction.do/ Then create a action mapping for the path. action path=/MyDefinitionAction type=aa.ScreenForwardingAction name=SomeForm forward name=success path=tiles.definition/ /action Here the screen forwarding action does nothing but just does a forward to successTHis can be used any where just by defining different success forward. And that solves the problem. regards, Shirish -Original Message- From: Jeff Kyser [mailto:[EMAIL PROTECTED] Sent: Tuesday, June 03, 2003 4:48 PM To: Struts Users Mailing List Subject: Re: Tiles Two JSP's for Displaying One Form . So if it is just a link, can't you create a forward action that points to a definition in your tiles-config.xml? for example: action path=/catalog/ChooseCategory parameter=order_entry.catalog.ChooseCategory type=org.apache.struts.actions.ForwardAction /action where order_entry.catalog.ChooseCategory is mapped to a JSP in my tile-config.xml no? i think I need to throw in the towel :) -jeff On Tuesday, June 3, 2003, at 09:30 AM, Nimish Chourey , Tidel Park - Chennai wrote: Yes .. now you exacly understand my problem .. See these form pages are direct links from the Menu and not result of some action .. I mean there is no form Submission and no action .. Just a link is clicked .. Can you give an example for that .. if possible ..I mean how I can avoid writing index.jsp ... - 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] *** DISCLAIMER *** Dit e-mailbericht en alle bijgevoegde bestanden zijn vertrouwelijk, kunnen informatie bevatten die beschermd zijn door intellectuele eigendomsrechten, zijn gecontroleerd op computervirussen (wat niet garandeert dat deze bestanden er volledig vrij van zijn) en zijn uitsluitend bestemd voor gebruik door de geadresseerde. Elk gebruik van deze informatie (waaronder de geheel of gedeeltelijke reproductie of verspreiding onder elke vorm) door andere personen dan de geadresseerde(n) is verboden. Indien deze e-mail verkeerdelijk bij u terechtkomt, gelieve de afzender te verwittigen en deze bestanden van uw computer te verwijderen. Deze e-mail kan op geen enkele wijze een invloed hebben op de contractuele relaties tussen de VLM en de betrokken partij. De inhoud van deze e-mail en zijn bestanden zijn afkomstig van de auteur en verbindt niet noodzakelijk de VLM tenzij dit bevestigd wordt door middel van een terzake geldig ondertekend document van de VLM. Gelieve de afzender er zonder onnodig uitstel ervan te verwittigen indien u een bevestiging in origineel van dit bericht wenst te ontvangen. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]