You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by ch...@tkdsoftware.com on 2004/06/11 12:17:34 UTC

form handling

Could someone offer some input on the best way to handle the necessary form 
logic described below?

I have a popup window and that looks similar to the following:

  Search: [                     ] [Find]
          A B C D E F G H I J K L M N O P Q R S T U V W X Y Z All
  -----------------------------------------------------------------------
                       [<<] 1-5 of 6 values [>>]
  -----------------------------------------------------------------------
    [ ] A1
    [ ] C2
    [ ] E3
    [ ] E4
    [ ] W5
  -----------------------------------------------------------------------
                       [<<] 1-5 of 6 values [>>]
  -----------------------------------------------------------------------
                          [Clear] [Save] [Return]

Functionality-wise, the initial view of this window is to always show "All"
values and the user can drill down by either eaching a "begins-with" search
criteria or selecting the letter hyperlink will alter the results to the 
subset of items which begin with that letter.

The caveat here is that the user selects "A1" and hits the save button.  
This in-essenses posts the form with the value of A1 selected.  Lets say
the user then hits the "E" hyperlink which would only show items E3 and E4.
The user selects E4 and hits save.  

At this point, A1 and E4 should be in the saved list of elements so if the
user then hits the "All" hyperlink, the above view will be shown with both
values having their checkbox checked.  

How can I go about being able to "persist" these selected values in this 
fashion?  

Thanks in advance!
Chris
 


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


Re: form handling

Posted by Bill Siggelkow <bi...@bellsouth.net>.
It sounds like you would want to use a session-scoped form containing an 
  array of Strings representing the total set of the selections. Then 
you would use <html:multibox> to create the checkboxes on the form. As a 
far as the paging/selecting by letter -- this is not too hard -- you 
just need your Action to handle either a page to display or the selected 
letter. On the page itself you would use logic:iterate to generate the 
html:multibox controls.

selectedchris.cranford@tkdsoftware.com wrote:
> Could someone offer some input on the best way to handle the necessary form 
> logic described below?
> 
> I have a popup window and that looks similar to the following:
> 
>   Search: [                     ] [Find]
>           A B C D E F G H I J K L M N O P Q R S T U V W X Y Z All
>   -----------------------------------------------------------------------
>                        [<<] 1-5 of 6 values [>>]
>   -----------------------------------------------------------------------
>     [ ] A1
>     [ ] C2
>     [ ] E3
>     [ ] E4
>     [ ] W5
>   -----------------------------------------------------------------------
>                        [<<] 1-5 of 6 values [>>]
>   -----------------------------------------------------------------------
>                           [Clear] [Save] [Return]
> 
> Functionality-wise, the initial view of this window is to always show "All"
> values and the user can drill down by either eaching a "begins-with" search
> criteria or selecting the letter hyperlink will alter the results to the 
> subset of items which begin with that letter.
> 
> The caveat here is that the user selects "A1" and hits the save button.  
> This in-essenses posts the form with the value of A1 selected.  Lets say
> the user then hits the "E" hyperlink which would only show items E3 and E4.
> The user selects E4 and hits save.  
> 
> At this point, A1 and E4 should be in the saved list of elements so if the
> user then hits the "All" hyperlink, the above view will be shown with both
> values having their checkbox checked.  
> 
> How can I go about being able to "persist" these selected values in this 
> fashion?  
> 
> Thanks in advance!
> Chris


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