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

  • Registration form

    Hallo everyone i'm trying to create a registration form. In this form there are field like username,password etc. Moreover i want to add at this form a listbox which i want to contain some fields. These fields are retrieved from a server. I manage to retrieve these fields successfully but i can't enhance them into the form. Here is my code:

    My model:

    public class Registration {

    private String username;
    private String password;
    private List<String> researchareas;

    get/set methods


    The view:

    <c:url var="reginto" value="/registration" />
    <form:form modelAttribute="registrationAttribute" method="GET" action="${reginto}">
    <td><form:label path="username">Username:</form:label></td>
    <td><form:input path="username"/></td>

    <td><form:label path="password">Password:</form:label></td>
    <td><form:input path="password"/></td>

    <td><form:label path="researchareas">Research area:</form:label></td>
    <form:select path="researchareas" items="${researchareas}" multiple="true" />

    I'm taking an exception which says:
    org.springframework.beans.NotReadablePropertyExcep tion: Invalid property 'researchareas' of bean class [org.client.model.registration.Registration] Bean property 'researchareas' is not readable or has an invalid getter method: Does the return type of the getter match the parameter type of the setter?

    And in the second part i want to send this form to the server.
    When i'll send this to the server i want to make a change in the researcharea field.
    I don't want to send it as a String, i want to send it as HATOEAS. Actually i receive
    it as HATOEAS and with a process i transorm it String.Now i want to do the opposite.
    I don't have idea how can i do these two parts.nothing seems to work. Please, if
    anyone has an idea, propose it to me.
    Thanks in advance
    Last edited by alexios.7; Aug 16th, 2012, 05:56 AM.

  • #2
    model.addAttribute("researchareas",lista); adds a list or a map?