I'm creating a web application. I have to list entries from database, with an additional column containing a link to edit the entry. I know how to view a table listing all the entries from the database using managed beans. My question is--how do I only show data relating to one entry on a separate page?
My link looks like that:
<h:commandLink value="Edit" action="#{searchOrdersBean.editThisOrder(order.orderNum)}">
And the called method:
public String editThisOrder(int id){
porder = purchaseOrderFacade.findByOrderNum(id);
return "edit";
}
But I don't know how to display the data of this single result.