-
1. Re: How to start a process out of a xhtml file
pmuir Jul 11, 2008 6:43 PM (in response to coolex)You can do this in pages.xml (but not directly from xhtml as this would be a confusion of concerns).
-
2. Re: How to start a process out of a xhtml file
coolex Jul 11, 2008 9:13 PM (in response to coolex)Ok, so it is not possible to start processes from a xhtml file? Or do you want to say that it does not make sense to do this?
-
3. Re: How to start a process out of a xhtml file
pmuir Jul 11, 2008 9:44 PM (in response to coolex)The former follows directly from the latter (i.e. yes to both questions).
-
4. Re: How to start a process out of a xhtml file
coolex Jul 11, 2008 9:48 PM (in response to coolex)Aha, cool.
I'm just trying to find out the right way to manage my processes.
So, the best way is to create something like manager classes that starts, stops etc. my processes? -
5. Re: How to start a process out of a xhtml file
admin.admin.email.tld Jul 12, 2008 12:38 AM (in response to coolex)Pete answered your question. You need to add the metadata/code into either pages.xml or components.xml depending on exactly when and what you're trying to do.
For example, I kick off the Quartz timer service after Seam starts up in components.xml:
<event type="org.jboss.seam.postInitialization">
<action execute="#{controller.scheduleTimer}"/>
</event>
Here's an example in pages.xml:
<pages>
<page view-id="/hello.xhtml" action="#{helloWorld.sayHello}"/>
</pages>
The sayHello method will fire prior to the rendering of hello.xhtml. -
6. Re: How to start a process out of a xhtml file
coolex Jul 12, 2008 8:10 PM (in response to coolex)Thanks guys.
My problem is that I'm new to SEAM. I have some books about seam. None of these books describe the way for managing the process like you've done above with page.xml. The books desribe a way by using POJOS.
What about using POJOS for process managing? -
7. Re: How to start a process out of a xhtml file
coolex Jul 13, 2008 4:02 PM (in response to coolex)Just to make clear!
In the end I still need a POJO class for managing the process? Correct?
So the pages.xml uses a seam component (e.g. POJO class) to trigger something (process start).Please correct me, if I'm wrong.
Thank you. -
8. Re: How to start a process out of a xhtml file
pmuir Jul 13, 2008 4:13 PM (in response to coolex)Correct
-
9. Re: How to start a process out of a xhtml file
coolex Jul 13, 2008 4:14 PM (in response to coolex)Cool! Many, many thanks. That helped me a lot!
-
10. Re: How to start a process out of a xhtml file
admin.admin.email.tld Jul 14, 2008 4:33 AM (in response to coolex)I'm pretty sure the action handler component can be a EJB3 (SFSB or SLSB), if you consider that a POJO or not....