Announcement Announcement Module
Collapse
No announcement yet.
multiple class binding problem Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • multiple class binding problem

    I have class TrasnportRequest which is twice associated with class Town:

    TransportRequest
    ---from-----------> Town
    --to------------> Town
    Class diagram: http://radone.php5.cz/classDiagram_new.png

    I use this binding:

    Jsp code:
    Code:
        <tr>
            <th>
                <appfuse&#58;label key="transportRequest.townFrom.name_i18n"/>
            </th>
            <td>
                <spring&#58;bind path="transportRequest.townFrom.postalCode">
                    <input type="text" name="<c&#58;out value="$&#123;status.expression&#125;"/>" value="<c&#58;out value="$&#123;status.value&#125;"/>"/>
                </spring&#58;bind>
            </td>
        </tr>
    
        <tr>
            <th>
                <appfuse&#58;label key="transportRequest.townTo.name_i18n"/>
            </th>
            <td>
    
                <spring&#58;bind path="transportRequest.townTo.postalCode">
                    <input type="text" name="<c&#58;out value="$&#123;status.expression&#125;"/>" value="<c&#58;out value="$&#123;status.value&#125;"/>"/>
                </spring&#58;bind>
            </td>
        </tr>

    rendered HTML code is :
    Code:
     <th>
                <label for="townFrom.name_i18n">Name_i18n&#58;</label>
            </th>
            <td>
    		<input type="text" name="townFrom.postalCode" value="10100"/> 
            </td>
        </tr>
        <tr>
            <th>
                <label for="townTo.name_i18n">Name_i18n&#58;</label>
            </th>
            <td>
    		<input type="text" name="townTo.postalCode" value="10100"/> 
            </td>
        </tr>
    Rendering woks correctly. But when I click Save button it second <input> item overwride first one and to both column is stored the same value.

    Is something wrong with my code or is it SpringMVC bug ?


    Thanks in advance.
Working...
X