[jbossseam-issues] [JBoss JIRA] Created: (JBSEAM-1341) IllegalStateException in seamspace example
by Valerij Timofeev (JIRA)
IllegalStateException in seamspace example
------------------------------------------
Key: JBSEAM-1341
URL: http://jira.jboss.com/jira/browse/JBSEAM-1341
Project: JBoss Seam
Issue Type: Bug
Components: Examples
Affects Versions: 1.2.1.GA
Reporter: Valerij Timofeev
Priority: Trivial
"Already a member?" link in register.xhtml page propagates conversation (s:link), so after clicking this link and after that again "SIGN UP!" button a factory method RegisterAction.start() is trying to start another long running conversation although the 1st one is still running.
This results in an exception: java.lang.IllegalStateException: begin method invoked from a long running conversation, try using @Begin(join=true) on method: start
Possible solutions:
instead
<s:button value="Cancel" action="#{register.cancel}" styleClass="registerButton"/>
use
1) <s:link view="/home.seam" value="Click here to log in 2" propagation="none" />
2) But in order to explicitly end current converstaion it would be better to implement RegisterAction.cancel() method with the @End annotation and use the following link:
<s:link view="/home.seam" action="#{register.cancel}" value="Click here to log in"/>
--
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
17 years, 8 months
[jbossseam-issues] [JBoss JIRA] Created: (JBSEAM-1023) Looking up a filtered SMPC in non-faces servlet throws NPE
by Christian Bauer (JIRA)
Looking up a filtered SMPC in non-faces servlet throws NPE
----------------------------------------------------------
Key: JBSEAM-1023
URL: http://jira.jboss.com/jira/browse/JBSEAM-1023
Project: JBoss Seam
Issue Type: Bug
Components: Core
Reporter: Christian Bauer
Priority: Minor
My servlet does:
EntityManager em = ((EntityManager)org.jboss.seam.Component.getInstance("entityManager"));
em.joinTransaction();
file = (!"".equals(id)) ? em.find(File.class, Long.parseLong(id)) : null;
This worked OK, but after I enabled this filter:
<core:filter name="accessLevelFilter">
<core:name>accessLevelFilter</core:name>
<core:parameters>
<key>currentAccessLevel</key>
<value>#{currentAccessLevel}</value>
</core:parameters>
</core:filter>
<core:managed-persistence-context name="entityManager"
auto-create="true"
entity-manager-factory="#{wikiEntityManagerFactory}">
<core:filters><value>#{accessLevelFilter}</value></core:filters>
</core:managed-persistence-context>
It fails with:
Caused by: java.lang.NullPointerException: facesContext
at org.apache.myfaces.el.ValueBindingImpl.getValue(ValueBindingImpl.java:379)
at org.jboss.seam.core.Expressions$1.getValue(Expressions.java:57)
at org.jboss.seam.persistence.HibernatePersistenceProvider.enableFilter(HibernatePersistenceProvider.java:60)
at org.jboss.seam.core.ManagedPersistenceContext.initEntityManager(ManagedPersistenceContext.java:85)
at org.jboss.seam.core.ManagedPersistenceContext.getEntityManager(ManagedPersistenceContext.java:105)
at sun.reflect.GeneratedMethodAccessor1775.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.jboss.seam.util.Reflections.invoke(Reflections.java:18)
at org.jboss.seam.util.Reflections.invokeAndWrap(Reflections.java:121)
at org.jboss.seam.Component.callComponentMethod(Component.java:1834)
at org.jboss.seam.Component.unwrap(Component.java:1860)
at org.jboss.seam.Component.getInstance(Component.java:1657)
at org.jboss.seam.Component.getInstance(Component.java:1610)
at org.jboss.seam.Component.getInstance(Component.java:1604)
at org.jboss.seam.wiki.core.ui.FileServlet.doGet(FileServlet.java:70)
The expression "#{currentAccessLevel}" can either be resolved to a variable in the SESSION context or to a factory method on one of my components.
--
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
17 years, 8 months
[jbossseam-issues] [JBoss JIRA] Created: (JBSEAM-1358) conversation stack not popping properly when used with pages.xml
by Hung Tang (JIRA)
conversation stack not popping properly when used with pages.xml
----------------------------------------------------------------
Key: JBSEAM-1358
URL: http://jira.jboss.com/jira/browse/JBSEAM-1358
Project: JBoss Seam
Issue Type: Bug
Components: Core
Affects Versions: 1.3.0.ALPHA
Reporter: Hung Tang
Assume there are two pages p1 and p2. Entering p1 will start a conversation c1. p1 contains a s:link to p2, which when clicked will start a new nested conversation c2. In p2, there's a s:link that goes back to p1 by invoking action #{conversation.redirectToParent}.
The strange part.
If the propagation=nested rule is specified as part of the s:link, then the redirectToParent is working okay and the conversationStack is consistent.
If the propagation=nested rule is specified as part of p2.page.xml as <begin-conversation nested="true"/>, then the redirectToParent does not redirect to parent, and the conversationStack reports an additional duplicate entry for p2.
-- Code snippets
## page1.page.xml
<page>
<description>Page 1</description>
<begin-conversation join="true"/>
</page>
## page1.xhtml
<html>
<h:form>
<ui:repeat var="entry" value="#{conversationStack}">
<h:outputText value="|"/>
<h:commandLink value="#{entry.description}" action="#{entry.select}"/>
</ui:repeat>
</h:form>
<s:link view="/page2.xhtml" value="Page 2"/>
</html>
## page2.page.xml
<page>
<description>Page 2</description>
<begin-conversation nested="true"/>
</page>
## page2.xhtml
<html>
<h:form>
<ui:repeat var="entry" value="#{conversationStack}">
<h:outputText value="|"/>
<h:commandLink value="#{entry.description}" action="#{entry.select}"/>
</ui:repeat>
</h:form>
<s:link value="Back to parent" action="#{conversation.redirectToParent}"/>
</html>
--
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
17 years, 8 months
[jbossseam-issues] [JBoss JIRA] Created: (JBSEAM-1359) Login redirection not remembering page parameters
by Hung Tang (JIRA)
Login redirection not remembering page parameters
-------------------------------------------------
Key: JBSEAM-1359
URL: http://jira.jboss.com/jira/browse/JBSEAM-1359
Project: JBoss Seam
Issue Type: Bug
Components: Core
Affects Versions: 1.3.0.ALPHA
Reporter: Hung Tang
I am experiencing some problems with login redirection not remembering page parameters.
I have a main page (main.xhtml) that goes to another page (call it go.xhtml) which requires login. After successful authentication, go.xhtml does not remember the page parameter that was passed in originally from main.xhtml, and as a result nothing is displayed. However, if I login prior to entering go.xhtml, the page parameter is remembered and the output is displayed.
Here are the relevant bits:
## main.xhtml
Code:
<s:link view="/go.xhtml" value="Go">
<f:param name="hello" value="world"/>
</s:link>
## go.page.xml
Code:
<page login-required="true">
<param name="hello" value="#{bean.value}"/>
</page>
## go.xhtml
Code:
<html>
#{bean.value}
#{facesContext.externalContext.requestParameterMap['hello']}
</html>
## components.xml
Code:
<event type="org.jboss.seam.notLoggedIn">
<action expression="#{redirect.captureCurrentView}"/>
</event>
<event type="org.jboss.seam.postAuthenticate">
<action expression="#{redirect.returnToCapturedView}"/>
</event>
--
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
17 years, 8 months
[jbossseam-issues] [JBoss JIRA] Created: (JBSEAM-1363) ManagedPersistenceContext.getEntityManager() should not throw NamingException
by Michael Youngstrom (JIRA)
ManagedPersistenceContext.getEntityManager() should not throw NamingException
-----------------------------------------------------------------------------
Key: JBSEAM-1363
URL: http://jira.jboss.com/jira/browse/JBSEAM-1363
Project: JBoss Seam
Issue Type: Bug
Affects Versions: 1.2.1.GA
Reporter: Michael Youngstrom
Fix For: 1.3.0.ALPHA
ManagedPersistenceContext.getEntityManager() has the potential to throw a NamingException because of a call to Transactions.isTransactionActive(). I believe ManagedPersistenceContext.getEntityManager() should assume that a NamingException thrown from Transactions.isTransactionActive() equates to "false".
My guess is the "throws NamingException" might be a relic of obtaining an EntityMangager from an EMF obtained through JNDI. However, that has moved to initEntityManager() that handles the error of obtaining an EMF on it's own. So, I think getEntityManager should log a NamingException thrown from Transactions.isTransactionActive() and move on as if no transaction is active.
Mike
--
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
17 years, 8 months
[jbossseam-issues] [JBoss JIRA] Created: (JBSEAM-1364) Bind Map to h:inputText value - causes 'model validation failed:String index out of range: -1'
by Clinton Parham (JIRA)
Bind Map to h:inputText value - causes 'model validation failed:String index out of range: -1'
----------------------------------------------------------------------------------------------
Key: JBSEAM-1364
URL: http://jira.jboss.com/jira/browse/JBSEAM-1364
Project: JBoss Seam
Issue Type: Feature Request
Components: JSF
Affects Versions: 1.2.1.GA
Reporter: Clinton Parham
I'm trying to bind a Map entry to h:inputText. The code below successfully extracts the value for the key when the page is loaded, but when I submit it, the page reloads with an error alongside the field: 'model validation failed:String index out of range: -1'. It appears that the s:validateAll that wraps h:inputText does not work properly when used this way??
(Gavin suggested that I submit this to JIRA - see forum thread reference)
>From the .xhtml
Code:
<h:form id="dataEntryForm">
...
<h:inputText id="asdf" required="true" value="#{biomarkers['waist']}" />
...
</h:form>
>From the session bean:
Code:
...
@Out
Map<String, String> biomarkers = new HashMap<String, String>();
...
// method code that preps the Map prior to being used
biomarkers.put("waist", "33.3");
...
--
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
17 years, 8 months