This content has been marked as final.
Show 2 replies
-
1. Re: order in parent-child page
mkouba Nov 9, 2012 4:06 AM (in response to i92jurir)Hi,
either try to use RichFaces sorting support (see also RF3 developer guide and RF3 live demo) or, might be a better solution, sort data when loading from persistence layer (e.g. db) -> this of course depends on your personaHome and entities implementations (e.g. place javax.persistence.OrderBy).
-
2. Re: order in parent-child page
i92jurir Nov 14, 2012 7:52 AM (in response to mkouba)Hi Martin,
I have tried your second aproach. Now I load the child this way:
<rich:dataTable var="_asistencias" value="#{misAsistencias}" ....>
In components I have added a factory component:
<framework:entity-query ejbql="select a from Asistencia a join fetch a.persona pa" name="misAsistenciasQuery" order="a.fecha desc" scope="conversation"> <framework:restrictions> <value>a.persona.id = #{personaHome.instance.id}</value> </framework:restrictions> </framework:entity-query>
The order attribute works fine when retrieves the data from the database.
Thank you!