Hi,
I'm having a hard time tracking down my issue at hand here. I have Form
components defined in a set of Block components in a Page class. The
entire set of Blocks is nested within a Zone that allows for navigation
between the Blocks without a page refresh.
Each form has supporting onValidateXXX(Object xxx) methods for most of
the fields. When I submit a given form within one of the related fields
in error, my debugging statements reveal that the expected
onValidateXXX(Object xxx) method(s) are called in the Page class.
Likewise, the form fails to submit when I use the recordError method of
the Form components.
However, the Validation Bubbles are failing to display despite being
designated for the related fields. Maybe I'm overlooking something here.
A simplified code example TML and Page class below.
Thanks,
Rich
TML:
<t:zone t:id="blockZone" id="blockZone" update="show">
<t:delegate to="selectedBlock" />
<!-- TRIGGERING PRICING -->
<t:block t:id="triggerPrice">
<t:form t:id="tPriceForm" t:zone="blockZone">
<ul class="registerConvoList">
<li class="fieldHelp">${message:discountPercentage-help}</li>
<li>
<label> ${message:discountPercentage-label} </label>
<t:textfield t:id="discountPercentage" value="prod.discountPercentage"
t:validate="required" />
</li>
<li>
<br/><input type="submit" value="${message:trigger-done-label}"/>
</li>
</ul>
</t:form>
</t:block>
</t:zone>
Page Class:
@Inject
private Messages messages;
@InjectComponent
private Form tPriceForm;
@Component(id="discountPercentage")
private TextField discountPercentageField;
@Inject
private Block triggerPrice;
@Persist
private Block selectedBlock;
@InjectComponent
private Zone blockZone;
void onValidateFromDiscountPercentage(Double percent){
if(percent < 0 || percent > 100.0){
debug("Attempted to be created with a discount percentage
of: " + percent);
tPriceForm.recordError(discountPercentageField,
messages.get("percentage-out-of-bounds"));
return;
}
}
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org