This content has been marked as final.
Show 5 replies
-
1. Re: Conversation management in a desktop-like applikation
swd847 Oct 9, 2007 4:57 AM (in response to jbuechel)
Seam contains el enhancements that allow you to pass parameters to action methods, so to make it a bit less verbose you could try:@End String navFunc(String param) { return param; }
<rich:menuItem value="#{messages.menu_manage_persons}" action="#{MyClass.navFunc('/modules/manageCatalogs/persons/main.xhtml')}" />
Although you still need a class to put the navFunc method on, so it does not help that much. -
2. Re: Conversation management in a desktop-like applikation
pmuir Oct 9, 2007 5:08 AM (in response to jbuechel)Why not send logical outcomes from the action="" on the menu and then do a outcome based navigation in pages.xml
-
3. Re: Conversation management in a desktop-like applikation
jbuechel Oct 9, 2007 7:09 AM (in response to jbuechel)@swd847:
Thanks, anyway this sounds better than the current solution.
@Pete:
Thanks, that was exactly what i was looking for. I didn't even know that's possible!
For those who are interested and happy about a code snippet:
menuItems.xhtml<rich:menuItem value="#{messages.menu_manage_persons}" action="manage_persons" rendered="#{s:hasRole('manage_persons')}" />
pages.xml<page view-id="/*" login-required="true"> <navigation> ... <rule if-outcome="manage_persons"> <end-conversation /> <redirect view-id="/modules/manageCatalogs/persons/main.xhtml" /> </rule> ... </navigation> </page>
-
4. Re: Conversation management in a desktop-like applikation
jbuechel Oct 12, 2007 8:21 AM (in response to jbuechel)I'm still fighting with the conversation management:
I'm trying to begin and end conversations through configuration within the pages.xml:<page view-id="/*" login-required="true"> <action execute="#{conversationTracker.logConversationState}" /> <navigation> <rule if-outcome="query_online_directory"> <end-conversation before-redirect="true" /> <redirect view-id="/modules/queryCatalog/catalog/main.xhtml" /> </rule> <rule if-outcome="manage_organigrams"> <end-conversation before-redirect="true"/> <redirect view-id="/modules/manageCatalogs/organigram/selectMission.xhtml" /> </rule> </navigation> </page> <page view-id="/modules/manageCatalogs/organigram/selectMission.xhtml"> <navigation evaluate="#{conversation.longRunning}"> <rule if-outcome="false"> <begin-conversation join="false" flush-mode="manual" /> </rule> </navigation> </page>
My intention is to end the previous long running conversation and begin an new one on the outcome "manage_organigrams".
It's almost working:
Case 1:
If the previous view-id was "/modules/queryCatalog/catalog/main.xhtml" i get the "The conversation ended, timed out or was processing another request" message after a few clicks within the view-id "/modules/manageCatalogs/organigram/selectMission.xhtml".
Case 2:
If the previous view-id was "/modules/manageCatalogs/organigram/selectMission.xhtml" it's working correctly..
Some output from the conversation tracker:
Case 1:
Click on menu item which switchs from view-id "/modules/queryCatalog/catalog/main.xhtml" to view-id "/modules/manageCatalogs/organigram/selectMission.xhtml":14:06:59,187 DEBUG [ConversationTracker] *********** Start log entry *********** 14:06:59,187 DEBUG [ConversationTracker] LONG RUNNING CONVERSATION: NO 14:06:59,187 DEBUG [ConversationTracker] NESTED CONVERSATION: NO 14:06:59,187 DEBUG [ConversationTracker] CONVERSATION ID: 59 14:06:59,187 DEBUG [ConversationTracker] CONVERSATION VIEW ID: null 14:06:59,187 DEBUG [ConversationTracker] CONVERSATION DESCRIPTION: null 14:06:59,187 DEBUG [ConversationTracker] ************ End log entry ************ 14:06:59,187 DEBUG [ConversationTracker] BEGIN CONVERSATION: 59 14:06:59,328 DEBUG [MissionServiceImpl] initializeMissions() called 14:06:59,343 INFO [STDOUT] Hibernate: select mission0_.id as id4_, mission0_.name as name4_, mission0_.identifier as identifier4_, mission0_.enddate as enddate4_, mission0_.startdate as startdate4_, mission0_.active as active4_, mission0_.activationDate as activati7_4_, mission0_.deactivationDate as deactiva8_4_ from NMSWEBOWN.Mission mission0_ order by mission0_.name
Click 1 withing view-id "/modules/manageCatalogs/organigram/selectMission.xhtml":14:07:05,515 INFO [MissionDataModelManager] select() called 14:07:05,531 DEBUG [ConversationTracker] *********** Start log entry *********** 14:07:05,531 DEBUG [ConversationTracker] LONG RUNNING CONVERSATION: YES 14:07:05,531 DEBUG [ConversationTracker] NESTED CONVERSATION: NO 14:07:05,531 DEBUG [ConversationTracker] CONVERSATION ID: 59 14:07:05,531 DEBUG [ConversationTracker] CONVERSATION VIEW ID: null 14:07:05,531 DEBUG [ConversationTracker] CONVERSATION DESCRIPTION: null 14:07:05,531 DEBUG [ConversationTracker] ************ End log entry ************
Click 2 withing view-id "/modules/manageCatalogs/organigram/selectMission.xhtml":14:07:13,546 DEBUG [MissionServiceImpl] initializeMissions() called 14:07:13,546 INFO [STDOUT] Hibernate: select mission0_.id as id4_, mission0_.name as name4_, mission0_.identifier as identifier4_, mission0_.enddate as enddate4_, mission0_.startdate as startdate4_, mission0_.active as active4_, mission0_.activationDate as activati7_4_, mission0_.deactivationDate as deactiva8_4_ from NMSWEBOWN.Mission mission0_ order by mission0_.name 14:07:13,625 INFO [MissionDataModelManager] select() called 14:07:13,625 DEBUG [ConversationTracker] BEGIN CONVERSATION: 60 14:07:13,625 DEBUG [ConversationTracker] *********** Start log entry *********** 14:07:13,625 DEBUG [ConversationTracker] LONG RUNNING CONVERSATION: YES 14:07:13,625 DEBUG [ConversationTracker] NESTED CONVERSATION: NO 14:07:13,625 DEBUG [ConversationTracker] CONVERSATION ID: 60 14:07:13,625 DEBUG [ConversationTracker] CONVERSATION VIEW ID: null 14:07:13,625 DEBUG [ConversationTracker] CONVERSATION DESCRIPTION: null 14:07:13,625 DEBUG [ConversationTracker] ************ End log entry ************
After click 2 the conversation is lost somehow and the message "The conversation ended, timed out or was processing another request" is displayed.
Case 2:
Click on menu item which reloads view-id "/modules/manageCatalogs/organigram/selectMission.xhtml":
It works fine and i can do as many clicks withing view-id "/modules/manageCatalogs/organigram/selectMission.xhtml" as i want..
Help would be very appreciated cause i'm really running out of ideas.. -
5. Re: Conversation management in a desktop-like applikation
jbuechel Oct 12, 2007 8:32 AM (in response to jbuechel)I just figured out if i add the following to the pages.xml it works for this two view-ids..
<page view-id="/modules/queryCatalog/catalog/main.xhtml"> <navigation evaluate="#{conversation.longRunning}"> <rule if-outcome="false"> <begin-conversation join="false" flush-mode="manual" /> </rule> </navigation> </page>
So the shaky behavior seems to depend on wether the conversation of the previous view-id was long running or not.. !?