0

Its a simple example but I need to use structs to dynamically create radio buttons using the data stored in the ArrayList. This is the code from the java file.

public void reset(ActionMapping mapping, HttpServletRequest request) {

        setGender(null);
        setGenderList(null);

        ArrayList gList = new ArrayList();

        gList.add(new LabelValueBean("Male", "Male"));
        gList.add(new LabelValueBean("Female", "Female"));

        setGenderList(gList);

    }

     public String getGender() {
        return gender;
    }

    /**
     * @param gender the gender to set
     */
    public void setGender(String gender) {
        this.gender = gender;
    }

    /**
     * @return the genderList
     */
    public ArrayList getGenderList() {
        return genderList;
    }

    /**
     * @param genderList the genderList to set
     */
    public void setGenderList(ArrayList genderList) {
        this.genderList = genderList;
    }

Edited by havoc433

1
Contributor
1
Reply
9
Views
3 Years
Discussion Span
Last Post by havoc433
0

The radio buttons have to be labeled using the information in the Arraylist and also select for that information.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.