Struts example command: <logic:iterate id="subscription" name="user" property="subscriptions">
I read it as: "user" is the bean, "user.subscriptions" is the Collection (Vector or Array), and each element in that Collection will be "subscription". If that's correct, why am I getting this error: javax.servlet.ServletException: Cannot find bean jobRequest in scope null for the commands: <logic:iterate id="jobRequest" name="user" property="schedule" scope="session"> <td><bean:write name="jobRequest" property="name" filter="true"/></td> </logic:iterate> Since there's no error on the iterate command, I assume that Struts did find the bean "user" and the property "schedule". Why then did it not find jobRequest? And why was Struts looking in scope "null"? Shouldn't the bean "jobRequest" be in the same scope as "user"? -----Original Message----- From: Jakkampudi, ChandraseKhar [mailto:[EMAIL PROTECTED]] Sent: Wednesday, January 30, 2002 3:12 PM To: 'Struts Users Mailing List' Subject: RE: initializing html:select You can set the value paramater like this <html:select property="selectProperty" value="two"> <html:options property="values" labelProperty="names"/> </html:select> Value can take a real time expression. Unfortunately, it currently works only if you dont have multiple set to true. It should work in your case. -----Original Message----- From: Robert Tyler Retzlaff [mailto:[EMAIL PROTECTED]] Sent: Wednesday, January 30, 2002 2:01 PM To: [EMAIL PROTECTED] Subject: initializing html:select How do you initialize the <html:select> to a particular option so that it appears to be the default when the form is loaded. .. my ActionForm class private String selectProperty; private String[] values = { ""+1, ""+2 }; private String[] names = { "One", "Two" }; .. setter/getters public void reset( .., ..) { selectProperty = values[1]; } .. my form.jsp <html:select property="selectProperty"> <html:options property="values" labelProperty="names"/> </html:select> When the form loads I still end up with the selection box displaying "One" as opposed to "Two" is there a way to do what I would like to accomplish? Also, I've hard coded the arrays of values and names into the form which I don't like I would like to extract them from an object I have stored in the request how might that be achieved? Thanks rob -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]> -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]> -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>