Click here to Skip to main content
15,843,145 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hello every Body ,

I m trying to save a list of order in my controller but i had a different type of order and each type had some specific entries how can i do that .I m using in my entity class inheritance type equal to joined
("@Inheritance(strategy = InheritanceType.JOINED)")
. Any body had an idea how to do that ?

What I have tried:

<form action="#" th:action="@{/order/save}" th:object="${form}"
  method="post">
    <fieldset>
        <input type="submit" id="submitButton" th:value="Save">
        <input type="reset" id="resetButton" name="reset" th:value="Reset"/>
        <table>
            <thead>
                <tr>
                    <th> Title</th>
                    <th> Author</th>
                </tr>
            </thead>
            <tbody>
                <tr th:each="order, itemStat : *{orders}">
                    <td><input th:field="*{orders[__${itemStat.index}__].title}" /></td>
                    <td><input th:field="*{orders[__${itemStat.index}__].author}" /></td>
                </tr>
            </tbody>
        </table>
    </fieldset>
</form>
Posted

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900