On Dec 18, 2007 2:15 PM, Matej Knopp <[EMAIL PROTECTED]> wrote:
> I'm not entirely sure isEnabled() works properly on timer behaviors.
> If it doesn't please add a feature request, the current implementation
> is way too simplistic and needs to be enhanced.
>
seems like we need to check for isEnabled(Component) in #renderHead
Gerolf
>
> -Matej
>
> On Dec 18, 2007 12:43 PM, Artur W. <[EMAIL PROTECTED]> wrote:
> >
> >
> > Alex Objelean wrote:
> > >
> > > AjaxSelfUpdatingTimerBehavior implements IBehavior interface, which
> has
> > > the following method:
> > > boolean isEnabled(Component component);
> > >
> > > Override it and provide your business logic there.
> > >
> >
> > I must do something wrong becouse it doesn't start refreshing.
> >
> > My refreshing label:
> >
> > counterLabel.add(new AjaxSelfUpdatingTimerBehavior(
> Duration.seconds(2)) {
> > @Override
> > protected void
> onPostProcessTarget(AjaxRequestTarget target) {
> > if (counter == 0 && confirmed) {
> > window.close(target);
> > }
> > }
> > @Override
> > public boolean isEnabled(Component component) {
> > return confirmed;
> > }
> > });
> > counterLabel.setOutputMarkupId(true);
> > add(counterLabel);
> >
> > My confirm button:
> >
> > form.add(new IndicatingAjaxButton("confirmButton", form)
> {
> > @Override
> > protected void onSubmit(final AjaxRequestTarget
> target, Form form) {
> >
> > confirmed = true;
> >
> >
> > setEnabled(false);
> > setOutputMarkupId(true);
> >
> > new Thread() {
> >
> > public void run() {
> > //do something here
> > counter--;
> > }
> >
> > }.start();
> > target.addComponent(this);
> > target.addComponent(counterLabel);
> > }
> >
> > Artur
> >
> > --
> > View this message in context:
> http://www.nabble.com/How-to-refresh-component-many-times-in-one-ajax-request-tp14374053p14395329.html
> >
> > Sent from the Wicket - User mailing list archive at Nabble.com.
> >
> >
> > ---------------------------------------------------------------------
> > 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]
>
>