[jboss-user] [JBoss Seam] - Re: dataTable in two windows

lightbulb432 do-not-reply at jboss.com
Sat Feb 3 18:24:46 EST 2007


anonymous wrote : First problem can be solved by passing the id as a request parameter instead of blindly using @DataModelSelection.

Could anybody please explain how they've done this with their code?

The code below explains how to remove the appropriate entity when you have a request parameter passed in. But how can I make every row in the dataTable output a corresponding request parameter (so that when someone clicks a link in the table, the request parameter gets passed)?

@RequestParameter
  | Long entityId;
  | 
  | public void removeMyEntity() {
  |  MyEntity mySelectedEntity = em.find(MyEntity.class, entityId);
  |  em.remove(mySelectedEntity);
  | }

Is it as simple as an h:commandLink to the action method with a nested f:param that has the id of the entity?

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4010560#4010560

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4010560



More information about the jboss-user mailing list