This week's book giveaway is in the Clojure forum.
We're giving away four copies of Clojure in Action and have Amit Rathore and Francis Avila on-line!
See this thread for details.
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Array of Object in DataTable

 
Syed Saifuddin
Ranch Hand
Posts: 130
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi EveryBody!

I am getting problem in setting value in the field of object that is displaying in the dataTable.

Manage Bean Code is
--------------------
public class MBGenerateInvoice {
private ListGT[] listGTs = null;

public ListGT[] getListGTs() {
return listGTs;
}
public void setListGTs(ListGT[] listGTs) {
this.listGTs = listGTs;
}
}


Page Code is
------------
<h:dataTable id="ticket" value="#{generateInvoice.listGTs}" var="tbean">
<h:column>
<f:facet name="header">
<hutputText id="ticketnumberText" value="Ticket Number"/>
</f:facet>
<hutputText id="ticketnumber" value="#{tbean.ticketNumber}"/>
</h:column>

<h:column>
<f:facet name="header">
<hutputText id="passengerText" value="Passenger Name"/>
</f:facet>
<hutputText id="passenger" value="#{tbean.passengerName}"/>
</h:column>

<h:column>
<f:facet name="header">
<hutputText id="ticketvalueText" value="Ticket Value"/>
</f:facet>
<hutputText id="ticketvalue" value="#{tbean.ticketValue}"/>
</h:column>

<h:column>
<f:facet name="header">
<hutputText id="taxesText" value="Taxes"/>
</f:facet>
<hutputText id="taxes" value="#{tbean.taxes}"/>
</h:column>

<h:column>
<f:facet name="header">
<hutputText id="commissionText" value="Commission"/>
</f:facet>
<h:inputText id="commission" size="3" value="#{tbean.commission}"/>
</h:column>
</h:dataTable>

Here in the page code last column is "commission" which is input type.
When on the page I change its value. It is not automatically set to the bean.

and when any validation error occur it goes to the initial state.

Please try to solve my problem.
Thank You
Best Regards
Syed Saifuddin
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic