Announcement Announcement Module
Collapse
No announcement yet.
form:options doesn't work Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • form:options doesn't work

    Hi,

    <form:select path="skills" items="${commandObj.skills}" />

    works perfectly and the form is submitted if I push the button. But with

    <form:select path="skills">
    <form:options items="${commandObj.skills}" itemValue="code" itemLabel="name"/>
    </form:select>

    all values are displayed but a form submission is not possible - nothings happens. I have a 'getSkills()' and 'setSkills(Skill[] a_skills)' in my command class. All skills are stored in the command class in an ordinary array. Do I have to use a map or such things?

    Where is my mistake?

    Thanks in advance!

  • #2
    Originally posted by Toru View Post
    Hi,

    <form:select path="skills" items="${commandObj.skills}" />

    works perfectly and the form is submitted if I push the button. But with

    <form:select path="skills">
    <form:options items="${commandObj.skills}" itemValue="code" itemLabel="name"/>
    </form:select>

    all values are displayed but a form submission is not possible - nothings happens. I have a 'getSkills()' and 'setSkills(Skill[] a_skills)' in my command class. All skills are stored in the command class in an ordinary array. Do I have to use a map or such things?

    Where is my mistake?

    Thanks in advance!
    It was my mistake. I forgot to implement a property editor.

    Comment

    Working...
    X