0

I am displaying a grid as follows

<p:dataTable id="dataTable" binding="#{table}" var="list" value="#{addIPDetails.IPAllocationDetailList}" >  
<f:facet name="header">  
    <font class="table-heading">Update Allocated IPs List</font>
</f:facet>  

<p:column>
    <f:facet name="header"> </f:facet>
    #{table.rowIndex + 1}
</p:column>

<p:column>
    <f:facet name="header">  
        <h:outputText value="IP Address" />  
    </f:facet>  
    <h:outputText value="#{list.ip_address}" />  
</p:column>

<p:column>
    <f:facet name="header">Description</f:facet>
    <p:inputText id="description" value="#{list.description}"></p:inputText>
</p:column>

<f:facet name="footer">
    <p:row>
        <p:column>
            <p:commandButton value="Update..." update="dataTable" id="btnSave" actionListener="#{addIPDetails.updateDetails}" 
                onstart="bui.show();" oncomplete="bui.hide();" style="width:140px" /> 
        </p:column>
    </p:row>
</f:facet>

And when I press the update button it post all the values as below format

dataTable:0:description
dataTable:1:description
dataTable:2:description

All I want to do is to post it as an HTML array like in simple HTML we can declare it as "description[]" and upon submit we get complete array. So that after submit traverse through the array will be easy. Please advise.

4

0 回答 0