Can someone please point out when/where in the code during the form
submission, ajaxformloop copies the newly added row results I'm referring to
the following example code -
http://jumpstart.doublenegative.com.au/jumpstart/examples/ajax/formloop1
I've a similar code, following is my ValueEncoder
@Log
public ValueEncoder<Promotion> getPromotionEncoder() {
return new ValueEncoder<Promotion>() {
@Log
public String toClient(Promotion promo) {
log.debug("toClient id="+promo.getId());
if (promo.getId() == 0)
{
return NEW_PROMOTION;
}
return new Long(promo.getId()).toString();
}
@Log
public Promotion toValue(String id) {
log.debug("toValue id="+id);
Promotion promotion = null;
if (id.equals(NEW_PROMOTION))
{
promotion = new Promotion();
newPromotions.add(promotion);
}
else
{
promotion =
crudService.findUniqueWithNamedQuery(Promotion.BY_ID,
QueryParameters.with("id", new
Long(id).longValue()).parameters());
}
return promotion == null? new Promotion(): promotion;
}
};
}
When onSuccess() method is called after the form submission, I can't access
the values of the newly created rows which I store in newPromotions in the
toValue() method above.
Appreciate any help on this.
Thanks,
Shaan
--
View this message in context:
http://tapestry.1045711.n5.nabble.com/AjaxFormLoop-not-populating-values-for-the-newly-created-form-elements-after-submission-tp5054568p5054568.html
Sent from the Tapestry - User mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]