Hmm. Nobody seems to know or want share his/her knowledge about pageFlowScope...
Is there any decent documentation about this? I know the the docs in Myfaces
site but they don't quite explain how and what happens with pageFlowScope when
navigating back and forth and if the dialog is not launched with some action...
S
________________________________
From: Luhtala Santeri
Sent: 26. syyskuuta 2008 9:21
To: MyFaces Discussion
Subject: [Trinidad] Strange behaviour of the pageFlowScope
We have couple of pretty similar dialogs in our app. Stuff is passed to dialog
via pageFlowScope. In some situations the objects are passed using
tr:setActionListener-tag with commandLink and then the actual launching is done
in Java and in some cases the dialog is launched from Java-code and the values
are set to pageFlowScope also there(So no commandLinks).
I have a strange exception. If I have launched the dialog from Java-code and
have set the values to pageFlowScope also there, then when I have done the
stuff in dialog and exit the dialog's scope and clear the pageFlowScope it
seems to clear it ok. But, when I open the other similar kind of dialog(from
commandLink) then we crash with this:
....
java.lang.IllegalArgumentException: Cannot convert com.xxx.ui.policy.
[EMAIL PROTECTED] of type class com.xxx.ui.policy.model
. UiModelA to class com.xxx.ui.policy.model.UiModelB
at com.sun.el.lang.ELSupport.coerceToType(ELSupport.java:381)
at com.sun.el.parser.AstValue.setValue(AstValue.java:164)
at com.sun.el.ValueExpressionImpl.setValue(ValueExpressionImpl.java:269)
....
When the dialog is launched via commandLink and values are set to pageFlowScope
with tr:setActionListener then theres no problem....!!!??? So what does this
tr:setActionListener do actually??
We use the same 'key' (like "selected") when setting values to pageFlowScope
with both dialogs. But this shouldn't matter? Right? And after all the
pageFlowScope is just some sort of Map. What does this pageFlowScope.clear()
actually do? And how can this be dependent of the type? I don't get this...
Santeri