RE: nesting tiles with definitions in xml
Cedric has a few examples of nested dynamic tiles in the Tiles Doc webapp: 'jakarta-struts-1.1-b3\webapps\tilesdoc\layout' and 'layouts'. It passes a list of tiles to include in a parent tile based on user preference. Cal http://www.calandva.com/Last update 01/03/03 -Original Message- From: Jörg Maurer [mailto:[EMAIL PROTECTED]] Sent: Friday, January 31, 2003 04:03 To: Struts Users Mailing List (E-mail) Subject: nesting tiles with definitions in xml Hi! Please can any of you provide me with an example to nest tiles properly. I need to include several *.jsp in several *.jsp, which are included based upon info on my tiles-def.xml. Using tiles:get at the 1st level of jsp page is okay, but using tiles:get at the 2nd level of a now nested jsp gives only back the identifier name of that tiles:get to include, what is essentially not a jsp page. THANX so much! Jörg - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] Learn more about Paymentech's payment processing services at www.paymentech.com THIS MESSAGE IS CONFIDENTIAL. This e-mail message and any attachments are proprietary and confidential information intended only for the use of the recipient(s) named above. If you are not the intended recipient, you may not print, distribute, or copy this message or any attachments. If you have received this communication in error, please notify the sender by return e-mail and delete this message and any attachments from your computer. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: nesting tiles with definitions in xml
Okay, i looked for them. But as i saw it, they take out/give in some attributes from tiles context. Not so super, is it? I personally would like to see my way of thinking as a feature, cause it gives me powerful control to manage WHERE and WHAT. The 'way around' you sketched is for me maintainance intense in my opinion - why to doe it by tiles even when i prepare info in action classes.I thought it works like this : all requests run through the same Tiles Request Processor. Such information be mananged centrally (a layout definition machine ) - it knows WHAT to display concretly in first step, and then if it finds a Joint point(WHERE) in some other JSP, over 2 and more forwards ?! THANX -Original Message- From: Holman, Cal [mailto:[EMAIL PROTECTED]] Sent: Freitag, 31. Jänner 2003 18:39 To: 'Struts Users Mailing List' Subject: RE: nesting tiles with definitions in xml Cedric has a few examples of nested dynamic tiles in the Tiles Doc webapp: 'jakarta-struts-1.1-b3\webapps\tilesdoc\layout' and 'layouts'. It passes a list of tiles to include in a parent tile based on user preference. Cal http://www.calandva.com/Last update 01/03/03 -Original Message- From: Jörg Maurer [mailto:[EMAIL PROTECTED]] Sent: Friday, January 31, 2003 04:03 To: Struts Users Mailing List (E-mail) Subject: nesting tiles with definitions in xml Hi! Please can any of you provide me with an example to nest tiles properly. I need to include several *.jsp in several *.jsp, which are included based upon info on my tiles-def.xml. Using tiles:get at the 1st level of jsp page is okay, but using tiles:get at the 2nd level of a now nested jsp gives only back the identifier name of that tiles:get to include, what is essentially not a jsp page. THANX so much! Jörg - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] Learn more about Paymentech's payment processing services at www.paymentech.com THIS MESSAGE IS CONFIDENTIAL. This e-mail message and any attachments are proprietary and confidential information intended only for the use of the recipient(s) named above. If you are not the intended recipient, you may not print, distribute, or copy this message or any attachments. If you have received this communication in error, please notify the sender by return e-mail and delete this message and any attachments from your computer. - 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: nesting tiles with definitions in xml
Jorg This way each of the tiles is an independent entity. Which has it's downside - but in a portal situation a single action cannot manage all the potential data required for a specific user. Using tiles actions on a per tiles basis you can separate each of the controller/business logic - if the tile is required then the appropriate tiles action fires - if not then no extra work is done. It would be difficult in the tiles definition or template to define every possible combination in a portal layout. Especially if the user is allowed to move the tiles around. Having to write some breadcrumb code I bumped into your situation where I wanted the parent definition visible to a lower level tile. By using a tiles action I was able to determine the definition being used in the template at run time and load a request scope bean so all the tiles could have access to the definition data. Cal http://www.calandva.com/Last update 01/03/03 -Original Message- From: Jörg Maurer [mailto:[EMAIL PROTECTED]] Sent: Friday, January 31, 2003 13:35 To: Struts Users Mailing List Subject: RE: nesting tiles with definitions in xml Okay, i looked for them. But as i saw it, they take out/give in some attributes from tiles context. Not so super, is it? I personally would like to see my way of thinking as a feature, cause it gives me powerful control to manage WHERE and WHAT. The 'way around' you sketched is for me maintainance intense in my opinion - why to doe it by tiles even when i prepare info in action classes.I thought it works like this : all requests run through the same Tiles Request Processor. Such information be mananged centrally (a layout definition machine ) - it knows WHAT to display concretly in first step, and then if it finds a Joint point(WHERE) in some other JSP, over 2 and more forwards ?! THANX -Original Message- From: Holman, Cal [mailto:[EMAIL PROTECTED]] Sent: Freitag, 31. Jänner 2003 18:39 To: 'Struts Users Mailing List' Subject: RE: nesting tiles with definitions in xml Cedric has a few examples of nested dynamic tiles in the Tiles Doc webapp: 'jakarta-struts-1.1-b3\webapps\tilesdoc\layout' and 'layouts'. It passes a list of tiles to include in a parent tile based on user preference. Cal http://www.calandva.com/Last update 01/03/03 -Original Message- From: Jörg Maurer [mailto:[EMAIL PROTECTED]] Sent: Friday, January 31, 2003 04:03 To: Struts Users Mailing List (E-mail) Subject: nesting tiles with definitions in xml Hi! Please can any of you provide me with an example to nest tiles properly. I need to include several *.jsp in several *.jsp, which are included based upon info on my tiles-def.xml. Using tiles:get at the 1st level of jsp page is okay, but using tiles:get at the 2nd level of a now nested jsp gives only back the identifier name of that tiles:get to include, what is essentially not a jsp page. THANX so much! Jörg - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] Learn more about Paymentech's payment processing services at www.paymentech.com THIS MESSAGE IS CONFIDENTIAL. This e-mail message and any attachments are proprietary and confidential information intended only for the use of the recipient(s) named above. If you are not the intended recipient, you may not print, distribute, or copy this message or any attachments. If you have received this communication in error, please notify the sender by return e-mail and delete this message and any attachments from your computer. - 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] Learn more about Paymentech's payment processing services at www.paymentech.com THIS MESSAGE IS CONFIDENTIAL. This e-mail message and any attachments are proprietary and confidential information intended only for the use of the recipient(s) named above. If you are not the intended recipient, you may not print, distribute, or copy this message or any attachments. If you have received this communication in error, please notify the sender by return e-mail and delete this message and any attachments from your computer. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: nesting tiles with definitions in xml
H. Just displayed the tiles documentation tiles-def.xml bundled with struts in Holmes´s console -- and somhow i grab a sense why putting a list (joint points) instead of tiles:get - 1 JSP for layout(WHERE)e.g. columnsLayout.jsp and list of WHAT to come, and even putting whole definitions to work in another jsp. Hm. You wrote ... By using a tiles action I was able to determine the definition being used in the template at run time and load a request scope bean so all the tiles could have access to the definition data. ... - can you please make that experience more examplereized for me? THANXX -Original Message- From: Holman, Cal [mailto:[EMAIL PROTECTED]] Sent: Freitag, 31. Jänner 2003 20:08 To: 'Struts Users Mailing List' Subject: RE: nesting tiles with definitions in xml Jorg This way each of the tiles is an independent entity. Which has it's downside - but in a portal situation a single action cannot manage all the potential data required for a specific user. Using tiles actions on a per tiles basis you can separate each of the controller/business logic - if the tile is required then the appropriate tiles action fires - if not then no extra work is done. It would be difficult in the tiles definition or template to define every possible combination in a portal layout. Especially if the user is allowed to move the tiles around. Having to write some breadcrumb code I bumped into your situation where I wanted the parent definition visible to a lower level tile. By using a tiles action I was able to determine the definition being used in the template at run time and load a request scope bean so all the tiles could have access to the definition data. Cal http://www.calandva.com/Last update 01/03/03 -Original Message- From: Jörg Maurer [mailto:[EMAIL PROTECTED]] Sent: Friday, January 31, 2003 13:35 To: Struts Users Mailing List Subject: RE: nesting tiles with definitions in xml Okay, i looked for them. But as i saw it, they take out/give in some attributes from tiles context. Not so super, is it? I personally would like to see my way of thinking as a feature, cause it gives me powerful control to manage WHERE and WHAT. The 'way around' you sketched is for me maintainance intense in my opinion - why to doe it by tiles even when i prepare info in action classes.I thought it works like this : all requests run through the same Tiles Request Processor. Such information be mananged centrally (a layout definition machine ) - it knows WHAT to display concretly in first step, and then if it finds a Joint point(WHERE) in some other JSP, over 2 and more forwards ?! THANX -Original Message- From: Holman, Cal [mailto:[EMAIL PROTECTED]] Sent: Freitag, 31. Jänner 2003 18:39 To: 'Struts Users Mailing List' Subject: RE: nesting tiles with definitions in xml Cedric has a few examples of nested dynamic tiles in the Tiles Doc webapp: 'jakarta-struts-1.1-b3\webapps\tilesdoc\layout' and 'layouts'. It passes a list of tiles to include in a parent tile based on user preference. Cal http://www.calandva.com/Last update 01/03/03 -Original Message- From: Jörg Maurer [mailto:[EMAIL PROTECTED]] Sent: Friday, January 31, 2003 04:03 To: Struts Users Mailing List (E-mail) Subject: nesting tiles with definitions in xml Hi! Please can any of you provide me with an example to nest tiles properly. I need to include several *.jsp in several *.jsp, which are included based upon info on my tiles-def.xml. Using tiles:get at the 1st level of jsp page is okay, but using tiles:get at the 2nd level of a now nested jsp gives only back the identifier name of that tiles:get to include, what is essentially not a jsp page. THANX so much! Jörg - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] Learn more about Paymentech's payment processing services at www.paymentech.com THIS MESSAGE IS CONFIDENTIAL. This e-mail message and any attachments are proprietary and confidential information intended only for the use of the recipient(s) named above. If you are not the intended recipient, you may not print, distribute, or copy this message or any attachments. If you have received this communication in error, please notify the sender by return e-mail and delete this message and any attachments from your computer. - 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] Learn more about Paymentech's payment processing services at www.paymentech.com THIS MESSAGE IS CONFIDENTIAL. This e-mail message and any attachments are proprietary and confidential information intended only
RE: nesting tiles with definitions in xml
Jorg Using the following tiles definition the 'PortalLayoutAction' is called for every request. This is a tiles action and called after the typical action is finished processing. In the PortalLayoutAction you can examine the tiles context and have access to all the tiles definition attributes - including all the parent values unless overridden. You can also change them. I create two beans from the definition (Cedric leaves them in tiles context but I have an easier time using request scope beans) a crumb and page bean. Also I can switch the template and stylesheet dynamically based on the user's preference. The overhead is the extra trip to the Tiles Action on each request. I included some of the jsp files that use the beans. It can get pretty complicated. I used Cedric's documentation and just modified his examples to fit my site. If you want more of the code email me off line so I am not sending out a lot of files. definition name=layouts.pagedef path=/do/PortalLayout !-- session variables for storing the individual settings -- put name=styleSettingsName value=holmansite.style.settings / put name=layoutSettingsName value=holmansite.layout.settings / !-- session variables for storing the lists of available settings -- put name=stylesName value=holmansite.layoutCatalog / put name=layoutsName value=holmansite.styleCatalog / !-- the names of the available layouts and styles -- put name=layoutSettingsvalue=available.layouts / put name=styleSettings value=available.styles / !-- the individual names in the tile definitions where the layout and style are defined -- put name=layout.attribute value=page.layout / put name=style.attribute value=styleSheet / put name=rightIndex value=portal.body.pagedef/ /definition definition name=home.pagedef extends=layouts.pagedef put name=title value=home.title / put name=header value=/web/includes/header.jsp / put name=index value=/web/pages/home/HomeIndex.jsp / put name=indexMain value=/web/includes/index.jsp / put name=content value=/web/pages/home/HomeContent.jsp / put name=footer value=/web/includes/footer.jsp / put name=styleSheet value=web/styles/Grey_StyleSheet.css / put name=keywords value=home.keywords/ put name=crumbs value=/web/includes/crumb.jsp/ put name=crumbtitle1 value=Home/ put name=crumblink1value=/home/home/ put name=pagename value=home/ /definition definition name=whatsnew.pagedef extends=home.pagedef put name=title value=whatsnew.title / put name=content value=/web/pages/home/WhatsNew.jsp / put name=keywords value=whatsnew.keywords/ put name=crumbtitle2 value=What's New/ put name=crumblink2 value=/home/WhatsNew/ put name=pagename value=WhatsNew/ /definition Here are the definitions for each of the portal tiles - they each have a Tiles Action that is called and does the work of populating data for them to display. These definitions are dropped into the page using a tiles:insert and pulling the name from a bean and dynamically placing them in the page. tiles:insert name=%=name% flush=true / Again I can send the code and jsps offline. definition name=portal.whatsnew.pagedef controllerUrl=/do/portalWhatsNew path=/web/pages/portal/PortalWhatsNew.jsp/ definition name=portal.newpictures.pagedef controllerUrl=/do/portalNewPictures path=/web/pages/portal/PortalNewPictures.jsp/ definition name=portal.popularpictures.pagedef controllerUrl=/do/portalPopularPictures path=/web/pages/portal/PortalPopularPictures.jsp/ definition name=portal.popularpages.pagedef controllerUrl=/do/portalPopularPages path=/web/pages/portal/PortalPopularPages.jsp/ Cal http://www.calandva.com/Last update 01/03/03 -Original Message- From: Jörg Maurer [mailto:[EMAIL PROTECTED]] Sent: Friday, January 31, 2003 14:35 To: Struts Users Mailing List Subject: RE: nesting tiles with definitions in xml H. Just displayed the tiles documentation tiles-def.xml bundled with struts in Holmes´s console -- and somhow i grab a sense why putting a list (joint points) instead of tiles:get - 1 JSP for layout(WHERE)e.g. columnsLayout.jsp and list of WHAT to come, and even putting whole definitions to work in another jsp. Hm. You wrote ... By using a tiles action I was able to determine the definition being used in the template