Results 1 to 2 of 2

Thread: <form:form> tag 2 issues

Hybrid View

  1. #1
    Join Date
    Nov 2008
    Posts
    13

    Default <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. #2
    Join Date
    Nov 2008
    Posts
    13

    Default

    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 at 04:12 AM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •