You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by noppy-flex <no...@gmail.com> on 2008/11/25 16:51:22 UTC
ajax indicator
Hi,
I'm trying to make an indicator visible when an ajax request is processed.
For a checkbox this is working well:
final AjaxCheckBox ac = new AjaxCheckBox("an", new Model()) {
private static final long serialVersionUID = 0L;
@Override
protected void onUpdate(AjaxRequestTarget target) {
target.addComponent(Panel.this);
}
};
add(ac);
ac.add(new TestAjaxBehavior());
class TestAjaxBehavior extends AjaxFormComponentUpdatingBehavior
implements
IAjaxIndicatorAware {
private static final long serialVersionUID = -2704582236045420318L;
public TestAjaxBehavior() {
super("onchange");
}
protected void onUpdate(AjaxRequestTarget target) {
try {
Thread.sleep(5000);
} catch (InterruptedException e) {
e.printStackTrace();
}
}
public String getAjaxIndicatorMarkupId() {
return imgContainer.getMarkupId();
}
}
Markup-File:
...
<input type="checkBox" wicket:id="an"/>
...
The same code fails when the checkbox is replaced by an ajax-button:
final AjaxButton ac = new AjaxButton("an") {
private static final long serialVersionUID = 0L;
protected void onSubmit(AjaxRequestTarget target, Form form) {
target.addComponent(Panel.this);
}
};
add(ac);
ac.add(new TestAjaxBehavior());
Markup-File:
<input type="submit" wicket:id="an"/>
I'm using wicket 1.34 but tried it also with 1.35.
Tanks for any help
--
View this message in context: http://www.nabble.com/ajax-indicator-tp20683826p20683826.html
Sent from the Wicket - User mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org
Re: ajax indicator
Posted by jWeekend <jw...@cabouge.com>.
You are listening to "onchange".
BTW, I expect you already know there is an IndicatingAjaxButton.
Regards - Cemal
http://www.jWeekend.co.uk http://jWeekend.co.uk
Regards - Cemal
http://www.jWeekend.co.uk http://jWeekend.co.uk
noppy-flex wrote:
>
> Hi,
>
> I'm trying to make an indicator visible when an ajax request is processed.
> For a checkbox this is working well:
>
> final AjaxCheckBox ac = new AjaxCheckBox("an", new Model()) {
> private static final long serialVersionUID = 0L;
>
> @Override
> protected void onUpdate(AjaxRequestTarget target) {
> target.addComponent(Panel.this);
> }
> };
>
> add(ac);
> ac.add(new TestAjaxBehavior());
>
> class TestAjaxBehavior extends AjaxFormComponentUpdatingBehavior
> implements
> IAjaxIndicatorAware {
> private static final long serialVersionUID = -2704582236045420318L;
>
> public TestAjaxBehavior() {
> super("onchange");
> }
>
> protected void onUpdate(AjaxRequestTarget target) {
> try {
> Thread.sleep(5000);
> } catch (InterruptedException e) {
> e.printStackTrace();
> }
> }
>
> public String getAjaxIndicatorMarkupId() {
> return imgContainer.getMarkupId();
> }
> }
>
> Markup-File:
> ...
>
> <input type="checkBox" wicket:id="an"/>
> ...
>
> The same code fails when the checkbox is replaced by an ajax-button:
>
> final AjaxButton ac = new AjaxButton("an") {
> private static final long serialVersionUID = 0L;
>
> protected void onSubmit(AjaxRequestTarget target, Form form) {
> target.addComponent(Panel.this);
> }
> };
>
> add(ac);
> ac.add(new TestAjaxBehavior());
>
> Markup-File:
>
>
> <input type="submit" wicket:id="an"/>
>
> I'm using wicket 1.34 but tried it also with 1.35.
>
> Tanks for any help
>
--
View this message in context: http://www.nabble.com/ajax-indicator-tp20683826p20684205.html
Sent from the Wicket - User mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org
Re: Integrating dijit.form.FilteringSelect
Posted by Igor Vaynberg <ig...@gmail.com>.
like this http://wicketstuff.org/wicket13/ajax/choice.1 ?
-igor
On Tue, Nov 25, 2008 at 9:35 AM, David R Robison
<dr...@openroadsconsulting.com> wrote:
> Has anyone integrated the dojo widget dijit.form.FilteringSelect into a
> Wicket application? I want to use AJAX to dynamiclly populate the drop down
> list. TNX David
>
> --
>
> David R Robison
> Open Roads Consulting, Inc.
> 103 Watson Road, Chesapeake, VA 23320
> phone: (757) 546-3401
> e-mail: drrobison@openroadsconsulting.com
> web: http://openroadsconsulting.com
> blog: http://therobe.blogspot.com
> book: http://www.xulonpress.com/book_detail.php?id=2579
>
> This e-mail communication (including any attachments) may contain
> confidential and/or privileged material intended solely for the individual
> or entity to which it is addressed. If you are not the intended recipient,
> you should immediately stop reading this message and delete it from all
> computers that it resides on. Any unauthorized reading, distribution,
> copying or other use of this communication (or its attachments) is strictly
> prohibited. If you have received this communication in error, please notify
> us immediately.
>
>
>
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org
Integrating dijit.form.FilteringSelect
Posted by David R Robison <dr...@openroadsconsulting.com>.
Has anyone integrated the dojo widget dijit.form.FilteringSelect into a
Wicket application? I want to use AJAX to dynamiclly populate the drop
down list. TNX David
--
David R Robison
Open Roads Consulting, Inc.
103 Watson Road, Chesapeake, VA 23320
phone: (757) 546-3401
e-mail: drrobison@openroadsconsulting.com
web: http://openroadsconsulting.com
blog: http://therobe.blogspot.com
book: http://www.xulonpress.com/book_detail.php?id=2579
This e-mail communication (including any attachments) may contain confidential and/or privileged material intended solely for the individual or entity to which it is addressed. If you are not the intended recipient, you should immediately stop reading this message and delete it from all computers that it resides on. Any unauthorized reading, distribution, copying or other use of this communication (or its attachments) is strictly prohibited. If you have received this communication in error, please notify us immediately.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org
Re: ajax indicator
Posted by Martin Makundi <ma...@koodaripalvelut.com>.
Have you tried this:
http://cwiki.apache.org/WICKET/generic-busy-indicator-for-both-ajax-and-non-ajax-submits.html
2008/11/25 noppy-flex <no...@gmail.com>:
>
> Hi,
>
> I'm trying to make an indicator visible when an ajax request is processed.
> For a checkbox this is working well:
>
> final AjaxCheckBox ac = new AjaxCheckBox("an", new Model()) {
> private static final long serialVersionUID = 0L;
>
> @Override
> protected void onUpdate(AjaxRequestTarget target) {
> target.addComponent(Panel.this);
> }
> };
>
> add(ac);
> ac.add(new TestAjaxBehavior());
>
> class TestAjaxBehavior extends AjaxFormComponentUpdatingBehavior
> implements
> IAjaxIndicatorAware {
> private static final long serialVersionUID = -2704582236045420318L;
>
> public TestAjaxBehavior() {
> super("onchange");
> }
>
> protected void onUpdate(AjaxRequestTarget target) {
> try {
> Thread.sleep(5000);
> } catch (InterruptedException e) {
> e.printStackTrace();
> }
> }
>
> public String getAjaxIndicatorMarkupId() {
> return imgContainer.getMarkupId();
> }
> }
>
> Markup-File:
> ...
>
> <input type="checkBox" wicket:id="an"/>
> ...
>
> The same code fails when the checkbox is replaced by an ajax-button:
>
> final AjaxButton ac = new AjaxButton("an") {
> private static final long serialVersionUID = 0L;
>
> protected void onSubmit(AjaxRequestTarget target, Form form) {
> target.addComponent(Panel.this);
> }
> };
>
> add(ac);
> ac.add(new TestAjaxBehavior());
>
> Markup-File:
>
>
> <input type="submit" wicket:id="an"/>
>
> I'm using wicket 1.34 but tried it also with 1.35.
>
> Tanks for any help
> --
> View this message in context: http://www.nabble.com/ajax-indicator-tp20683826p20683826.html
> Sent from the Wicket - User mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org