0

in JSF 2.0 it's now possible to pass parameters to a managed bean simply by following this syntax:

<h:commandButton action="#{classMB.delete(1)}" />

here is the MB:

String delete(int id) {
      EJBinstance.delete(id);
      return "success";
}

What i need is how to change the #{classMB.delete(1)} by something link: #classMB.delete(#{user.id}) of course we'll suppose that we're working inside a datatable

<h:dataTable value="#{clientMB.listClients}" var="user" class = "table1">

where we're getting user informations...

Kukeltje
  • 12,223
  • 4
  • 24
  • 47
johnMcLean
  • 21
  • 2
  • Uhmmmm by doing `#{classMB.delete(user.id)}` ? Like in all EL where you pass parameters – Kukeltje Aug 03 '16 at 20:52
  • I was not thinking... that was stupid ! thanks... any ideas tho if we can pass multiple params ? using this same approach of course.. – johnMcLean Aug 03 '16 at 21:53

0 Answers0