Orders - OrderDetails kind of example please

Hello friends,

I am looking for help in the following scenario.

I have a web page which displays(multiple) OrderNo, OrderDescription rows as follows

OrderNoOrderDesc

100234Beginers JSF Book

100277Mastering Java Book

I am displaying OrderNo using a commandLink inside a datatable.

When user clicks on one of the OrderNo,I need to pass this OrderNo as a parameter

to OrderDetails page and dsiplay the order details on that page using the passsed in parameter.

Anybody has an example something like this. I appreciate your help & thanks in advance.

<h:dataTable value="#{CJ01P006ResultSet1.CJ01P006ResultSet1Row}" var="CJ01P006ResultSet1Row">

<f:facet name="header">

<h:outputText value="Search Results:" styleClass="header"> </h:outputText>

</f:facet>

<h:column >

<h:commandLink action="gotoDeatils">

<f:param name="orderno" value="#{CJ01P006ResultSet1Row.order_no}" />

<h:outputText value="#{CJ01P006ResultSet1Row.order_no}" />

</h:commandLink>

<f:facet name="header">

<h:outputText value="OrderNo"></h:outputText>

</f:facet>

</h:column>

<h:column>

<h:outputText value="#{CJ01P006ResultSet1Row.order_desc}" />

<f:facet name="header">

<h:outputText value="OrderDesc"></h:outputText>

</f:facet>

</h:column>

</h:dataTable>

[1550 byte] By [MyJSFa] at [2007-11-26 18:42:29]
# 1
Check here how to use datatables: http://balusc.xs4all.nl/srv/dev-jep-dat.htmlJust use HtmlDataTable#getRowData() to retrieve the selected row. And it is a good practice to add a List<OrderDetails> to the Order DTO as a property.
BalusCa at 2007-7-9 6:16:30 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...
# 2
Hi Balus,Thanks for your reply. I will give it a try and let you know.
MyJSFa at 2007-7-9 6:16:30 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...