Re: prepopulating a dropdown box in a struts way.

2005-12-12 Thread Frank W. Zammetti
Ah, in the "modern" world of AJAX and the like, enclosing forms many times are no longer much use. I wouldn't say it does much harm to still do it in most cases, it just becomes somewhat superfluous. Maybe you have a who's purpose is to change the contents of a by firing off an AJAX event. No

Re: prepopulating a dropdown box in a struts way.

2005-12-12 Thread Laurie Harper
The documentation for html:select states that, 'This tag is only valid when nested inside a form tag body.' It *might* work without an enclosing html:form tag, but you would need to tell the html:optionsCollection tag where to lookup the 'system_href' property. Try adding name="availableSystem"

Re: prepopulating a dropdown box in a struts way.

2005-12-12 Thread Keith Sader
Mine are, because I do submits off of those pages. If you use a form, then the scriptlet logic you have can go into the action and you don't have that messy java code in your jsp. On 12/12/05, Leung Ping Cheung <[EMAIL PROTECTED]> wrote: > Should the jsp be tied to a form for this case? > > I do

Re: prepopulating a dropdown box in a struts way.

2005-12-12 Thread Leung Ping Cheung
Should the jsp be tied to a form for this case? I do not make up a form. I do this in the jsp. <% List availableSystemList = UserSystemService.getInstance().getAvailableSystemList(request.getRemoteUser()); request.setAttribute("availableSystem", availableSystemList); %> where syste

Re: prepopulating a dropdown box in a struts way.

2005-12-08 Thread Keith Sader
You need to make use of the html:optionsCollection tag In your form bean you need an object that has the properties label and value. Like this: public class ComboBoxItem implements Serializable, Comparable { private String label; private String value;

prepopulating a dropdown box in a struts way.

2005-12-08 Thread Leung Ping Cheung
I think there are many people asking the same question. But I cannot find the answer. any web sites have more or less coding example of populating a dropdown box or list in a Struts way before the web page displays. Thanks - To