Re: @BeginRender equivalent for component AJAX events

2013-04-24 Thread Ivan Khalopik
One note about ZoneRefresh mixin: https://issues.apache.org/jira/browse/TAP5-2100 So it provides not the original event context(that was encoded in url) but the context populated from parameter. And so it has no sence for now. On Wed, Apr 24, 2013 at 4:21 PM, Michael Prescott < michael.r.presc

Re: @BeginRender equivalent for component AJAX events

2013-04-24 Thread Michael Prescott
Okay! I've filed it as https://issues.apache.org/jira/browse/TAP5-2111 On 24 April 2013 09:07, Lance Java wrote: > Far from being a gory detail, it's part of the public API for the mixin, > very similar to AutoComplete's "provideCompletions" event. > > The mixin should ideally declare the event

Re: @BeginRender equivalent for component AJAX events

2013-04-24 Thread Lance Java
Far from being a gory detail, it's part of the public API for the mixin, very similar to AutoComplete's "provideCompletions" event. The mixin should ideally declare the event using @Events("refresh") and should have a mention in the javadoc too.

Re: @BeginRender equivalent for component AJAX events

2013-04-24 Thread Michael Prescott
Thanks, Lance, that looks like it will do the trick nicely. Do you think that the 'refresh' event should be added to the ZoneRefresh mixin's documentation? Is this public/won't change, or a gory internal detail? On 24 April 2013 04:47, Lance Java wrote: > The ZoneRefresh mixin fires the "refr

Re: @BeginRender equivalent for component AJAX events

2013-04-24 Thread Lance Java
The ZoneRefresh mixin fires the "refresh" event passing the (optional) context parameter. So, add a handler to the containing page / component. Eg: void onRefresh(Foo context) {...} If you return a Block, this will be rendered (zone.getBody() renders by default).

@BeginRender equivalent for component AJAX events

2013-04-23 Thread Michael Prescott
I have a component that includes a zone - the zone is periodically refreshed using the ZoneRefresh mixin. Is there any equivalent to @BeginRender that I can use to set up data to support the zone re-rendering? @BeginRender methods are called when the page renders, but they're not called when the

Re: [5.3.6] Listening to native tapestry ajax events

2012-12-16 Thread Geoff Callender
Sorry, I shouldn't have suggested subclassing. The preferred way to extend and/or override a Tapestry component's functionality is to "wrap" it. If you can't achieve what you want with wrapping then maybe create your own component by copying DateField? It might not be much work. As for your las

Re: [5.3.6] Listening to native tapestry ajax events

2012-12-16 Thread Muhammad Gelbana
I should try extedning the datefield component but I have a question, is it just about my component class "extending" tapestry's component class and that's it ? No other wiring needed ? Just a plain java "extends" and referring to my component instead ? A question to the developers, why isn't tap

Re: [5.3.6] Listening to native tapestry ajax events

2012-12-15 Thread Geoff Callender
> This may help: > > http://localhost:8080/jumpstart/examples/component/eventbubbling Wrong. I meant this: http://jumpstart.doublenegative.com.au/jumpstart/examples/component/eventbubbling

Re: [5.3.6] Listening to native tapestry ajax events

2012-12-15 Thread Geoff Callender
On 16/12/2012, at 10:14 AM, Muhammad Gelbana wrote: > Some tapestry components do fire ajax events and reach out to the server > and it get's handy sometimes to listen to those events. For instance the > datefield event fired to format the selected date. Side question, why does &g

[5.3.6] Listening to native tapestry ajax events

2012-12-15 Thread Muhammad Gelbana
Some tapestry components do fire ajax events and reach out to the server and it get's handy sometimes to listen to those events. For instance the datefield event fired to format the selected date. Side question, why does the date field have to reach out to the server to format the selected

Re: AJAX Events

2012-06-27 Thread Gep
I feel quite dumb, My issue was simply the capital o on my OnInc method (becoming lazy about case sensitivy in Tapestry :p ). Although, thank you for the requestParameter link! -- View this message in context: http://tapestry.1045711.n5.nabble.com/AJAX-Events-tp2429263p5714109.html Sent from

