You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Cedric Dumoulin <ce...@apache.org> on 2002/10/01 11:26:54 UTC

Re: Tiles and tabbed display

  Hi,

  When you use Tiles tabs layout, the current body is inserted by 
calling <tiles:insert name="linkOfSelectedItem" />. This mean that you 
should be able to put as link="aValue" any value allowed by the insert 
tag (an URL or a tiles definition name).
  To be short, you should be able to put the url of an action. Don't 
forget to add the url extension (ex: .do) for the action (ex: 
/payment/edit.do). If you have an error, check if accessing your body 
alone work (try to call the body url directly). If yes, it should work 
with tabs. If problem persist, let me know.

        Cedric

Charles McClain wrote:

>All:
>
>Okay, I successfully integrated Struts Tiles with my app, and it's
>working very nicely, thank you.
>
>Then I got the bright idea that I wanted a tabbed display, and since the
>Tiles documentation shows a couple of examples of tabbed displays, I
>thought, "Why not?".
>
>Now that it's brought me to my knees, I know why not.  I got a "play"
>tabbed display working -- basically copying and editing the
>tiles-def.xml files from the tiles-documentation example -- fairly
>easily, and I can throw up all of the simple JSPs I want to in a tabbed
>display.  HOWEVER, in actual practice, of course, my app only has one or
>two simple JSP pages; most of what I want to display flows through
>Actions, ActionMappings, etc., and contains some sort of data display.
>
>I had no trouble, when I first integrated Tiles, linking the mappings in
>my struts-config.xml to tiles definitions instead of to the JSPs they
>originally referenced.  Indeed, the tiles-documentation example
>contained instances of this, which I dutifully cribbed.  However, the
>tabbed-display part of the example contains tiles definitions only
>directly to JSP pages; for example:
>
>      <item value="Doc Home"
>	  		link="/index.jsp" />
>      <item value="Quick overview"
>	  		link="/doc/quickOverview.jsp" />
>      <item value="Tutorial"
>	  		link="/doc/tutorial.jsp" />
>      <item value="Examples Home"
>	  		link="/examples/index.jsp" />
>
>Each of these <item> definitions represents a page I can tab to.
>However, what if I want to link to the path "/payment/edit", find its
>ActionMapping, invoke its Action, and display a JSP populated by its
>ActionForm?  Can I put a link to an ActionMapping as the link value in
>this element?  I've tried, but keep getting NullPointerExceptions
>without much else to guide me.  And I haven't found anything in the
>documentation to guide me, either.
>
>Sorry if my question isn't very coherent; I'm confused enough that I'm
>having trouble formulating the question properly.  Anyway, any help or
>guidance will be greatly appreciated.
>
>Thanks in advance,
>
>Charles McClain
>Phone:  603.659.2046
>email:    cmcclain01@attbi.com
>
>
>--
>To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
>For additional commands, e-mail: <ma...@jakarta.apache.org>
>
>
>  
>



--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


RE: Tiles and tabbed display

Posted by Charles McClain <CM...@ATTBI.Com>.
Thanks, Cedric.

-----Original Message-----
From: Cedric Dumoulin [mailto:cedric@apache.org] 
Sent: Tuesday, October 01, 2002 5:27 AM
To: Struts Users Mailing List
Subject: Re: Tiles and tabbed display



  Hi,

  When you use Tiles tabs layout, the current body is inserted by 
calling <tiles:insert name="linkOfSelectedItem" />. This mean that you 
should be able to put as link="aValue" any value allowed by the insert 
tag (an URL or a tiles definition name).
  To be short, you should be able to put the url of an action. Don't 
forget to add the url extension (ex: .do) for the action (ex: 
/payment/edit.do). If you have an error, check if accessing your body 
alone work (try to call the body url directly). If yes, it should work 
with tabs. If problem persist, let me know.

        Cedric

Charles McClain wrote:

>All:
>
>Okay, I successfully integrated Struts Tiles with my app, and it's 
>working very nicely, thank you.
>
>Then I got the bright idea that I wanted a tabbed display, and since 
>the Tiles documentation shows a couple of examples of tabbed displays, 
>I thought, "Why not?".
>
>Now that it's brought me to my knees, I know why not.  I got a "play" 
>tabbed display working -- basically copying and editing the 
>tiles-def.xml files from the tiles-documentation example -- fairly 
>easily, and I can throw up all of the simple JSPs I want to in a tabbed

>display.  HOWEVER, in actual practice, of course, my app only has one 
>or two simple JSP pages; most of what I want to display flows through 
>Actions, ActionMappings, etc., and contains some sort of data display.
>
>I had no trouble, when I first integrated Tiles, linking the mappings 
>in my struts-config.xml to tiles definitions instead of to the JSPs 
>they originally referenced.  Indeed, the tiles-documentation example 
>contained instances of this, which I dutifully cribbed.  However, the 
>tabbed-display part of the example contains tiles definitions only 
>directly to JSP pages; for example:
>
>      <item value="Doc Home"
>	  		link="/index.jsp" />
>      <item value="Quick overview"
>	  		link="/doc/quickOverview.jsp" />
>      <item value="Tutorial"
>	  		link="/doc/tutorial.jsp" />
>      <item value="Examples Home"
>	  		link="/examples/index.jsp" />
>
>Each of these <item> definitions represents a page I can tab to. 
>However, what if I want to link to the path "/payment/edit", find its 
>ActionMapping, invoke its Action, and display a JSP populated by its 
>ActionForm?  Can I put a link to an ActionMapping as the link value in 
>this element?  I've tried, but keep getting NullPointerExceptions 
>without much else to guide me.  And I haven't found anything in the 
>documentation to guide me, either.
>
>Sorry if my question isn't very coherent; I'm confused enough that I'm 
>having trouble formulating the question properly.  Anyway, any help or 
>guidance will be greatly appreciated.
>
>Thanks in advance,
>
>Charles McClain
>Phone:  603.659.2046
>email:    cmcclain01@attbi.com
>
>
>--
>To unsubscribe, e-mail:
<ma...@jakarta.apache.org>
>For additional commands, e-mail: 
><ma...@jakarta.apache.org>
>
>
>  
>



--
To unsubscribe, e-mail:
<ma...@jakarta.apache.org>
For additional commands, e-mail:
<ma...@jakarta.apache.org>


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>