I was using a url fragment and that is incorrect. You should use the filename
of the view that contains the component in question.
However, petemuir suggested an even cleaner solution (IMO) because it's
contained in the code and alleviates the need for the xml file. Here's what I
did instead of using the pages.xml file.
| @DataModel
| private List<PackageEntity> packages;
|
| @Factory("packages")
| public void load() {
| packages = em.createQuery("from PackageEntity").getResultList();
| }
|
the load() method, annotated with @Factory("packages"), is used to initalize
the "named" property (that property being "packages"). This is done before the
page is rendered making this a great way to initialize state before the page is
display.
Eric Ray
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3959898#3959898
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3959898
_______________________________________________
jboss-user mailing list
[email protected]
https://lists.jboss.org/mailman/listinfo/jboss-user