tags:

views:

14

answers:

0

I need to update List of Domain objects in struts2. I fetching those list of objects from other table..Each row of page table contains one dropdown. when user clicks on SAve button i have to fetch all these dropdowns and save t into the database.

<display:table id="data"
                        name="lstEntities" sort="list" uid="row" htmlId="rowid"
                        class="main" export="false">
                        <display:column property="property.propertyType.propertyTypeName"
                            sortable="true" titleKey="common.propertytype" style="width:20%" />
                        <display:column property="property.propertyName" sortable="true"
                            title="Property" style="width:35%" />
                        <display:column property="concern.concernText" sortable="true"
                            title="Concern" style="width:35%" />
                        <display:column title="Condition" sortable="true">
                            <s:select cssClass="drop" list="%{#attr.row.lstStatements}"
                                headerKey="0" headerValue=" "
                                listKey="propertyConcernStatementId" name="statementMapped[\'%{#attr.row.prtyCrnId}']"
                                listValue="statement.condition"></s:select>
                                                        </display:column>
                    </display:table>


private HashMap hmMapStatemet = new HashMap();

    public Object getStatementMapped(String key) {
        return hmMapStatemet.get(key);
    }

    public void setStatementMapped(String key, Object value) {
        hmMapStatemet.put(key, value);
    }

Above is the code i am using.Please help on this.