<img src="#" border="0" wicket:id="ajaxIndicatorImage"
id="ajaxIndicatorImage"/> should get you started :)
the only caveat is if that image component for some reason has
setoutputmarkupid(true) set on it, in which case the id attr you put
into markup will be overwritten, to make this thing work dynamically
you would
final Image image=new Image("ajxIndicatorImage", ...);
image.setOutputMarkupId(true);
image.setMarkupId('whatever-you-want-but-make-sure-its-unique');
pass that markup id to your iajaxindicatorware component
alternatively you can wire up the two components so the use wicket's
automatically generated markup id which is available via
component.getmarkupid() but the caveat is that it is only available
during render
-igor
class abstract mycomponent implements iajaxindicatoraware {
};
-igor
On Jan 30, 2008 12:02 AM, Martin Makundi
<[EMAIL PROTECTED]> wrote:
> > And wait a minute, is the container in fact the indicator?
>
> Yes!
>
> > > @Override
> > > protected void onComponentTag(ComponentTag tag) {
> > > super.onComponentTag(tag);
> > > tag.put("src",urlFor(AbstractDefaultAjaxBehavior.INDICATOR));
> > > }
> >
> > This part I didn't understand.
>
> The html has just "<img src="#" border="0"
> wicket:id="ajaxIndicator"/>" and that command will replace the src ->
> Wicket's default indicator image.
>
> > Wicket id is a different thing than the markup id. Probably
> > you need to override getMarkupId() to return that id.
>
> Ok. This is probably where I have messed up.
>
> Say I have "<img src="#" border="0" wicket:id="ajaxIndicatorImage"/>"
> in my HTML and an AjaxIndicatorContainer extends WebMarkupContainer
> for it as previously.
>
> Now, how do I set up the markup-id if it is not the same as wicket-id
> :) ? Anyone has done this exact same thing before in a similar manner
> and coud post code?
>
> **
> Martin
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]