On 1/19/2001 at 12:52 PM [EMAIL PROTECTED] wrote:
> How do I set the value of the radio button to the value of the
<struts:htmlProperty name="product" property="productID"/>

Using the current builds, you would do something like this (taken from
the example application). 

Build a bean to hold the collection of radio button options. Store it
in the request context.

<%-- In real life, these would be loaded from a database --%>
<%
  java.util.ArrayList list = new java.util.ArrayList();
  list.add(new org.apache.struts.example.LabelValueBean("IMAP
Protocol", "imap"));
  list.add(new org.apache.struts.example.LabelValueBean("POP3
Protocol", "pop3"));
  pageContext.setAttribute("serverTypes", list);
%>


Reference the bean in the options tag.

      <html:select property="subscription.type">
        <html:options collection="serverTypes" property="value"
                   labelProperty="label"/>
      </html:select>

In your case, I think it might be

      <html:select property="dispProductsBean">
        <html:options collection="property" property="productID"/>
      </html:select>


-- Ted Husted, Husted dot Com, Fairport NY USA.
-- Custom Software ~ Technical Services.
-- Tel 716 425-0252; Fax 716 223-2506.
-- http://www.husted.com/about/struts/


Reply via email to