Re: Zone error after I have updated to Tapestry 5.2.6
This might help http://tawus.wordpress.com/2011/04/16/tapestry-magic-2-ajax-with-graceful-degradation/ On Fri, Sep 9, 2011 at 11:28 AM, Jonathan Barker wrote: > The error looks a lot like what you get when you are expecting an Ajax > request (and so return a Block), but instead get a regular page request > where you would want to return null or a Page. As a general practice, try to > allow for graceful degradation in the absence of javascript by doing the > check " if (request.isXHR()) " before returning a block or zone body. I've > been surprised a couple of times. > > I hope that helps. > > Regards, > Jonathan > > > On Thu, Sep 8, 2011 at 12:31 PM, Javicha wrote: > >> no, that's not the error. All is well defined. >> >> I have declared the zone: >> >> >> >> And the actionlinks refer to this zone: >> >> >> href="#" t:type="ActionLink" t:id="previousPatientLink" >> t:zone="searchPatientResultZone" >> >> href="#" t:type="ActionLink" t:id="nextPatientLink" >> t:zone="searchPatientResultZone" >> >> >> >> As I said before, this worked before the upgrade. >> I have not changed any .java and .tml files. >> >> -- >> View this message in context: >> http://tapestry.1045711.n5.nabble.com/Zone-error-after-I-have-updated-to-Tapestry-5-2-6-tp4782821p4783107.html >> Sent from the Tapestry - User mailing list archive at Nabble.com. >> >> - >> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org >> For additional commands, e-mail: users-h...@tapestry.apache.org >> >> > > > -- > Jonathan Barker > ITStrategic > -- Regards Taha Hafeez Siddiqi (tawus) http://tawus.wordpress.com - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: Zone error after I have updated to Tapestry 5.2.6
The error looks a lot like what you get when you are expecting an Ajax request (and so return a Block), but instead get a regular page request where you would want to return null or a Page. As a general practice, try to allow for graceful degradation in the absence of javascript by doing the check " if (request.isXHR()) " before returning a block or zone body. I've been surprised a couple of times. I hope that helps. Regards, Jonathan On Thu, Sep 8, 2011 at 12:31 PM, Javicha wrote: > no, that's not the error. All is well defined. > > I have declared the zone: > > > > And the actionlinks refer to this zone: > > > href="#" t:type="ActionLink" t:id="previousPatientLink" > t:zone="searchPatientResultZone" > > href="#" t:type="ActionLink" t:id="nextPatientLink" > t:zone="searchPatientResultZone" > > > > As I said before, this worked before the upgrade. > I have not changed any .java and .tml files. > > -- > View this message in context: > http://tapestry.1045711.n5.nabble.com/Zone-error-after-I-have-updated-to-Tapestry-5-2-6-tp4782821p4783107.html > Sent from the Tapestry - User mailing list archive at Nabble.com. > > - > To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org > For additional commands, e-mail: users-h...@tapestry.apache.org > > -- Jonathan Barker ITStrategic
Re: Zone error after I have updated to Tapestry 5.2.6
no, that's not the error. All is well defined. I have declared the zone: And the actionlinks refer to this zone: href="#" t:type="ActionLink" t:id="previousPatientLink" t:zone="searchPatientResultZone" href="#" t:type="ActionLink" t:id="nextPatientLink" t:zone="searchPatientResultZone" As I said before, this worked before the upgrade. I have not changed any .java and .tml files. -- View this message in context: http://tapestry.1045711.n5.nabble.com/Zone-error-after-I-have-updated-to-Tapestry-5-2-6-tp4782821p4783107.html Sent from the Tapestry - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: Zone error after I have updated to Tapestry 5.2.6
I don't see a zone parameter in your code. I started tapestry with 5.2, so I don't know upgrade issues, but I do know that the element which has zone.getBody() returning from it has to have a zone= parameter in its tml. On Sep 8, 2011, at 12:27 PM, Javicha wrote: > no, that's not the error. All is well defined. > > I have declared the zone: > > > > And the actionlinks refer to this zone: > > > > ># > ${message:link-previous} > > > > > > ># > ${message:link-next} > > > > > > > As I said before, this worked before the upgrade. > I have not changed any .java and .tml files. > > -- > View this message in context: > http://tapestry.1045711.n5.nabble.com/Zone-error-after-I-have-updated-to-Tapestry-5-2-6-tp4782821p4783089.html > Sent from the Tapestry - User mailing list archive at Nabble.com. > > - > 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
Re: Zone error after I have updated to Tapestry 5.2.6
no, that's not the error. All is well defined. I have declared the zone: And the actionlinks refer to this zone: # ${message:link-previous} # ${message:link-next} As I said before, this worked before the upgrade. I have not changed any .java and .tml files. -- View this message in context: http://tapestry.1045711.n5.nabble.com/Zone-error-after-I-have-updated-to-Tapestry-5-2-6-tp4782821p4783089.html Sent from the Tapestry - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: Zone error after I have updated to Tapestry 5.2.6
my guess you are missing zone= parameter in one of your tml files. On Sep 8, 2011, at 11:20 AM, Javicha wrote: > Hi! > > I was working with Tapestry 5.1.0.5 and everithing worked fine. I updated to > Tapestry 5.2.6 because new project needs, and now I have problems with > actionlinks. > > The case is the following: > I use paging for searches. In the search result page, I have two actionlinks > (previous and next links) that make a new search and re-load the zone with > search results. The code of a link is: > > public Object onActionFromNextPatientLink() { > > if (patientBlock.isHasMoreElements()) { > startIndex += PATIENTS_PER_PAGE; > patientBlock = coreFacade.findPatient(obtainFilter(), > startIndex, > PATIENTS_PER_PAGE); > return searchPatientResultZone.getBody(); > } else { > return null; > } > } > > After Tapestry update, I have the follow error when I click a actionlink: > > "A component event handler method returned the value Block[Body of > patient/Find:searchpatientresultzone, at > classpath:es/clinica/enkeli/core/interfaces/web/pages/patient/FindPatient.tml, > line 60]. Return type org.apache.tapestry5.internal.structure.BlockImpl can > not be handled." > > And the console notes the following line of code as the source of the error: > > # > > Debugging I saw that the problem was the line "return > searchPatientResultZone.getBody();" > > There is a problem with Zone in this Tapestry version? This error has me > puzzled! > > Thnaks for help!! > > -- > View this message in context: > http://tapestry.1045711.n5.nabble.com/Zone-error-after-I-have-updated-to-Tapestry-5-2-6-tp4782821p4782821.html > Sent from the Tapestry - User mailing list archive at Nabble.com. > > - > 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
Zone error after I have updated to Tapestry 5.2.6
Hi! I was working with Tapestry 5.1.0.5 and everithing worked fine. I updated to Tapestry 5.2.6 because new project needs, and now I have problems with actionlinks. The case is the following: I use paging for searches. In the search result page, I have two actionlinks (previous and next links) that make a new search and re-load the zone with search results. The code of a link is: public Object onActionFromNextPatientLink() { if (patientBlock.isHasMoreElements()) { startIndex += PATIENTS_PER_PAGE; patientBlock = coreFacade.findPatient(obtainFilter(), startIndex, PATIENTS_PER_PAGE); return searchPatientResultZone.getBody(); } else { return null; } } After Tapestry update, I have the follow error when I click a actionlink: "A component event handler method returned the value Block[Body of patient/Find:searchpatientresultzone, at classpath:es/clinica/enkeli/core/interfaces/web/pages/patient/FindPatient.tml, line 60]. Return type org.apache.tapestry5.internal.structure.BlockImpl can not be handled." And the console notes the following line of code as the source of the error: # Debugging I saw that the problem was the line "return searchPatientResultZone.getBody();" There is a problem with Zone in this Tapestry version? This error has me puzzled! Thnaks for help!! -- View this message in context: http://tapestry.1045711.n5.nabble.com/Zone-error-after-I-have-updated-to-Tapestry-5-2-6-tp4782821p4782821.html Sent from the Tapestry - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org