I grabbed your code and ran it. I'm not 100% sure what's supposed to happen if you perform an ajax post but don't return anything, but have errors. I added a handler for failure and returned the same block back and it seems to do the right thing. Is the form supposed to just send back the errors if it fails?
Block onFailure() { log.debug("Failed form post"); return resources.findBlock("triggerPrice"); } On Fri, Feb 25, 2011 at 1:30 PM, Rich M <rich...@moremagic.com> wrote: > Hmm, no luck. I checked the error console and nothing came up. Looked at the > Request and Response sent in Firebug console, the Response is 200 OK and the > response body is {}. Threw in a handful of breakpoints in Tapestry.js in > places that seemed relevant to the Validation Bubbles but never saw anything > too interesting come up. I'd willingly look deeper, but I'm not too sure > what I'm looking for at this point. > > On 02/25/2011 03:02 PM, Howard Lewis Ship wrote: >> >> User Firefox or Chrome and monitor your JavaScript console; most >> likely there's a JavaScript error somewhere on the page that's >> preventing normal initialization logic for occurring. >> >> On Fri, Feb 25, 2011 at 11:08 AM, Rich M<rich...@moremagic.com> wrote: >>> >>> Does anyone have insight into what I might be missing here? As I >>> mentioned >>> clicking the form submit will not render the validation bubbles, but if I >>> click the form submit and then reload the URL in the browser the page >>> re-renders and the validation bubbles show up. >>> >>> Does something about the form being part of a zone update versus a page >>> render change the behavior or lack thereof of validation bubbles? >>> >>> Thanks, >>> Rich >>> >>> On 02/24/2011 05:02 PM, Rich M wrote: >>>> >>>> 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 >>>> >>> >>> --------------------------------------------------------------------- >>> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org >>> For additional commands, e-mail: users-h...@tapestry.apache.org >>> >>> >> >> > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org > For additional commands, e-mail: users-h...@tapestry.apache.org > > --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org