[JBoss Seam] - pageflow annotation and pages.xml
by awheeler
I am using seam 1.20. I have a problem starting a pageflow:
If I use the pageflow property of the @Begin annotation the pageflow will not start and subsequently will not move from the first page. e.g:
| Pageflow
| <pageflow-definition name="linkCorrespondence">
| <start-page name="upload" view-id="/secure/document/linkCorrespondenceWfUpload.xhtml">
| <transition name="next" to="entity"></transition>
| </start-page>
|
|
| @Create @Begin(flushMode=FlushModeType.MANUAL,pageflow="linkCorrespondence")
| public void create() {
| }
However the following code does work when using the depreciated function:
| @Create @Begin(flushMode=FlushModeType.MANUAL,pageflow="linkCorrespondence")
| public void create() {
| Conversation.instance().beginPageflow("linkCorrespondence");
| }
|
The pageflow does work if I use <begin-conversation> element in the pages.xml:
| <page view-id="/secure/document/linkCorrespondenceWfUpload.xhtml">
| <begin-conversation pageflow="linkCorrespondence" join="true" flush-mode="MANUAL"/>
| <description>Link new correspondence</description>
| </page>
|
However the conversation must specify join="true". If it does not and the page refreshes or submits then a new conversation is started which produces an error. I also notice that if the conversation is started using <begin-conversation> that the conversation description is not shown in the conversationList or on the debug.seam page. Is this a consequence of specifying join=true?
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4030896#4030896
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4030896
19Â years, 1Â month
[JBoss Seam] - Please, help to find optimal strategy for multiple iteration
by anarinsky
For the sake of simplicity my database contains 2 tables ? containers and fruits. I need to show a report that contains a list of fruits for every container
So, on my report page I have to iterate through the list of containers and for every container show the list of fruits
I generated the entities using seam-gen and received the following objects:
Container
ContainerList
ContainerHome
Fruit
FruitList
FruitHome
In the Container object I have the method that retrieves the set of fruits. However, due to the specifics of JSF I cannot iterate through the set on the page ? I can iterate only through the list. Also, the ContainerHome object has a method that retrieves the list of fruits for a particular container.
Please, let me know what it the best strategy?
I think that I have several options. First, I can add @Transient method in the Container object that retrieves the list of fruits. What is better ? to use the existent Set method and transfer Set to List or to write another query?
Second, I can somehow for every Container use the List method specified in the ContainerHome object. However, I do not know how to get the reference to the ContainerHome object for a particular Id on a JSF.
Should I create a new Session Bean for this task or I can use only Entity beans originally generated by seam-gen?
Thank you very much for a feedback
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4030883#4030883
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4030883
19Â years, 1Â month