Re: AJAX Events

2012-06-26 Thread Ray Nicholus
> > Does anyone have an idea why I can't manage to access the event? > > Gep > > -- > View this message in context: > http://tapestry.1045711.n5.nabble.com/AJAX-Events-tp2429263p5714097.html > Sent from the Tapestry - User mailing list archive at Nabble.com. > > -

Re: AJAX Events

2012-06-26 Thread Gep
page: Whether I click on the link triggering the event or goes directly to the expected URL of the event, I get the same error message: Does anyone have an idea why I can't manage to access the event? Gep -- View this message in context: http://tapestry.1045711.n5.nabble.com/A

Re: Ajax events, expired session and @Persist fields

2011-09-19 Thread Lenny Primak
I finally figured out how to handle Ajax events and sessions from the @XHR annotation. It involved Thiago's suggested SessionState object, but as a means of communicating between the annotation worker and the session state tracker. The session state tracker turned out to be pretty co

Re: Ajax events, expired session and @Persist fields

2011-09-18 Thread Lenny Primak
I finally had a chance to try these methods, unfortunately with little success. Yes, I can check only one @Persist field for null to see whether the session still exists, which works. Request.getSession(false) does not really work, because a new (empty) session can be created within this request

Re: Ajax events, expired session and @Persist fields

2011-09-15 Thread Lenny Primak
Thanks Thiago. I will try all these options and report the results. On Sep 14, 2011, at 5:19 PM, "Thiago H. de Paula Figueiredo" wrote: > On Wed, 14 Sep 2011 16:25:14 -0300, Lenny Primak > wrote: > >> This is a design/best practices question. >> We set up @Persist fields inside @SetupRend

Re: Ajax events, expired session and @Persist fields

2011-09-14 Thread Thiago H. de Paula Figueiredo
On Wed, 14 Sep 2011 16:25:14 -0300, Lenny Primak wrote: This is a design/best practices question. We set up @Persist fields inside @SetupRender method. When a session is invalid/expired and an Ajax event is called, All these fields at null. The question is if there is a better way to handle t

Ajax events, expired session and @Persist fields

2011-09-14 Thread Lenny Primak
This is a design/best practices question. We set up @Persist fields inside @SetupRender method. When a session is invalid/expired and an Ajax event is called, All these fields at null. The question is if there is a better way to handle this situation than having to check for Null in every Ajax

Re: AJAX Events

2009-02-25 Thread Robert Zeigler
Check out EventLink and/or ComponentResources.createEventLink. Like: public class SomeComponent { @Inject private ComponentResources resources; public String getEventLink() { return resources .createEventLink ("MyCustomEventName",contextParameter1,contextParameter2,...); } void onMyCustom

Re: AJAX Events

2009-02-25 Thread Thiago H. de Paula Figueiredo
Em Wed, 25 Feb 2009 08:07:18 -0300, Davor Miku escreveu: Question is how can some arbitraryJavaScriptFunction() invoke corresponding Tapestry method? Make your Javascript invoke an URL created by ComponentResources.createEventLink(). ;) -- Thiago H. de Paula Figueiredo Independent Java

Re: AJAX Events

2009-02-25 Thread Davor Miku
Clicking on actionlink component, some Tapestry method is invoked (method for action event). Question is how can some arbitraryJavaScriptFunction() invoke corresponding Tapestry method? I'm not sure I'm clear enough. On Wed, Feb 25, 2009 at 4:17 AM, Alex Kotchnev wrote: > Davor, > what do

Re: AJAX Events

2009-02-24 Thread Alex Kotchnev
Davor, what do you mean by "when some is dropped" ? Can you please describe in slightly more detail by "custom events" ? Cheers, Alex Kotchnev On Mon, Feb 23, 2009 at 1:56 PM, Davor Miku wrote: > Hi! > > I've found some tutorials for AJAX in Tapestry, but there all about action > event, fi

AJAX Events

2009-02-23 Thread Davor Miku
Hi! I've found some tutorials for AJAX in Tapestry, but there all about action event, fired form actionlink component. My questions is how to define custom events, i.e.. when some is dropped. Thanks!