Thanks for the reply Scott. The thing that I find strange is if I purposely
incorrectly enter data that will throw a validation error the incorrectly
entered data is returned with the error message. This indicates that the
entered data is getting picked up, but how?
Thanks again
Paul
seloha . wrote:
I am using the new contrib:Table since I believe contrib:FormTable is to
de deprecated.
I think I have a very stupid mistake somewhere. I am trying to update some
fields, when I get the list of table data objects they still have the old
information prior to submission. If I put an invalid entry the form fails
validation an has the new data redisplayed with an error message, this
indicates something is working!
I am using beta-5 which was checked-out from the cvs about a week ago.
Some of the code:
.page:
<property name="priceCalcData"/>
<component id="priceCalcTable" type="contrib:Table">
<binding name="source" value="ognl:priceCalcData"/>
<binding name="convertor" value="ognl:priceCalcDataItemConvertor"/>
<binding name="columns"
value="literal:
airport,
areaPostcode,
noOfPeople,
!price,
!exclusivePrice,
!onewayPrice,
!onewayExclusivePrice"/>
<binding name="rowsClass" value="ognl:'priceCalcRowbgcolor' +
beans.evenOdd.next"/>
<binding name="pageSize" value="literal:20"/>
<binding name="row" value="ognl:rowObj"/>
<binding name="persist" value="literal:session"/>
</component>
example of one of the columns to update:
<component id="priceColumnValue" type="Block"/>
<component id="editablePrice" type="TextField">
<binding name="displayName" value="literal:Price"/>
<binding name="value"
value="ognl:components.priceCalcTable.tableRow.price"/>
<binding name="translator" value="translator:number,pattern=#.##"/>
<binding name="validators" value="validators:required,min=0"/>
<binding name="id" value="ognl:'price' + rowId"/>
</component>
template:
<table class="priceCalcTable" jwcid="priceCalcTable">
<tr jwcid="airportColumnValue">
<td jwcid="displayAirport" class="priceCalcRowColor"/>
</tr>
<tr jwcid="areaPostcodeColumnValue">
<td jwcid="displayAreaPostcode"/>
</tr>
<tr jwcid="noOfPeopleColumnValue">
<td jwcid="displayNoOfPeople" class="priceCalcRowColor"/>
</tr>
<tr jwcid="priceColumnValue">
<td jwcid="editablePrice" class="priceCalcRowColor"
align="right" size="8"/>
</tr>
<tr jwcid="exclusivePriceColumnValue">
<td jwcid="editableExclusivePrice" class="priceCalcRowColor"
align="right" size="8"/>
</tr>
<tr jwcid="onewayPriceColumnValue">
<td jwcid="editableOnewayPrice" class="priceCalcRowColor"
align="right" size="8"/>
</tr>
<tr jwcid="onewayExclusivePriceColumnValue">
<td jwcid="editableOnewayExclusivePrice"
class="priceCalcRowColor" align="right" size="8"/>
</tr>
</table>
java in the form listener:
if (validationDelegate.getHasErrors()) {
return;
}
List priceCalcData = getPriceCalcData();
this last line retrieves the original values prior to submission.
I probably haven't provided enough code or detail but maybe someone could
point me in the right direction. It almost works (funny), method
getPriceCalcData() is declared as:
public abstract List getPriceCalcData();
As previously stated the validation returns the page with the entered
incorrect value. It is almost like I am reading the value at the wrong time,
but there is only one listener on the form?
Any help appreciated,
Paul
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
scott wrote:
Finally else who has run into this issue. I created a bug for this about a
month ago and it hasn't been looked at yet. Take a look at
http://issues.apache.org/jira/browse/TAPESTRY-436
scott.
--
Scott F. Walter Scott F. Walter
Principal Consultant
Vivare, Inc.
E: [EMAIL PROTECTED]
E: [EMAIL PROTECTED]
Visit scottwalter.com <http://scottwalter.com> --Point. Click. Explore!
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]