[jbossseam-issues] [JBoss JIRA] Created: (JBSEAM-3386) Building with ant 1.7.1 causes NPE in testing/deployed apps
by Marek Novotny (JIRA)
Building with ant 1.7.1 causes NPE in testing/deployed apps
-----------------------------------------------------------
Key: JBSEAM-3386
URL: https://jira.jboss.org/jira/browse/JBSEAM-3386
Project: Seam
Issue Type: Bug
Components: Build
Affects Versions: 2.0.3.CR1
Environment: Linux, Ant 1.7.1, jdk5/jdk6
Reporter: Marek Novotny
Attachments: ant171_build.log
Building with ant 1.7.1 causes NullPointerException in examples NumberGuess, Todo, Drools, DVDStore and in Integration test of BPM.
2 different places with NPE:
[testng] java.lang.NullPointerException
[testng] at org.jboss.seam.navigation.ConversationControl.beginOrEndConversation(ConversationControl.java:79)
[testng] at org.jboss.seam.navigation.Page.preRender(Page.java:242)
[testng] at org.jboss.seam.navigation.Pages.preRender(Pages.java:316)
[testng] at org.jboss.seam.jsf.SeamPhaseListener.preRenderPage(SeamPhaseListener.java:560)
[testng] at org.jboss.seam.jsf.SeamPhaseListener.beforeRenderResponse(SeamPhaseListener.java:471)
[testng] at org.jboss.seam.jsf.SeamPhaseListener.beforeServletPhase(SeamPhaseListener.java:144)
[testng] at org.jboss.seam.jsf.SeamPhaseListener.beforePhase(SeamPhaseListener.java:114)
[testng] at org.jboss.seam.mock.BaseSeamTest$Request.renderResponsePhase(BaseSeamTest.java:629)
[testng] at org.jboss.seam.mock.BaseSeamTest$Request.emulateJsfLifecycle(BaseSeamTest.java:622)
[testng] at org.jboss.seam.mock.BaseSeamTest$Request.access$300(BaseSeamTest.java:184)
[testng] at org.jboss.seam.mock.BaseSeamTest$Request$2.doFilter(BaseSeamTest.java:530)
[testng] at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:83)
[testng] at org.jboss.seam.web.LoggingFilter.doFilter(LoggingFilter.java:58)
[testng] at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
[testng] at org.jboss.seam.web.MultipartFilter.doFilter(MultipartFilter.java:85)
[testng] at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
[testng] at org.jboss.seam.web.ExceptionFilter.doFilter(ExceptionFilter.java:64)
[testng] at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
[testng] at org.jboss.seam.web.RedirectFilter.doFilter(RedirectFilter.java:45)
[testng] at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
[testng] at org.jboss.seam.servlet.SeamFilter.doFilter(SeamFilter.java:158)
[testng] at org.jboss.seam.mock.BaseSeamTest$Request.run(BaseSeamTest.java:524)
[testng] at org.jboss.seam.example.numberguess.test.NumberGuessTest.testNumberGuessWin(NumberGuessTest.java:18)
[testng] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[testng] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
[testng] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
[testng] at java.lang.reflect.Method.invoke(Method.java:585)
[testng] at org.testng.internal.MethodHelper.invokeMethod(MethodHelper.java:604)
[testng] at org.testng.internal.Invoker.invokeMethod(Invoker.java:470)
[testng] at org.testng.internal.Invoker.invokeTestMethod(Invoker.java:564)
[testng] at org.testng.internal.Invoker.invokeTestMethods(Invoker.java:830)
[testng] at org.testng.internal.TestMethodWorker.invokeTestMethods(TestMethodWorker.java:125)
[testng] at org.testng.internal.TestMethodWorker.run(TestMethodWorker.java:109)
[testng] at org.testng.TestRunner.runWorkers(TestRunner.java:678)
[testng] at org.testng.TestRunner.privateRun(TestRunner.java:624)
[testng] at org.testng.TestRunner.run(TestRunner.java:495)
[testng] at org.testng.SuiteRunner.runTest(SuiteRunner.java:300)
[testng] at org.testng.SuiteRunner.runSequentially(SuiteRunner.java:295)
[testng] at org.testng.SuiteRunner.privateRun(SuiteRunner.java:275)
[testng] at org.testng.SuiteRunner.run(SuiteRunner.java:190)
[testng] at org.testng.TestNG.createAndRunSuiteRunners(TestNG.java:792)
[testng] at org.testng.TestNG.runSuitesLocally(TestNG.java:765)
[testng] at org.testng.TestNG.run(TestNG.java:699)
[testng] at org.testng.TestNG.privateMain(TestNG.java:824)
[testng] at org.testng.TestNG.main(TestNG.java:802)
or in DVDstore:
[testng] Caused by: java.lang.NullPointerException
[testng] at org.jboss.seam.core.ConversationInterceptor.beginNavigation(ConversationInterceptor.java:243)
[testng] at org.jboss.seam.core.ConversationInterceptor.beginConversation(ConversationInterceptor.java:235)
[testng] at org.jboss.seam.core.ConversationInterceptor.beginConversationIfNecessary(ConversationInterceptor.java:166)
[testng] at org.jboss.seam.core.ConversationInterceptor.aroundInvoke(ConversationInterceptor.java:57)
[testng] at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:68)
[testng] at org.jboss.seam.core.MethodContextInterceptor.aroundInvoke(MethodContextInterceptor.java:42)
[testng] at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:68)
[testng] at org.jboss.seam.persistence.EntityManagerProxyInterceptor.aroundInvoke(EntityManagerProxyInterceptor.java:26)
[testng] at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:68)
[testng] at org.jboss.seam.persistence.HibernateSessionProxyInterceptor.aroundInvoke(HibernateSessionProxyInterceptor.java:27)
[testng] at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:68)
[testng] at org.jboss.seam.intercept.RootInterceptor.invoke(RootInterceptor.java:107)
[testng] at org.jboss.seam.intercept.SessionBeanInterceptor.aroundInvoke(SessionBeanInterceptor.java:50)
[testng] at org.jboss.ejb3.interceptor.InvocationContextImpl.proceed(InvocationContextImpl.java:118)
[testng] at org.jboss.ejb3.interceptor.EJB3InterceptorsInterceptor.invoke(EJB3InterceptorsInterceptor.java:63)
[testng] at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
[testng] at org.jboss.ejb3.entity.ExtendedPersistenceContextPropagationInterceptor.invoke(ExtendedPersistenceContextPropagationInterceptor.java:71)
[testng] at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
[testng] at org.jboss.ejb3.entity.TransactionScopedEntityManagerInterceptor.invoke(TransactionScopedEntityManagerInterceptor.java:54)
[testng] at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
[testng] at org.jboss.ejb3.AllowedOperationsInterceptor.invoke(AllowedOperationsInterceptor.java:47)
[testng] at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
[testng] at org.jboss.aspects.tx.TxPolicy.invokeInCallerTx(TxPolicy.java:126)
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
15 years, 8 months
[jbossseam-issues] [JBoss JIRA] Created: (JBSEAM-3368) conversation id evaluated to null (natural conversations)
by Arron Ferguson (JIRA)
conversation id evaluated to null (natural conversations)
---------------------------------------------------------
Key: JBSEAM-3368
URL: https://jira.jboss.org/jira/browse/JBSEAM-3368
Project: Seam
Issue Type: Bug
Components: Core
Affects Versions: 2.0.3.CR1
Environment: Linux Ubuntu 7.10, Intel Pentium 4, 3GHz, 1 GB RAM, Tomcat 6.0.16
Reporter: Arron Ferguson
Priority: Blocker
If the user attempts to go to a page that is restricted based on what is in the pages.xml file, two things go wrong: 1) an exception is thrown (java.lang.IllegalStateException: conversation id evaluated to null: [name of natural conversation]), 2) the user can still view the page that is supposed to be restricted (i.e., using the restrict element in the pages.xml file).
Setup Instructions:
1.) Set up Tomcat 6.x
2.) Create web app project structure
3.) Use the following for your pages.xml file (copy/paste):
<?xml version="1.0" encoding="UTF-8"?>
<pages xmlns="http://jboss.com/products/seam/pages"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://jboss.com/products/seam/pages http://jboss.com/products/seam/pages-2.0.xsd"
http-port="8080" https-port="8443"
no-conversation-view-id="/index.xhtml"
login-view-id="/index.xhtml">
<conversation name="regmem"
parameter-name="memberID"
parameter-value="#{memberreg.tempKey}"/>
<page view-id="*" scheme="http" />
<page view-id="/register.xhtml">
<description>Register Member: #{memberreg}</description>
<navigation from-action="#{memberreg.start}">
<begin-conversation join="true" conversation="regmem"/>
<redirect view-id="/register1.xhtml"/>
</navigation>
<navigation>
<rule if="#{identity.loggedIn}">
<redirect view-id="/memberadmin.xhtml"/>
</rule>
<rule if="#{memberreg.acceptedInformation}">
<redirect view-id="/register3.xhtml"/>
</rule>
<rule if="#{memberreg.agree}">
<redirect view-id="/register2.xhtml"/>
</rule>
<rule if="#{memberreg.started}">
<redirect view-id="/register1.xhtml"/>
</rule>
</navigation>
</page>
<page view-id="/register1.xhtml" conversation-required="true"
conversation="regmem">
<description>Register Member: #{memberreg}</description>
<restrict>#{memberreg.started}</restrict>
<navigation from-action="#{memberreg.agreeToLicense}">
<redirect view-id="/register2.xhtml"/>
</navigation>
<navigation from-action="#{memberreg.cancel}">
<end-conversation/>
<redirect view-id="/index.xhtml"/>
</navigation>
<navigation>
<rule if="#{identity.loggedIn}">
<redirect view-id="/memberadmin.xhtml"/>
</rule>
<rule if="#{memberreg.acceptedInformation}">
<redirect view-id="/register3.xhtml"/>
</rule>
<rule if="#{memberreg.agree}">
<redirect view-id="/register2.xhtml"/>
</rule>
</navigation>
</page>
<page view-id="/register2.xhtml" conversation-required="true"
conversation="regmem">
<description>Register Member: #{memberreg}</description>
<restrict>#{memberreg.agree}</restrict>
<navigation from-action="#{memberreg.next}">
<rule if="#{memberreg.readyToConfirm}">
<redirect view-id="/register3.xhtml"/>
</rule>
<rule if="#{not memberreg.readyToConfirm}">
<redirect view-id="/register2.xhtml"/>
</rule>
</navigation>
<navigation>
<rule if="#{identity.loggedIn}">
<redirect view-id="/memberadmin.xhtml"/>
</rule>
<rule if="#{memberreg.acceptedInformation}">
<redirect view-id="/register3.xhtml"/>
</rule>
</navigation>
</page>
<page view-id="/register3.xhtml" conversation-required="true"
conversation="regmem">
<description>Register Member: #{memberreg}</description>
<restrict>#{memberreg.readyToConfirm}</restrict>
<navigation from-action="#{memberreg.acceptInformation}">
<redirect view-id="/register4.xhtml"/>
</navigation>
<navigation from-action="#{memberreg.editInformation}">
<redirect view-id="/register2.xhtml"/>
</navigation>
<navigation>
<rule if="#{identity.loggedIn}">
<redirect view-id="/memberadmin.xhtml"/>
</rule>
</navigation>
</page>
<page view-id="/register4.xhtml" conversation-required="true"
conversation="regmem">
<description>Register Member: #{memberreg}</description>
<restrict>#{memberreg.acceptedInformation}</restrict>
<navigation from-action="#{memberreg.end}">
<end-conversation before-redirect="false"/>
<redirect view-id="/index.xhtml"/>
</navigation>
</page>
<!-- START EXCEPTIONS -->
<exception class="org.jboss.seam.security.NotLoggedInException" log="false">
<redirect view-id="/index.xhtml">
<message severity="warn">Your session ended or expired.</message>
</redirect>
</exception>
<exception class="org.jboss.seam.security.AuthorizationException" log="false">
<end-conversation/>
<redirect view-id="/index.xhtml">
<message severity="warn">You are not authorized.</message>
</redirect>
</exception>
<!-- END EXCEPTIONS -->
</pages>
4.) Create two Java classes (registration bean and POJO):
Registration Bean:
package com.test;
import javax.ejb.Remove;
import javax.persistence.Column;
import javax.persistence.NoResultException;
import java.io.Serializable;
import java.util.Date;
import javax.persistence.EntityManager;
import org.jboss.seam.annotations.In;
import org.jboss.seam.annotations.End;
import org.jboss.seam.annotations.Destroy;
import org.jboss.seam.annotations.Name;
import org.jboss.seam.annotations.Out;
import org.jboss.seam.annotations.Scope;
import org.jboss.seam.faces.FacesMessages;
import org.jboss.seam.faces.Renderer;
import static org.jboss.seam.ScopeType.CONVERSATION;
@Scope(CONVERSATION)
@Name("memberreg")
public class MemberRegistrationAction implements Serializable
{
private static long tempKey = 0;
@Out(required = false) @In(required = false)
private Member newMember;
@In(create = true)
private Renderer renderer;
private boolean started = false;
private boolean agree = false;
private boolean acceptedInformation = false;
private boolean readyToConfirm = false;
private boolean stillNeedsToEdit = false;
private String confirm = "";
public String getConfirm() { return confirm; }
public void setConfirm(String confirm) { this.confirm = confirm; }
public long getTempKey() { return tempKey; }
public void setTempKey(long tempKey) { this.tempKey = tempKey; }
public Member getNewMember() { return newMember; }
/////////////////////////////////////////////
// CONVERSATION METHODS
/////////////////////////////////////////////
public void start()
{
newMember = new Member();
if(tempKey >= Long.MAX_VALUE)
{
tempKey = 0;
}
tempKey++;
started = true;
}
public void agreeToLicense() { agree = true; }
public void cancel()
{
started = false;
agree = false;
acceptedInformation = false;
readyToConfirm = false;
stillNeedsToEdit = false;
}
public void next() { readyToConfirm = this.verify(); }
private boolean verify() {
return true; // test purposes, always true
}
public void acceptInformation()
{
acceptedInformation = true;
stillNeedsToEdit = false;
this.complete();
}
public void editInformation()
{
stillNeedsToEdit = true;
acceptedInformation = false;
}
private void complete() {
; // write to JPA/Hibernate
}
public void end() {
; // something, something, something, dark side
}
/////////////////////////////////////////////
public boolean isStarted() { return started; }
public boolean isAgree() { return agree; }
public boolean isAcceptedInformation() { return acceptedInformation; }
public boolean isReadyToConfirm() { return readyToConfirm; }
public boolean isStillNeedsToEdit() { return stillNeedsToEdit; }
public void destroy()
{
started = false;
agree = false;
acceptedInformation = false;
readyToConfirm = false;
stillNeedsToEdit = false;
}
}
POJO:
package com.test;
import java.io.Serializable;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.Table;
import org.hibernate.validator.Length;
import org.hibernate.validator.NotEmpty;
import org.hibernate.validator.NotNull;
import org.jboss.seam.annotations.Name;
@Entity @Name("member") @Table(name="member")
public class Member implements Serializable {
@Id
@GeneratedValue
@Column(name = "id")
private long id = -1;
@NotNull
@Length(min=2, max=20, message="Must be between 2 and 20 chars long")
@Column(name = "lastname")
private String lastName;
@NotNull
@Length(min=2, max=20, message="Must be between 2 and 20 chars long")
@Column(name = "firstname")
private String firstName;
public long getId() { return id; }
public void setId(long id) { this.id = id; }
public String getLastName() { return lastName; }
public void setLastName(String lastName) { this.lastName = lastName; }
public String getFirstName() { return firstName; }
public void setFirstName(String firstName) { this.firstName = firstName; }
@Override
public String toString() { return firstName + " " + lastName; }
}
5.) Create XHTML files (template, index, register1 - register4):
///////////////////////////////////
template.xhtml:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en"
xmlns:ui="http://java.sun.com/jsf/facelets"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:f="http://java.sun.com/jsf/core" >
<head>
<title>something.com</title>
</head>
<body>
<div>
<h:messages globalOnly="true"/><br/><br/>
<ui:insert name="maincontent">
</ui:insert>
</div>
</body>
</html>
///////////////////////////////////
index.html:
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:ui="http://java.sun.com/jsf/facelets"
xmlns:s="http://jboss.com/products/seam/taglib">
<!-- <ui:composition template="./template.xhtml"> -->
<ui:composition template="./template.xhtml">
<ui:define name="maincontent">
<s:link view="/register.html" value="click here to register" propagation="none"/>
</ui:define>
</ui:composition>
</html>
///////////////////////////////////
register.html
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:ui="http://java.sun.com/jsf/facelets"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:s="http://jboss.com/products/seam/taglib">
<ui:composition template="./template.xhtml">
<ui:define name="maincontent">
<p>Click to start natural conversation:</p>
<h:form id="testform">
<h:outputText value="Click: "/>
<h:commandButton value="Register" action="#{memberreg.start}">
<s:conversationName value="regmem"/>
<s:conversationPropagation type="join"/>
</h:commandButton>
</h:form>
</ui:define>
</ui:composition>
</html>
///////////////////////////////////
register1.xhtml
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:ui="http://java.sun.com/jsf/facelets"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:s="http://jboss.com/products/seam/taglib" >
<ui:composition template="./template.xhtml">
<ui:define name="maincontent">
<h:form id="agreeform">
<h:commandButton id="agreebut1" value="Agree"
action="#{memberreg.agreeToLicense}">
<s:conversationName value="regmem"/>
<s:conversationPropagation type="join"/>
</h:commandButton>
<br/><p>Click cancel to kill the natural conversation early</p>
<h:commandButton id="disagreebut1" value="Disagree"
action="#{memberreg.cancel}">
<s:conversationName value="regmem"/>
<s:conversationPropagation type="end"/>
</h:commandButton>
</h:form>
</ui:define>
</ui:composition>
</html>
///////////////////////////////////
register2.xhtml
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:ui="http://java.sun.com/jsf/facelets"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:s="http://jboss.com/products/seam/taglib" >
<ui:composition template="./template.xhtml">
<ui:define name="maincontent">
<h:form id="formfields">
<p>Content inserted for testing purposes when this button clicked:</p>
<h:commandButton id="next" value="Next" action="#{memberreg.next}">
<s:conversationName value="regmem"/>
<s:conversationPropagation type="join"/>
</h:commandButton>
</h:form>
</ui:define>
</ui:composition>
</html>
///////////////////////////////////
register3.xhtml
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:ui="http://java.sun.com/jsf/facelets"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:rich="http://richfaces.org/rich"
xmlns:s="http://jboss.com/products/seam/taglib" >
<ui:composition template="./template.xhtml">
<ui:define name="maincontent">
<h:form id="formfields" rendered="#{not identity.loggedIn}">
<h:commandButton id="editinfo" value="Edit Information"
action="#{memberreg.editInformation}">
<s:conversationName value="regmem"/>
<s:conversationPropagation type="join"/>
</h:commandButton>
     
