This content has been marked as final.
Show 2 replies
-
1. Re: populating clickable datatable by data comming from OneToMany relationship?
gjeudy Sep 16, 2008 4:10 PM (in response to michal.mich.kuna.gmail.com)Yes this is certainly possible but why use
#{person.cars.toArray()}
?I havent tested this but I guess it will work with JBoss EL handling the method call ?
I usually do something like
#{person.cars}
, this will work if you have a matching getter that return a list:List<Car> getCars()
on person class.
-
2. Re: populating clickable datatable by data comming from OneToMany relationship?
michal.mich.kuna.gmail.com Sep 16, 2008 5:38 PM (in response to michal.mich.kuna.gmail.com)Hello Guillaume,
Thats probably the same thing i've tried to use before:
Person:
@Entity Person { private Set<Car> cars; // strip...... // for returning public List<Car> getCarList() { return new ArrayList<Car>(cars); } }
But still the action method ::
<a4j:commandLink value="remove" action="#{somebean.removeCar(car)}" />
defined in the datatable is never called.
It seems like either I am missing something, or EL does not handle the method call in this way.