For the controller/logic part, I also think you need one action and one form for all 
your tabs.
  For the view part, check Tiles : there is an example of tabs
(struts-tiles/examples/summariesTabs.jsp). You can easily adapt it to your needs. You 
can create a
body with the submit/cancel button, and insert tabs in this body.

   Cedric


[EMAIL PROTECTED] wrote:

> One other question though now that I am looking at this a little closer:
>
> Each of my individual JSP's should not have a Submit/Cancel/Reset for each
> page.    I was thinking about having one and only one Submit/Cancel button.
> So I would probobly use a Frame and have a target window (which would be
> filled in by one of the 5 different JSP files).   The outer frame itself
> would contain the Submit button (but would not necessarily have to be a
> frame).   The outer frame would also contain the links that would invoke
> the corresponding Form-Action load for that respective JSP.
>
> Would that be a viable approach rather than having a "Submit" button on
> each tab?    I would only need to do my required fields check when they hit
> the global submit (in which case I can redirect them to the specific JSP
> that needs to be corrected should an error occur).
>
> Please let me know if I am on the right wave length here.
>
> thanks,
> Theron K
>
>
>                     Rob Breeds
>                     <Rob_Breeds@u        To:     Struts Users Mailing List
>                     k.ibm.com>           <[EMAIL PROTECTED]>
>                                          cc:
>                     03/04/02             Subject:     Re: Advice requested, what's 
>the best way to
>                     09:22 AM             mimic tab panes in Struts?
>                     Please
>                     respond to
>                     Struts Users
>                     Mailing List
>
>
>
> 1 ActionForm (session scope), 5 ActionMappings, one Action, 5 JSPs. Each
> tab has link which submits form with that tab's form values, the tab submit
> link is differentiated by mapping parameter attribute (or hidden form
> field). ActionForm validate checks data is OK. Each submit of the current
> tab is redirected back to the input page (the current tab). If the user
> changes tabs, the mapping simply redirects to the appropriate page. Only
> when the user clicks the final 'commit this lot' link should the Action
> actually process the data.
>
> Rob
>
>                     theron.kousek@
>                     webmd.net            To:     Struts Users Mailing List
> <[EMAIL PROTECTED]>
>                                          cc:
>                     04/03/2002           Subject:     Advice requested,
> what's the best way to mimic tab panes in Struts?
>                     17:11
>                     Please respond
>                     to "Struts
>                     Users Mailing
>                     List"
>
> Hi Folks:
>
> We're converting much of our GUI (written in JFC/Swing) to thin client
> using HTML-JavaScript and the struts framework.
>
> I have converted a few of the simpler maintenance screens using the
> framework and (thanks to you all) have learned quite a bit with struts.
>
> There is a screen that I need to convert though which has 5 panes in a
> JTabbedPane control.    Each pane refers to input in a different table but
> all 5 panes together serve to obtain information about a Process Setup for
> claims.    So in other words, you fill out the info for all 5 tabs and when
> you hit "Ok", required field checks are performed.   If required fields are
> ok, then data is gathered from each tab and the corresponding table is
> updated for a total of 5 tables.   But they all belong to the same SQL
> transaction.    So it is not valid to update just 1 of the 5 tables.   It's
> either all or none.    So if the update/insert fails on any of the 5
> tables, then the whole transaction is rolled back and the user is informed
> of the problem.
>
> With the JFC/Swing architecture, this is pretty easy to do.    With struts
> it seems different.   Do I need to have 5 forms (each form mimicing a tab)
> with a hyperlink of image files that look like tabs but have href's to the
> 5 different forms?
>
> Here's my problem:
> - Don't forms need to have a Submit button?     If so, I can't do this.   I
> need to have 5 forms but one submit so that all 5 forms share the same
> submit button (the 1 submit button would cause an action to take data off
> of the 5 pages (or forms) and populate the tables directly.
>
> What would be the best way to do this?    I can't use a wizard as the user
> needs to be able to flip back and forth at will thru any of the 5 forms
> before they hit the final "submit" button.
>
> thanks,
> Theron
>
> --
> To unsubscribe, e-mail:   <
> mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail: <
> mailto:[EMAIL PROTECTED]>
>
> --
> To unsubscribe, e-mail:   <
> mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail: <
> mailto:[EMAIL PROTECTED]>
>
> --
> To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>


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

Reply via email to