cannot output table tags in outputraw compnnent
Folks, If the output and outputraw components cannot contain a left angel bracket < or other angle brackets ex. Then I am left with doing this... But if yeilds the following exception java.lang.RuntimeExceptionError parsing property expression '': Unable to parse input at character position 1. Does anyone know how to output table tags in my template ? Thanks kcola...@live.com
RE: is there a way to refer to a Class type in a tml ?
Thanks Thiago... that worked for my one class. But... @java.lang.Math@min(collection.size,itemsPerPage) the above statement... I am sure you know what it is T4 What I am looking for is a T5 solution to reference these classes and operate them right inside the template. Is there a solution in T5 to do this? I feel like I need to design another public Class mathClass() { return Math.class; } and on and on... for any other classes I would like to use. kcola...@live.com > To: users@tapestry.apache.org; kcola...@live.com > Subject: Re: is there a way to refer to a Class type in a tml ? > Date: Fri, 28 Sep 2012 15:51:25 -0300 > From: thiag...@gmail.com > > On Fri, 28 Sep 2012 15:28:41 -0300, Ken in Nashua > wrote: > > > Folks, > > Hi! > > > I am referring to the old T4 manner in which we would refer to a class > > type using > > > > @Integer.class > > > > within a template > > > > can this be done in T5 ? > > The Tapestry 5 philosophy is to do this kind of stuff in Java, never in > the template, probably putting it in a getter: > > Class getIntegerClass() { > return Integer.class; > } > > In your template: > > ${integerClass} > > -- > Thiago H. de Paula Figueiredo
onValidate get list of fields containing validation errors.
Hello, in my onValidate method, I'm trying to get a list of the fields containing validation errors. I'm able to get a list of the errors using form.getDefaultTracker().getErrors(); however that only returns the error messages and not the fields. I know I could just pass the field name into the inError method, however I'm using an AjaxFormLoop with tapestry generated ID's. example field, field_0, field_1 etc. What I'm trying to ultimately accomplish. I have two tabs in my form, each contains an AjaxFormLoop. When serverside validation errors occur, I need away to mark the tab as having errors, I planned to add the error count to the tab. However in order for me to do this, I would first need to be able to count the errors from the backend. -- View this message in context: http://tapestry.1045711.n5.nabble.com/onValidate-get-list-of-fields-containing-validation-errors-tp5716549.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: Generating link/url without RequestGlobals
On Fri, 28 Sep 2012 15:41:50 -0300, Alex Kotchnev wrote: In my application, I send html emails which contain links to the application. I use the pageRenderLinkSource.createPageRenderLink to generate the URLs from within the application. So far, so good. The trouble begins when I tried to make the email sending asynchronous : that is, the application just queues them up, and sometime later a message listener picks up the email requests from the queue, and sends the actual emails. The problem is that by the time the emails are being generated, there is no current request associated with the current thread; hence, the link generation fails miserably (see stack trace, the exception is thrown when I call pageRenderLinkSource.createPageRenderLink). Any thoughts on how I could get around this ? Is there some other way that I could generate a link that doesn't rely on requestglobals ? I know it's not an answer, but you could create the Link and store it somewhere before queuing the e-mail. Of course, this will work just if you already know which pages to link before merging the template. -- Thiago H. de Paula Figueiredo - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: is there a way to refer to a Class type in a tml ?
On Fri, 28 Sep 2012 15:28:41 -0300, Ken in Nashua wrote: Folks, Hi! I am referring to the old T4 manner in which we would refer to a class type using @Integer.class within a template can this be done in T5 ? The Tapestry 5 philosophy is to do this kind of stuff in Java, never in the template, probably putting it in a getter: Class getIntegerClass() { return Integer.class; } In your template: ${integerClass} -- Thiago H. de Paula Figueiredo - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: Zone update after ajax request to component event
I'm not too familiar with the tapestry-jquery code but perhaps updateZoneOnEvent(eventName, element, zoneId, url) does exactly what you want? https://github.com/got5/tapestry5-jquery/blob/master/src/main/resources/org/got5/tapestry5/jquery/tapestry-jquery.js -- View this message in context: http://tapestry.1045711.n5.nabble.com/Zone-update-after-ajax-request-to-component-event-tp5716538p5716544.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 update after ajax request to component event
Yep I use tapestry5-jquery :) Ok so I added the following code to my javascript click events callback: if (responseJSON.zones) { // perform multi zone update $.each(responseJSON.zones, function(zoneId) { $('#' + zoneId).tapestryZone("applyContentUpdate", responseJSON.zones[zoneId]); }); $.tapestry.utils.loadScriptsInReply(responseJSON); } if (responseJSON.updateZone) { var spec = { url : responseJSON.updateZone.url, params : responseJSON.updateZone.params }; $('#' + responseJSON.updateZone.zoneId).tapestryZone( "update", spec); } Now my zones get updated and my added scripts get loaded. Is this what I'm supposed to do? Thanks all! -- View this message in context: http://tapestry.1045711.n5.nabble.com/Zone-update-after-ajax-request-to-component-event-tp5716538p5716543.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 update after ajax request to component event
Hi, If you use Tapestry5-jQuery, you should have a look to this javascript code : https://github.com/got5/tapestry5-jquery/blob/master/src/main/resources/org/got5/tapestry5/jquery/assets/components/upload/upload-jquery.js Manu 2012/9/28 nquirynen > Hi, > > I have a component (grid) where I added a javascript onclick event on my > rows where I do an ajax (jquery) request to a component event: > > $.get('${onRowClickEventLink}'); > > This all works fine, but I also want to update some zones after this event > so I added this to the event method: > > void onRowClick() { > ... > ajaxResponseRenderer.addRender(aZone); > } > > In Firebug I do see in the response the following: > > "zones" : { > "aZone" : ... > } > > But the zone does not get updated. > Now I found a workaround where I added a javascript callback function on > the > $.get request where I do the following: > > function rowClickCalback(r) { >aZone.html(r.zones.aZone); > } > > This does work and makes the zone update, but it does not feel like I am > doing things the right way. I'm pretty new to Tapestry with Ajax, so any > insight in what I am doing wrong is appreciated. > > Thanks, > Nathan > > > > > -- > View this message in context: > http://tapestry.1045711.n5.nabble.com/Zone-update-after-ajax-request-to-component-event-tp5716538.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 > > -- Emmanuel DEMEY Ingénieur Etude et Développement ATOS Worldline +33 (0)6 47 47 42 02 demey.emman...@gmail.com http://emmanueldemey.fr/ Twitter : @EmmanuelDemey
Re: Zone update after ajax request to component event
As you use your own zone update mechanism instead of native(e.g. EventLink component) you can provide js-callback for ajax request as you mention before. To update zone use something like this: var zone = Tapestry.findZoneManager(spec.zoneId); function rowClickCalback(response) { zone.processReply(response); } Or you can update zone with T5 js api: var zone = Tapestry.findZoneManager(spec.zoneId); zone.updateFromURL(url, parameters); On Fri, Sep 28, 2012 at 12:19 PM, nquirynen wrote: > Hi, > > I have a component (grid) where I added a javascript onclick event on my > rows where I do an ajax (jquery) request to a component event: > > $.get('${onRowClickEventLink}'); > > This all works fine, but I also want to update some zones after this event > so I added this to the event method: > > void onRowClick() { > ... > ajaxResponseRenderer.addRender(aZone); > } > > In Firebug I do see in the response the following: > > "zones" : { > "aZone" : ... > } > > But the zone does not get updated. > Now I found a workaround where I added a javascript callback function on > the > $.get request where I do the following: > > function rowClickCalback(r) { >aZone.html(r.zones.aZone); > } > > This does work and makes the zone update, but it does not feel like I am > doing things the right way. I'm pretty new to Tapestry with Ajax, so any > insight in what I am doing wrong is appreciated. > > Thanks, > Nathan > > > > > -- > View this message in context: > http://tapestry.1045711.n5.nabble.com/Zone-update-after-ajax-request-to-component-event-tp5716538.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 > > -- BR Ivan
Re: Zone update after ajax request to component event
Take a look at Geoff's ZoneUpdater mixin [1] which fires a serverside event by listening to a clientside event on a DOM element. You should never update the innerHTML of a zone directly, use the client-side ZoneManager. If you are using tapestry-jquery, there is a different implementation of this. http://jumpstart.doublenegative.com.au/jumpstart/examples/ajax/onevent -- View this message in context: http://tapestry.1045711.n5.nabble.com/Zone-update-after-ajax-request-to-component-event-tp5716538p5716540.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 update after ajax request to component event
Hey, I've never used it but if you want to use jQuery, you should take a look at the tapestry5-jquery plugin : http://tapestry5-jquery.com/ Charles. 2012/9/28 nquirynen > Hi, > > I have a component (grid) where I added a javascript onclick event on my > rows where I do an ajax (jquery) request to a component event: > > $.get('${onRowClickEventLink}'); > > This all works fine, but I also want to update some zones after this event > so I added this to the event method: > > void onRowClick() { > ... > ajaxResponseRenderer.addRender(aZone); > } > > In Firebug I do see in the response the following: > > "zones" : { > "aZone" : ... > } > > But the zone does not get updated. > Now I found a workaround where I added a javascript callback function on > the > $.get request where I do the following: > > function rowClickCalback(r) { >aZone.html(r.zones.aZone); > } > > This does work and makes the zone update, but it does not feel like I am > doing things the right way. I'm pretty new to Tapestry with Ajax, so any > insight in what I am doing wrong is appreciated. > > Thanks, > Nathan > > > > > -- > View this message in context: > http://tapestry.1045711.n5.nabble.com/Zone-update-after-ajax-request-to-component-event-tp5716538.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 > >
Zone update after ajax request to component event
Hi, I have a component (grid) where I added a javascript onclick event on my rows where I do an ajax (jquery) request to a component event: $.get('${onRowClickEventLink}'); This all works fine, but I also want to update some zones after this event so I added this to the event method: void onRowClick() { ... ajaxResponseRenderer.addRender(aZone); } In Firebug I do see in the response the following: "zones" : { "aZone" : ... } But the zone does not get updated. Now I found a workaround where I added a javascript callback function on the $.get request where I do the following: function rowClickCalback(r) { aZone.html(r.zones.aZone); } This does work and makes the zone update, but it does not feel like I am doing things the right way. I'm pretty new to Tapestry with Ajax, so any insight in what I am doing wrong is appreciated. Thanks, Nathan -- View this message in context: http://tapestry.1045711.n5.nabble.com/Zone-update-after-ajax-request-to-component-event-tp5716538.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: BufferedImage in Tapestry
As I said before, use firebug or a similar tool to inspect the HTTP response for the image. Are there any differences between the Jetty response and the Tomcat response? Take note of the response headers. Also, have you tried setting the content length header? -- View this message in context: http://tapestry.1045711.n5.nabble.com/BufferedImage-in-Tapestry-tp5714465p5716536.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