Announcement Announcement Module
Collapse
No announcement yet.
Can't get Spring form binding with subclasses to work! Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Can't get Spring form binding with subclasses to work!

    tried the same thing as this thread suggested
    http://forum.springframework.org/showthread.php?t=9850. I added custom edtior. It still doesn't work for me. I found a post on the web dated in July 30, 2004 saying there was an issue with registering Property edtior. Changes do not get propagate down to the lower class.

    http://article.gmane.org/gmane.comp.....rcp.devel/179

    My question is do I have the latest and greatest from Spring?

    I'm running Spring IDE plugin for Websphere
    org.springframework.ide.eclipse.beans_1.0.3
    org.springframework_1.0.2

    How do I know if that changes are in the version of plugin I'm running?

    What am I trying to do is very straightforward...

    Binding a form with an object EditUser with subclasses: User, Member & Group...

    <spring:bind path="editUser.user.firstname">
    <input type="text" name="firstname" value="<c:out
    value="${status.value}"/>"/>
    </spring:bind>

    The changes from the form is not get to my User Object.

    If I bind the form directly to User like this: And it works fine

    <spring:bind path="user.firstname">
    <input type="text" name="firstname" value="<c:out
    value="${status.value}"/>"/>
    </spring:bind>

    Some body help...
    Last edited by Rod Johnson; Jan 18th, 2006, 10:38 AM.

  • #2
    Seems like you pass the User object instead of the EditUser object as your command object to the form

    Comment


    • #3
      I did pass the EditUser Object as the command class...

      Comment


      • #4
        Try to use the ${status.expression} for the name parameter of your html tag.

        Code:
        <spring&#58;bind path="editUser.user.firstname"> 
        <input type="text" name="<c&#58;out 
        value="$&#123;status.expression&#125;"/>" value="<c&#58;out 
        value="$&#123;status.value&#125;"/>" > 
        </spring&#58;bind>
        [/code]

        Comment

        Working...
        X