You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tapestry.apache.org by "Stephan Windmüller (JIRA)" <ji...@apache.org> on 2010/01/13 13:40:54 UTC
[jira] Created: (TAP5-983) CLONE -NPE in BeanDisplay if used in a
form with a default model
CLONE -NPE in BeanDisplay if used in a form with a default model
----------------------------------------------------------------
Key: TAP5-983
URL: https://issues.apache.org/jira/browse/TAP5-983
Project: Tapestry 5
Issue Type: Bug
Components: tapestry-core
Affects Versions: 5.0.15
Reporter: Stephan Windmüller
Priority: Minor
Create something like this:
<t:form>
<t:beandisplay object="foo" include="bar" />
</t:form>
and submit the form. You get a NPE in beandisplay. The workaround is to create the model yourself.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (TAP5-983) CLONE -NPE in BeanDisplay if used in a
form with a default model
Posted by "Stephan Windmüller (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/TAP5-983?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12799723#action_12799723 ]
Stephan Windmüller commented on TAP5-983:
-----------------------------------------
I created a minimal page which shows the error in Tapestry 5.1.0:
TestObject.java:
public class TestObject {
private String test;
public String getTest() {
return test;
}
public void setTest(String test) {
this.test = test;
}
}
TestPage.java:
import org.apache.tapestry5.annotations.Property;
public class TestPage {
@Property
private TestObject testObject;
void onPrepare() {
testObject = new TestObject();
testObject.setTest("Test String");
}
}
TestPage.tml:
<html xmlns:t="http://tapestry.apache.org/schema/tapestry_5_1_0.xsd">
<head>
<title>Test Page</title>
</head>
<body>
<t:form>
<t:beandisplay object="testObject"/>
<t:submit/>
</t:form>
</body>
</html>
StackTrace after submitting the form:
Caused by: org.apache.tapestry5.ioc.internal.util.TapestryException: Failure reading parameter 'source' of component TestPage:beandisplay.loop: Property 'model' (within property expression 'model.propertyNames', of org.apache.tapestry5.corelib.components.BeanDisplay@162595) is null. [at classpath:org/apache/tapestry5/corelib/components/BeanDisplay.tml, line 4]
at org.apache.tapestry5.corelib.components.Form.executeStoredActions(Form.java:495)
at org.apache.tapestry5.corelib.components.Form._$advised$onAction(Form.java:378)
at org.apache.tapestry5.corelib.components.Form$onAction$invocation_12627b12cc9.invokeAdvisedMethod(Form$onAction$invocation_12627b12cc9.java)
at org.apache.tapestry5.internal.services.AbstractComponentMethodInvocation.proceed(AbstractComponentMethodInvocation.java:71)
at org.apache.tapestry5.ioc.internal.services.LoggingAdvice.advise(LoggingAdvice.java:37)
at org.apache.tapestry5.internal.transform.LogWorker$1.advise(LogWorker.java:54)
at org.apache.tapestry5.internal.services.AbstractComponentMethodInvocation.proceed(AbstractComponentMethodInvocation.java:80)
at org.apache.tapestry5.corelib.components.Form.onAction(Form.java)
at org.apache.tapestry5.corelib.components.Form.dispatchComponentEvent(Form.java)
at org.apache.tapestry5.internal.structure.ComponentPageElementImpl.dispatchEvent(ComponentPageElementImpl.java:910)
at org.apache.tapestry5.internal.structure.ComponentPageElementImpl.triggerContextEvent(ComponentPageElementImpl.java:1081)
... 55 more
Caused by: org.apache.tapestry5.ioc.internal.util.TapestryException: Failure reading parameter 'source' of component TestPage:beandisplay.loop: Property 'model' (within property expression 'model.propertyNames', of org.apache.tapestry5.corelib.components.BeanDisplay@162595) is null. [at classpath:org/apache/tapestry5/corelib/components/BeanDisplay.tml, line 4]
at org.apache.tapestry5.internal.structure.InternalComponentResourcesImpl$1.read(InternalComponentResourcesImpl.java:516)
at org.apache.tapestry5.internal.structure.InternalComponentResourcesImpl$1.read(InternalComponentResourcesImpl.java:496)
at org.apache.tapestry5.corelib.components.Loop._$read_parameter_source(Loop.java)
at org.apache.tapestry5.corelib.components.Loop.setupForVolatile(Loop.java:358)
at org.apache.tapestry5.corelib.components.Loop.access$100(Loop.java:44)
at org.apache.tapestry5.corelib.components.Loop$2.execute(Loop.java:75)
at org.apache.tapestry5.corelib.components.Loop$2.execute(Loop.java:79)
at org.apache.tapestry5.corelib.components.Form.executeStoredActions(Form.java:480)
... 65 more
Caused by: org.apache.tapestry5.ioc.internal.util.TapestryException: Property 'model' (within property expression 'model.propertyNames', of org.apache.tapestry5.corelib.components.BeanDisplay@162595) is null. [at classpath:org/apache/tapestry5/corelib/components/BeanDisplay.tml, line 4]
at org.apache.tapestry5.internal.bindings.PropBinding.get(PropBinding.java:62)
at org.apache.tapestry5.internal.structure.InternalComponentResourcesImpl$1.read(InternalComponentResourcesImpl.java:510)
... 72 more
Caused by: java.lang.NullPointerException: Property 'model' (within property expression 'model.propertyNames', of org.apache.tapestry5.corelib.components.BeanDisplay@162595) is null.
at org.apache.tapestry5.internal.services.PropertyConduitSourceImpl.nullTerm(PropertyConduitSourceImpl.java:1256)
at $PropertyConduit_12627b119a9.navigate($PropertyConduit_12627b119a9.java)
at $PropertyConduit_12627b119a9.get($PropertyConduit_12627b119a9.java)
at org.apache.tapestry5.internal.bindings.PropBinding.get(PropBinding.java:58)
... 73 more
> CLONE -NPE in BeanDisplay if used in a form with a default model
> ----------------------------------------------------------------
>
> Key: TAP5-983
> URL: https://issues.apache.org/jira/browse/TAP5-983
> Project: Tapestry 5
> Issue Type: Bug
> Components: tapestry-core
> Affects Versions: 5.0.15
> Reporter: Stephan Windmüller
> Priority: Minor
>
> Create something like this:
> <t:form>
> <t:beandisplay object="foo" include="bar" />
> </t:form>
> and submit the form. You get a NPE in beandisplay. The workaround is to create the model yourself.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (TAP5-983) CLONE -NPE in BeanDisplay if used in a
form with a default model
Posted by "Stephan Windmüller (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/TAP5-983?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12799723#action_12799723 ]
Stephan Windmüller commented on TAP5-983:
-----------------------------------------
I created a minimal page which shows the error in Tapestry 5.1.0:
TestObject.java:
public class TestObject {
private String test;
public String getTest() {
return test;
}
public void setTest(String test) {
this.test = test;
}
}
TestPage.java:
import org.apache.tapestry5.annotations.Property;
public class TestPage {
@Property
private TestObject testObject;
void onPrepare() {
testObject = new TestObject();
testObject.setTest("Test String");
}
}
TestPage.tml:
<html xmlns:t="http://tapestry.apache.org/schema/tapestry_5_1_0.xsd">
<head>
<title>Test Page</title>
</head>
<body>
<t:form>
<t:beandisplay object="testObject"/>
<t:submit/>
</t:form>
</body>
</html>
StackTrace after submitting the form:
Caused by: org.apache.tapestry5.ioc.internal.util.TapestryException: Failure reading parameter 'source' of component TestPage:beandisplay.loop: Property 'model' (within property expression 'model.propertyNames', of org.apache.tapestry5.corelib.components.BeanDisplay@162595) is null. [at classpath:org/apache/tapestry5/corelib/components/BeanDisplay.tml, line 4]
at org.apache.tapestry5.corelib.components.Form.executeStoredActions(Form.java:495)
at org.apache.tapestry5.corelib.components.Form._$advised$onAction(Form.java:378)
at org.apache.tapestry5.corelib.components.Form$onAction$invocation_12627b12cc9.invokeAdvisedMethod(Form$onAction$invocation_12627b12cc9.java)
at org.apache.tapestry5.internal.services.AbstractComponentMethodInvocation.proceed(AbstractComponentMethodInvocation.java:71)
at org.apache.tapestry5.ioc.internal.services.LoggingAdvice.advise(LoggingAdvice.java:37)
at org.apache.tapestry5.internal.transform.LogWorker$1.advise(LogWorker.java:54)
at org.apache.tapestry5.internal.services.AbstractComponentMethodInvocation.proceed(AbstractComponentMethodInvocation.java:80)
at org.apache.tapestry5.corelib.components.Form.onAction(Form.java)
at org.apache.tapestry5.corelib.components.Form.dispatchComponentEvent(Form.java)
at org.apache.tapestry5.internal.structure.ComponentPageElementImpl.dispatchEvent(ComponentPageElementImpl.java:910)
at org.apache.tapestry5.internal.structure.ComponentPageElementImpl.triggerContextEvent(ComponentPageElementImpl.java:1081)
... 55 more
Caused by: org.apache.tapestry5.ioc.internal.util.TapestryException: Failure reading parameter 'source' of component TestPage:beandisplay.loop: Property 'model' (within property expression 'model.propertyNames', of org.apache.tapestry5.corelib.components.BeanDisplay@162595) is null. [at classpath:org/apache/tapestry5/corelib/components/BeanDisplay.tml, line 4]
at org.apache.tapestry5.internal.structure.InternalComponentResourcesImpl$1.read(InternalComponentResourcesImpl.java:516)
at org.apache.tapestry5.internal.structure.InternalComponentResourcesImpl$1.read(InternalComponentResourcesImpl.java:496)
at org.apache.tapestry5.corelib.components.Loop._$read_parameter_source(Loop.java)
at org.apache.tapestry5.corelib.components.Loop.setupForVolatile(Loop.java:358)
at org.apache.tapestry5.corelib.components.Loop.access$100(Loop.java:44)
at org.apache.tapestry5.corelib.components.Loop$2.execute(Loop.java:75)
at org.apache.tapestry5.corelib.components.Loop$2.execute(Loop.java:79)
at org.apache.tapestry5.corelib.components.Form.executeStoredActions(Form.java:480)
... 65 more
Caused by: org.apache.tapestry5.ioc.internal.util.TapestryException: Property 'model' (within property expression 'model.propertyNames', of org.apache.tapestry5.corelib.components.BeanDisplay@162595) is null. [at classpath:org/apache/tapestry5/corelib/components/BeanDisplay.tml, line 4]
at org.apache.tapestry5.internal.bindings.PropBinding.get(PropBinding.java:62)
at org.apache.tapestry5.internal.structure.InternalComponentResourcesImpl$1.read(InternalComponentResourcesImpl.java:510)
... 72 more
Caused by: java.lang.NullPointerException: Property 'model' (within property expression 'model.propertyNames', of org.apache.tapestry5.corelib.components.BeanDisplay@162595) is null.
at org.apache.tapestry5.internal.services.PropertyConduitSourceImpl.nullTerm(PropertyConduitSourceImpl.java:1256)
at $PropertyConduit_12627b119a9.navigate($PropertyConduit_12627b119a9.java)
at $PropertyConduit_12627b119a9.get($PropertyConduit_12627b119a9.java)
at org.apache.tapestry5.internal.bindings.PropBinding.get(PropBinding.java:58)
... 73 more
> CLONE -NPE in BeanDisplay if used in a form with a default model
> ----------------------------------------------------------------
>
> Key: TAP5-983
> URL: https://issues.apache.org/jira/browse/TAP5-983
> Project: Tapestry 5
> Issue Type: Bug
> Components: tapestry-core
> Affects Versions: 5.0.15
> Reporter: Stephan Windmüller
> Priority: Minor
>
> Create something like this:
> <t:form>
> <t:beandisplay object="foo" include="bar" />
> </t:form>
> and submit the form. You get a NPE in beandisplay. The workaround is to create the model yourself.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (TAP5-983) CLONE -NPE in BeanDisplay if used in a
form with a default model
Posted by "Stephan Windmüller (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/TAP5-983?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Stephan Windmüller updated TAP5-983:
------------------------------------
Environment: Ubuntu Linux, Apache Tomcat
Affects Version/s: 5.1.0.5
> CLONE -NPE in BeanDisplay if used in a form with a default model
> ----------------------------------------------------------------
>
> Key: TAP5-983
> URL: https://issues.apache.org/jira/browse/TAP5-983
> Project: Tapestry 5
> Issue Type: Bug
> Components: tapestry-core
> Affects Versions: 5.1.0.5, 5.0.15
> Environment: Ubuntu Linux, Apache Tomcat
> Reporter: Stephan Windmüller
> Priority: Minor
>
> Create something like this:
> <t:form>
> <t:beandisplay object="foo" include="bar" />
> </t:form>
> and submit the form. You get a NPE in beandisplay. The workaround is to create the model yourself.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (TAP5-983) CLONE -NPE in BeanDisplay if used in a
form with a default model
Posted by "Stephan Windmüller (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/TAP5-983?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Stephan Windmüller updated TAP5-983:
------------------------------------
Environment: Ubuntu Linux, Apache Tomcat
Affects Version/s: 5.1.0.5
> CLONE -NPE in BeanDisplay if used in a form with a default model
> ----------------------------------------------------------------
>
> Key: TAP5-983
> URL: https://issues.apache.org/jira/browse/TAP5-983
> Project: Tapestry 5
> Issue Type: Bug
> Components: tapestry-core
> Affects Versions: 5.1.0.5, 5.0.15
> Environment: Ubuntu Linux, Apache Tomcat
> Reporter: Stephan Windmüller
> Priority: Minor
>
> Create something like this:
> <t:form>
> <t:beandisplay object="foo" include="bar" />
> </t:form>
> and submit the form. You get a NPE in beandisplay. The workaround is to create the model yourself.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.