AW: AW: AW: Question about html:select (again)

2003-02-28 Thread Hirschmann, Bernhard

So this is what you have:

html:select name=test multiple=true property=list  size=8
html:optionsCollection property=list label=label value=name/
/html:select


You're using the field list from the form bean for two purposes, which
result in a conflict. 
In the html:select, the 'property' is supposed to store the selections by
the user.
In the html:options, the 'property' keeps the content for your selection
box.
I guess you should choos a different list for the selections, made by the
user.

Regards,
Bernhard



-Ursprüngliche Nachricht-
Von: Peng Tuck Kwok
Gesendet: Freitag, 28. Februar 2003 00:44
An: Hirschmann, Bernhard
Betreff: Re: AW: AW: Question about html:select (again)


That's funny, I did attach it. Nevermind here it is again.

Hirschmann, Bernhard wrote:
 there is not attachment in your mail...
 
 
 -Ursprüngliche Nachricht-
 Von: Peng Tuck Kwok 
 Gesendet: Donnerstag, 27. Februar 2003 11:41
 An: Struts Users Mailing List
 Betreff: Re: AW: Question about html:select (again)
 
 
 Hey Bernhard thanks.
 
 Here it goes.
 
 Hirschmann, Bernhard wrote:
 
Hey Pen,

if you could post the JSP code, maybe I could give you a hint.

Regards,
Bernhard


-Ursprüngliche Nachricht-
Von: Peng Tuck Kwok 
Gesendet: Donnerstag, 27. Februar 2003 10:21
An: Struts Users Mailing List
Betreff: Question about html:select (again)


I've been able to display a collection of beans using the html:select 
tag in conjunction with with the html:optionsCollection tag but I am 
stuck with a problem. I get complains from struts that it has a type 
mismatch when it tries to set my attribute for the html:select field.

I have public ArrayList getSelection() and public void 
setSelection(ArrayList input) . It seems the problem is at setSelection.
Does anyone know how to make this work?  I'm a little confused by this 
and I'm sorry if it doesn't make sense in the first read. THanks


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

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


 
 
 
 


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



Re: AW: AW: AW: Question about html:select (again)

2003-02-28 Thread Kwok Peng Tuck
I've managed to fix this problem and if you click submit without 
validation then it is able to get the values :)

But if you validate it and the page gets redirected  back to the input 
page then the input page complains that it no longer able to get the 
collection.
Where or how should I repopulate the list  Bernhand ?

ps : my tags look like this now, along with the necessary class changes.

html:select name=compose multiple=true property=recipients  
size=8
   html:optionsCollection label=name 
property=beanCollection value=number/
/html:select


 



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


AW: AW: AW: AW: Question about html:select (again)

2003-02-28 Thread Hirschmann, Bernhard

If you get your values out of the form bean, and this form bean is valid not
only for one request (configured in struts-config.xml), then you don't have
to repopulate. 

If you explicitly want to repolulate, then this should be done in your
action. But as I said, this is not necessary if you configure the validity
in the right way.

Bernhard

-Ursprüngliche Nachricht-
Von: Kwok Peng Tuck [mailto:[EMAIL PROTECTED]
Gesendet: Freitag, 28. Februar 2003 10:44
An: Struts Users Mailing List
Betreff: Re: AW: AW: AW: Question about html:select (again)


I've managed to fix this problem and if you click submit without 
validation then it is able to get the values :)

But if you validate it and the page gets redirected  back to the input 
page then the input page complains that it no longer able to get the 
collection.
Where or how should I repopulate the list  Bernhand ?

ps : my tags look like this now, along with the necessary class changes.

 html:select name=compose multiple=true property=recipients  
size=8
html:optionsCollection label=name 
property=beanCollection value=number/
/html:select


  



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

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