-
1. Re: Seam & Delegation
lvdberg Apr 5, 2011 3:33 AM (in response to lovelyliatroim)Hi,
I would be happy to help, you, but I would recommend that you first get a basic idea on the workings of Seam before you start
playing and/or hacking
.The Seam component EntityQuery has excellent - built-in - support for pagination, so under normal circumstances there is no need whatsoever to build such functionality yourself. Seam MUST handle the management of components, so at the moment you create with new, or with a factory method, Seam doesn't handle such instance, so in- and outjecting won't work.
- Get the full doc and examples of Seam
- buy the Seam in Action book.
Leo
-
2. Re: Seam & Delegation
lovelyliatroim Apr 5, 2011 8:10 AM (in response to lovelyliatroim)Hi Leo,
Im more interested in the interaction of the components between each other. Dont get hung up by the fact that it is pagination im more interested in how the call back works or would work in seam.I realise from your comments (Thanks) that this wont work
@Out private PagingHandler pagingHandler = PagingHandler.getInstance(this);
As you said seam must manage the components to it should possibly look like something like this
@In @Out private PagingHandler pagingHandler ;
What im stuck on is how the injection of the pagingListener in PagingHandler from seam would work?? I dont see it in the docs.
Is the above even possible in seam??
Cheers,
JB -
3. Re: Seam & Delegation
lvdberg Apr 5, 2011 8:19 AM (in response to lovelyliatroim)Hi,
you can create components statically in Seam more or less like Spring does. You define a component in componenst.xml and provides its name and the class it should use and (optionally) a scope. Instance variables can be set as tags inside the component tag.
If you want Seam to handle the creation with annotations, you need the In-annotation with the attribute create
@In(create=true)
, which takes care of creating an instance. You can also put an AutoCreate annotation on a component.
Leo