Yeah, the url method could be much better. I'll think about that, or
in case you have concrete suggestions...

Also, instead of overriding onRequest, consider using one of the more
specific methods like onComponentTagBody or onComponentTag. You could
take a look at how other components are implements.

Eelco


On 9/3/05, Christian Essl <[EMAIL PROTECTED]> wrote:
> Thanks for the answers.
> 
> I understand know. It is good to know that I can override onRequest()
> directly on the component.
> 
> I also overlooked the bind() method, where you can add AttributeModifiers,
> which is indeed better. Sorry for the beginner mistakes.
> 
> What remains is than the url thing. Is there also something I overlooked?
> 
> Thanks,
> Christian
> 
> On Sat, 3 Sep 2005 16:14:25 +0200, Eelco Hillenius
> <[EMAIL PROTECTED]> wrote:
> 
> > I'll take a look at some of the things you propose later today.
> >
> > A few notes:
> > 1) I chose not to let ajax be components as that wouldn't be as
> > flexible (you can now attach 0..n handlers to one component) and it
> > would certainly mean having a lot of new components. A good example of
> > this is the - not yet finished - ajax validation handler. You can
> > attach the ajax behaviour to any (form) component you want, reusing
> > the validation logic. If ajax support would be bound to the component
> > hierarchy, it would mean that we need a set of special ajax
> > components, and have such a different implementation for each form
> > component we want to use the ajax behaviour with. In other words, I
> > choose for object composition over inheritance.
> > 2) I don't think there is anything wrong with using attribute
> > modifiers instead of directly editing the attributes. Attribute
> > modifiers give you the ability to work on attributes while still
> > keeping the component internals hidden.
> > 3) In case you don't agree with the above, you can easily create your
> > own component (base)set that are ajax enabled and edit attributes
> > directly. One of Wicket's main goals is to make creating custom
> > components easy.
> >
> > Eelco
> >
> >
> > On 9/3/05, Christian Essl <[EMAIL PROTECTED]> wrote:
> >> I just managed to write my first little AJAX page. Nothing greate - I
> >> just
> >> used the prototype Ajax.Updater to load a peace of text after clicking
> >> on
> >> a span. After a bit of browsing the docs and source of wicket it was
> >> thanks to ScriptaculousAjaxHandler not realy difficult.
> >>
> >> I still have some points and questions, which maybe could also help to
> >> make an even better AJAX support.
> >>
> >> Why can't I modify the tag-attributes in the
> >> IAjaxHandler.onComponentTag()? I do not want to create an extra
> >> AttributeModifier to add onclick behaviour. And is there a particular
> >> reason that an AjaxHandler is not a normal component, which can take
> >> part
> >> in the 'normal' page-rendering and additional can handle AJAX stuff?
> >>
> >> It took me quite some time to find the URL for my AjaxHandler. Maybe the
> >> AbstractAjaxHandler could have a method getAjaxUrl(), because it is not
> >> realy intuitive to call Component.urlFor(IAjaxListener.class) + "&id="
> >> + ajaxHandler.getId().
> >>
> >> And than how to get this url into the JavaScript. Currently I create the
> >> (very simple) script in the Page java-code, but this can't be the final
> >> answer. It reminds of the early Servlet days. Is there some way I could
> >> normally write the JavaScript in the html-page and just template in the
> >> URL? Ie Velocity is good for code-generation. Or expose the url and
> >> other
> >> things as script-variables and have some support for this. I do not know
> >> has someone more experience for this?
> >>
> >> I am new to AJAX and no way a Wicket expert, and still - beside the
> >> issues
> >> mentioned - it was quite easy to get this simple thing go. Maybe it
> >> could
> >> be made even simpler.
> >>
> >> Christian
> >>
> >>
> >>
> >>
> >>
> >>
> >>
> >> ___________________________________________________________
> >> Gesendet von Yahoo! Mail - Jetzt mit 1GB Speicher kostenlos - Hier
> >> anmelden: http://mail.yahoo.de
> >>
> >>
> >>
> >> -------------------------------------------------------
> >> SF.Net email is Sponsored by the Better Software Conference & EXPO
> >> September 19-22, 2005 * San Francisco, CA * Development Lifecycle
> >> Practices
> >> Agile & Plan-Driven Development * Managing Projects & Teams * Testing &
> >> QA
> >> Security * Process Improvement & Measurement *
> >> http://www.sqe.com/bsce5sf
> >> _______________________________________________
> >> Wicket-user mailing list
> >> Wicket-user@lists.sourceforge.net
> >> https://lists.sourceforge.net/lists/listinfo/wicket-user
> >>
> >
> >
> > -------------------------------------------------------
> > SF.Net email is Sponsored by the Better Software Conference & EXPO
> > September 19-22, 2005 * San Francisco, CA * Development Lifecycle
> > Practices
> > Agile & Plan-Driven Development * Managing Projects & Teams * Testing &
> > QA
> > Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf
> > _______________________________________________
> > Wicket-user mailing list
> > Wicket-user@lists.sourceforge.net
> > https://lists.sourceforge.net/lists/listinfo/wicket-user
> 
> 
> 
> --
> Christian Essl
> 
> 
> 
> 
> 
> ___________________________________________________________
> Gesendet von Yahoo! Mail - Jetzt mit 1GB Speicher kostenlos - Hier anmelden: 
> http://mail.yahoo.de
> 
> 
> 
> -------------------------------------------------------
> SF.Net email is Sponsored by the Better Software Conference & EXPO
> September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
> Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA
> Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf
> _______________________________________________
> Wicket-user mailing list
> Wicket-user@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/wicket-user
>


-------------------------------------------------------
SF.Net email is Sponsored by the Better Software Conference & EXPO
September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA
Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf
_______________________________________________
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user

Reply via email to