Announcement Announcement Module
Collapse
No announcement yet.
checkbox Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • checkbox

    Hi, I have a problem with the use of checkbox, my file .jsp is this:
    .
    .

    <form:form>
    <table>

    <tr>
    <td>Interests:</td>
    <td>
    Quidditch: <input name="CheckboxController.interests" type="checkbox" value="Quidditch"/>
    <input type="hidden" value="1" name="_CheckboxController.interests"/>
    Herbology: <input name="CheckboxController.interests" type="checkbox" value="Herbology"/>
    <input type="hidden" value="1" name="_CheckboxController.interests"/>
    Defence Against the Dark Arts: <input name="CheckboxController.interests" type="checkbox"
    value="Defence Against the Dark Arts"/>
    <input type="hidden" value="1" name="_CheckboxController.interests"/>
    </td>
    </tr>
    .
    .
    my file .java is this

    package springapp.web;

    public class CheckboxController {

    private boolean receiveNewsletter;

    private String[] interests;

    private String favouriteWord;

    public boolean isReceiveNewsletter() {
    return receiveNewsletter;
    }

    public void setReceiveNewsletter(boolean receiveNewsletter) {
    this.receiveNewsletter = receiveNewsletter;
    }

    public String[] getInterests() {
    return interests;
    }

    public void setInterests(String[] interests) {
    this.interests = interests;
    }

    public String getFavouriteWord() {
    return favouriteWord;
    }

    public void setFavouriteWord(String favouriteWord) {
    this.favouriteWord = favouriteWord;
    }


    }

    The problem is that I do not know how linked in the file xml.
    I want simply that I read the names selected and I pass them to another page
Working...
X