You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by "Anderson, James H [IT]" <ja...@citigroup.com> on 2004/01/20 17:28:23 UTC

beginner's html:options question

I have a collection of LabelValueBeans as a property of another bean (an Action), and I store this bean in session scope with "preparedData" as the key. But when I try and access it using html:option, I get the following error:

	"Cannot find bean preparedData in any scope"

Here's html:option related stuff:

	<html:select property="account">
	    <bean:define id="viewOptions" name="preparedData" property="view" type="java.util.collection"/>
	    <html:options collection="viewOptions" property='value" labelProperty="label"/>
	</html:select>
	

Here's how I save it in session scope:

	HttpSession session = request.getSession();
	session.setAttribute("preparedData", this);

(I know this code is working because a subsequent retrieval worked.)

Here's the attached code for the "preparedData" Action bean:

 <<PrepareAction.java>> 
Any help greatly appreciated!

jim