Re: How to store a String[] in a hidden field?

2002-01-16 Thread Keith Bacon

Just looked at this reply - I wonder why I said put these methods in an object in the 
session?
They can just be static methods of any class.
Keith.

--- Keith Bacon <[EMAIL PROTECTED]> wrote:
> How about putting a helper class in your session which has methods:-
> 
> String stringArrayToTokenizedString(String[] array)
>//store array elements delimted by some char that's not in the data.
> 
> String[] tokenizedStringToStringArray.
>//Use StringTokeniser to build the array again.
> 
> Then you need only store 1 big long string.
> Personally that seems fairly horrible too but at least there's less JSP code.
> Keith.
> 
> --- Christian Bouessay <[EMAIL PROTECTED]> wrote:
> > Well, I've found one solution:
> > 
> > 
> > > collection="<%=request.getParameterValues("fields")%>">
> > 
> >  
> > 
> >
> > 
> > 
> > Is there a better way to do this?
> > 
> > --
> > C. Bouessay
> > 
> > Christian Bouessay wrote:
> > 
> > > Hi,
> > > I have a form with a multiple select box.
> > > 
> > > class myForm1 extends ActionForm {
> > > String[] getFields() { ...}
> > > void setFields(String[] fields )
> > > ...
> > > }
> > > 
> > >  > > labelProperty="label"/>
> > > 
> > > 
> > > When I submit the form and validate() return null, it forwards to an 
> > > other view of the same form where I would like to store this property in 
> > > a hidden field.
> > > 
> > > And HTML output is:
> > > 
> > > 
> > > 
> > > How can I tell struts to store it in a "String" format?
> > > 
> > > 
> > > Thanks for help.
> > > -- 
> > > C. Bouessay
> > > 
> > > 
> > > -- 
> > > To unsubscribe, e-mail:   
> > > 
> > > For additional commands, e-mail: 
> > > 
> > > 
> > 
> > 
> > 
> > 
> > --
> > To unsubscribe, e-mail:   
> > For additional commands, e-mail: 
> > 
> 
> 
> __
> Do You Yahoo!?
> Send FREE video emails in Yahoo! Mail!
> http://promo.yahoo.com/videomail/
> 
> --
> To unsubscribe, e-mail:   
> For additional commands, e-mail: 
> 


__
Do You Yahoo!?
Send FREE video emails in Yahoo! Mail!
http://promo.yahoo.com/videomail/

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: How to store a String[] in a hidden field?

2002-01-16 Thread Keith Bacon

How about putting a helper class in your session which has methods:-

String stringArrayToTokenizedString(String[] array)
   //store array elements delimted by some char that's not in the data.

String[] tokenizedStringToStringArray.
   //Use StringTokeniser to build the array again.

Then you need only store 1 big long string.
Personally that seems fairly horrible too but at least there's less JSP code.
Keith.

--- Christian Bouessay <[EMAIL PROTECTED]> wrote:
> Well, I've found one solution:
> 
> 
> collection="<%=request.getParameterValues("fields")%>">
> 
>  
> 
>
> 
> 
> Is there a better way to do this?
> 
> --
> C. Bouessay
> 
> Christian Bouessay wrote:
> 
> > Hi,
> > I have a form with a multiple select box.
> > 
> > class myForm1 extends ActionForm {
> > String[] getFields() { ...}
> > void setFields(String[] fields )
> > ...
> > }
> > 
> >  > labelProperty="label"/>
> > 
> > 
> > When I submit the form and validate() return null, it forwards to an 
> > other view of the same form where I would like to store this property in 
> > a hidden field.
> > 
> > And HTML output is:
> > 
> > 
> > 
> > How can I tell struts to store it in a "String" format?
> > 
> > 
> > Thanks for help.
> > -- 
> > C. Bouessay
> > 
> > 
> > -- 
> > To unsubscribe, e-mail:   
> > 
> > For additional commands, e-mail: 
> > 
> > 
> 
> 
> 
> 
> --
> To unsubscribe, e-mail:   
> For additional commands, e-mail: 
> 


__
Do You Yahoo!?
Send FREE video emails in Yahoo! Mail!
http://promo.yahoo.com/videomail/

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: How to store a String[] in a hidden field?

2002-01-16 Thread Christian Bouessay

Well, I've found one solution:


   ">

 

   


Is there a better way to do this?

--
C. Bouessay

Christian Bouessay wrote:

> Hi,
> I have a form with a multiple select box.
> 
> class myForm1 extends ActionForm {
> String[] getFields() { ...}
> void setFields(String[] fields )
> ...
> }
> 
>  labelProperty="label"/>
> 
> 
> When I submit the form and validate() return null, it forwards to an 
> other view of the same form where I would like to store this property in 
> a hidden field.
> 
> And HTML output is:
> 
> 
> 
> How can I tell struts to store it in a "String" format?
> 
> 
> Thanks for help.
> -- 
> C. Bouessay
> 
> 
> -- 
> To unsubscribe, e-mail:   
> 
> For additional commands, e-mail: 
> 
> 




--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




How to store a String[] in a hidden field?

2002-01-16 Thread Christian Bouessay

Hi,
I have a form with a multiple select box.

class myForm1 extends ActionForm {
 String[] getFields() { ...}
 void setFields(String[] fields )
 ...
}

 


When I submit the form and validate() return null, it forwards to an 
other view of the same form where I would like to store this property in 
a hidden field.

And HTML output is:



How can I tell struts to store it in a "String" format?


Thanks for help.
--
C. Bouessay


--
To unsubscribe, e-mail:   
For additional commands, e-mail: