You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by hese <10...@gmail.com> on 2011/06/23 19:41:30 UTC
problems with submit when class variables are used in "value"
attribute
Hi,
I have a form with a table. Each row in the table has a select control,
whose 'value' is being set from one of "row" class's instance variables. I
have a submit button to post the form.
The problem is the onSelectFromSubmit() handler is not getting called when I
use value="campaignProgram.campaign.status" in the select control. So I
declared a string variable 'test' in the class and used it instead, and it
works.
Here is the original code:
<table t:type="grid" t:source="campaignPrograms" t:row="campaignProgram"
t:add="status">
<p:statusCell>
<div id="campaign_${campaignProgram.campaign.id}">
<select t:type="select" t:id="inPlaceCampaignSelect"
model="campaignStatusModel"
t:context="campaignProgram.campaign.id"
value="campaignProgram.campaign.status"
t:mixins="onEvent" t:event="change"
onCompleteCallback="onUpdateCampaignStatus"
validate="required"></select>
</div>
</p:statusCell>
</table>
select controls value changed to:
value="test"
and the form submit works. What am I missing?
note: I am loading 'campaignPrograms' and 'campaignProgram' (source and row)
in onActivate().
--
View this message in context: http://tapestry.1045711.n5.nabble.com/problems-with-submit-when-class-variables-are-used-in-value-attribute-tp4518343p4518343.html
Sent from the Tapestry - User mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org
Re: problems with submit when class variables are used in "value"
attribute
Posted by hese <10...@gmail.com>.
The problem was the data type of campaign.status. It was a class, instead
of a string. Guess tapestry didnt know how to convert it, so the onSelect
handler was not called....
--
View this message in context: http://tapestry.1045711.n5.nabble.com/problems-with-submit-when-class-variables-are-used-in-value-attribute-tp4518343p4518545.html
Sent from the Tapestry - User mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org