Re: AW: Populating a html select in struts.

2003-02-21 Thread Peng Tuck Kwok
Thanks Bernhard for replying, I do know I can do that but my question 
was more along the lines of how to get html:select multiple to work 
properly. I can't seem to find good examples for this on the struts 
website. Do you have or know of any ?

Hirschmann, Bernhard wrote:
You can pre-populate your form in an action, which you have to call before
showing the JSP. You then forward to the JSP from your action.

Calling a action is done using ...yoururl.com/actionName.do in the browser
url.

Bernhard

-Ursprüngliche Nachricht-
Von: Peng Tuck Kwok [mailto:[EMAIL PROTECTED]]
Gesendet: Freitag, 21. Februar 2003 09:36
An: Struts Users Mailing List
Betreff: Populating a html select in struts.


How does one pre-populate a form field in struts which uses the multiple 
select ? I've tried it but I don't see anything being filled out in the 
select box, I've also created the necessary form beans for it to work. 
Help with this would be nice, 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: Populating a html select in struts.

2003-02-21 Thread eddieyan
Peng Tuck,

Below is a working example. You need to populate the eventTypeAll in 
your
action class.

FOr JSP:
html:select property=eventTypeId 
html:options collection=eventTypeAll property=id
labelProperty=code  /
/html:select

For Action class:
request.setAttribute(eventTypeAll, new ArrayList(your 
array
list));

Ed.

- Original Message -
From: Peng Tuck Kwok [EMAIL PROTECTED]
To: Struts Users Mailing List [EMAIL PROTECTED]
Sent: Friday, February 21, 2003 5:13 PM
Subject: Re: AW: Populating a html select in struts.


 Thanks Bernhard for replying, I do know I can do that but my question
 was more along the lines of how to get html:select multiple to work
 properly. I can't seem to find good examples for this on the struts
 website. Do you have or know of any ?

 Hirschmann, Bernhard wrote:
  You can pre-populate your form in an action, which you have to call
before
  showing the JSP. You then forward to the JSP from your action.
 
  Calling a action is done using ...yoururl.com/actionName.do in the
browser
  url.
 
  Bernhard
 
  -Ursprüngliche Nachricht-
  Von: Peng Tuck Kwok [mailto:[EMAIL PROTECTED]]
  Gesendet: Freitag, 21. Februar 2003 09:36
  An: Struts Users Mailing List
  Betreff: Populating a html select in struts.
 
 
  How does one pre-populate a form field in struts which uses the 
multiple
  select ? I've tried it but I don't see anything being filled out in 
the
  select box, I've also created the necessary form beans for it to 
work.
  Help with this would be nice, 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]




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




Re: AW: Populating a html select in struts.

2003-02-21 Thread Peng Tuck Kwok
Thanks for the tip eddie. Much appreciated.

[EMAIL PROTECTED] wrote:

Peng Tuck,

Below is a working example. You need to populate the eventTypeAll in 
your
action class.

FOr JSP:
html:select property=eventTypeId 
html:options collection=eventTypeAll property=id
labelProperty=code  /
/html:select

For Action class:
request.setAttribute(eventTypeAll, new ArrayList(your 
array
list));

Ed.

- Original Message -
From: Peng Tuck Kwok [EMAIL PROTECTED]
To: Struts Users Mailing List [EMAIL PROTECTED]
Sent: Friday, February 21, 2003 5:13 PM
Subject: Re: AW: Populating a html select in struts.



Thanks Bernhard for replying, I do know I can do that but my question
was more along the lines of how to get html:select multiple to work
properly. I can't seem to find good examples for this on the struts
website. Do you have or know of any ?

Hirschmann, Bernhard wrote:


You can pre-populate your form in an action, which you have to call


before


showing the JSP. You then forward to the JSP from your action.

Calling a action is done using ...yoururl.com/actionName.do in the


browser


url.

Bernhard

-Ursprüngliche Nachricht-
Von: Peng Tuck Kwok [mailto:[EMAIL PROTECTED]]
Gesendet: Freitag, 21. Februar 2003 09:36
An: Struts Users Mailing List
Betreff: Populating a html select in struts.


How does one pre-populate a form field in struts which uses the 

multiple


select ? I've tried it but I don't see anything being filled out in 

the


select box, I've also created the necessary form beans for it to 

work.


Help with this would be nice, 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]






-
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]