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.
 = = = = = = = = = == = = = = = == = = = = = = = == = = = = = == = = = = 

Reply via email to