Results 1 to 4 of 4

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

Hybrid View

  1. #1

    Default 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 at 10:38 AM.

  2. #2
    Join Date
    Aug 2004
    Location
    Los Angeles, USA
    Posts
    62

    Default

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

  3. #3

    Default

    I did pass the EditUser Object as the command class...

  4. #4
    Join Date
    Aug 2004
    Location
    Paris
    Posts
    43

    Default

    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]

Similar Threads

  1. Replies: 3
    Last Post: Jun 8th, 2010, 03:27 AM
  2. Replies: 5
    Last Post: Aug 9th, 2008, 05:30 AM
  3. Replies: 6
    Last Post: Sep 24th, 2006, 11:58 AM
  4. Replies: 14
    Last Post: Feb 21st, 2005, 05:41 PM
  5. Replies: 2
    Last Post: Aug 17th, 2004, 04:16 PM

Posting Permissions

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