Announcement Announcement Module
Collapse
No announcement yet.
<form:form> tag 2 issues Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • <form:form> tag 2 issues

    Hi,

    I 'm currently having 2 problems with a spring form:

    1. I 'm using this line

    Code:
    <form:form name="invitationDetails" commandName="invitation"  action="<c:url value='${requestUrl}'/>" method="POST">
    However, the
    Code:
    <c:url value='${requestUrl}'/>
    is not translated to the actual URI mapped in the dispatcher servlet. Of course I have included the core jstl library.

    Is
    Code:
    <c:url value='${requestUrl}'/>
    not working with <form:form> ? Is it only working with <form> ?

    2. I 've been using checkboxes to display information. It was a bit tricky to realise where should I map the items and path attributes. However, I need to display some of the checkboxes pre-checked. The reference documentation mentions:

    Approach Two - When the bound value is of type array or java.util.Collection, the input(checkbox) is marked as 'checked' if the configured setValue(Object) value is present in the bound Collection.
    What does this mean exactly?

    Thanks in advance for your replies...

    J

  • #2
    For the 1st, I found a solution, even though not the explication:

    Code:
    <c:url value="${requestUrl}" var="actionUrl" scope="page" ></c:url>
    <form:form name="invitationDetails" commandName="invitation"  action="${actionUrl}" method="POST">
    For the 2nd, I think it talks about the setValue() in the PropertyEditor.
    Last edited by jkost; Nov 28th, 2008, 04:12 AM.

    Comment

    Working...
    X