You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Natalie D Rassmann <na...@lmco.com> on 2003/06/27 12:12:35 UTC

Tiles Tab Link ?

Hi,

I have a Tiles Definition file that contains a tab layout.  In the tab
layout, I want to use actions as links rther than linking directly to
jsp files.  I can get this to work, my only problem is that the action I
am linking to is a dispatchAction and I need to include that parameter
on the link line.  Here is an excerpt from my tiles definition file:

 <!-- tabs page -->
    <definition name="prtr.pr.tabs.page" extends="prtr.default">
       <put name="body-content" value="prtr.tabs.body"/>
    </definition>

    <!-- body using tabs -->
    <definition name="prtr.tabs.body"
path="/jsp/prtr/layouts/tabsLayout.jsp">
       <put name="selectedIndex" value="0"/>
       <put name="parameterName" value="selected"/>
       <putList name="tabList">
          <item value="Description"
link="/jsp/prtr/tabs/prDescription.jsp"/>
          <item value="Size"         link="/jsp/prtr/tabs/size.jsp"/>
          <item value="Checklists"
link="/jsp/prtr/tabs/checklists.jsp"/>
          <item value="Meetings"
link="/jsp/prtr/tabs/meetings.jsp"/>
          <item value="Defects"      link="/jsp/prtr/tabs/defects.jsp"/>

          <item value="Comments"
link="/jsp/prtr/tabs/comments.jsp"/>
          <item value="Distribution"
link="/jsp/prtr/tabs/distribution.jsp"/>
          <item value="Review"       link="/jsp/prtr/tabs/review.jsp"/>
          <item value="TestTab"
link="/createPeerRecordTestTab.do"/>
          <item value="TestDispatchTab"
link="/reviewRecordAction.do?dispatchAction=createPeerRec"/>
          <item value="Test"         link="/reviewRecordAction.do"/>
       </putList>
    </definition>

I want all of my links to look like the TestDispatchTab link.  However,
my problem is that I can't hardcode dispatchAction like that.  I need
the dispatchAction to be whatever it is....  I store the dispatchAction
string in the request.  So here is my question, How do I do this...  Can
anyone help???

Thanks,

Natalie


Re: Tiles Tab Link ?

Posted by Sandeep Takhar <sa...@yahoo.com>.
I think that ParameterAction will take a parameter??

sandeep
--- Natalie D Rassmann <na...@lmco.com>
wrote:
> Hi,
> 
> I have a Tiles Definition file that contains a tab
> layout.  In the tab
> layout, I want to use actions as links rther than
> linking directly to
> jsp files.  I can get this to work, my only problem
> is that the action I
> am linking to is a dispatchAction and I need to
> include that parameter
> on the link line.  Here is an excerpt from my tiles
> definition file:
> 
>  <!-- tabs page -->
>     <definition name="prtr.pr.tabs.page"
> extends="prtr.default">
>        <put name="body-content"
> value="prtr.tabs.body"/>
>     </definition>
> 
>     <!-- body using tabs -->
>     <definition name="prtr.tabs.body"
> path="/jsp/prtr/layouts/tabsLayout.jsp">
>        <put name="selectedIndex" value="0"/>
>        <put name="parameterName" value="selected"/>
>        <putList name="tabList">
>           <item value="Description"
> link="/jsp/prtr/tabs/prDescription.jsp"/>
>           <item value="Size"        
> link="/jsp/prtr/tabs/size.jsp"/>
>           <item value="Checklists"
> link="/jsp/prtr/tabs/checklists.jsp"/>
>           <item value="Meetings"
> link="/jsp/prtr/tabs/meetings.jsp"/>
>           <item value="Defects"     
> link="/jsp/prtr/tabs/defects.jsp"/>
> 
>           <item value="Comments"
> link="/jsp/prtr/tabs/comments.jsp"/>
>           <item value="Distribution"
> link="/jsp/prtr/tabs/distribution.jsp"/>
>           <item value="Review"      
> link="/jsp/prtr/tabs/review.jsp"/>
>           <item value="TestTab"
> link="/createPeerRecordTestTab.do"/>
>           <item value="TestDispatchTab"
>
link="/reviewRecordAction.do?dispatchAction=createPeerRec"/>
>           <item value="Test"        
> link="/reviewRecordAction.do"/>
>        </putList>
>     </definition>
> 
> I want all of my links to look like the
> TestDispatchTab link.  However,
> my problem is that I can't hardcode dispatchAction
> like that.  I need
> the dispatchAction to be whatever it is....  I store
> the dispatchAction
> string in the request.  So here is my question, How
> do I do this...  Can
> anyone help???
> 
> Thanks,
> 
> Natalie
> 
> >
---------------------------------------------------------------------
> To unsubscribe, e-mail:
> struts-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail:
struts-user-help@jakarta.apache.org


__________________________________
Do you Yahoo!?
SBC Yahoo! DSL - Now only $29.95 per month!
http://sbc.yahoo.com

---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org