On Wed, 30 Jan 2008, Martin Makundi wrote:
> public class Login extends WebPage {
>    // ... default constructor contents:
>    final Form loginForm = new Form(LOGIN_FORM, new Model());
>    final AjaxIndicatorContainer indicatorContainer = new
> AjaxIndicatorContainer();
>    indicatorContainer.setOutputMarkupId(true);
>    loginForm.add(indicatorContainer);

Maybe you won't need the container around the indicator if
you say setOutputMarkupPlaceHolderTag(true) to the indicator
itself.

>        public String getAjaxIndicatorMarkupId() {
>          return indicatorContainer.getMarkupId();
>        }

I have used hardocoded HTML ids here, that way you can 
easily control the layout of the indicator in CSS.

> public class AjaxIndicatorContainer extends WebMarkupContainer {
...
>   */
>  public static final String INDICATOR_MARKUP_ID = "ajaxIndicator";
...
>   */
>  public AjaxIndicatorContainer() {
>    super(INDICATOR_MARKUP_ID);
>  }

Wicket id is a different thing than the markup id. Probably
you need to override getMarkupId() to return that id.

And wait a minute, is the container in fact the indicator?
Then you definitely need to output the placeholder container
for it, otherwise ajax has no way of making it visible
as it does not appear in the HTML. You should be able to see
this as an error in the ajax debug console (available when
running with -Dwicket.configuration=development ).

>  @Override
>  protected void onComponentTag(ComponentTag tag) {
>    super.onComponentTag(tag);
>    tag.put("src",urlFor(AbstractDefaultAjaxBehavior.INDICATOR));
>  }

This part I didn't understand.

Best wishes,
Timo

-- 
Timo Rantalaiho           
Reaktor Innovations Oy    <URL: http://www.ri.fi/ >

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to