Hi,

I have a bean StoreRoomForm which I have saved in the session in application
scope via:
        StoreRoomForm storerooms=new StoreRoomForm();
        ServletContext context=this.getServlet().getServletContext();
      context.setAttribute("storeroom",storerooms );

StoreRoomForm has the following two methods:

  Vector storerooms=new Vector()
  public void setStoreroom(pwStoreroom newStoreroom)
  {
    storerooms.add(newStoreroom);
  }

  public Vector getStoreroom()
  {
    return storerooms;
  }

pwStoreroom has the following method:

  public String getName()
  {
    return name;
  }

  public void setName(String newName)
  {
    name = newName;
  }

Now I want to populate a select box with the names of the storerooms kept in
my list of storerooms kept in the session.

I have tried the following:

First Line: check to make sure that their is an object of type
'StoreRoomForm' in the session under the key "storeroom". This works.

Second line: place any user selection into another bean. This works

Third line: create a bean using the pwStorerooms held in the vector. This
does not work. I keep getting a "No getter method for property storeroom of
bean storeroom." I think the way I have structured this line is correct.
Name=the key of the bean to search for; scope=the session scope to search
upon and property=the name of the vector property in the bean.

Any help in unravelling this is appreciated.

<logic:present name="storeroom" scope="application">
        <html:select property="requisitionLines.storeroom.name">
        <bean:define id="requisitionStorerooms" name="storeroom"
scope="application"     property="storeroom"/>
        <html:options collection="requisitionStorerooms" property="name"/>
        </html:select>
</logic:present>

Regards

Alex

Reply via email to