you can add an IAjaxCallDecorator to the ajax behavior inside your submit button and prepend that little bit of _javascript_.

-Igor


On 4/5/06, Steve Knight <[EMAIL PROTECTED]> wrote:
Okay, now that my indicator is working, I need to add a _javascript_ confirmation box to appear before my form is submitted.

With a regular button I just used getOnClickScript(), but I don't see how to do it with AjaxSubmitButton.  Is there someway I can add my _javascript_ call before the ajax form submission?

Steve



On 4/5/06, Steve Knight <[EMAIL PROTECTED]> wrote:
I created a quickstart project to demonstrate the problem.  Then I decided to bump the quickstart up to beta 3 and the problem went away.  So, I guess I'll have to upgrade.

Thanks Igor.


Steve

On 4/4/06, Igor Vaynberg <[EMAIL PROTECTED]> wrote:
hrm. ok. can you make me a quickstart project that reproduces the problem? and then i will try it against trunk and tell  you if its been fixed or not.


-Igor


On 4/4/06, Steve Knight <[EMAIL PROTECTED]> wrote:
Not easily.  I am using Databinder which I think is tied to beta2.

Steve


On 4/4/06, Igor Vaynberg <[EMAIL PROTECTED] > wrote:
can you try against trunk or beta3?

-Igor



On 4/4/06, Steve Knight <[EMAIL PROTECTED]> wrote:
I am trying to make an AjaxSubmitButton that uses WicketAjaxIndicatorAppender to display a busy indicator, but it's not quite working.  I used the IndicatingAjaxLink as a guideline, and everything seems to work except that the indicator does not disappear after the Ajax call is completed.

Here is my IndicatingAjaxSubmitButton class:

abstract class IndicatingAjaxSubmitButton extends AjaxSubmitButton implements IAjaxIndicatorAware {
    private final WicketAjaxIndicatorAppender indicatorAppender = new WicketAjaxIndicatorAppender();

    public IndicatingAjaxSubmitButton(String id, Form form) {
        super(id, form);
        add(indicatorAppender);
    }

    public String getAjaxIndicatorMarkupId() {
        return  indicatorAppender.getMarkupId ();
    }
}

Here is the relevant bit of html that gets generated:

<input value="submit via ajax" type="button" wicket:id="ajax-submit-button" wicketAjaxCallMade=wicketSubmitFormById('selectForm', '/smarttag2/app?wicket:interface=:0:ajax-submit-button:-1:IUnversionedBehaviorListener&wicket:behaviorId=0' , function() { wicketHide('ajax-submit-button--ajax-indicator');});; return true;" id="ajax-submit-button"/><span style="display:none;" class="wicket-ajax-indicator" id="ajax-submit-button--ajax-indicator"><img src=""

Am I missing something?

Steve

  






Reply via email to