<h:commandButton id="confirmreg" value="Confirm Registration"
action="#{memberreg.acceptInformation}">
<s:conversationName value="regmem"/>
<s:conversationPropagation type="join"/>
</h:commandButton>
</h:form>
</ui:define>
</ui:composition>
</html>
///////////////////////////////////
register4.xhtml
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:ui="http://java.sun.com/jsf/facelets"
xmlns:s="http://jboss.com/products/seam/taglib" >
<ui:composition template="./template.xhtml">
<ui:define name="maincontent">
<p>Click back to finish natural conversation.</p>
<s:link value="Back to home." action="#{memberreg.end}"
propagation="end"/>
</ui:define>
</ui:composition>
</html>
6.) Use the following JARs for your web app (for running inside of Tomcat 6):
activation.jar
antlr.jar
asm.jar
cglib.jar
commons-beanutils.jar
commons-codec-1.3.jar
commons-collections.jar
commons-digester.jar
commons-lang.jar
commons-logging.jar
DA.jar
dom4j.jar
ejb-api.jar
filelist.txt
hibernate-annotations.jar
hibernate-commons-annotations.jar
hibernate-entitymanager.jar
hibernate.jar
hibernate-search.jar
hibernate-validator.jar
javassist.jar
jboss-archive-browsing.jar
jboss-el.jar
jboss-seam-debug.jar
jboss-seam-ioc.jar
jboss-seam.jar
jboss-seam-mail.jar
jboss-seam-ui.jar
jsf-api.jar
jsf-facelets.jar
jsf-impl.jar
jstl.jar
jta.jar
lucene-core.jar
mail.jar
persistence-api.jar
richfaces-api.jar
richfaces-impl.jar
richfaces-ui.jar
spring.jar
urlrewrite-3.1.0.jar
7.) (Optional) Set up facelets but you may also want to make the default extension html:
<servlet-mapping>
<servlet-name>Faces Servlet</servlet-name>
<url-pattern>*.html</url-pattern>
</servlet-mapping>
Steps to reproduce bug:
1.) Start web app inside of Tomcat 6
2.) using your browser's URL text field, type in the name of a register1.html, register2.html, or register3.html. At this point your web app will generate an exception stack which will be caused by:
java.lang.IllegalStateException: conversation id evaluated to null:
The conversation is evaluated to null. Since conversations are a layer on top of sessions, the same behavior is expected which is a faces message purporting of no conversation existing and a redirect to the URL specified in the pages.xml attribute no-conversation-view-id="/index.xhtml" (so in this case index.xhtml page). It should not allow the user to see the page and generate exceptions.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
15 years, 8 months
[jbossseam-issues] [JBoss JIRA] Created: (JBSEAM-2310) Need an option to remove URL parameters from a URL
by Terry (JIRA)
Need an option to remove URL parameters from a URL
--------------------------------------------------
Key: JBSEAM-2310
URL: http://jira.jboss.com/jira/browse/JBSEAM-2310
Project: JBoss Seam
Issue Type: Feature Request
Components: Core
Affects Versions: 1.2.1.GA
Environment: All environments
Reporter: Terry
Priority: Minor
When JSF page is loaded, seam goes through all the page links and instantiate seam components referenced in those pages, it then adds url parameters (specified in page.xml file) to those links.
Both of these features should be option: auto Instantiation of seam components referenced in jsf pages and appending parameters to the link on jsf page.
I have menu with about 40 links to jsf pages: everytime my page refreshes all the seam components in those 40+ pages get instantiated and all think get appened with parameters specified in page.xml files.
--
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, 8 months
[jbossseam-issues] [JBoss JIRA] Created: (JBSEAM-3480) s:link with propagation="none" linked to action with @Begin fails (intermittently) with conversation-required="true"
by Francisco Jose Peredo Noguez (JIRA)
s:link with propagation="none" linked to action with @Begin fails (intermittently) with conversation-required="true"
---------------------------------------------------------------------------------------------------------------------
Key: JBSEAM-3480
URL: https://jira.jboss.org/jira/browse/JBSEAM-3480
Project: Seam
Issue Type: Bug
Reporter: Francisco Jose Peredo Noguez
You can not call a s:link with propagation="none" linked to an action with @Begin from a page with conversation-required="true" to a page with conversation-required="true" because it will redirect you to the no-conversation-view-id. (And I think it shouldn't do that, it should allow you to reach the page you originally meant to reach, because the action has a @Begin and it should consider that)
Menu.java code:
@Name("menu")
public class Menu {
@Begin
public String goToCategoryList(){
return "/CategoryList.xhtml";
}
}
layout/menu.xhtml code:
<s:link value="Category List By Action" propagation="none" action="#{menu.goToCategoryList}"/>
And in CategoryList.page.xml
<?xml version="1.0" encoding="UTF-8"?>
<page xmlns="http://jboss.com/products/seam/pages"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://jboss.com/products/seam/pages http://jboss.com/products/seam/pages-2.0.xsd"
no-conversation-view-id="/Blank.xhtml" conversation-required="true">
<param name="firstResult" value="#{categoryList.firstResult}"/>
<param name="order" value="#{categoryList.order}"/>
<param name="from"/>
<param name="name" value="#{categoryList.category.name}"/>
</page>
The funny thing is that this makes the menu option work intermittently:
first time works (from a page without conversation-required to a page with conversation-required)
second time does not work (from a page with conversation-required to a page with conversation-required) and it gets redirected to Blank.seam
third time works (from a page without conversation-required to a page with conversation-required)
And so on and so forth...
The big question here is, if the @Begin is not really working, why it does work the first time? because if I comment the @Begin::
Menu.java code:
@Name("menu")
public class Menu {
//@Begin <----THIS IS NOW COMMENTED
public String goToCategoryList(){
return "/CategoryList.xhtml";
}
}
Then It fails always.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
15 years, 8 months