[jbossseam-issues] [JBoss JIRA] Created: (JBSEAM-1922) Back button doesn't work with PAGE scope and JSF-RI Server state saving
by Michael Youngstrom (JIRA)
Back button doesn't work with PAGE scope and JSF-RI Server state saving
-----------------------------------------------------------------------
Key: JBSEAM-1922
URL: http://jira.jboss.com/jira/browse/JBSEAM-1922
Project: JBoss Seam
Issue Type: Bug
Components: Core
Affects Versions: 2.0.0.BETA1
Reporter: Michael Youngstrom
JSF doesn't make any guarentees about the isolation of attributes stored in the view. Because of this a PAGE scoped component that gets passed along to several views will actually be a single instance when using Server state management with the RI.
This causes a problem with back button support for the PAGE scope (imho the main difference of PAGE scope over CONVERSATION). For example:
@Name("test")
@Scope(PAGE)
public class Test implements Serializable {
private int value = 0;
public int getValue() {
return value;
}
public void incValue() {
value++;
}
}
Value = #{test.value}
<h:form>
<h:commandButton action="#{test.incValue}" value="Increment Value"/>
</h:form>
Test Case when using Server side state management:
1. I view the page: "Value = 0" Displayed
2. I press "Increment" button: "Value = 1"
3. I press "Increment" button: "Value = 2"
4. I press "back" button: "Value = 1"
5. I press "Increment" button: "Value=3"
If running in client state mode Step 5 displays "Value=2".
To make PAGE scope work consistently between client and server JSF state management we need to figure out some way to serialize PAGE scoped values when doing "saveState" or something so that a new instance of PAGE is accessed from restore-view of any subsequent requests.
Here is a link to a conversation on the RI about this issue:
https://javaserverfaces.dev.java.net/servlets/BrowseList?list=dev&by=thre...
>From the conversation it appears the MyFaces is not effected by this issue by default.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
16 years, 1 month
[jbossseam-issues] [JBoss JIRA] Created: (JBSEAM-1982) Improved documentation for Nested Conversations
by Jacob Orshalick (JIRA)
Improved documentation for Nested Conversations
-----------------------------------------------
Key: JBSEAM-1982
URL: http://jira.jboss.com/jira/browse/JBSEAM-1982
Project: JBoss Seam
Issue Type: Feature Request
Components: Core
Affects Versions: 2.0.0.CR1
Reporter: Jacob Orshalick
Nested conversations have been discussed at length on several occasions on the forum. The documentation states:
"A conversation may be thought of as a continuable state. Nested conversations allow the application to capture a consistent continuable state at various points in a user interaction, thus insuring truly correct behavior in the face of backbuttoning and workspace management."
This gives the impression of use of nested conversations to achieve a continuation server approach. This approach is possible and is described at the forum reference, but it seems that most developers use nested conversations for sub-flows ending the conversation at the end of the sub-flow. This does not allow back-buttoning to the sub-flow (which seems to be in conflict with the documentation above).
(I will add a link to an article describing the continuation approach in a few weeks, perhaps it could serve as a patch)
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
16 years, 3 months
[jbossseam-issues] [JBoss JIRA] Created: (JBSEAM-541) ConversationEntry reports the wrong description
by Norman Richards (JIRA)
ConversationEntry reports the wrong description
-----------------------------------------------
Key: JBSEAM-541
URL: http://jira.jboss.com/jira/browse/JBSEAM-541
Project: JBoss Seam
Issue Type: Bug
Affects Versions: 1.1.0.CR1
Reporter: Norman Richards
Assigned To: Gavin King
The linked forum post shows one example of this bug, though it is not directly the issue the poster is complaining of.
Using the forum application as a guide, start a conversation and then start a nested conversation. End the nested conversation. The description of the parent conversation in the converstion list on will be incorrect. (it will have the name of the current conversation that just ended)
This happens because of the following code:
public String getDescription()
{
if ( isCurrent() )
{
String desc = Conversation.instance().description;
if (desc!=null) return desc;
}
return description;
}
public boolean isCurrent()
{
Manager manager = Manager.instance();
if ( manager.isLongRunningConversation() )
{
return id.equals( manager.getCurrentConversationId() );
}
else if ( manager.isNestedConversation() )
{
return id.equals( manager.getParentConversationId() );
}
else
{
return false;
}
}
The parent conversation entry is considered "current". (isLongRunning() is false and isNestedConversation() is true) Because of this, the ConversationEntry description is ignored in favor of Conversation.instance().description. (Again, Conversation.instance(), is the nested conversation that just ended)
Subsequent requests display the conversation description correctly since they are done in the context of the correct conversation.
The isNestedConversation() check looks to be the source of the problem. I can't figure out what case that would make sense for.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
16 years, 3 months