[jbossseam-issues] [JBoss JIRA] Created: (JBSEAM-2346) s:selectItems - noSelectionLabel is not hidden after first selection of a value
by Wolfgang Schwendt (JIRA)
s:selectItems - noSelectionLabel is not hidden after first selection of a value
-------------------------------------------------------------------------------
Key: JBSEAM-2346
URL: http://jira.jboss.com/jira/browse/JBSEAM-2346
Project: JBoss Seam
Issue Type: Bug
Environment: CVS-based Seam 2.0.1
Reporter: Wolfgang Schwendt
Priority: Minor
<s:selectItems> offers that the user can specify an (optional) "noSelectionLabel" to be placed at the top of the selection list. It further provides a hideNoSelectionLabel option -- if this property is true, the noSelectionLabel will be hidden when a value is selected.
And exactly the latter functionality has a bug, but only as far as the user's FIRST selection is concerned. When the users makes his _first_ selection and submits the form, then the noSelectionLabel is still displayed when the page is redisplayed by the server, no matter whether or not hideNoSelection was set to "true". However, when the users makes additional requests, the hideNoSelectionLabel functionality works correctly.
Reason for the bug: caching behavior of org.jboss.seam.ui.component.UISelectItems.getValue()
Too understand why there is a bug, consider the following scenario:
A page with <h:selectOneMenu> and <s:selectItems var="myVar" label="#{myVar.name}" value="#{resultList}" noSelectionLabel="* Your choice please *" hideNoSelectionLabel="true"/> as its child component.
When the user makes a selection and submits the form, the UISelectOne components checks during the "Process validations" JSF phase whether the submitted input value matches one of the available options (SelectItems). Consequently, the UISelectOne component calls the getValue() method of its org.jboss.seam.ui.component.UISelectItems child component in order to retrieve a list of SelectItem s. Then, if if validation was successful because a matching value was found, the user's selection is either written to the model (during JSF Update model phase) or if we don't make it to the Update model phase, because some other component had a validation error, the user's selection is stored in the value property of the UISelectOne component.
When we finally reach the "Render response" phase and the same page should be redisplayed, the UISelectOne component gets rendered again. In order to render the selection list items, org.jboss.seam.ui.component.UISelectItems.getValue() gets called another time.
But now it doesn't re-calculate its list of SelectItems. Take a look at the code:
org.jboss.seam.ui.component.UISelectItems.getValue()
@Override
public Object getValue()
{
if (value == null || originalValue == null || !originalValue.equals(super.getValue()))
{ ...
}
return value;
}
Note that "value" is not null, because during "Process validations" org.jboss.seam.ui.component.UISelectItems.getValue() was already called which lead to value being set. Therefore, getValue() returns the OLD cached list of SelectItem s, which was calculated during Process Validations and therefore still includes the noSelectionLabel! And therefore getValue() doesn't take into account that the user made a selection and that the noSelectionLabel should now be hidden.
--
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
15 years
[jbossseam-issues] [JBoss JIRA] Created: (JBSEAM-1814) DataModel wrapped data is set to null by ManagedEntityIdentityInterceptor
by Matt Drees (JIRA)
DataModel wrapped data is set to null by ManagedEntityIdentityInterceptor
-------------------------------------------------------------------------
Key: JBSEAM-1814
URL: http://jira.jboss.com/jira/browse/JBSEAM-1814
Project: JBoss Seam
Issue Type: Bug
Affects Versions: 2.0.0.BETA1
Environment: seam cvs (20070816.1709)
Reporter: Matt Drees
Priority: Minor
The following test fails:
@Name("dataModelComponent")
@Scope(ScopeType.CONVERSATION)
public class DataModelComponent extends EntityQuery {
@Override
public String getEjbql() {
return "from java.lang.Object o";
}
}
public class DataModelComponentTest extends SeamTest{
@Test
public void test() throws Exception {
new FacesRequest() {
@Override
protected void renderResponse() throws Exception {
DataModel model = (DataModel) getValue("#{dataModelComponent.dataModel}");
assert model.getWrappedData() != null;
}
}.run();
}
}
Because the component is conversation-scoped, a ManagedEntityIdentityInterceptor is attached, which nulls the wrapped List after getDataModel() is called.
In the referenced forum, Gavin indicated he hadn't decided whether this should be expected behavior or not, and asked for a jira issue.
If it is expected behavior (I hope not), I think either EntityQuery should not have a getDataModel() attribute, or it should be documented and/or programmatically enforced that EntityQuerys should not be conversation-scoped.
--
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
15 years, 1 month
[jbossseam-issues] [JBoss JIRA] Created: (JBSEAM-2678) improve docs for conversation propagation
by Martin Trummer (JIRA)
improve docs for conversation propagation
-----------------------------------------
Key: JBSEAM-2678
URL: http://jira.jboss.com/jira/browse/JBSEAM-2678
Project: JBoss Seam
Issue Type: Feature Request
Components: Documentation Issues
Environment: n.A.
Reporter: Martin Trummer
following points should be emphasized in the docs:
* the fact, that ending a conversation demotes the long-running conversation to a temporary conversation should be emphasized in the docs or explained in more detail
* the difference between ending a conversation and ending a conversation before-redirect should also be explained in more detail
* the docs should mention, that any facesMessages are lost, when you end the conversation and use before-redirect=true (and maybe how to work around this)
discussion can be found in the forum
I will attach a text file with a draft, of what these improvements could be (hope this helps)
--
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
15 years, 1 month
[jbossseam-issues] [JBoss JIRA] Created: (JBSEAM-2257) Raise a session expired and new session event on occurence
by Jacob Orshalick (JIRA)
Raise a session expired and new session event on occurence
----------------------------------------------------------
Key: JBSEAM-2257
URL: http://jira.jboss.com/jira/browse/JBSEAM-2257
Project: JBoss Seam
Issue Type: Feature Request
Components: Security
Affects Versions: 2.0.0.GA
Reporter: Jacob Orshalick
Priority: Minor
You have to make some assumptions here, but you can basically notify the user when the server session has ended with the following in a PhaseListener:
Code:
@Observer("org.jboss.seam.beforePhase")
public void beforePhase(PhaseEvent event)
{
if(event.getPhaseId() == PhaseId.RESTORE_VIEW)
{
HttpServletRequest request =
(HttpServletRequest) FacesContext.getCurrentInstance()
.getExternalContext().getRequest();
if(request.getRequestedSessionId() != null
&& request.getSession().isNew())
Events.instance().raiseEvent("org.jboss.seam.sessionExpired");
...
Based on general cookie settings this will raise the event when the user still has the browser window open, the http session expired, and the user tries to access the app. If the user closes and reopens the browser to start the application, the event will not be raised. This of course makes the assumption that cookies expire when the browser session is ended (which is generally the case).
The org.jboss.seam.newSession event would simply change the condition to:
if(request.getRequestedSessionId() == null
&& request.getSession().isNew())
Events.instance().raiseEvent("org.jboss.seam.newSession");
This is generally useful for user notification on the login screen. Please see the forum reference for more information. Thanks.
--
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
15 years, 1 month
[jbossseam-issues] [JBoss JIRA] Created: (JBSEAM-1875) Rework configuration chapter
by Pete Muir (JIRA)
Rework configuration chapter
----------------------------
Key: JBSEAM-1875
URL: http://jira.jboss.com/jira/browse/JBSEAM-1875
Project: JBoss Seam
Issue Type: Task
Components: Documentation
Affects Versions: 2.0.0.BETA1
Reporter: Pete Muir
Fix For: 2.0.0.GA
Rework configuration chapter to make it a generic discussion of configuring and packaging Seam applications. Move platform specific stuff to platform specific chapter.
i.e.
25 Configuring & Packaging Seam Applications
25.1 Basic Seam Configuration
25.1.1 Integrating Seam with JSF and the Servlet Container
25.1.2 Using Facelets
25.1.3 Seam Resource Servlet
25.1.4 Seam Filter
25.1.5. Integrating Seam with your EJB container
25.2 Seam Applications in a JEE 5 environment
25.3 Seam Applications in a J2EE environment
25.4 Seam Applicaitons in a JSE environment
* Move JBPM configuration to JBPM chapter
* Move JBoss AS stuff to new JBoss AS chapter
* Move JBoss Embedded stuff to new JBoss Embedded Chapter
26 Seam on JBoss AS
26.1 Seam on JBoss AS 4.0
* Includes stuff on install JSF 1.2 from Chapter 2
26.2 Seam on JBoss AS 4.2
27 Seam with JBoss Embedded
28 Seam on OC4J
29 Seam on Glassfish
* Needs writing!
--
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
15 years, 1 month