Lim,
You describe exactly the problem I am having, as well. 
I started on this yesterday and tried a few things to try to help me 
understand how it should work. One idea I have had but not yet had time to 
test (hopefully today if me other production problems go away!), is 
passing the "selectedBody" back into the session from the Action that is 
invoked and just re-invoking the jsp that inserts the tabs page. Of 
course, this could be totally inefficient or downright wrong. But it's the 
only clue I have right now of how to make it work.

Post it if you make any progress and I'll do likewise and we'll hope in 
the meantime Cedric or some other real tiles authority can shed light on 
how to do it.

Later, Joe





"Lim Huat Heng" <[EMAIL PROTECTED]>
10/30/2003 02:16 AM
Please respond to "Struts Users Mailing List"

 
        To:     "Struts Users Mailing List" <[EMAIL PROTECTED]>
        cc: 
        Subject:        Re: Tiles, Tabs, Actions


Joseph:
   I would like to know how to develop application wth Tiles, Tabs and
Actions.
   I have three JSPs that I have done with Struts and the action and
forwarding works well. Now I created another JSP with tabs, in which each
tab display the 3 JSPs respectively. When I submit, the result is 
displayed
on a new screen rather on the tab, so how can I forward the result to be
displayed on the same tab?
   Do you refer to any reference to perform this task? Please 
advice.Thanks.


----- Original Message -----
From: <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, October 30, 2003 1:48 AM
Subject: Tiles, Tabs, Actions


> I have an application that I have tried to wind into a tabbed display
> using the Tab Example from Cedric DuMoulin's site. The application is
> already a Struts/Tiles application that works just fine. I would just 
like
> to embed the functions/screens in the tabs and make is work normally.
>
> Currently, there are two tabs, one for each function of the application.
> Each of these is an initialization Action that routes to display/process
> actions. These are defined in the tilesdefinition.xml like this:
>
>   <definition name="timeEntryTabs.page"  path="/tabOnlyLayout.jsp">
>      <put name="header" value="/Header.jsp"/>
>           <put name="title" value=""/>
>           <put name="actionname" value="" />
>           <put name="formbeanname" value=""/>
>           <put name="title"  value="Tiles 1.1 Tabs layout example" />
>           <put name="body"   value="timeEntryTabs.body" />
>       <put name="footer" value="/secure/footer.jsp"/>
>   </definition>
>
>  <definition name="timeEntryTabs.body"  path="/tabsLayout.jsp">
>         <put name="selectedIndex"  value="0" />
>         <put name="parameterName"  value="selected" />
>     <putList name="tabList" >
>       <item value="Time Entry"  link="/TimeSheetLogin.do"
>                 classtype="org.apache.struts.tiles.beans.SimpleMenuItem"
> />
>       <item value="Reports"     link="/TimeSheetReportMain.do"
>  classtype="org.apache.struts.tiles.beans.SimpleMenuItem" />
>     </putList>
>   </definition>
>
> Further down in the tilesdefinition.xml I have the individual 
definitions
> for these. The actual Action.do's have their inputs set to the 
definitions
> in the tilesdefinition.xml like this (TimeSheetStatus is unconditionally
> forwarded to by TimeSheetLogin.do):
>
> <action path="/TimeSheetStatus"
> type="mizuho.mtts.struts.actions.TimeSheetStatusAction"
>       name="TimeSheetStatusBean" input="statusDef"
>          scope="session">
>       <forward name="timesheetstatusform" path="statusDef"/>
>
> On the first invocation, everything is right. The application's two
> functions (TimeSheetEntry.do and TimeSheetStatus.do) display ok and you
> can tab between them. However, the minute you perform any kind of action
> (submit a form action or click a link) the "tabbed" version is gone and
> the plain application is displayed.
>
> I kind of understand why this would be, but I can't think of how it 
ought
> to be fixed so it works. Do you need to define and put all bean 
variables
> in the tilesdefinition? How do the actions know to use the right layout?
>
> I tried to understand how the example application made this work, but 
the
> version that I downloaded doesn't seem to work either. There are no 
active
> "actions" in any of the tabbed applications that work.
>
> I apologize if this is not clear. I didn't want to be too verbose or 
dump
> too much code into this first mail, in case it's just something real
> obvious and simple and everyone in the world out there has done it
> already.
>
> Thanks much IA.
>
> = = = = = = = = = == = = = = = == = = = = = = = == = = = = = == = = = =
> This transmittal and any attachments may contain confidential, 
privileged
or sensitive information and is solely for the use of the intended
recipient. If you are not intended recipient, you are hereby notified that
you have received this transmittal and any such attachments in error and 
any
review, dissemination, distribution or copying thereof is strictly
prohibited. If you have received this transmittal and any attachments in
error please notify the sender and immediately destroy the message and all
its attachments. Any opinions herein expressed may be those of the author
and not necessarily of Mizuho Corporate Bank, Ltd (the "Bank"). The Bank
accepts no responsibility for the accuracy or completeness of any
information herein contained.
>  = = = = = = = = = == = = = = = == = = = = = = = == = = = = = == = = = =
>
>


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]





= = = = = = = = = == = = = = = == = = = = = = = == = = = = = == = = = = 
This transmittal and any attachments may contain confidential, privileged or sensitive 
information and is solely for the use of the intended recipient. If you are not 
intended recipient, you are hereby notified that you have received this transmittal 
and any such attachments in error and any review, dissemination, distribution or 
copying thereof is strictly prohibited. If you have received this transmittal and any 
attachments in error please notify the sender and immediately destroy the message and 
all its attachments. Any opinions herein expressed may be those of the author and not 
necessarily of Mizuho Corporate Bank, Ltd (the "Bank"). The Bank accepts no 
responsibility for the accuracy or completeness of any information herein contained.
 = = = = = = = = = == = = = = = == = = = = = = = == = = = = = == = = = = 

Reply via email to