On Tue, Jan 15, 2013 at 11:30 AM, Thomas Götz <[email protected]> wrote:
> Ah ok, the patch didn't make it into the mailing list. > > What I did is simply: > > - AjaxRequestAttributes are created (and saved as a property) in > RequestCycle (in execute(…)) > I don't like this. There is nothing specific to Ajax in RequestCycle so far and I'd like to keep it this way. > - IRequestCycleListener gets a new method: > void updateAjaxAttributes(RequestCycle cycle, AjaxRequestAttributes > attributes) > With this change you'd have to wait for Wicket 7. No changes to APIs in minor versions! > - AbstractDefaultAjaxBehavior does not create AjaxRequestAttributes, but > gets them from RequestCycle > > Patch (only draft): > http://cl.ly/code/1p3x0e2W1h3Q/WICKET-4958__global_AjaxRequestAttributes_-_DRAFT.patch > > -Tom > > On 15.01.2013, at 09:01, Martin Grigorov <[email protected]> wrote: > > > Hi Thomas, > > > > There is no attachment with your mail nor at > > https://issues.apache.org/jira/browse/WICKET-4958 > > > > Initially I was thinking to use > > WebApplication#getAjaxRequestAttributesProvider(), as > > #getAjaxRequestTargetProvider, > > But now I think listeners like > > > org.apache.wicket.protocol.http.WebApplication#getAjaxRequestTargetListeners > > will be better. But I see two problems: > > 1) we will need new type of listeners because we cannot > > extend org.apache.wicket.ajax.AjaxRequestTarget.IListener until Wicket 7 > > 2) I'm not so sure that listeners should be used because this way a > > listener in libraryX can configure the attributes and then a listener > > coming with libraryY can revert the configuration. But still > > WebApplication#init() is called *after* IInitializer#init(), i.e. after > the > > libraries, so the application can add a third listener that makes all > happy. > > > > Anyone have a better solution ? > > > > > > > > > > On Mon, Jan 14, 2013 at 10:28 PM, Thomas Götz <[email protected]> wrote: > > > >> Hi devs! > >> > >> I'm currently looking into WICKET-4958, maybe you could give me a hint > if > >> I'm on the right track (see attached patch for Wicket master) or if > this is > >> completely nonsense ;-) I'm not yet sure of the possible side effects > that > >> this solution might have, also I'm not sure if the RequestCycle (+ > >> -listerners) is the correct place to implement this behavior. At least, > it > >> seems to work (I created a test page in examples). So, this is yet only > a > >> draft to get some feedback. > >> > >> Thanks, > >> -Tom > >> > >> > > > > > > -- > > Martin Grigorov > > jWeekend > > Training, Consulting, Development > > http://jWeekend.com <http://jweekend.com/> > > -- Martin Grigorov jWeekend Training, Consulting, Development http://jWeekend.com <http://jweekend.com/>
