I looked at tabsLayout.jsp in rc2. Here is a code snippet: <<<<< String href = request.getRequestURI() + "?"+parameterName + "=" + index; // Don't add request URI prefix , but let the client compute the original URL // This allows to use a Struts action as page URL, and perform a forward. // Bug reported by Don Peterkofsky //String href = "" + "?"+parameterName + "=" + index; String color = notSelectedColor; if( index == selectedIndex ) { selectedBody = tab.getLink(); color = selectedColor; } // enf if index++; %> <td bgcolor="<%=color%>"> <a href="<%=href%>" ><%=tab.getValue()%></a> </td> <td width="1" ></td> >>>>>>>>>>>>>>>
In the above code - tab is what you have defined as an entry in your putList and we are iterating over it. This code is creating the tabs. At the very bottom is where it is creating the link for each tab. This link seems to be always the same according to the code and to just append a parameter to it. So basically you want the original request to the page to be an action and I think it should work since it will always make an href to the original request + parameter which tells what has been selected. Below this code snippet it does an insert (include): <tiles:insert name="<%=selectedBody%>" flush="true" /> selectedBody depends on selectedIndex (this is the paramater that changes depending on the tab). This is set as a default in your definition as well in case you haven't selected a tab yet.(zero below). SelectedBody is a jsp in this case although the comment makes it seem like it could be an action. I am not sure if you can do a tiles:insert name="some_Action"?? So if you can't then I wouldn't have the link parameter set to an action... Also selectedBody is set twice. Once in the code above if someone selected something. Also by default. So I think by reading the code the the initial action that brings up the tab layout will always be called when you click on the link. This should always forward to this same tile. The only thing that changes is the parameter saying which page is selected. If you want to change the behaviour you will have to change the code. sandeep --- [EMAIL PROTECTED] wrote: > Hi, > > I have exactly the same question, so if someone can > help us out, it would be great. > > Regards, > Trang > > -----Original Message----- > From: Natalie D Rassmann > [mailto:[EMAIL PROTECTED] > Sent: Donnerstag, 26. Juni 2003 12:29 > To: Struts Users Mailing List > Subject: Tiles Tab to Actions > > > I am using the Tiles Tab Layout and I need the links > to go to an action > rather than a jsp page? Does anyone know how I go > about do that. Here > is my Tiles Def for the layout.... > > <!-- 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="/promis/action/createPeerRecord"/> > </putList> > </definition> > > Actually, I need it to go to a particular JSP (for > example I need the > Size tab to go to the Size JSP) but through an > action rather than a > link.... > > Can anyone help? > > Thanks, > > Natalie > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: > [EMAIL PROTECTED] > For additional commands, e-mail: > [EMAIL PROTECTED] > __________________________________ Do you Yahoo!? SBC Yahoo! DSL - Now only $29.95 per month! http://sbc.yahoo.com --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]