Hi all, 
 in 
tapestry-core/src/main/resources/org/apache/tapestry5/corelib/components/BeanDisplay.tml
 the loop component has the formState parameter set to "ITERATION" while 
(probably) should be set to "NONE". 
I'm appending [3] a really simple example showing that this bug prevents the 
Beandisplay component to be used inside a form.

I found two jira Issues reporting the problem: 
- TAP5-311 [1] - NPE in BeanDisplay if used in a form with a default model 
- TAP5-983 [2] - CLONE -NPE in BeanDisplay if used in a form with a default 
model

I think both of them fail to point out the real bug which is not related to 
beanmodel construction but to the fact that BeanDisplay should not be involved 
in form processing logic at all.

Luca

PS: I would be *really* happy to contribute a patch and test case *if* any 
committer has interest in fixing this bug. I would also be ready to check the 
behavior in T54 where the form submission logic has changed (from POST+GET to 
POST)

[1] https://issues.apache.org/jira/browse/TAP5-311
[2] https://issues.apache.org/jira/browse/TAP5-983
[3] example code
Example.tml: 
<t:form> 
<div t:id="testBeanDisplay" /> 
<input t:type="submit"/> 
</t:form>

Example.java: 
@Component(parameters = { "object=testbean" }) 
private BeanDisplay testBeanDisplay; 
@Persist //No matter if persisted or not 
@Property 
private TestBean testbean; 
void onActivate() { 
if (testbean == null) { 
testbean = new TestBean(); 
} 

 


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org

Reply via email to