Hi, I have the following code:
<t:zone id="gamesZone" t:id="gamesZone">
<t:form t:id="gamesForm" id="gamesForm" t:zone="gamesZone">
<t:Loop t:source="game.gameResultsByPeriod"
t:value="gameResult">
<div class="t-beaneditor-row">
<label>Period:</label>
${gameResult.gamePeriod.name}
</div>
<div class="t-beaneditor-row">
<label>First Team Goals</label>
<t:textfield
t:value="gameResult.firstTeamGoals"></t:textfield>
</div>
<div class="t-beaneditor-row">
<label>Second Team Goals</label>
<t:textfield
t:value="gameResult.secondTeamGoals"></t:textfield>
</div>
</t:Loop>
<div class="t-beaneditor-row">
<input t:type="submit" value="Save" />
</div>
</div>
</t:form>
</t:zone>
By pressing the submit, I receive
Caused by: org.apache.tapestry5.ioc.internal.util.TapestryException: Property
'gameResult' (within property expression 'gameResult.firstTeamGoals', of
com.empters.football.pages.AdminPage@7752bd97) is null. [at
classpath:com/empters/football/pages/AdminPage.tml, line 442]
at
org.apache.tapestry5.internal.bindings.PropBinding.set(PropBinding.java:76)
[tapestry-core-5.3.7.jar:]
at
org.apache.tapestry5.internal.transform.ParameterWorker$3$1.writeToBinding(ParameterWorker.java:298)
[tapestry-core-5.3.7.jar:]
... 85 more
Caused by: java.lang.NullPointerException: Property 'gameResult' (within
property expression 'gameResult.firstTeamGoals', of
com.empters.football.pages.AdminPage@7752bd97) is null.
at
org.apache.tapestry5.internal.services.PropertyConduitSourceImpl.nullTerm(PropertyConduitSourceImpl.java:1537)
[tapestry-core-5.3.7.jar:]
at $InternalPropertyConduit_1a24021095bb.navigate(Unknown Source)
at $InternalPropertyConduit_1a24021095bb.set(Unknown Source) at
org.apache.tapestry5.internal.bindings.PropBinding.set(PropBinding.java:72)
[tapestry-core-5.3.7.jar:]
... 86 more
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]