Announcement Announcement Module
Collapse
No announcement yet.
How to populate a form and show it to the user !? (newbie) Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • How to populate a form and show it to the user !? (newbie)

    Hi, all!
    Im a new spring user and i have a little problem.

    I want to populate a form (jsp view) with information to update.


    Example
    <td>
    <spring:bind path="enterpriseInsurance.address">
    <input name="address" type="text" value="<c:out value='${enterpriseInsurance.address}'/>"/>
    </spring:bind>
    </td>

    So how to put the "enterpriseInsurance" on value without lose the auto bind feature !?

    Sorry by my english and thanks all!

  • #2
    Problem solved !

    Thanks anyway !

    Comment


    • #3
      populate data

      hi,
      i am facing same problem can you tell how did u solve that prob.

      Comment


      • #4
        Loading spring class

        Most of the questions are answered in the documentation. However, just a quick pointer. If you are using annotations, have a function to load your bean with data e.g

        Code:
        @ModelAttribute("person")
        public Person fillPersonData(){
            //fill data here
        }
        Then in your form,

        Code:
        <form:form method="post" commandName="person">
        Then call your form:input path attributes similar to your person attributes.

        Comment

        Working...
        X