Re: Page with AjaxSelfUpdatingTimerBehavior in multiple browser tabs

2020-07-29 Thread Zbynek Vavros
Hi,

I did tried that but didn't work.
Ended up with increasing
org.apache.wicket.settings.IStoreSettings.setMaxSizePerSession(Bytes) to
keep more pages in store.

Are there any negative aspects of doing that beside (obvious) disk space?

Thanks,
Zbynek

On Tue, Jul 28, 2020 at 2:07 PM Martin Grigorov 
wrote:

> Hi,
>
> On Tue, Jul 28, 2020 at 11:09 AM Zbynek Vavros 
> wrote:
>
> > Hi,
> >
> > We have a page with AjaxSelfUpdatingTimerBehavior and now one of our
> > customers is complaining about "weird" behavior when this page is opened
> in
> > multiple browser tabs (yeah yeah we told him not to do it...).
> >
> > What happens is that after opening this page in new tab, the previous tab
> > gets ajax redirect on mentioned timer.
> >
> > After some digging I found out that this is happening because the page is
> > stateful.
> > Excerpt from Wicket code:
> >
> > // If the page is stateful then we cannot assume that the listener
> > interface is
> > // invoked on its initial state (right after page initialization) and
> that
> > its
> > // component and/or behavior will be available. That's why the listener
> > interface
> > // should be ignored and the best we can do is to re-paint the newly
> > constructed
> > // page.
> >
> > I did use StatelessChecker (very useful!) and found out that the reason
> is
> > this AjaxSelfUpdatingTimerBehavior.
> >
> > Googling around I found this thread from 2011 -
> >
> >
> http://apache-wicket.1842946.n4.nabble.com/Stateless-page-with-an-auto-update-section-td3795927.html
> > .
> > The suggestion here is to "roll your own timer behavior".
> >
> > Well, I spent some time with Wicket already but this is beyond my
> > knowledge. Can anyone please point me the right direction? Is this even
> > possible? I just have to say the AjaxSelfUpdatingTimerBehavior must stay
> -
> > this page displays progress bar of background task that is
> non-negotiable.
> >
>
> Try by overwriting AjaxSelfUpdatingTimerBehavior#getStatelessHint() and
> return true.
> Depending on how complex is your logic in #onTimer() it may work or not.
> See https://stackoverflow.com/a/10589807/497381 for more details. We
> integrated the Jolira's Wicket-Stateless approach in Wicket core since
> ver.7.4.0.
>
>
> >
> > Thanks,
> > Zbynek
> >
>


Re: Page with AjaxSelfUpdatingTimerBehavior in multiple browser tabs

2020-07-28 Thread Martin Grigorov
Hi,

On Tue, Jul 28, 2020 at 11:09 AM Zbynek Vavros 
wrote:

> Hi,
>
> We have a page with AjaxSelfUpdatingTimerBehavior and now one of our
> customers is complaining about "weird" behavior when this page is opened in
> multiple browser tabs (yeah yeah we told him not to do it...).
>
> What happens is that after opening this page in new tab, the previous tab
> gets ajax redirect on mentioned timer.
>
> After some digging I found out that this is happening because the page is
> stateful.
> Excerpt from Wicket code:
>
> // If the page is stateful then we cannot assume that the listener
> interface is
> // invoked on its initial state (right after page initialization) and that
> its
> // component and/or behavior will be available. That's why the listener
> interface
> // should be ignored and the best we can do is to re-paint the newly
> constructed
> // page.
>
> I did use StatelessChecker (very useful!) and found out that the reason is
> this AjaxSelfUpdatingTimerBehavior.
>
> Googling around I found this thread from 2011 -
>
> http://apache-wicket.1842946.n4.nabble.com/Stateless-page-with-an-auto-update-section-td3795927.html
> .
> The suggestion here is to "roll your own timer behavior".
>
> Well, I spent some time with Wicket already but this is beyond my
> knowledge. Can anyone please point me the right direction? Is this even
> possible? I just have to say the AjaxSelfUpdatingTimerBehavior must stay -
> this page displays progress bar of background task that is non-negotiable.
>

Try by overwriting AjaxSelfUpdatingTimerBehavior#getStatelessHint() and
return true.
Depending on how complex is your logic in #onTimer() it may work or not.
See https://stackoverflow.com/a/10589807/497381 for more details. We
integrated the Jolira's Wicket-Stateless approach in Wicket core since
ver.7.4.0.


>
> Thanks,
> Zbynek
>


Page with AjaxSelfUpdatingTimerBehavior in multiple browser tabs

2020-07-28 Thread Zbynek Vavros
Hi,

We have a page with AjaxSelfUpdatingTimerBehavior and now one of our
customers is complaining about "weird" behavior when this page is opened in
multiple browser tabs (yeah yeah we told him not to do it...).

What happens is that after opening this page in new tab, the previous tab
gets ajax redirect on mentioned timer.

After some digging I found out that this is happening because the page is
stateful.
Excerpt from Wicket code:

// If the page is stateful then we cannot assume that the listener
interface is
// invoked on its initial state (right after page initialization) and that
its
// component and/or behavior will be available. That's why the listener
interface
// should be ignored and the best we can do is to re-paint the newly
constructed
// page.

I did use StatelessChecker (very useful!) and found out that the reason is
this AjaxSelfUpdatingTimerBehavior.

Googling around I found this thread from 2011 -
http://apache-wicket.1842946.n4.nabble.com/Stateless-page-with-an-auto-update-section-td3795927.html.
The suggestion here is to "roll your own timer behavior".

Well, I spent some time with Wicket already but this is beyond my
knowledge. Can anyone please point me the right direction? Is this even
possible? I just have to say the AjaxSelfUpdatingTimerBehavior must stay -
this page displays progress bar of background task that is non-negotiable.

Thanks,
Zbynek


Re: Stateless page with AjaxSelfUpdatingTimerBehavior

2020-06-23 Thread Sven Meier

Hi,

you can make any Ajax behavior stateless as follows:

        component.setMarkupId("stable-id");
        add(component);

        component.add(new 
AjaxSelfUpdatingTimerBehavior(Duration.seconds(5)) {

            @Override
            public boolean getStatelessHint(Component component) {
                return true;
            }
        });

Note that you have to use a stable markup id for the component, 
otherwise it cannot be updated.


Have fun
Sven


On 23.06.20 17:21, Zbynek Vavros wrote:

Hi,

We have a page with AjaxSelfUpdatingTimerBehavior and now one of our
customers is complaining about "weird" behavior when this page is opened in
multiple browser tabs (yeah yeah we told him not to do it...).

What happens is that after opening this page in new tab, the previous tab
gets ajax redirect on mentioned timer.

After some digging I found out that this is happening because the page is
stateful.
Excerpt from Wicket code:

// If the page is stateful then we cannot assume that the listener
interface is
// invoked on its initial state (right after page initialization) and that
its
// component and/or behavior will be available. That's why the listener
interface
// should be ignored and the best we can do is to re-paint the newly
constructed
// page.

I did use StatelessChecker (very useful!) and found out that the reason is
this AjaxSelfUpdatingTimerBehavior.

Googling around I found this thread from 2011 -
http://apache-wicket.1842946.n4.nabble.com/Stateless-page-with-an-auto-update-section-td3795927.html.
The suggestion here is to "roll your own timer behavior".

Well, I spent some time with Wicket already but this is beyond my
knowledge. Can anyone please point me the right direction? Is this even
possible? I just have to say the AjaxSelfUpdatingTimerBehavior must stay -
this page displays progress bar of background task that is non-negotiable.

Thanks,
Zbynek



-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Stateless page with AjaxSelfUpdatingTimerBehavior

2020-06-23 Thread Zbynek Vavros
Hi,

We have a page with AjaxSelfUpdatingTimerBehavior and now one of our
customers is complaining about "weird" behavior when this page is opened in
multiple browser tabs (yeah yeah we told him not to do it...).

What happens is that after opening this page in new tab, the previous tab
gets ajax redirect on mentioned timer.

After some digging I found out that this is happening because the page is
stateful.
Excerpt from Wicket code:

// If the page is stateful then we cannot assume that the listener
interface is
// invoked on its initial state (right after page initialization) and that
its
// component and/or behavior will be available. That's why the listener
interface
// should be ignored and the best we can do is to re-paint the newly
constructed
// page.

I did use StatelessChecker (very useful!) and found out that the reason is
this AjaxSelfUpdatingTimerBehavior.

Googling around I found this thread from 2011 -
http://apache-wicket.1842946.n4.nabble.com/Stateless-page-with-an-auto-update-section-td3795927.html.
The suggestion here is to "roll your own timer behavior".

Well, I spent some time with Wicket already but this is beyond my
knowledge. Can anyone please point me the right direction? Is this even
possible? I just have to say the AjaxSelfUpdatingTimerBehavior must stay -
this page displays progress bar of background task that is non-negotiable.

Thanks,
Zbynek


Re: AjaxSelfUpdatingTimerBehavior breaks browser refresh

2015-09-21 Thread eostermueller
That fixed it, thanks Sven.
I updated to github repo with your fix.

Is that ever a valid combo, to have a stateful page and a raw value for a
model?
Thanks again for the help,
--Erik

On Sun, Sep 20, 2015 at 3:44 PM, Sven Meier [via Apache Wicket] <
ml-node+s1842946n467199...@n4.nabble.com> wrote:

> Hi,
>
> the AjaxSelfUpdatingBehavior makes the page stateful - without it the
> refresh will serve a new page instance with an up-to-date counter.
>
> To make this work for a stateful page, you should use a model that
> provides the current counter to the label:
>
>  add(new Label("myCounter", new AbstractReadOnlyModel() {
>  @Override
>  public Integer getObject()
>  {
>  Object o = getApplication();
>  if (o instanceof WicketApplication) {
>  WicketApplication w = (WicketApplication)o;
>  return w.getCounter().get();
>  }
>  return null;
>  }
>  }));
>
> Have fun
> Sven
>
> On 20.09.2015 21:48, eostermueller wrote:
>
> > Hello all,
> >
> > I just created a wicket quickstart here:
> >
> > https://github.com/eostermueller/selfUpdating
> >
> > I added a AjaxSelfUpdatingTimerBehavior that kind of breaks the browser
> > refresh.
> > The details are on the README.md.
> >
> > I found a number of similar issues on the forum but none quite match
> this.
> >
> > Thanks,
> > --Erik
> >
> >
> > --
> > View this message in context:
> http://apache-wicket.1842946.n4.nabble.com/AjaxSelfUpdatingTimerBehavior-breaks-browser-refresh-tp4671997.html
> > Sent from the Users forum mailing list archive at Nabble.com.
> >
> > -
> > To unsubscribe, e-mail: [hidden email]
> <http:///user/SendEmail.jtp?type=node=4671998=0>
> > For additional commands, e-mail: [hidden email]
> <http:///user/SendEmail.jtp?type=node=4671998=1>
> >
>
>
> -
> To unsubscribe, e-mail: [hidden email]
> <http:///user/SendEmail.jtp?type=node=4671998=2>
> For additional commands, e-mail: [hidden email]
> <http:///user/SendEmail.jtp?type=node=4671998=3>
>
>
>
> --
> If you reply to this email, your message will be added to the discussion
> below:
>
> http://apache-wicket.1842946.n4.nabble.com/AjaxSelfUpdatingTimerBehavior-breaks-browser-refresh-tp4671997p4671998.html
> To unsubscribe from AjaxSelfUpdatingTimerBehavior breaks browser refresh, 
> click
> here
> <http://apache-wicket.1842946.n4.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code=4671997=ZW9zdGVybXVlbGxlckBnbWFpbC5jb218NDY3MTk5N3wtNTA0MjE0ODU1>
> .
> NAML
> <http://apache-wicket.1842946.n4.nabble.com/template/NamlServlet.jtp?macro=macro_viewer=instant_html%21nabble%3Aemail.naml=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml>
>


--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/AjaxSelfUpdatingTimerBehavior-breaks-browser-refresh-tp4671997p4672004.html
Sent from the Users forum mailing list archive at Nabble.com.

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Re: AjaxSelfUpdatingTimerBehavior breaks browser refresh

2015-09-21 Thread Sven Meier

Hi Erik,

>Is that ever a valid combo, to have a stateful page and a raw value 
for a model?


access to a value without model indirection is discouraged in Wicket.

The Label constructor with a raw value exists just for convenience - and 
to shoot yourself in the foot :P


Have fun
Sven


On 21.09.2015 13:20, eostermueller wrote:

That fixed it, thanks Sven.
I updated to github repo with your fix.

Is that ever a valid combo, to have a stateful page and a raw value for a
model?
Thanks again for the help,
--Erik

On Sun, Sep 20, 2015 at 3:44 PM, Sven Meier [via Apache Wicket] <
ml-node+s1842946n467199...@n4.nabble.com> wrote:


Hi,

the AjaxSelfUpdatingBehavior makes the page stateful - without it the
refresh will serve a new page instance with an up-to-date counter.

To make this work for a stateful page, you should use a model that
provides the current counter to the label:

  add(new Label("myCounter", new AbstractReadOnlyModel() {
  @Override
  public Integer getObject()
  {
  Object o = getApplication();
  if (o instanceof WicketApplication) {
  WicketApplication w = (WicketApplication)o;
  return w.getCounter().get();
  }
  return null;
  }
  }));

Have fun
Sven

On 20.09.2015 21:48, eostermueller wrote:


Hello all,

I just created a wicket quickstart here:

https://github.com/eostermueller/selfUpdating

I added a AjaxSelfUpdatingTimerBehavior that kind of breaks the browser
refresh.
The details are on the README.md.

I found a number of similar issues on the forum but none quite match

this.

Thanks,
--Erik


--
View this message in context:

http://apache-wicket.1842946.n4.nabble.com/AjaxSelfUpdatingTimerBehavior-breaks-browser-refresh-tp4671997.html

Sent from the Users forum mailing list archive at Nabble.com.

-
To unsubscribe, e-mail: [hidden email]

<http:///user/SendEmail.jtp?type=node=4671998=0>

For additional commands, e-mail: [hidden email]

<http:///user/SendEmail.jtp?type=node=4671998=1>

-
To unsubscribe, e-mail: [hidden email]
<http:///user/SendEmail.jtp?type=node=4671998=2>
For additional commands, e-mail: [hidden email]
<http:///user/SendEmail.jtp?type=node=4671998=3>



--
If you reply to this email, your message will be added to the discussion
below:

http://apache-wicket.1842946.n4.nabble.com/AjaxSelfUpdatingTimerBehavior-breaks-browser-refresh-tp4671997p4671998.html
To unsubscribe from AjaxSelfUpdatingTimerBehavior breaks browser refresh, click
here
<http://apache-wicket.1842946.n4.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code=4671997=ZW9zdGVybXVlbGxlckBnbWFpbC5jb218NDY3MTk5N3wtNTA0MjE0ODU1>
.
NAML
<http://apache-wicket.1842946.n4.nabble.com/template/NamlServlet.jtp?macro=macro_viewer=instant_html%21nabble%3Aemail.naml=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml>



--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/AjaxSelfUpdatingTimerBehavior-breaks-browser-refresh-tp4671997p4672004.html
Sent from the Users forum mailing list archive at Nabble.com.

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org




-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Re: AjaxSelfUpdatingTimerBehavior breaks browser refresh

2015-09-20 Thread Sven Meier

Hi,

the AjaxSelfUpdatingBehavior makes the page stateful - without it the 
refresh will serve a new page instance with an up-to-date counter.


To make this work for a stateful page, you should use a model that 
provides the current counter to the label:


add(new Label("myCounter", new AbstractReadOnlyModel() {
@Override
public Integer getObject()
{
Object o = getApplication();
if (o instanceof WicketApplication) {
WicketApplication w = (WicketApplication)o;
return w.getCounter().get();
}
return null;
}
}));

Have fun
Sven

On 20.09.2015 21:48, eostermueller wrote:

Hello all,

I just created a wicket quickstart here:

https://github.com/eostermueller/selfUpdating

I added a AjaxSelfUpdatingTimerBehavior that kind of breaks the browser
refresh.
The details are on the README.md.

I found a number of similar issues on the forum but none quite match this.

Thanks,
--Erik


--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/AjaxSelfUpdatingTimerBehavior-breaks-browser-refresh-tp4671997.html
Sent from the Users forum mailing list archive at Nabble.com.

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org




-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



AjaxSelfUpdatingTimerBehavior breaks browser refresh

2015-09-20 Thread eostermueller
Hello all,

I just created a wicket quickstart here:

https://github.com/eostermueller/selfUpdating

I added a AjaxSelfUpdatingTimerBehavior that kind of breaks the browser
refresh.
The details are on the README.md.

I found a number of similar issues on the forum but none quite match this.

Thanks,
--Erik


--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/AjaxSelfUpdatingTimerBehavior-breaks-browser-refresh-tp4671997.html
Sent from the Users forum mailing list archive at Nabble.com.

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



AjaxSelfUpdatingTimerBehavior memory?

2014-03-14 Thread Rob Audenaerde
I have a question on the AjaxSelfUpdatingTimerBehavior
I have some memory issues and wondered in the behavior could cause this (on 
Jetty)
When connected with jvisualvm I see the heap increasing each time the 
AjaxSelfUpdatingTimerBehavior is fired (with about 3M per request)
Is that what I should see?


?Thx

-Rob


Re: AjaxSelfUpdatingTimerBehavior memory?

2014-03-14 Thread Martin Grigorov
Hi,

Definitely not!
Capture some memory snapshots and see what is the difference between them.
I'm not sure whether VisualVM can do that but Eclipse MAT can.

Martin Grigorov
Wicket Training and Consulting


On Fri, Mar 14, 2014 at 3:29 PM, Rob Audenaerde rob.audenae...@valuecare.nl
 wrote:

 I have a question on the AjaxSelfUpdatingTimerBehavior
 I have some memory issues and wondered in the behavior could cause this
 (on Jetty)
 When connected with jvisualvm I see the heap increasing each time the
 AjaxSelfUpdatingTimerBehavior is fired (with about 3M per request)
 Is that what I should see?


 ?Thx

 -Rob



RE: AjaxSelfUpdatingTimerBehavior memory?

2014-03-14 Thread Rob Audenaerde
On Fri, Mar 14, 2014 at 3:29 PM, Rob Audenaerde rob.audenae...@valuecare.nl
 wrote:

 I have a question on the AjaxSelfUpdatingTimerBehavior
 I have some memory issues and wondered in the behavior could cause this
 (on Jetty)
 When connected with jvisualvm I see the heap increasing each time the
 AjaxSelfUpdatingTimerBehavior is fired (with about 3M per request)
 Is that what I should see?



I have reproduced it in a quickstart.

The screenshot is here: http://www.audenaerde.org/ajax/screenshot.png
The quickstart can be found here: http://www.audenaerde.org/ajax/ajaxmemory.zip

Note that I am running in debug mode; but that should not matter I suppose. 
-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Re: AjaxSelfUpdatingTimerBehavior memory?

2014-03-14 Thread Martin Grigorov
It looks OK.
The memory grows but after (manual) GC it is freed.

Martin Grigorov
Wicket Training and Consulting


On Fri, Mar 14, 2014 at 3:54 PM, Rob Audenaerde rob.audenae...@valuecare.nl
 wrote:

 On Fri, Mar 14, 2014 at 3:29 PM, Rob Audenaerde 
 rob.audenae...@valuecare.nl
  wrote:

  I have a question on the AjaxSelfUpdatingTimerBehavior
  I have some memory issues and wondered in the behavior could cause this
  (on Jetty)
  When connected with jvisualvm I see the heap increasing each time the
  AjaxSelfUpdatingTimerBehavior is fired (with about 3M per request)
  Is that what I should see?
 
 

 I have reproduced it in a quickstart.

 The screenshot is here: http://www.audenaerde.org/ajax/screenshot.png
 The quickstart can be found here:
 http://www.audenaerde.org/ajax/ajaxmemory.zip

 Note that I am running in debug mode; but that should not matter I suppose.
 -
 To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
 For additional commands, e-mail: users-h...@wicket.apache.org




Re: Generic busy indicator - override for AjaxSelfUpdatingTimerBehavior

2013-12-05 Thread Martin Grigorov
Hi,

Please give more details what exactly is the problem.


On Thu, Dec 5, 2013 at 8:30 AM, Marieke Vandamme marieke.vanda...@tvh.bewrote:

 Dear wicket users,

 We are using the Generic busy indicator found on the wiki to have a busy
 indicator for every ajax event.

 https://cwiki.apache.org/confluence/display/WICKET/Generic+Busy+Indicator+%28for+both+Ajax+and+non-Ajax+submits%29#

 In that article on the wiki, it's also described how to override that
 functionality for a specific ajax event.
 /var clickedElement = (window.event) ? event.srcElement :
 eventData.target;/
 Afterwards the clickedElement can be checked to see if the indicator needs
 to be shown or not.
 This is all working fine, but now we have a case where we want to use
 AjaxSelfUpdatingTimerBehavior. Then we have no clickedElement.
 Would somebody have an idea on how it's possible to retrieve the element
 that needs to be updated in the javascript functions for busy indicator?

 Thanks !! Kind regards, Marieke



 --
 View this message in context:
 http://apache-wicket.1842946.n4.nabble.com/Generic-busy-indicator-override-for-AjaxSelfUpdatingTimerBehavior-tp4662800.html
 Sent from the Users forum mailing list archive at Nabble.com.

 -
 To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
 For additional commands, e-mail: users-h...@wicket.apache.org




Re: Generic busy indicator - override for AjaxSelfUpdatingTimerBehavior

2013-12-05 Thread Marieke Vandamme
Hi, 

Okay, I'll do my best to explain more in detail. 

When doing an ajax call, we want to show a busy indicator on the page, so
that the user knows that something is happening and that he must wait for
the ajax response. This can be done by adding the Generic busy indicator (as
described on the wiki page I linked above). This binds the event before an
ajax call with following code:
/ Wicket.Event.subscribe('/ajax/call/beforeSend', function( attributes,
jqXHR, settings ) { showBusysign() });/

For some ajax events, it's not needed to show the busy indators. Now we have
such a case, with a timer, and we don't want to disturb the customer when
doing the ajax call. On the wiki page with the example, it's explained that
for specific ajax calls, you can check things, so that the indicator is not
showing. But the example is for AjaxLinks, where you have an element that
was clicked, and that element can be retrieved with event.srcElement in
javascript. We use the AjaxSelfUpdatingTimerBehavior, so we don't have an
element that is clicked. 
Is there a way that we can retrieve the element that the timer is put on?
Something like event.srcElement?

I wanted to comment on the wiki article with this question too, but found no
way to add comment.. 

Thanks again! Kind Regards, Marieke



--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Generic-busy-indicator-override-for-AjaxSelfUpdatingTimerBehavior-tp4662800p4662803.html
Sent from the Users forum mailing list archive at Nabble.com.

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Re: Generic busy indicator - override for AjaxSelfUpdatingTimerBehavior

2013-12-05 Thread Martin Grigorov
Hi,


On Thu, Dec 5, 2013 at 2:58 PM, Marieke Vandamme marieke.vanda...@tvh.bewrote:

 Hi,

 Okay, I'll do my best to explain more in detail.

 When doing an ajax call, we want to show a busy indicator on the page, so
 that the user knows that something is happening and that he must wait for
 the ajax response. This can be done by adding the Generic busy indicator
 (as
 described on the wiki page I linked above). This binds the event before an
 ajax call with following code:
 / Wicket.Event.subscribe('/ajax/call/beforeSend', function( attributes,
 jqXHR, settings ) { showBusysign() });/

 For some ajax events, it's not needed to show the busy indators. Now we
 have
 such a case, with a timer, and we don't want to disturb the customer when
 doing the ajax call. On the wiki page with the example, it's explained that
 for specific ajax calls, you can check things, so that the indicator is not
 showing. But the example is for AjaxLinks, where you have an element that
 was clicked, and that element can be retrieved with event.srcElement in
 javascript. We use the AjaxSelfUpdatingTimerBehavior, so we don't have an
 element that is clicked.
 Is there a way that we can retrieve the element that the timer is put on?
 Something like event.srcElement?


Yes, there is: document.getElementById(attributes.c)



 I wanted to comment on the wiki article with this question too, but found
 no
 way to add comment..

 Thanks again! Kind Regards, Marieke



 --
 View this message in context:
 http://apache-wicket.1842946.n4.nabble.com/Generic-busy-indicator-override-for-AjaxSelfUpdatingTimerBehavior-tp4662800p4662803.html
 Sent from the Users forum mailing list archive at Nabble.com.

 -
 To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
 For additional commands, e-mail: users-h...@wicket.apache.org




Re: Generic busy indicator - override for AjaxSelfUpdatingTimerBehavior

2013-12-05 Thread Ernesto Reinaldo Barreiro
Why just don't pass an attribute that means do not show progress... and
use the same for all AJAX action that do not need to show progress


On Thu, Dec 5, 2013 at 2:58 PM, Marieke Vandamme marieke.vanda...@tvh.bewrote:

 Hi,

 Okay, I'll do my best to explain more in detail.

 When doing an ajax call, we want to show a busy indicator on the page, so
 that the user knows that something is happening and that he must wait for
 the ajax response. This can be done by adding the Generic busy indicator
 (as
 described on the wiki page I linked above). This binds the event before an
 ajax call with following code:
 / Wicket.Event.subscribe('/ajax/call/beforeSend', function( attributes,
 jqXHR, settings ) { showBusysign() });/

 For some ajax events, it's not needed to show the busy indators. Now we
 have
 such a case, with a timer, and we don't want to disturb the customer when
 doing the ajax call. On the wiki page with the example, it's explained that
 for specific ajax calls, you can check things, so that the indicator is not
 showing. But the example is for AjaxLinks, where you have an element that
 was clicked, and that element can be retrieved with event.srcElement in
 javascript. We use the AjaxSelfUpdatingTimerBehavior, so we don't have an
 element that is clicked.
 Is there a way that we can retrieve the element that the timer is put on?
 Something like event.srcElement?

 I wanted to comment on the wiki article with this question too, but found
 no
 way to add comment..

 Thanks again! Kind Regards, Marieke



 --
 View this message in context:
 http://apache-wicket.1842946.n4.nabble.com/Generic-busy-indicator-override-for-AjaxSelfUpdatingTimerBehavior-tp4662800p4662803.html
 Sent from the Users forum mailing list archive at Nabble.com.

 -
 To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
 For additional commands, e-mail: users-h...@wicket.apache.org




-- 
Regards - Ernesto Reinaldo Barreiro


Re: Generic busy indicator - override for AjaxSelfUpdatingTimerBehavior

2013-12-05 Thread Ernesto Reinaldo Barreiro
remove the don't


On Thu, Dec 5, 2013 at 3:30 PM, Ernesto Reinaldo Barreiro 
reier...@gmail.com wrote:

 Why just don't pass an attribute that means do not show progress... and
 use the same for all AJAX action that do not need to show progress


 On Thu, Dec 5, 2013 at 2:58 PM, Marieke Vandamme 
 marieke.vanda...@tvh.bewrote:

 Hi,

 Okay, I'll do my best to explain more in detail.

 When doing an ajax call, we want to show a busy indicator on the page, so
 that the user knows that something is happening and that he must wait for
 the ajax response. This can be done by adding the Generic busy indicator
 (as
 described on the wiki page I linked above). This binds the event before an
 ajax call with following code:
 / Wicket.Event.subscribe('/ajax/call/beforeSend', function( attributes,
 jqXHR, settings ) { showBusysign() });/

 For some ajax events, it's not needed to show the busy indators. Now we
 have
 such a case, with a timer, and we don't want to disturb the customer when
 doing the ajax call. On the wiki page with the example, it's explained
 that
 for specific ajax calls, you can check things, so that the indicator is
 not
 showing. But the example is for AjaxLinks, where you have an element that
 was clicked, and that element can be retrieved with event.srcElement in
 javascript. We use the AjaxSelfUpdatingTimerBehavior, so we don't have an
 element that is clicked.
 Is there a way that we can retrieve the element that the timer is put on?
 Something like event.srcElement?

 I wanted to comment on the wiki article with this question too, but found
 no
 way to add comment..

 Thanks again! Kind Regards, Marieke



 --
 View this message in context:
 http://apache-wicket.1842946.n4.nabble.com/Generic-busy-indicator-override-for-AjaxSelfUpdatingTimerBehavior-tp4662800p4662803.html
 Sent from the Users forum mailing list archive at Nabble.com.

 -
 To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
 For additional commands, e-mail: users-h...@wicket.apache.org




 --
 Regards - Ernesto Reinaldo Barreiro




-- 
Regards - Ernesto Reinaldo Barreiro


Generic busy indicator - override for AjaxSelfUpdatingTimerBehavior

2013-12-04 Thread Marieke Vandamme
Dear wicket users, 

We are using the Generic busy indicator found on the wiki to have a busy
indicator for every ajax event. 
https://cwiki.apache.org/confluence/display/WICKET/Generic+Busy+Indicator+%28for+both+Ajax+and+non-Ajax+submits%29#

In that article on the wiki, it's also described how to override that
functionality for a specific ajax event. 
/var clickedElement = (window.event) ? event.srcElement : eventData.target;/
Afterwards the clickedElement can be checked to see if the indicator needs
to be shown or not. 
This is all working fine, but now we have a case where we want to use
AjaxSelfUpdatingTimerBehavior. Then we have no clickedElement.
Would somebody have an idea on how it's possible to retrieve the element
that needs to be updated in the javascript functions for busy indicator? 

Thanks !! Kind regards, Marieke



--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Generic-busy-indicator-override-for-AjaxSelfUpdatingTimerBehavior-tp4662800.html
Sent from the Users forum mailing list archive at Nabble.com.

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



AjaxSelfUpdatingTimerBehavior does not stop itself properly after certain time

2013-09-30 Thread Behrooz Nobakht
Hello,

I have a custom AjaxSelfUpdatingTimerBehavior as follows:

public class LimitedAjaxSelfUpdatingTimerBehavior extends
AjaxSelfUpdatingTimerBehavior {
private static final long serialVersionUID = 1L;

public static final long MAX_IDLE_TIME = TimeUnit.SECONDS.toMillis(120);

private final Logger logger = LoggerFactory.getLogger(getClass());

private final AtomicLong createdTime = new
AtomicLong(System.currentTimeMillis());

private final AtomicBoolean expired = new AtomicBoolean(false);

public LimitedAjaxSelfUpdatingTimerBehavior() {
this(Duration.milliseconds(MAX_IDLE_TIME));
}

protected LimitedAjaxSelfUpdatingTimerBehavior(Duration updateInterval) {
super(updateInterval);
}

@Override
protected final void onPostProcessTarget(AjaxRequestTarget target) {
if (expired.get()) {
stop(target);
return;
}
doProcessTarget(target);
}

@Override
protected boolean shouldTrigger() {
long idle = System.currentTimeMillis() - createdTime.get();
expired.compareAndSet(false, idle  MAX_IDLE_TIME);
if (expired.get()) {
logger.warn(A message);

// find the AJAX request and stop it
AjaxRequestTarget target =
RequestCycle.get().find(AjaxRequestTarget.class);
stop(target);
}
return !expired.get();
}

/**
 * @param target
 */
protected void doProcessTarget(AjaxRequestTarget target) {
}
}

I use this behavior on a set of my components in a Wicket page, however,
after the default timeout passes, I can still see in the browser debug
console XHR requests such as:

http://localhost:8081/w/wicket/page?1-1.IBehaviorListener.0-serviceInstances-0-serviceInstanceServerInstances-content-servers-0-server-instances-0-instance_=1380542862344

And the response to such XHR looks like:

ajax-response
evaluate encoding=wicket1
![CDATA[
(function(){Wicket.TimerHandles['instance103']^ =
setTimeout('Wicket.Ajax.ajax({\u\:\./page?1-1.IBehaviorListener.0-serviceInstances-0-serviceInstanceServerInstances-content-servers-0-server-instances-0-instance\,\c\:\instance103\});',
1)})();
]]

/evaluate

/ajax-response

which shows that the behavior has *not* been stopped for the component.

What am I missing or doing in a wrong way?

Thanks for the help!— Behrooz Nobakht


Re: AjaxSelfUpdatingTimerBehavior does not stop itself properly after certain time

2013-09-30 Thread Martin Grigorov
Hi,

Put a breakpoint in #onPostProcessTarget() and make sure that stop(target)
is invoked.
Then check the Ajax response for this request and verify that it has
something like:
  delete Wicket.TimerHandles['instance103']
and that there is no another setTimeout() call in the evaluation elements
in the response.

As last resort create a quickstart app and attach it to a ticket so we can
debug it and fix it if there is a problem.


On Mon, Sep 30, 2013 at 2:12 PM, Behrooz Nobakht nob...@gmail.com wrote:

 Hello,

 I have a custom AjaxSelfUpdatingTimerBehavior as follows:

 public class LimitedAjaxSelfUpdatingTimerBehavior extends
 AjaxSelfUpdatingTimerBehavior {
 private static final long serialVersionUID = 1L;

 public static final long MAX_IDLE_TIME =
 TimeUnit.SECONDS.toMillis(120);

 private final Logger logger = LoggerFactory.getLogger(getClass());

 private final AtomicLong createdTime = new
 AtomicLong(System.currentTimeMillis());

 private final AtomicBoolean expired = new AtomicBoolean(false);

 public LimitedAjaxSelfUpdatingTimerBehavior() {
 this(Duration.milliseconds(MAX_IDLE_TIME));
 }

 protected LimitedAjaxSelfUpdatingTimerBehavior(Duration
 updateInterval) {
 super(updateInterval);
 }

 @Override
 protected final void onPostProcessTarget(AjaxRequestTarget target) {
 if (expired.get()) {
 stop(target);
 return;
 }
 doProcessTarget(target);
 }

 @Override
 protected boolean shouldTrigger() {
 long idle = System.currentTimeMillis() - createdTime.get();
 expired.compareAndSet(false, idle  MAX_IDLE_TIME);
 if (expired.get()) {
 logger.warn(A message);

 // find the AJAX request and stop it
 AjaxRequestTarget target =
 RequestCycle.get().find(AjaxRequestTarget.class);
 stop(target);
 }
 return !expired.get();
 }

 /**
  * @param target
  */
 protected void doProcessTarget(AjaxRequestTarget target) {
 }
 }

 I use this behavior on a set of my components in a Wicket page, however,
 after the default timeout passes, I can still see in the browser debug
 console XHR requests such as:


 http://localhost:8081/w/wicket/page?1-1.IBehaviorListener.0-serviceInstances-0-serviceInstanceServerInstances-content-servers-0-server-instances-0-instance_=1380542862344

 And the response to such XHR looks like:

 ajax-response
 evaluate encoding=wicket1
 ![CDATA[
 (function(){Wicket.TimerHandles['instance103']^ =

 setTimeout('Wicket.Ajax.ajax({\u\:\./page?1-1.IBehaviorListener.0-serviceInstances-0-serviceInstanceServerInstances-content-servers-0-server-instances-0-instance\,\c\:\instance103\});',
 1)})();
 ]]

 /evaluate

 /ajax-response

 which shows that the behavior has *not* been stopped for the component.

 What am I missing or doing in a wrong way?

 Thanks for the help!— Behrooz Nobakht



Re: AjaxSelfUpdatingTimerBehavior does not stop itself properly after certain time

2013-09-30 Thread Behrooz Nobakht
Thanks for the hint. The part that delete
Wicket.TimerHandles[‘instance103’] should be in the response, helped us
find the issue.

However, there is a more general discussion as this cannot be called a bug.
Why after the last time “shouldTrigger” is called and then
“stop(AjaxRequestTargte)”, there will be still another call to
“doProcessTarget()”?

This made us to use two flags to manage time-wise expiration of the
behavior.

Thanks,


On Mon, Sep 30, 2013 at 2:23 PM, Martin Grigorov mgrigo...@apache.orgwrote:

 Hi,

 Put a breakpoint in #onPostProcessTarget() and make sure that stop(target)
 is invoked.
 Then check the Ajax response for this request and verify that it has
 something like:
   delete Wicket.TimerHandles['instance103']
 and that there is no another setTimeout() call in the evaluation elements
 in the response.

 As last resort create a quickstart app and attach it to a ticket so we can
 debug it and fix it if there is a problem.


 On Mon, Sep 30, 2013 at 2:12 PM, Behrooz Nobakht nob...@gmail.com wrote:

  Hello,
 
  I have a custom AjaxSelfUpdatingTimerBehavior as follows:
 
  public class LimitedAjaxSelfUpdatingTimerBehavior extends
  AjaxSelfUpdatingTimerBehavior {
  private static final long serialVersionUID = 1L;
 
  public static final long MAX_IDLE_TIME =
  TimeUnit.SECONDS.toMillis(120);
 
  private final Logger logger = LoggerFactory.getLogger(getClass());
 
  private final AtomicLong createdTime = new
  AtomicLong(System.currentTimeMillis());
 
  private final AtomicBoolean expired = new AtomicBoolean(false);
 
  public LimitedAjaxSelfUpdatingTimerBehavior() {
  this(Duration.milliseconds(MAX_IDLE_TIME));
  }
 
  protected LimitedAjaxSelfUpdatingTimerBehavior(Duration
  updateInterval) {
  super(updateInterval);
  }
 
  @Override
  protected final void onPostProcessTarget(AjaxRequestTarget target) {
  if (expired.get()) {
  stop(target);
  return;
  }
  doProcessTarget(target);
  }
 
  @Override
  protected boolean shouldTrigger() {
  long idle = System.currentTimeMillis() - createdTime.get();
  expired.compareAndSet(false, idle  MAX_IDLE_TIME);
  if (expired.get()) {
  logger.warn(A message);
 
  // find the AJAX request and stop it
  AjaxRequestTarget target =
  RequestCycle.get().find(AjaxRequestTarget.class);
  stop(target);
  }
  return !expired.get();
  }
 
  /**
   * @param target
   */
  protected void doProcessTarget(AjaxRequestTarget target) {
  }
  }
 
  I use this behavior on a set of my components in a Wicket page, however,
  after the default timeout passes, I can still see in the browser debug
  console XHR requests such as:
 
 
 
 http://localhost:8081/w/wicket/page?1-1.IBehaviorListener.0-serviceInstances-0-serviceInstanceServerInstances-content-servers-0-server-instances-0-instance_=1380542862344
 
  And the response to such XHR looks like:
 
  ajax-response
  evaluate encoding=wicket1
  ![CDATA[
  (function(){Wicket.TimerHandles['instance103']^ =
 
 
 setTimeout('Wicket.Ajax.ajax({\u\:\./page?1-1.IBehaviorListener.0-serviceInstances-0-serviceInstanceServerInstances-content-servers-0-server-instances-0-instance\,\c\:\instance103\});',
  1)})();
  ]]
 
  /evaluate
 
  /ajax-response
 
  which shows that the behavior has *not* been stopped for the component.
 
  What am I missing or doing in a wrong way?
 
  Thanks for the help!— Behrooz Nobakht
 




-- 
-- Behrooz Nobakht


Re: AjaxSelfUpdatingTimerBehavior does not stop itself properly after certain time

2013-09-30 Thread Martin Grigorov
doProcessTarget() is your own method and AFAIS it is called only if not
expired.

@Override
protected final void onPostProcessTarget(AjaxRequestTarget target) {
if (expired.get()) {
stop(target);
return;
}
doProcessTarget(target);
}

Wicket knows nothing about this method, so it cannot call it.



On Mon, Sep 30, 2013 at 3:52 PM, Behrooz Nobakht nob...@gmail.com wrote:

 Thanks for the hint. The part that delete
 Wicket.TimerHandles[‘instance103’] should be in the response, helped us
 find the issue.

 However, there is a more general discussion as this cannot be called a bug.
 Why after the last time “shouldTrigger” is called and then
 “stop(AjaxRequestTargte)”, there will be still another call to
 “doProcessTarget()”?

 This made us to use two flags to manage time-wise expiration of the
 behavior.

 Thanks,


 On Mon, Sep 30, 2013 at 2:23 PM, Martin Grigorov mgrigo...@apache.org
 wrote:

  Hi,
 
  Put a breakpoint in #onPostProcessTarget() and make sure that
 stop(target)
  is invoked.
  Then check the Ajax response for this request and verify that it has
  something like:
delete Wicket.TimerHandles['instance103']
  and that there is no another setTimeout() call in the evaluation
 elements
  in the response.
 
  As last resort create a quickstart app and attach it to a ticket so we
 can
  debug it and fix it if there is a problem.
 
 
  On Mon, Sep 30, 2013 at 2:12 PM, Behrooz Nobakht nob...@gmail.com
 wrote:
 
   Hello,
  
   I have a custom AjaxSelfUpdatingTimerBehavior as follows:
  
   public class LimitedAjaxSelfUpdatingTimerBehavior extends
   AjaxSelfUpdatingTimerBehavior {
   private static final long serialVersionUID = 1L;
  
   public static final long MAX_IDLE_TIME =
   TimeUnit.SECONDS.toMillis(120);
  
   private final Logger logger = LoggerFactory.getLogger(getClass());
  
   private final AtomicLong createdTime = new
   AtomicLong(System.currentTimeMillis());
  
   private final AtomicBoolean expired = new AtomicBoolean(false);
  
   public LimitedAjaxSelfUpdatingTimerBehavior() {
   this(Duration.milliseconds(MAX_IDLE_TIME));
   }
  
   protected LimitedAjaxSelfUpdatingTimerBehavior(Duration
   updateInterval) {
   super(updateInterval);
   }
  
   @Override
   protected final void onPostProcessTarget(AjaxRequestTarget target)
 {
   if (expired.get()) {
   stop(target);
   return;
   }
   doProcessTarget(target);
   }
  
   @Override
   protected boolean shouldTrigger() {
   long idle = System.currentTimeMillis() - createdTime.get();
   expired.compareAndSet(false, idle  MAX_IDLE_TIME);
   if (expired.get()) {
   logger.warn(A message);
  
   // find the AJAX request and stop it
   AjaxRequestTarget target =
   RequestCycle.get().find(AjaxRequestTarget.class);
   stop(target);
   }
   return !expired.get();
   }
  
   /**
* @param target
*/
   protected void doProcessTarget(AjaxRequestTarget target) {
   }
   }
  
   I use this behavior on a set of my components in a Wicket page,
 however,
   after the default timeout passes, I can still see in the browser debug
   console XHR requests such as:
  
  
  
 
 http://localhost:8081/w/wicket/page?1-1.IBehaviorListener.0-serviceInstances-0-serviceInstanceServerInstances-content-servers-0-server-instances-0-instance_=1380542862344
  
   And the response to such XHR looks like:
  
   ajax-response
   evaluate encoding=wicket1
   ![CDATA[
   (function(){Wicket.TimerHandles['instance103']^ =
  
  
 
 setTimeout('Wicket.Ajax.ajax({\u\:\./page?1-1.IBehaviorListener.0-serviceInstances-0-serviceInstanceServerInstances-content-servers-0-server-instances-0-instance\,\c\:\instance103\});',
   1)})();
   ]]
  
   /evaluate
  
   /ajax-response
  
   which shows that the behavior has *not* been stopped for the component.
  
   What am I missing or doing in a wrong way?
  
   Thanks for the help!— Behrooz Nobakht
  
 



 --
 -- Behrooz Nobakht



Repeaters and AjaxSelfUpdatingTimerBehavior

2013-03-22 Thread heikki
hello,

I've a question about using AjaxSelfUpdatingTimerBehavior and a
RepeatingView (or ListView).

I have a repeater, with AjaxSelfUpdatingTimerBehavior set on its parent, so
that it can update the list in the page with the latest list items that were
added (or removed) on the server side. This works just fine, as such.

However, instead of repainting the whole repeater with all its items, I
would like to only add newly added items. Sure I've seen
http://wicketinaction.com/2008/10/repainting-only-newly-created-repeater-items-via-ajax/
where it is achieved by scripting, and using target.prependJavascript(). But
that's in the context of an AjaxButton that has an
onSubmit(AjaxRequestTarget target, Form ?  f) method -- so you actually
have a reference to the target to put your scripting to.

But in the case of using AjaxSelfUpdatingTimerBehavior, I have no clue how
to go about this. Is there some callback method in this case, similar to
AjaxButton.onSubmit(), that gives a reference to the target? 

Hopefully I made my question clear, and it's obvious and I just missed
something..

All help greatly appreciated,
kind regards
Heikki Doeleman




--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Repeaters-and-AjaxSelfUpdatingTimerBehavior-tp4657456.html
Sent from the Users forum mailing list archive at Nabble.com.

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Avoid session timeout through AjaxSelfUpdatingTimerBehavior

2012-11-26 Thread Tobi81
hi,

i got a problem with wicket's session timeout. i'm using wicket version
1.4.9. i set the session timeout to 1 minute in the file web.xml.
in my case this is necessary to recognize if an user is on-/offline quite
fast. if the user closes the browser the session is timed out after 1
minute.

i don't want the session to timeout in case the user is hanging around on
one of the pages. so what i did is to establish a self updating timer in the
following way:

add(lblMessages);
lblMessages.add(new
AjaxSelfUpdatingTimerBehavior(Duration.seconds(GloCon.TIMER_UPDATE_HEADER))); 

the label is updated every 30 seconds and part of a panel that is part of
all pages. and still i got session timeouts. i can't figure out why!? i
searched the web already for a while: the above mentioned solutions is
exactly what should work.
i found also something about constructors and PageParameters ... but this
happens also on pages with PageParameters in the constructor.

or is tomcat the problem (version 6)?

can you please help me ...

regards,
tobi



--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Avoid-session-timeout-through-AjaxSelfUpdatingTimerBehavior-tp4654240.html
Sent from the Users forum mailing list archive at Nabble.com.

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Re: Avoid session timeout through AjaxSelfUpdatingTimerBehavior

2012-11-26 Thread Martin Grigorov
Hi,

This should work.
Make sure the Ajax call hits the server side, i.e. check that onTimer()
method is actually called.
Next try with a quickstart application that uses newer versions of both
Wicket and Tomcat.


On Mon, Nov 26, 2012 at 10:14 PM, Tobi81 tobias.go...@web.de wrote:

 hi,

 i got a problem with wicket's session timeout. i'm using wicket version
 1.4.9. i set the session timeout to 1 minute in the file web.xml.
 in my case this is necessary to recognize if an user is on-/offline quite
 fast. if the user closes the browser the session is timed out after 1
 minute.

 i don't want the session to timeout in case the user is hanging around on
 one of the pages. so what i did is to establish a self updating timer in
 the
 following way:

 add(lblMessages);
 lblMessages.add(new

 AjaxSelfUpdatingTimerBehavior(Duration.seconds(GloCon.TIMER_UPDATE_HEADER)));

 the label is updated every 30 seconds and part of a panel that is part of
 all pages. and still i got session timeouts. i can't figure out why!? i
 searched the web already for a while: the above mentioned solutions is
 exactly what should work.
 i found also something about constructors and PageParameters ... but this
 happens also on pages with PageParameters in the constructor.

 or is tomcat the problem (version 6)?

 can you please help me ...

 regards,
 tobi



 --
 View this message in context:
 http://apache-wicket.1842946.n4.nabble.com/Avoid-session-timeout-through-AjaxSelfUpdatingTimerBehavior-tp4654240.html
 Sent from the Users forum mailing list archive at Nabble.com.

 -
 To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
 For additional commands, e-mail: users-h...@wicket.apache.org




-- 
Martin Grigorov
jWeekend
Training, Consulting, Development
http://jWeekend.com http://jweekend.com/


Re: AjaxSelfUpdatingTimerBehavior stops working

2012-07-10 Thread esajjkh
Thank you!

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/AjaxSelfUpdatingTimerBehavior-stops-working-tp4650412p4650421.html
Sent from the Users forum mailing list archive at Nabble.com.

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Re: AjaxSelfUpdatingTimerBehavior stops working

2012-07-09 Thread Francois Meillet
odd : the maximum value for the timout is Integer.MAX_VALUE.

François


Le 9 juil. 2012 à 15:11, esajjkh a écrit :

 When I create an instance of AjaxSelfUpdatingTimerBehavior with value of
 TIMEOUT, the onPostProcessTarget methods is being called immediately rather
 than it should wait for the specified time. 
 Below is the code snippet for clarity.
 
 final long TIMEOUT= 63078410055L; // it becomes 730,1 Days
 
 conferenceStartTimer = new
 AjaxSelfUpdatingTimerBehavior(Duration.milliseconds(TIMEOUT)) {
 
@Override
protected void onPostProcessTarget(AjaxRequestTarget target) {
  info(getString(INVALID TIMEOUT));
   }
};
 
 Can someone help me why it is calling this method before the time is out? 
 Thank you!
 
 --
 View this message in context: 
 http://apache-wicket.1842946.n4.nabble.com/AjaxSelfUpdatingTimerBehavior-stops-working-tp4650412.html
 Sent from the Users forum mailing list archive at Nabble.com.
 
 -
 To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
 For additional commands, e-mail: users-h...@wicket.apache.org
 



Re: AjaxSelfUpdatingTimerBehavior stops working

2012-07-09 Thread Francois Meillet
odd : the maximum value for the timout is Integer.MAX_VALUE.

François

Le 9 juil. 2012 à 15:11, esajjkh a écrit :

 When I create an instance of AjaxSelfUpdatingTimerBehavior with value of
 TIMEOUT, the onPostProcessTarget methods is being called immediately rather
 than it should wait for the specified time. 
 Below is the code snippet for clarity.
 
 final long TIMEOUT= 63078410055L; // it becomes 730,1 Days
 
 conferenceStartTimer = new
 AjaxSelfUpdatingTimerBehavior(Duration.milliseconds(TIMEOUT)) {
 
@Override
protected void onPostProcessTarget(AjaxRequestTarget target) {
  info(getString(INVALID TIMEOUT));
   }
};
 
 Can someone help me why it is calling this method before the time is out? 
 Thank you!
 
 --
 View this message in context: 
 http://apache-wicket.1842946.n4.nabble.com/AjaxSelfUpdatingTimerBehavior-stops-working-tp4650412.html
 Sent from the Users forum mailing list archive at Nabble.com.
 
 -
 To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
 For additional commands, e-mail: users-h...@wicket.apache.org
 



Component not found after AjaxSelfUpdatingTimerBehavior

2012-03-03 Thread André Schütz
Hi,

I have two Tabs in the same browser where the same application is running. The 
scope is different but the session is the same.
When I make a call to my application at Page1 in Tab1 and get the results In 
Page2, everything is fine.

The problem occurs when I make parallel calls in the two Tabs and get the 
results.
The links in the two tabs throw an Unexpected RuntimeException when I click on 
them.

Error:

Last cause: Could not find component 
'resultsContent:filter:filter_keywords:filter_box:filter_entries_list:filter_entries:17:filter_entries_link'
 on page 'class org.mycomp.client.website.MyResults

Stacktrace:

Root cause:

org.apache.wicket.request.handler.ComponentNotFoundException: Could not find 
component 
'resultsContent:filter:filter_keywords:filter_box:filter_entries_list:filter_entries:17:filter_entries_link'
 on page 'class org.mycomp.client.website.MyResults
at 
org.apache.wicket.request.handler.PageAndComponentProvider.getComponent(PageAndComponentProvider.java:181)
at 
org.apache.wicket.request.handler.ListenerInterfaceRequestHandler.getComponent(ListenerInterfaceRequestHandler.java:92)
at 
org.apache.wicket.request.handler.ListenerInterfaceRequestHandler.respond(ListenerInterfaceRequestHandler.java:239)
at 
org.apache.wicket.request.cycle.RequestCycle$HandlerExecutor.respond(RequestCycle.java:781)
at 
org.apache.wicket.request.RequestHandlerStack.execute(RequestHandlerStack.java:64)
at org.apache.wicket.request.cycle.RequestCycle.execute(RequestCycle.java:255)
at 
org.apache.wicket.request.cycle.RequestCycle.processRequest(RequestCycle.java:212)
at 
org.apache.wicket.request.cycle.RequestCycle.processRequestAndDetach(RequestCycle.java:283)
at 
org.apache.wicket.protocol.http.WicketFilter.processRequest(WicketFilter.java:162)
at org.apache.wicket.protocol.http.WicketFilter.doFilter(WicketFilter.java:218)
at 
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at 
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at 
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
at 
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
at 
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:298)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:859)
at 
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:588)
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489)
at java.lang.Thread.run(Thread.java:662)


The error just occurs, when I use the application in both tabs. The page ID of 
the pages in the two tabs is different and works fine, only the links are not 
working correctly.

Thanks,
Andre
-- 
NEU: FreePhone 3-fach-Flat mit kostenlosem Smartphone!  

Jetzt informieren: http://mobile.1und1.de/?ac=OM.PW.PW003K20328T7073a

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Component not found after AjaxSelfUpdatingTimerBehavior

2012-03-03 Thread André Schütz
Hi,

I have two Tabs in the same browser where the same application is running. The 
scope is different but the session is the same.
When I make a call to my application at Page1 in Tab1 and get the results In 
Page2, everything is fine.

The problem occurs when I make parallel calls in the two Tabs and get the 
results.
The links in the two tabs throw an Unexpected RuntimeException when I click on 
them.

Error:

Last cause: Could not find component 
'resultsContent:filter:filter_keywords:filter_box:filter_entries_list:filter_entries:17:filter_entries_link'
 on page 'class org.mycomp.client.website.MyResults

Stacktrace:

Root cause:

org.apache.wicket.request.handler.ComponentNotFoundException: Could not find 
component 
'resultsContent:filter:filter_keywords:filter_box:filter_entries_list:filter_entries:17:filter_entries_link'
 on page 'class org.mycomp.client.website.MyResults
at 
org.apache.wicket.request.handler.PageAndComponentProvider.getComponent(PageAndComponentProvider.java:181)
at 
org.apache.wicket.request.handler.ListenerInterfaceRequestHandler.getComponent(ListenerInterfaceRequestHandler.java:92)
at 
org.apache.wicket.request.handler.ListenerInterfaceRequestHandler.respond(ListenerInterfaceRequestHandler.java:239)
at 
org.apache.wicket.request.cycle.RequestCycle$HandlerExecutor.respond(RequestCycle.java:781)
at 
org.apache.wicket.request.RequestHandlerStack.execute(RequestHandlerStack.java:64)
at org.apache.wicket.request.cycle.RequestCycle.execute(RequestCycle.java:255)
at 
org.apache.wicket.request.cycle.RequestCycle.processRequest(RequestCycle.java:212)
at 
org.apache.wicket.request.cycle.RequestCycle.processRequestAndDetach(RequestCycle.java:283)
at 
org.apache.wicket.protocol.http.WicketFilter.processRequest(WicketFilter.java:162)
at org.apache.wicket.protocol.http.WicketFilter.doFilter(WicketFilter.java:218)
at 
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at 
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at 
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
at 
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
at 
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:298)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:859)
at 
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:588)
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489)
at java.lang.Thread.run(Thread.java:662)


The error just occurs, when I use the application in both tabs. The page ID of 
the pages in the two tabs is different and works fine, only the links are not 
working correctly.

Thanks,
Andre
-- 
Empfehlen Sie GMX DSL Ihren Freunden und Bekannten und wir
belohnen Sie mit bis zu 50,- Euro! https://freundschaftswerbung.gmx.de

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Re: AjaxSelfUpdatingTimerBehavior stops working for a while

2011-11-24 Thread Ramona
Hi Dan! 
It's just one behavior and Wicket Ajax window doesn't show any error log.
It first starts the behavior like this:

INFO: Response parsed. Now invoking steps...
INFO: Response processed successfully.
INFO: Invoking post-call handler(s)...
INFO: refocus last focused component not needed/allowed
INFO:
INFO: Initiating Ajax GET request on
?wicket:interface=:15:upload_component:upload:list_and_refresh:refresh-panel::IActivePageBehaviorListener:0:
-1wicket:ignoreIfNotActive=truerandom=0.2869209546584387
INFO: Invoking pre-call handler(s)...
INFO: Received ajax response (1627 characters)
INFO:
?xml version=1.0 encoding=UTF-8?ajax-responseheader-contribution
encoding=wicket1 /header-contributioncomponent id=refresh_panel4d1
/componentcomponent id=save4d4
/componentevaluate/evaluate/ajax-response

but when i upload many files it stops sending responses, like this:

INFO: Response parsed. Now invoking steps...
INFO: Response processed successfully.
INFO: Invoking post-call handler(s)...
INFO: refocus last focused component not needed/allowed
INFO:
INFO: Initiating Ajax GET request on
?wicket:interface=:15:upload_component:upload:list_and_refresh:refresh-panel::IActivePageBehaviorListener:0:
-1wicket:ignoreIfNotActive=truerandom=0.49126573698542464
INFO: Invoking pre-call handler(s).


Dan Retzlaff wrote
 
 Hi Ramona,
 
 Is this one Ajax behavior or many (8)? Does the Wicket AJAX window in your
 browser show anything interesting? In particular I would look for channel
 busy messages, indicating that some other AJAX request is pending when a
 new one is triggered.
 
 Dan
 
 On Wed, Nov 23, 2011 at 2:46 PM, Ramona lt;vicky-ramones@gt; wrote:
 
 Hi all!
 I'm using AjaxSelfUpdatingTimerBehavior for updating some progress bars
 with
 multiple file uploads (it's simulated with a Servlet), but when i try to
 upload for example 8 files the behaviour (which has been working and
 listening) stops listening for a while (the uploading continues but the
 listener isn't called , this listener is used for updating some panels
 with
 files uploading information).
 Any idea? Why could a AjaxSelfUpdatingTimerBehavior stops working for a
 while? ..beacause after for example 3 minutes it restarts (i have it as:
 refreshComponent.add(behavior= new
 AjaxSelfUpdatingTimerBehavior(Duration.milliseconds(1000)) ).

 Thanks!


 --
 View this message in context:
 http://apache-wicket.1842946.n4.nabble.com/AjaxSelfUpdatingTimerBehavior-stops-working-for-a-while-tp4101950p4101950.html
 Sent from the Users forum mailing list archive at Nabble.com.

 -
 To unsubscribe, e-mail: users-unsubscribe@.apache
 For additional commands, e-mail: users-help@.apache


 


--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/AjaxSelfUpdatingTimerBehavior-stops-working-for-a-while-tp4101950p4105312.html
Sent from the Users forum mailing list archive at Nabble.com.

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Re: AjaxSelfUpdatingTimerBehavior stops working for a while

2011-11-24 Thread Ramona
Hi! Thanks for your answer.
I tried that and set 200 as value but it still happens the same.
Any other idea?



Martin Grigorov-4 wrote
 
 Hi
 
 Try with Firefox and see at how many connections it stops working.
 The open about:config page and change the value of
 network.http.max-connections-per-server setting and try again.
 
 On Thu, Nov 24, 2011 at 12:46 AM, Ramona lt;vicky-ramones@gt; wrote:
 Hi all!
 I'm using AjaxSelfUpdatingTimerBehavior for updating some progress bars
 with
 multiple file uploads (it's simulated with a Servlet), but when i try to
 upload for example 8 files the behaviour (which has been working and
 listening) stops listening for a while (the uploading continues but the
 listener isn't called , this listener is used for updating some panels
 with
 files uploading information).
 Any idea? Why could a AjaxSelfUpdatingTimerBehavior stops working for a
 while? ..beacause after for example 3 minutes it restarts (i have it as:
 refreshComponent.add(behavior= new
 AjaxSelfUpdatingTimerBehavior(Duration.milliseconds(1000)) ).

 Thanks!


 --
 View this message in context:
 http://apache-wicket.1842946.n4.nabble.com/AjaxSelfUpdatingTimerBehavior-stops-working-for-a-while-tp4101950p4101950.html
 Sent from the Users forum mailing list archive at Nabble.com.

 -
 To unsubscribe, e-mail: users-unsubscribe@.apache
 For additional commands, e-mail: users-help@.apache


 
 
 
 -- 
 Martin Grigorov
 jWeekend
 Training, Consulting, Development
 http://jWeekend.com
 
 -
 To unsubscribe, e-mail: users-unsubscribe@.apache
 For additional commands, e-mail: users-help@.apache
 


--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/AjaxSelfUpdatingTimerBehavior-stops-working-for-a-while-tp4101950p4105320.html
Sent from the Users forum mailing list archive at Nabble.com.

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



AjaxSelfUpdatingTimerBehavior stops working for a while

2011-11-23 Thread Ramona
Hi all!
I'm using AjaxSelfUpdatingTimerBehavior for updating some progress bars with
multiple file uploads (it's simulated with a Servlet), but when i try to
upload for example 8 files the behaviour (which has been working and
listening) stops listening for a while (the uploading continues but the
listener isn't called , this listener is used for updating some panels with
files uploading information).
Any idea? Why could a AjaxSelfUpdatingTimerBehavior stops working for a
while? ..beacause after for example 3 minutes it restarts (i have it as:
refreshComponent.add(behavior= new
AjaxSelfUpdatingTimerBehavior(Duration.milliseconds(1000)) ).

Thanks!


--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/AjaxSelfUpdatingTimerBehavior-stops-working-for-a-while-tp4101950p4101950.html
Sent from the Users forum mailing list archive at Nabble.com.

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Re: AjaxSelfUpdatingTimerBehavior stops working for a while

2011-11-23 Thread Dan Retzlaff
Hi Ramona,

Is this one Ajax behavior or many (8)? Does the Wicket AJAX window in your
browser show anything interesting? In particular I would look for channel
busy messages, indicating that some other AJAX request is pending when a
new one is triggered.

Dan

On Wed, Nov 23, 2011 at 2:46 PM, Ramona vicky-ramo...@hotmail.com wrote:

 Hi all!
 I'm using AjaxSelfUpdatingTimerBehavior for updating some progress bars
 with
 multiple file uploads (it's simulated with a Servlet), but when i try to
 upload for example 8 files the behaviour (which has been working and
 listening) stops listening for a while (the uploading continues but the
 listener isn't called , this listener is used for updating some panels with
 files uploading information).
 Any idea? Why could a AjaxSelfUpdatingTimerBehavior stops working for a
 while? ..beacause after for example 3 minutes it restarts (i have it as:
 refreshComponent.add(behavior= new
 AjaxSelfUpdatingTimerBehavior(Duration.milliseconds(1000)) ).

 Thanks!


 --
 View this message in context:
 http://apache-wicket.1842946.n4.nabble.com/AjaxSelfUpdatingTimerBehavior-stops-working-for-a-while-tp4101950p4101950.html
 Sent from the Users forum mailing list archive at Nabble.com.

 -
 To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
 For additional commands, e-mail: users-h...@wicket.apache.org




Re: AjaxSelfUpdatingTimerBehavior stops working for a while

2011-11-23 Thread Martin Grigorov
Hi

Try with Firefox and see at how many connections it stops working.
The open about:config page and change the value of
network.http.max-connections-per-server setting and try again.

On Thu, Nov 24, 2011 at 12:46 AM, Ramona vicky-ramo...@hotmail.com wrote:
 Hi all!
 I'm using AjaxSelfUpdatingTimerBehavior for updating some progress bars with
 multiple file uploads (it's simulated with a Servlet), but when i try to
 upload for example 8 files the behaviour (which has been working and
 listening) stops listening for a while (the uploading continues but the
 listener isn't called , this listener is used for updating some panels with
 files uploading information).
 Any idea? Why could a AjaxSelfUpdatingTimerBehavior stops working for a
 while? ..beacause after for example 3 minutes it restarts (i have it as:
 refreshComponent.add(behavior= new
 AjaxSelfUpdatingTimerBehavior(Duration.milliseconds(1000)) ).

 Thanks!


 --
 View this message in context: 
 http://apache-wicket.1842946.n4.nabble.com/AjaxSelfUpdatingTimerBehavior-stops-working-for-a-while-tp4101950p4101950.html
 Sent from the Users forum mailing list archive at Nabble.com.

 -
 To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
 For additional commands, e-mail: users-h...@wicket.apache.org





-- 
Martin Grigorov
jWeekend
Training, Consulting, Development
http://jWeekend.com

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Re: component .... not found on page for a Link colun in the Datatable after self refresh using the AjaxSelfUpdatingTimerBehavior

2010-08-16 Thread bjolletz

Thanks, that seems to do the trick...

Fernando: Returning null does not work since the resolve method requires a
not null return value. But if the AjaxLink trick works, it seems I wont be
needing to modify the resolve method anyway...
-- 
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/component-not-found-on-page-for-a-Link-colun-in-the-Datatable-after-self-refresh-using-the-AjaxSelfUr-tp1892913p2327012.html
Sent from the Wicket - User mailing list archive at Nabble.com.

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Re: component .... not found on page for a Link colun in the Datatable after self refresh using the AjaxSelfUpdatingTimerBehavior

2010-07-20 Thread Fernando Wermus
Daniel,
It is better to return just a null. A null is translate it as ...the
page you already are

On Fri, Jul 2, 2010 at 8:39 AM, bjolletz daniel.akerl...@pagero.com wrote:


 Hi,

 My conclusion is that this is not really a wicket error, since we're
 clicking a link which no longer exists after the Ajax update.

 My solution to this has been to catch these exceptions in my
 WebRequestCycleProcessor, like this:

@Override
public IRequestTarget resolve(RequestCycle requestCycle,
 RequestParameters requestParameters) {
try {
return super.resolve(requestCycle, requestParameters);
} catch (InvalidUrlException e) {
if
 (requestCycle.getRequest().getURL().contains(ILinkListener)) {
return new
 PageRequestTarget(requestCycle.getRequest().getPage());
}
throw e;
}
}

 What happens is that if I get this exception and the request URL contains
 ILinkListener, I just return the page which the user is already at. For
 the user it will seem like nothing happens, which at least is better than
 that they get an exception.

 This is not a pretty solution, but the best I could think of. If someone
 knows of a better or more general soultion to this problem I would be happy
 to know.

 /Daniel
 --
 View this message in context:
 http://apache-wicket.1842946.n4.nabble.com/component-not-found-on-page-for-a-Link-colun-in-the-Datatable-after-self-refresh-using-the-AjaxSelfUr-tp1892913p2276328.html
 Sent from the Wicket - User mailing list archive at Nabble.com.

 -
 To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
 For additional commands, e-mail: users-h...@wicket.apache.org




-- 
Fernando Wermus.

www.linkedin.com/in/fernandowermus


Re: component .... not found on page for a Link colun in the Datatable after self refresh using the AjaxSelfUpdatingTimerBehavior

2010-07-19 Thread Fernando Wermus
Daniel,
 Help!
 I am running into the same exception. But I had a harsher situation. In
my case I have a component called box who can have many images in it. A
modal window permits adding images to boxes - your case: modal window and
refreshing back page -  which you can click and send you to another page. I
have plenty of these boxes into my app. The exception only occurs for the
new images added. As I had plenty of boxes, I cannot take your patch for my
case. It would be burdensome.

Have you found any solution to this kind of not proven bug, but repeated in
many cases?

thanks in advance


On Fri, Jul 2, 2010 at 8:39 AM, bjolletz daniel.akerl...@pagero.com wrote:


 Hi,

 My conclusion is that this is not really a wicket error, since we're
 clicking a link which no longer exists after the Ajax update.

 My solution to this has been to catch these exceptions in my
 WebRequestCycleProcessor, like this:

@Override
public IRequestTarget resolve(RequestCycle requestCycle,
 RequestParameters requestParameters) {
try {
return super.resolve(requestCycle, requestParameters);
} catch (InvalidUrlException e) {
if
 (requestCycle.getRequest().getURL().contains(ILinkListener)) {
return new
 PageRequestTarget(requestCycle.getRequest().getPage());
}
throw e;
}
}

 What happens is that if I get this exception and the request URL contains
 ILinkListener, I just return the page which the user is already at. For
 the user it will seem like nothing happens, which at least is better than
 that they get an exception.

 This is not a pretty solution, but the best I could think of. If someone
 knows of a better or more general soultion to this problem I would be happy
 to know.

 /Daniel
 --
 View this message in context:
 http://apache-wicket.1842946.n4.nabble.com/component-not-found-on-page-for-a-Link-colun-in-the-Datatable-after-self-refresh-using-the-AjaxSelfUr-tp1892913p2276328.html
 Sent from the Wicket - User mailing list archive at Nabble.com.

 -
 To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
 For additional commands, e-mail: users-h...@wicket.apache.org




-- 
Fernando Wermus.

www.linkedin.com/in/fernandowermus


Interrupting AjaxSelfUpdatingTimerBehavior

2010-07-13 Thread dbuttery

Hi all,

   This may have been asked-and-answered but here goes ...

   I'm looking for a way to interrupt a AjaxSelfUpdatingTimerBehavior. 
Specifically, there is a AjaxSelfUpdatingTimerBehavior running on a page to
auto-refresh displayed data.  There is also a button to invoke a dialog to
allow the user to change critieria that determines what data is to be
displayed.

   Presently it appears that the button's onclick handler does not get
invoked until the timer fires after its current interval has been met.

   When the button is clicked I would like the timer to be interrupted and
allow the onclick handler to do its thing immediately.

   Simple enough, eh?

Thanks,
-Dennis

   
-- 
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Interrupting-AjaxSelfUpdatingTimerBehavior-tp2287833p2287833.html
Sent from the Wicket - User mailing list archive at Nabble.com.

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Re: component .... not found on page for a Link colun in the Datatable after self refresh using the AjaxSelfUpdatingTimerBehavior

2010-07-02 Thread cristina.vlaicu

Hello,

Have you found the resolution to this problem?

Thank you!
-- 
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/component-not-found-on-page-for-a-Link-colun-in-the-Datatable-after-self-refresh-using-the-AjaxSelfUr-tp1892913p2276311.html
Sent from the Wicket - User mailing list archive at Nabble.com.

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Re: component .... not found on page for a Link colun in the Datatable after self refresh using the AjaxSelfUpdatingTimerBehavior

2010-07-02 Thread bjolletz

Hi,

My conclusion is that this is not really a wicket error, since we're
clicking a link which no longer exists after the Ajax update.

My solution to this has been to catch these exceptions in my
WebRequestCycleProcessor, like this:

@Override
public IRequestTarget resolve(RequestCycle requestCycle,
RequestParameters requestParameters) {
try {
return super.resolve(requestCycle, requestParameters);
} catch (InvalidUrlException e) {
if
(requestCycle.getRequest().getURL().contains(ILinkListener)) {
return new
PageRequestTarget(requestCycle.getRequest().getPage());
}
throw e;
}
}

What happens is that if I get this exception and the request URL contains
ILinkListener, I just return the page which the user is already at. For
the user it will seem like nothing happens, which at least is better than
that they get an exception.

This is not a pretty solution, but the best I could think of. If someone
knows of a better or more general soultion to this problem I would be happy
to know.

/Daniel
-- 
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/component-not-found-on-page-for-a-Link-colun-in-the-Datatable-after-self-refresh-using-the-AjaxSelfUr-tp1892913p2276328.html
Sent from the Wicket - User mailing list archive at Nabble.com.

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Re: component .... not found on page for a Link colun in the Datatable after self refresh using the AjaxSelfUpdatingTimerBehavior

2010-07-02 Thread vov

Try to use AjaxLink(iconLink) instead your Link(iconLink)
-- 
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/component-not-found-on-page-for-a-Link-colun-in-the-Datatable-after-self-refresh-using-the-AjaxSelfUr-tp1892913p2276332.html
Sent from the Wicket - User mailing list archive at Nabble.com.

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Re: TabbedPanel with AjaxSelfUpdatingTimerBehavior

2010-06-10 Thread Decebal Suiu

Hello Ernesto,

I resolved the problem. The AjaxSelfUpdatingTimerBehavior was added by me on
the panel returned by the ITab.getPanel() method. I put the behavior on a
child of the tab panel and it works.
Do you have an explanation why I retrieve PageExpiredException: No behavior
listener found with behaviorId in the first case (behavior on the tab
panel)?
Is it something that keeps by the role of onlyTargetActivePage() method? In
the second case, the ajax was stopped because of precondition check (ignore
if not active) but in the first case (with the error) the condition with
active page is not true.

Thanks,
Decebal
-- 
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/TabbedPanel-with-AjaxSelfUpdatingTimerBehavior-tp2243691p2250376.html
Sent from the Wicket - User mailing list archive at Nabble.com.

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Re: TabbedPanel with AjaxSelfUpdatingTimerBehavior

2010-06-10 Thread Ernesto Reinaldo Barreiro
Decebal,

I think TabbedPanel works by replacing the active panel with the
result of ITab.getPanel: see method setSelectedTab(int index). So,
when you click on a tab the previous one is removed form the component
tree (and therefore TimerAjaxCallBacks are not able to find the
component). Have you considered using JavaScript based tabs (as the
ones proc=vided by jquery)? That way your component tree will be
always consistent.

Best,

Ernesto

On Thu, Jun 10, 2010 at 3:02 PM, Decebal Suiu decebal.s...@asf.ro wrote:

 Hello Ernesto,

 I resolved the problem. The AjaxSelfUpdatingTimerBehavior was added by me on
 the panel returned by the ITab.getPanel() method. I put the behavior on a
 child of the tab panel and it works.
 Do you have an explanation why I retrieve PageExpiredException: No behavior
 listener found with behaviorId in the first case (behavior on the tab
 panel)?
 Is it something that keeps by the role of onlyTargetActivePage() method? In
 the second case, the ajax was stopped because of precondition check (ignore
 if not active) but in the first case (with the error) the condition with
 active page is not true.

 Thanks,
 Decebal
 --
 View this message in context: 
 http://apache-wicket.1842946.n4.nabble.com/TabbedPanel-with-AjaxSelfUpdatingTimerBehavior-tp2243691p2250376.html
 Sent from the Wicket - User mailing list archive at Nabble.com.

 -
 To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
 For additional commands, e-mail: users-h...@wicket.apache.org



-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Re: TabbedPanel with AjaxSelfUpdatingTimerBehavior

2010-06-08 Thread Decebal Suiu

I tried your advice and I keep the timer behavior outside the tab, in
MyTabbedPanel. In the refreshable panel  I register a listener with
MyApplication.get().addRefreshableComponent(Duration,Component). When I
select the tab with the refreshable panel all works fine but when I switch
the tab I received the same PageExpiredException: No behavior listener
found with behaviorId.
Did I do something wrong or I misunderstood you?

Below is the java code:

public class MyTabbedPanel extends AjaxTabbedPanel {

private static final long serialVersionUID = 1L;

private ListAbstractAjaxTimerBehavior ajaxTimerBehaviors;

public ImageTabbedPanel(String id, ListITab tabs) {
super(id, tabs);

ajaxTimerBehaviors = new ArrayListAbstractAjaxTimerBehavior();
}

@Override
protected WebMarkupContainer newLink(String linkId, final int index) {
List? extends ITab tabs = getTabs();

// check for usage of our custom class, if it is not our class, 
// add as image empty container - this way you can use image 
only in tabs
you want
ITab currentTab = tabs.get(index);
if (currentTab instanceof ImageTab) {
final ImageTab imageTab = (ImageTab) currentTab;
return new ImageTabLink(linkId, imageTab.getImage()) {

private static final long serialVersionUID = 1L;

@Override
public void onClick(AjaxRequestTarget target) {
removeAjaxTimerBehaviors();
clearRefreshableComponents();

setSelectedTab(index);

createAjaxTimerBehaviors();
addAjaxTimerBehaviors();
target.addComponent(MyTabbedPanel.this);
}

};
} else {
WebMarkupContainer link = super.newLink(linkId, index);
link.add(new 
WebMarkupContainer(image).setVisible(false));

return link;
}
}

private MapDuration, ListComponent getRefreshableComponents() {
return MyApplication.get().getRefreshableComponents();
}

private void clearRefreshableComponents() {
getRefreshableComponents().clear();
}

private void createAjaxTimerBehaviors() {
final MapDuration, ListComponent refreshableComponents =
getRefreshableComponents();
SetDuration durations = getRefreshableComponents().keySet();
for (final Duration duration : durations) {
AbstractAjaxTimerBehavior behavior = new
AbstractAjaxTimerBehavior(duration) {

private static final long serialVersionUID = 1L;

@Override
protected void onTimer(AjaxRequestTarget 
target) {
ListComponent components = 
refreshableComponents.get(duration);
for (Component component : components) {
target.addComponent(component);
}
}

};
ajaxTimerBehaviors.add(behavior);
}
}

private void addAjaxTimerBehaviors() {
for (IBehavior behavior : ajaxTimerBehaviors) {
add(behavior);
}
}

private void removeAjaxTimerBehaviors() {
for (AbstractAjaxTimerBehavior behavior : ajaxTimerBehaviors) {
behavior.stop();
remove(behavior);
}

ajaxTimerBehaviors.clear();
}

}

-- 
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/TabbedPanel-with-AjaxSelfUpdatingTimerBehavior-tp2243691p2247320.html
Sent from the Wicket - User mailing list archive at Nabble.com.

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Re: TabbedPanel with AjaxSelfUpdatingTimerBehavior

2010-06-08 Thread Ernesto Reinaldo Barreiro
();
        }

 }

 --
 View this message in context: 
 http://apache-wicket.1842946.n4.nabble.com/TabbedPanel-with-AjaxSelfUpdatingTimerBehavior-tp2243691p2247320.html
 Sent from the Wicket - User mailing list archive at Nabble.com.

 -
 To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
 For additional commands, e-mail: users-h...@wicket.apache.org



-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Re: TabbedPanel with AjaxSelfUpdatingTimerBehavior

2010-06-08 Thread Decebal Suiu

Hello Ernesto

I understood now. I single AbstractAjaxTimerBehavior on timerContext
component and onTimer I will iterate  through all visible components from
TabbedPanel that implements ITimerListener. One problem is that
DashboardsTab (for example) contains many auto refreshable widget panels
with various durations (panel1 at 5 seconds, panel2 at 15 seconds, etc).
What duration may I put in the single timer on timerContext? (the min
duration).
And I don't see the role of the hasChnaged() from ITimerListener in my case.
I want to do an auto refresh on some panels at some interval and in this
case hasChnaged() returns always true (or for example if I want to refresh
the component after 30 seconds and the unique timer has duration 10 seconds
I will ignore 2 calls?)

Thnaks,
decebal
-- 
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/TabbedPanel-with-AjaxSelfUpdatingTimerBehavior-tp2243691p2247422.html
Sent from the Wicket - User mailing list archive at Nabble.com.

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Re: TabbedPanel with AjaxSelfUpdatingTimerBehavior

2010-06-08 Thread Ernesto Reinaldo Barreiro
Hi Decebal,

Was just an idea you will have to adapt it to your needs... It would
be interesting to see why your original setting is not working: as I
only was guessing an explanation which might be wrong.

Best,

Ernesto

On Tue, Jun 8, 2010 at 3:57 PM, Decebal Suiu decebal.s...@asf.ro wrote:

 Hello Ernesto

 I understood now. I single AbstractAjaxTimerBehavior on timerContext
 component and onTimer I will iterate  through all visible components from
 TabbedPanel that implements ITimerListener. One problem is that
 DashboardsTab (for example) contains many auto refreshable widget panels
 with various durations (panel1 at 5 seconds, panel2 at 15 seconds, etc).
 What duration may I put in the single timer on timerContext? (the min
 duration).
 And I don't see the role of the hasChnaged() from ITimerListener in my case.
 I want to do an auto refresh on some panels at some interval and in this
 case hasChnaged() returns always true (or for example if I want to refresh
 the component after 30 seconds and the unique timer has duration 10 seconds
 I will ignore 2 calls?)

 Thnaks,
 decebal
 --
 View this message in context: 
 http://apache-wicket.1842946.n4.nabble.com/TabbedPanel-with-AjaxSelfUpdatingTimerBehavior-tp2243691p2247422.html
 Sent from the Wicket - User mailing list archive at Nabble.com.

 -
 To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
 For additional commands, e-mail: users-h...@wicket.apache.org



-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Re: TabbedPanel with AjaxSelfUpdatingTimerBehavior

2010-06-07 Thread Decebal Suiu

When I switch to other tab I received a PageExpiredException:
org.apache.wicket.protocol.http.PageExpiredException: No behavior listener
found with behaviorId 0; Component: [MarkupContainer [Component id = panel]]

Any idea how can I remove/stop the AjaxSelfUpdatingTimerBehavior? 
I created a visitor (in TabbedPanel.newLink) that visit all children
components and for each component if I found that a behavior is an instance
of AjaxSelfUpdatingTimerBehavior call stop method and remove the behavior
but the exception appears again on tab switch.
-- 
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/TabbedPanel-with-AjaxSelfUpdatingTimerBehavior-tp2243691p2245915.html
Sent from the Wicket - User mailing list archive at Nabble.com.

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Re: TabbedPanel with AjaxSelfUpdatingTimerBehavior

2010-06-07 Thread Ernesto Reinaldo Barreiro
Why not put the behavior outside the tab and just do something if
you are on the wight tab?

Ernesto

On Mon, Jun 7, 2010 at 3:07 PM, Decebal Suiu decebal.s...@asf.ro wrote:

 When I switch to other tab I received a PageExpiredException:
 org.apache.wicket.protocol.http.PageExpiredException: No behavior listener
 found with behaviorId 0; Component: [MarkupContainer [Component id = panel]]

 Any idea how can I remove/stop the AjaxSelfUpdatingTimerBehavior?
 I created a visitor (in TabbedPanel.newLink) that visit all children
 components and for each component if I found that a behavior is an instance
 of AjaxSelfUpdatingTimerBehavior call stop method and remove the behavior
 but the exception appears again on tab switch.
 --
 View this message in context: 
 http://apache-wicket.1842946.n4.nabble.com/TabbedPanel-with-AjaxSelfUpdatingTimerBehavior-tp2243691p2245915.html
 Sent from the Wicket - User mailing list archive at Nabble.com.

 -
 To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
 For additional commands, e-mail: users-h...@wicket.apache.org



-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Re: TabbedPanel with AjaxSelfUpdatingTimerBehavior

2010-06-07 Thread Ernesto Reinaldo Barreiro
I meant right tab

On Mon, Jun 7, 2010 at 3:54 PM, Ernesto Reinaldo Barreiro
reier...@gmail.com wrote:
 Why not put the behavior outside the tab and just do something if
 you are on the wight tab?

 Ernesto

 On Mon, Jun 7, 2010 at 3:07 PM, Decebal Suiu decebal.s...@asf.ro wrote:

 When I switch to other tab I received a PageExpiredException:
 org.apache.wicket.protocol.http.PageExpiredException: No behavior listener
 found with behaviorId 0; Component: [MarkupContainer [Component id = panel]]

 Any idea how can I remove/stop the AjaxSelfUpdatingTimerBehavior?
 I created a visitor (in TabbedPanel.newLink) that visit all children
 components and for each component if I found that a behavior is an instance
 of AjaxSelfUpdatingTimerBehavior call stop method and remove the behavior
 but the exception appears again on tab switch.
 --
 View this message in context: 
 http://apache-wicket.1842946.n4.nabble.com/TabbedPanel-with-AjaxSelfUpdatingTimerBehavior-tp2243691p2245915.html
 Sent from the Wicket - User mailing list archive at Nabble.com.

 -
 To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
 For additional commands, e-mail: users-h...@wicket.apache.org




-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Re: TabbedPanel with AjaxSelfUpdatingTimerBehavior

2010-06-07 Thread Decebal Suiu

Thanks, I will try. The problem with your approach is that in our application
each tab is a section that can be added using spring framework (modular
architecture). For example the dashboards tab has many widget panels, each
widget panel is auto refreshable (different time for different widget). Also
each tab supports contributors (you can add panels, fragments that can be
auto refreshable). I think that will be better to stop/remove behaviors
automatically on tab switch and not to force each contributor to do it.
What's mean for you outside the tab?
-- 
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/TabbedPanel-with-AjaxSelfUpdatingTimerBehavior-tp2243691p2246419.html
Sent from the Wicket - User mailing list archive at Nabble.com.

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Re: TabbedPanel with AjaxSelfUpdatingTimerBehavior

2010-06-07 Thread Ernesto Reinaldo Barreiro
I mean to have the timer attached to a component that is a sibling of
the tab. You could register component as listener of this behavior and
have the timer ask the components if the have changes to repaint.

I´m not sure but the problem you have might happen as follows:

1-When you switch tabs you stop the behavior at server side.
2-On client side there is a queued AJAX request (timer) asking to
refresh a component.
3-When tab is switched the component the timer is trying to address
is no longer on the path  specified by the request.

If timer is on a sibling f the tab this will not happen.

Ernesto

On Mon, Jun 7, 2010 at 9:16 PM, Decebal Suiu decebal.s...@asf.ro wrote:

 Thanks, I will try. The problem with your approach is that in our application
 each tab is a section that can be added using spring framework (modular
 architecture). For example the dashboards tab has many widget panels, each
 widget panel is auto refreshable (different time for different widget). Also
 each tab supports contributors (you can add panels, fragments that can be
 auto refreshable). I think that will be better to stop/remove behaviors
 automatically on tab switch and not to force each contributor to do it.
 What's mean for you outside the tab?
 --
 View this message in context: 
 http://apache-wicket.1842946.n4.nabble.com/TabbedPanel-with-AjaxSelfUpdatingTimerBehavior-tp2243691p2246419.html
 Sent from the Wicket - User mailing list archive at Nabble.com.

 -
 To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
 For additional commands, e-mail: users-h...@wicket.apache.org



-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



AjaxSelfUpdatingTimerBehavior refreshing Entire Page

2010-06-07 Thread Ayodeji Aladejebi
Hi,
I placed AjaxSelfUpdatingTimerBehavior on a component of an Application and
rather than refresh the component only, its refreshing the entire page.
its acting like i clicked on browser refresh button
 Pls what did I do wrong

projectPostCont.add(new AjaxSelfUpdatingTimerBehavior(Duration.seconds(5)));


Re: AjaxSelfUpdatingTimerBehavior refreshing Entire Page

2010-06-07 Thread nino martinez wael
hmm why use ajax for that? Is it something you add during the
interaction with the page or is it something that are always happing
on the page?

-Nino

2010/6/7 Ayodeji Aladejebi aladej...@gmail.com:
 Hi,
 I placed AjaxSelfUpdatingTimerBehavior on a component of an Application and
 rather than refresh the component only, its refreshing the entire page.
 its acting like i clicked on browser refresh button
  Pls what did I do wrong

 projectPostCont.add(new AjaxSelfUpdatingTimerBehavior(Duration.seconds(5)));


-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



TabbedPanel with AjaxSelfUpdatingTimerBehavior

2010-06-04 Thread Decebal Suiu
Hello

I use AjaxSelfUpdatingTimerBehavior on one tab and when switching to
another tab I want to stop it.
The AjaxSelfUpdatingTimerBehavior will be active only if this tab is
selected (start timer behavior when select the tab and stop it when
select other tab).
Any help is welcome.

Thanks,
Decebal

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Re: component .... not found on page for a Link colun in the Datatable after self refresh using the AjaxSelfUpdatingTimerBehavior

2010-05-25 Thread bjolletz

Hi,

Did you find a solution for this?

I'm using wicket 1.4.8 and get almost the same error. Like you I have a
customized column with a Link component in a datagrid. I have an ajax search
field which updates the data (and the links) in the data grid when changing
the search input. Sometimes if I click the link very quickly after I have
changed the search value,, I get the same exception as you:

org.apache.wicket.WicketRuntimeException: component
panel:searchAndShowPanel:form:dataGrid:form:bodyContainer:body:row:31:item:addLink:addRecipientLink
not found on page
se.diamo.paysol.web.pages.invoicerecipientdir.pages.pagerorecipientdirectory.invoicerecipientdirectoryforcustomerpage.admin.AdminInvoiceRecipientDirectoryForCustomerPage[id
= 27], listener interface = [RequestListenerInterface name=ILinkListener,
method=public abstract void
org.apache.wicket.markup.html.link.ILinkListener.onLinkClicked()]
at
org.apache.wicket.request.AbstractRequestCycleProcessor.resolveListenerInterfaceTarget(AbstractRequestCycleProcessor.java:426)
at
org.apache.wicket.request.AbstractRequestCycleProcessor.resolveRenderedPage(AbstractRequestCycleProcessor.java:471)
at
org.apache.wicket.protocol.http.WebRequestCycleProcessor.resolve(WebRequestCycleProcessor.java:144)


But, if I wait one or two seconds before clicking, I never get this error.

It seems like this has to do with the re-rendering of the page after the
ajax request. At the moment the link is clicked, the link listener is not
present on the server side.

The question is if this should be considered a bug in Wicket or if this is
by design.

I'm thankful for any input on this.



Apollo Apollo11 wrote:
 
 Hi all,
 
 I create a customized column with a Link component with an Icon, which it
 will popup a new page for editding after click on it, for the Wicket
 Datatable.
 
 *public* IconLinkPanel( *final* Item item, *final* String componentId, *
 final* IModel model) {*{*
 
 *final* Link link = *new* Link(iconLink) {
 
 @Override
 
 *public* *void* onClick() {
 
 PageParameters params = *new* PageParameters();
 
 params.put(object, theModel.getObject());
 
 EditorPopupPage page = *new *EditorPopupPage(params ) ;
 
 setRedirect(*true*);
 
 setResponsePage(page);
 
 };
 
 link.setPopupSettings(getPopupSettings());
 
 Image img = *new* Image(image, getImageResourceReference());
 
 *if* (getAltString() != *null*  !getAltString().trim().isEmpty()) {
 
 img.add(*new* SimpleAttributeModifier(alt, getAltString()));
 
 }
 
 *if* (getTitleString() != *null*  !getTitleString().trim().isEmpty()) {
 
 img.add(*new* SimpleAttributeModifier(title, getTitleString()));
 
 }
 
 link.add(img);
 
 add(link);
 
 }
 
 
 the Datatable itself I added AjaxSelfUpdatingTimerBehavior to refresh the
 table every 5 seconds.
 
 I've encountered a Intermittent internal server error whick when clicking
 on
 the link. the log shows
 
 Caused by: org.apache.wicket.WicketRuntimeException: component
 homePage:panel:table:rows:32:cells:14:cell:link not found on page
 com.apollo.fo.web.HomePage[id = 0], listener interface =
 [RequestListenerInterface name=ILinkListener, method=public abstract void
 org.apache.wicket.markup.html.link.ILinkListener.onLinkClicked()]
 
 at
 org.apache.wicket.request.AbstractRequestCycleProcessor.resolveListenerInterfaceTarget(AbstractRequestCycleProcessor.java:426)
 
 at
 org.apache.wicket.request.AbstractRequestCycleProcessor.resolveRenderedPage(AbstractRequestCycleProcessor.java:471)
 
 at
 org.apache.wicket.protocol.http.WebRequestCycleProcessor.resolve(WebRequestCycleProcessor.java:144)
 
 
 
 I believe this issue is related to the datatable refreshing every 5
 seconds.
 
 
 Is everyone have the same issue? If so, any solution for this?
 
 Your feedback are appreciated!
 
 

-- 
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/component-not-found-on-page-for-a-Link-colun-in-the-Datatable-after-self-refresh-using-the-AjaxSelfUr-tp1892913p2229885.html
Sent from the Wicket - User mailing list archive at Nabble.com.

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



How to construct/generate AjaxRequestTarget for a WebPage, without explicitly being fired from AjaxButton/AjaxLink/AjaxSelfUpdatingTimerBehavior

2010-03-19 Thread Martin Asenov
To me modalWindow.close(new AjaxRequestTarget(containerPage)) doesn't work...
And RequestCycle.get().getRequestTarget() returns null;

Please help...

Best,
Martin

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Re: How to construct/generate AjaxRequestTarget for a WebPage, without explicitly being fired from AjaxButton/AjaxLink/AjaxSelfUpdatingTimerBehavior

2010-03-19 Thread Martin Makundi
Yes .. don't do new AjaxTarget... use the one you are given, why not?
It is an ajax event, no?

**
Martin

2010/3/19 Martin Asenov mase...@velti.com:
 To me modalWindow.close(new AjaxRequestTarget(containerPage)) doesn't work...
 And RequestCycle.get().getRequestTarget() returns null;

 Please help...

 Best,
 Martin

 -
 To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
 For additional commands, e-mail: users-h...@wicket.apache.org



-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



RE: How to construct/generate AjaxRequestTarget for a WebPage, without explicitly being fired from AjaxButton/AjaxLink/AjaxSelfUpdatingTimerBehavior

2010-03-19 Thread Martin Asenov
No, it's something like:

new Timer().schedule(new TimerTask() {
public void run() {
modal.close(the target);
}
}, 12);

Best,
Martin


-Original Message-
From: Martin Makundi [mailto:martin.maku...@koodaripalvelut.com] 
Sent: Friday, March 19, 2010 5:23 PM
To: users@wicket.apache.org
Subject: Re: How to construct/generate AjaxRequestTarget for a WebPage, without 
explicitly being fired from AjaxButton/AjaxLink/AjaxSelfUpdatingTimerBehavior

Yes .. don't do new AjaxTarget... use the one you are given, why not?
It is an ajax event, no?

**
Martin

2010/3/19 Martin Asenov mase...@velti.com:
 To me modalWindow.close(new AjaxRequestTarget(containerPage)) doesn't work...
 And RequestCycle.get().getRequestTarget() returns null;

 Please help...

 Best,
 Martin

 -
 To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
 For additional commands, e-mail: users-h...@wicket.apache.org



-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org


-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Re: How to construct/generate AjaxRequestTarget for a WebPage, without explicitly being fired from AjaxButton/AjaxLink/AjaxSelfUpdatingTimerBehavior

2010-03-19 Thread Martijn Dashorst
So how does the server communicate the close call to the client?

Martijn

On Fri, Mar 19, 2010 at 4:29 PM, Martin Asenov mase...@velti.com wrote:
 No, it's something like:

 new Timer().schedule(new TimerTask() {
        public void run() {
                modal.close(the target);
        }
 }, 12);

 Best,
 Martin


 -Original Message-
 From: Martin Makundi [mailto:martin.maku...@koodaripalvelut.com]
 Sent: Friday, March 19, 2010 5:23 PM
 To: users@wicket.apache.org
 Subject: Re: How to construct/generate AjaxRequestTarget for a WebPage, 
 without explicitly being fired from 
 AjaxButton/AjaxLink/AjaxSelfUpdatingTimerBehavior

 Yes .. don't do new AjaxTarget... use the one you are given, why not?
 It is an ajax event, no?

 **
 Martin

 2010/3/19 Martin Asenov mase...@velti.com:
 To me modalWindow.close(new AjaxRequestTarget(containerPage)) doesn't work...
 And RequestCycle.get().getRequestTarget() returns null;

 Please help...

 Best,
 Martin

 -
 To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
 For additional commands, e-mail: users-h...@wicket.apache.org



 -
 To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
 For additional commands, e-mail: users-h...@wicket.apache.org


 -
 To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
 For additional commands, e-mail: users-h...@wicket.apache.org





-- 
Become a Wicket expert, learn from the best: http://wicketinaction.com
Apache Wicket 1.4 increases type safety for web applications
Get it now: http://www.apache.org/dyn/closer.cgi/wicket/1.4.4

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



RE: How to construct/generate AjaxRequestTarget for a WebPage, without explicitly being fired from AjaxButton/AjaxLink/AjaxSelfUpdatingTimerBehavior

2010-03-19 Thread Martin Asenov
Here's the issue: 

Modal window is displayed. The user gets idle for a while. I've registered the 
modal by its session ID.

When the user clicks on some AjaxLink/AjaxButton and I want to see if session 
is invalid, so I've overridden sessionDestroyed() in the webapp, which calls a 
method that should close the modal, just like this:

modal.close((AjaxRequestTarget) RequestCycle.get().getRequestTarget());

but it doesn't work.

Best,
Martin

-Original Message-
From: Martijn Dashorst [mailto:martijn.dasho...@gmail.com] 
Sent: Friday, March 19, 2010 5:42 PM
To: users@wicket.apache.org
Subject: Re: How to construct/generate AjaxRequestTarget for a WebPage, without 
explicitly being fired from AjaxButton/AjaxLink/AjaxSelfUpdatingTimerBehavior

So how does the server communicate the close call to the client?

Martijn

On Fri, Mar 19, 2010 at 4:29 PM, Martin Asenov mase...@velti.com wrote:
 No, it's something like:

 new Timer().schedule(new TimerTask() {
        public void run() {
                modal.close(the target);
        }
 }, 12);

 Best,
 Martin


 -Original Message-
 From: Martin Makundi [mailto:martin.maku...@koodaripalvelut.com]
 Sent: Friday, March 19, 2010 5:23 PM
 To: users@wicket.apache.org
 Subject: Re: How to construct/generate AjaxRequestTarget for a WebPage, 
 without explicitly being fired from 
 AjaxButton/AjaxLink/AjaxSelfUpdatingTimerBehavior

 Yes .. don't do new AjaxTarget... use the one you are given, why not?
 It is an ajax event, no?

 **
 Martin

 2010/3/19 Martin Asenov mase...@velti.com:
 To me modalWindow.close(new AjaxRequestTarget(containerPage)) doesn't work...
 And RequestCycle.get().getRequestTarget() returns null;

 Please help...

 Best,
 Martin

 -
 To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
 For additional commands, e-mail: users-h...@wicket.apache.org



 -
 To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
 For additional commands, e-mail: users-h...@wicket.apache.org


 -
 To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
 For additional commands, e-mail: users-h...@wicket.apache.org





-- 
Become a Wicket expert, learn from the best: http://wicketinaction.com
Apache Wicket 1.4 increases type safety for web applications
Get it now: http://www.apache.org/dyn/closer.cgi/wicket/1.4.4

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org


-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



component .... not found on page for a Link colun in the Datatable after self refresh using the AjaxSelfUpdatingTimerBehavior

2010-03-08 Thread Apollo Apollo11
Hi all,

I create a customized column with a Link component with an Icon, which it
will popup a new page for editding after click on it, for the Wicket
Datatable.

*public* IconLinkPanel( *final* Item item, *final* String componentId, *
final* IModel model) {*{*

*final* Link link = *new* Link(iconLink) {

@Override

*public* *void* onClick() {

PageParameters params = *new* PageParameters();

params.put(object, theModel.getObject());

EditorPopupPage page = *new *EditorPopupPage(params ) ;

setRedirect(*true*);

setResponsePage(page);

};

link.setPopupSettings(getPopupSettings());

Image img = *new* Image(image, getImageResourceReference());

*if* (getAltString() != *null*  !getAltString().trim().isEmpty()) {

img.add(*new* SimpleAttributeModifier(alt, getAltString()));

}

*if* (getTitleString() != *null*  !getTitleString().trim().isEmpty()) {

img.add(*new* SimpleAttributeModifier(title, getTitleString()));

}

link.add(img);

add(link);

}


the Datatable itself I added AjaxSelfUpdatingTimerBehavior to refresh the
table every 5 seconds.

I've encountered a Intermittent internal server error whick when clicking on
the link. the log shows

Caused by: org.apache.wicket.WicketRuntimeException: component
homePage:panel:table:rows:32:cells:14:cell:link not found on page
com.apollo.fo.web.HomePage[id = 0], listener interface =
[RequestListenerInterface name=ILinkListener, method=public abstract void
org.apache.wicket.markup.html.link.ILinkListener.onLinkClicked()]

at
org.apache.wicket.request.AbstractRequestCycleProcessor.resolveListenerInterfaceTarget(AbstractRequestCycleProcessor.java:426)

at
org.apache.wicket.request.AbstractRequestCycleProcessor.resolveRenderedPage(AbstractRequestCycleProcessor.java:471)

at
org.apache.wicket.protocol.http.WebRequestCycleProcessor.resolve(WebRequestCycleProcessor.java:144)



I believe this issue is related to the datatable refreshing every 5 seconds.


Is everyone have the same issue? If so, any solution for this?

Your feedback are appreciated!


AjaxSelfUpdatingTimerBehavior

2010-01-26 Thread Sam Barrow
Is there any way to make the AjaxSelfUpdatingTimerBehavior execute X
number of times and then stop until a page refresh/reload?



-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Re: AjaxSelfUpdatingTimerBehavior

2010-01-26 Thread Pedro Santos
You can override getPreconditionScript method to test an counter value on
document object. When you refresh the page, you got a new document.

On Tue, Jan 26, 2010 at 10:05 AM, Sam Barrow s...@sambarrow.com wrote:

 Is there any way to make the AjaxSelfUpdatingTimerBehavior execute X
 number of times and then stop until a page refresh/reload?



 -
 To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
 For additional commands, e-mail: users-h...@wicket.apache.org




-- 
Pedro Henrique Oliveira dos Santos


Re: AjaxSelfUpdatingTimerBehavior and session timeout

2010-01-25 Thread Chuck Brinkman
1)  So, if I didn't access the session in my ajax callback then the page
would eventually expire.  Another way to say this is if I simply had the
original Clock implementation on this page then the session would expire?

2)  Is there an easy way of implement this countdown to expire?

On Mon, Jan 25, 2010 at 1:14 AM, Igor Vaynberg igor.vaynb...@gmail.comwrote:

 your behavior is always touching the session, so it will never
 timeout. using this behavior is actually a solution to preventing the
 session from ever timing out :)

 -igor

 On Sun, Jan 24, 2010 at 9:10 PM, Chuck Brinkman chasb1...@gmail.com
 wrote:
  I thought it would be fun to add a 'time to session expiration' display
 to
  my pages. So I attempted this using the AjaxSelfUpdatingTimerBehavior. I
  just took the Clock example and hacked it as follows
 
 
   hsession = request.getHttpServletRequest().getSession();
 
  lastAccessTime = hsession.getLastAccessedTime();
 
  thisTime = *new* java.util.Date().getTime();
 
  elapsedTime = thisTime - lastAccessTime;
 
 
   The problem is that elapsedTime is always the duration specified when I
  create the clock instance. So, my question is, if I have a page that uses
  AjaxSelfUpdatingTimerBehavior and the user is displaying that page then
 his
  session will never expire? Or am I missing something?
 

 -
 To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
 For additional commands, e-mail: users-h...@wicket.apache.org




Re: AjaxSelfUpdatingTimerBehavior and session timeout

2010-01-25 Thread James Carman
On Mon, Jan 25, 2010 at 4:37 AM, Chuck Brinkman chasb1...@gmail.com wrote:
 1)  So, if I didn't access the session in my ajax callback then the page
 would eventually expire.  Another way to say this is if I simply had the
 original Clock implementation on this page then the session would expire?


No, the ajax self updating behavior has to touch the session because
it has to know how to get back to itself to do its work.

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Re: AjaxSelfUpdatingTimerBehavior and session timeout

2010-01-25 Thread Chuck Brinkman
James,

Thanks for the information.  I wonder if those using
AjaxSelfUpdatingTimerBehavior realize that this prevents session timeout?

Chuck

On Mon, Jan 25, 2010 at 7:09 AM, James Carman
jcar...@carmanconsulting.comwrote:

 On Mon, Jan 25, 2010 at 4:37 AM, Chuck Brinkman chasb1...@gmail.com
 wrote:
  1)  So, if I didn't access the session in my ajax callback then the page
  would eventually expire.  Another way to say this is if I simply had the
  original Clock implementation on this page then the session would expire?
 

 No, the ajax self updating behavior has to touch the session because
 it has to know how to get back to itself to do its work.

 -
 To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
 For additional commands, e-mail: users-h...@wicket.apache.org




Re: AjaxSelfUpdatingTimerBehavior and session timeout

2010-01-25 Thread Martin Grigorov
On Mon, 2010-01-25 at 07:09 -0500, James Carman wrote:
 On Mon, Jan 25, 2010 at 4:37 AM, Chuck Brinkman chasb1...@gmail.com wrote:
  1)  So, if I didn't access the session in my ajax callback then the page
  would eventually expire.  Another way to say this is if I simply had the
  original Clock implementation on this page then the session would expire?
You may use plain JavaScript to show such a counter. Just pass the value
to the client side and then start counting down.

I don't know of a Servlet API to read the value of session-timeout
element so you may need to hardcode it in your code...
 
 
 No, the ajax self updating behavior has to touch the session because
 it has to know how to get back to itself to do its work.
 
 -
 To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
 For additional commands, e-mail: users-h...@wicket.apache.org
 
 



-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



AjaxSelfUpdatingTimerBehavior and session timeout

2010-01-24 Thread Chuck Brinkman
I thought it would be fun to add a 'time to session expiration' display to
my pages. So I attempted this using the AjaxSelfUpdatingTimerBehavior. I
just took the Clock example and hacked it as follows


 hsession = request.getHttpServletRequest().getSession();

lastAccessTime = hsession.getLastAccessedTime();

thisTime = *new* java.util.Date().getTime();

elapsedTime = thisTime - lastAccessTime;


 The problem is that elapsedTime is always the duration specified when I
create the clock instance. So, my question is, if I have a page that uses
AjaxSelfUpdatingTimerBehavior and the user is displaying that page then his
session will never expire? Or am I missing something?


Re: AjaxSelfUpdatingTimerBehavior and session timeout

2010-01-24 Thread Igor Vaynberg
your behavior is always touching the session, so it will never
timeout. using this behavior is actually a solution to preventing the
session from ever timing out :)

-igor

On Sun, Jan 24, 2010 at 9:10 PM, Chuck Brinkman chasb1...@gmail.com wrote:
 I thought it would be fun to add a 'time to session expiration' display to
 my pages. So I attempted this using the AjaxSelfUpdatingTimerBehavior. I
 just took the Clock example and hacked it as follows


  hsession = request.getHttpServletRequest().getSession();

 lastAccessTime = hsession.getLastAccessedTime();

 thisTime = *new* java.util.Date().getTime();

 elapsedTime = thisTime - lastAccessTime;


  The problem is that elapsedTime is always the duration specified when I
 create the clock instance. So, my question is, if I have a page that uses
 AjaxSelfUpdatingTimerBehavior and the user is displaying that page then his
 session will never expire? Or am I missing something?


-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



How can I correctly add (by Ajax) and remove (by Ajax) an AjaxSelfUpdatingTimerBehavior?

2009-11-02 Thread Ambrose Wheatcroft
Hello,

Is it possible to correctly add and then remove an
AjaxSelfUpdatingTimerBehavior from a component, all by Ajax?  At the
moment I'm running into problems - the browser gets a Page Expired
response soon after I remove the behavior.  I think I have an idea why
it doesn't work in its current form - is there any way to get
something similar working?

Thanks,
Ambrose

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Re: How can I correctly add (by Ajax) and remove (by Ajax) an AjaxSelfUpdatingTimerBehavior?

2009-11-02 Thread Ernesto Reinaldo Barreiro
Remember having the same problem with panel and I have dome something like

for(Object behavior : getBehaviors()) {
if(behavior instanceof AjaxSelfUpdatingTimerBehavior) {
remove((AjaxSelfUpdatingTimerBehavior)behavior);
}
}
add(new AjaxSelfUpdatingTimerBehavior(Duration.seconds(1000)));
So, that refresh is delayed a lot... but now that I look to it again I see
there is an stop() method on AbstractAjaxTimerBehavior.

Regards,

Ernesto

On Mon, Nov 2, 2009 at 12:20 PM, Ambrose Wheatcroft 
ambrosewheatcr...@gmail.com wrote:

 Hello,

 Is it possible to correctly add and then remove an
 AjaxSelfUpdatingTimerBehavior from a component, all by Ajax?  At the
 moment I'm running into problems - the browser gets a Page Expired
 response soon after I remove the behavior.  I think I have an idea why
 it doesn't work in its current form - is there any way to get
 something similar working?

 Thanks,
 Ambrose

 -
 To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
 For additional commands, e-mail: users-h...@wicket.apache.org




Re: How can I correctly add (by Ajax) and remove (by Ajax) an AjaxSelfUpdatingTimerBehavior?

2009-11-02 Thread Ambrose Wheatcroft
Okay,

So I got it working.  As you suggest - stop() works.  I then also
store the behavior so that it can be removed permanently on a later
Ajax trip.  That way I can keep adding and removing timers with
different intervals.

Thanks!

2009/11/2 Ernesto Reinaldo Barreiro reier...@gmail.com:
 Remember having the same problem with panel and I have dome something like

 for(Object behavior : getBehaviors()) {
 if(behavior instanceof AjaxSelfUpdatingTimerBehavior) {
 remove((AjaxSelfUpdatingTimerBehavior)behavior);
 }
 }
 add(new AjaxSelfUpdatingTimerBehavior(Duration.seconds(1000)));
 So, that refresh is delayed a lot... but now that I look to it again I see
 there is an stop() method on AbstractAjaxTimerBehavior.

 Regards,

 Ernesto

 On Mon, Nov 2, 2009 at 12:20 PM, Ambrose Wheatcroft 
 ambrosewheatcr...@gmail.com wrote:

 Hello,

 Is it possible to correctly add and then remove an
 AjaxSelfUpdatingTimerBehavior from a component, all by Ajax?  At the
 moment I'm running into problems - the browser gets a Page Expired
 response soon after I remove the behavior.  I think I have an idea why
 it doesn't work in its current form - is there any way to get
 something similar working?

 Thanks,
 Ambrose

 -
 To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
 For additional commands, e-mail: users-h...@wicket.apache.org




-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Opera. AjaxSelfUpdatingTimerBehavior inside iframe not rendering

2009-10-30 Thread Anton Veretennikov
Hi,

Anyone encountered that AjaxSelfUpdatingTimerBehavior doesn't update
markup when site is inside iframe on Opera browser?
When outside iframe there is no problem.
And it is floating - some markup is updated fine and when it is more
complex, page become frozen.

Opera versions tested: 9.64, 10.01

-- Tony.

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Re: AjaxSelfUpdatingTimerBehavior and ModalWindow

2009-07-21 Thread satar

I know this is an old post but it hits an issue I currently have. I want to
provide the user the ability to turn on/off auto refresh of data from the
database. If all possible, I would like to use the original
AjaxSelfUpdatingTimerBehavior or at least the AbstractAjaxTimerBehavior but
it has the stopped boolean as a private with no way to set it back to true
and the methods that use it use it directly instead of calling a method that
I can override -- am I missing something? 

The man reason I want to do this is for performance trade-offs. I see that
if I set the timer off by calling the stop() method, the interface is much
snappier. It looks like another potential idea may be to override the method
renderHead, but I cannot override the respond method, which uses the stopped
boolean.

Is there a better way to handle such a problem -- I am using Wicket 1.4-r2.
-- 
View this message in context: 
http://www.nabble.com/AjaxSelfUpdatingTimerBehavior-and-ModalWindow-tp22202102p24593467.html
Sent from the Wicket - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Re: AjaxSelfUpdatingTimerBehavior and ModalWindow

2009-07-21 Thread Martin Makundi
Well.. you could just replace it with a new one..

**
Martin

2009/7/21 satar starl...@gmail.com:

 I know this is an old post but it hits an issue I currently have. I want to
 provide the user the ability to turn on/off auto refresh of data from the
 database. If all possible, I would like to use the original
 AjaxSelfUpdatingTimerBehavior or at least the AbstractAjaxTimerBehavior but
 it has the stopped boolean as a private with no way to set it back to true
 and the methods that use it use it directly instead of calling a method that
 I can override -- am I missing something?

 The man reason I want to do this is for performance trade-offs. I see that
 if I set the timer off by calling the stop() method, the interface is much
 snappier. It looks like another potential idea may be to override the method
 renderHead, but I cannot override the respond method, which uses the stopped
 boolean.

 Is there a better way to handle such a problem -- I am using Wicket 1.4-r2.
 --
 View this message in context: 
 http://www.nabble.com/AjaxSelfUpdatingTimerBehavior-and-ModalWindow-tp22202102p24593467.html
 Sent from the Wicket - User mailing list archive at Nabble.com.


 -
 To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
 For additional commands, e-mail: users-h...@wicket.apache.org



-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Re: AjaxSelfUpdatingTimerBehavior and ModalWindow

2009-07-21 Thread dtoffe

There is an enhancement request in Wicket JIRA for this issue, but it is
set to 1.5 release...

  http://issues.apache.org/jira/browse/WICKET-1525

In the meantime, the class I created merging
AjaxSelfUpdatingTimerBehavior and  AbstractAjaxTimerBehavior is working
fine, although I agree that when the page refreshes on a timer it seems
somewhat sluggish.

hth,

Daniel


satar wrote:
 
 I know this is an old post but it hits an issue I currently have. I want
 to provide the user the ability to turn on/off auto refresh of data from
 the database. If all possible, I would like to use the original
 AjaxSelfUpdatingTimerBehavior or at least the AbstractAjaxTimerBehavior
 but it has the stopped boolean as a private with no way to set it back to
 true and the methods that use it use it directly instead of calling a
 method that I can override -- am I missing something? 
 
 The man reason I want to do this is for performance trade-offs. I see that
 if I set the timer off by calling the stop() method, the interface is much
 snappier. It looks like another potential idea may be to override the
 method renderHead, but I cannot override the respond method, which uses
 the stopped boolean.
 
 Is there a better way to handle such a problem -- I am using Wicket
 1.4-r2.
 

-- 
View this message in context: 
http://www.nabble.com/AjaxSelfUpdatingTimerBehavior-and-ModalWindow-tp22202102p24595575.html
Sent from the Wicket - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Update separate current select panel from AjaxSelfUpdatingTimerBehavior of inmethod DataGrid

2009-07-16 Thread Steve Tarlton
Stumbling on this one: I am using an AjaxSelfUpdatingTimerBehavior added to
an inmethod DataGrid to have it update its datasource from a database every
15 seconds. This worked well but then I also want to update a corresponding
panel that contains data from the currently selected row of the DataGrid. I
feed to the DataGrid a data source that implements IDataSource so I can
provide my own sortIterator and have my data source pull from the database
automatically itself. Thing is, I want to update an external panel that
contains the currently selected row (I have it set to single select) if the
contents in the database changes. I figured one way to do that is to create
a getObject() method in my data source so that I can override it and get
each item being iterated over whenever the data source is refreshing and
compare it with the id of the one currently selected. This worked fine but
now I am not sure how to tell the panel to refresh itself from an Override
of the getObject() method of the extended IDataSource. Any suggestions?
Maybe I should be going about it differently and Overriding something within
the DataGrid and walking the data source from it? I know if I could do that,
the use of the AjaxRequestTarget.get() method works.

Thanks ahead of time for any help/hints on this one,
-Steve


Re: Update separate current select panel from AjaxSelfUpdatingTimerBehavior of inmethod DataGrid

2009-07-16 Thread satar

Sorry, I should have explored deeper into the user list on this one. It was
basically already answered before in thread:
http://www.nabble.com/AjaxSelfUpdatingTimerBehavior-and-Panels-td24301204.html#a24301204

I simply changed the scope of my timer to be the whole page beings that is
all it has on it and this worked perfectly! Man I LOVE Wicket... I can do
very powerful things already and I am basically a newbie!
-- 
View this message in context: 
http://www.nabble.com/Update-separate-current-select-panel-from-AjaxSelfUpdatingTimerBehavior--of-inmethod-DataGrid-tp24526412p24526740.html
Sent from the Wicket - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Re: AjaxSelfUpdatingTimerBehavior and Panels

2009-07-08 Thread Mauro Ciancio
On Thu, Jul 2, 2009 at 2:43 AM, Igor Vaynberg igor.vaynb...@gmail.comwrote:

 you can attach the behavior to a container around the panels, just a
 simple webmarkupcontainer should do.


Thanks for the reply Igor. I could not test it yet.
I'll test it and then write I'll write what happened.

Cheers!
-- 
Mauro Ciancio


Re: AjaxSelfUpdatingTimerBehavior and Panels

2009-07-08 Thread Mauro Ciancio
On Wed, Jul 8, 2009 at 1:29 PM, Mauro Ciancio maurocian...@gmail.comwrote:

 Thanks for the reply Igor. I could not test it yet.
 I'll test it and then write I'll write what happened.


It works pretty cool. Thanks for the advice!
-- 
Mauro Ciancio


AjaxSelfUpdatingTimerBehavior and Panels

2009-07-01 Thread Mauro Ciancio
Hi everyone,
  I'm having an issue with the AjaxSelfUpdatingTimerBehavior and panels
in my page. The thing is I have a panel that is switched via ajax. All the
others parts of my page remains without change.
  In a specific panel (one of those being changed) I added an
AjaxSelfUpdatingTimerBehavior. It works fine, but when i replace the panel
with a new instance of the panel a new timer its appended to the page.
So, after that I have two timers refreshing my page.
  If the panel is replaced another time, a third timer come up.
  But, if the original panel is replaced with other panel, this exception is
thrown:

Root cause:

java.lang.NullPointerException
at
org.apache.wicket.request.target.component.listener.BehaviorRequestTarget.processEvents(BehaviorRequestTarget.java:96)
at
org.apache.wicket.request.AbstractRequestCycleProcessor.processEvents(AbstractRequestCycleProcessor.java:92)
at
org.apache.wicket.RequestCycle.processEventsAndRespond(RequestCycle.java:1240)
at org.apache.wicket.RequestCycle.step(RequestCycle.java:1319)
at org.apache.wicket.RequestCycle.steps(RequestCycle.java:1418)
at org.apache.wicket.RequestCycle.request(RequestCycle.java:544)
at org.apache.wicket.protocol.http.WicketFilter.doGet(WicketFilter.java:456)
at
org.apache.wicket.protocol.http.WicketFilter.doFilter(WicketFilter.java:289)
at
org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1089)
at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:365)
at
org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:216)
at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:181)
at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:712)
at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:405)
at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:139)
at org.mortbay.jetty.Server.handle(Server.java:295)
at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:503)
at
org.mortbay.jetty.HttpConnection$RequestHandler.headerComplete(HttpConnection.java:827)
at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:511)
at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:210)
at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:379)
at
org.mortbay.jetty.bio.SocketConnector$Connection.run(SocketConnector.java:226)
at
org.mortbay.thread.BoundedThreadPool$PoolThread.run(BoundedThreadPool.java:442)
Any idea to fix this issue?
How should I do to make the panel changeable without having this issue?

Thanks in advance,
Cheers!
-- 
Mauro Ciancio


Re: AjaxSelfUpdatingTimerBehavior and Panels

2009-07-01 Thread Igor Vaynberg
you can attach the behavior to a container around the panels, just a
simple webmarkupcontainer should do.

-igor

On Wed, Jul 1, 2009 at 10:06 PM, Mauro Cianciomaurocian...@gmail.com wrote:
 Hi everyone,
  I'm having an issue with the AjaxSelfUpdatingTimerBehavior and panels
 in my page. The thing is I have a panel that is switched via ajax. All the
 others parts of my page remains without change.
  In a specific panel (one of those being changed) I added an
 AjaxSelfUpdatingTimerBehavior. It works fine, but when i replace the panel
 with a new instance of the panel a new timer its appended to the page.
 So, after that I have two timers refreshing my page.
  If the panel is replaced another time, a third timer come up.
  But, if the original panel is replaced with other panel, this exception is
 thrown:

 Root cause:

 java.lang.NullPointerException
 at
 org.apache.wicket.request.target.component.listener.BehaviorRequestTarget.processEvents(BehaviorRequestTarget.java:96)
 at
 org.apache.wicket.request.AbstractRequestCycleProcessor.processEvents(AbstractRequestCycleProcessor.java:92)
 at
 org.apache.wicket.RequestCycle.processEventsAndRespond(RequestCycle.java:1240)
 at org.apache.wicket.RequestCycle.step(RequestCycle.java:1319)
 at org.apache.wicket.RequestCycle.steps(RequestCycle.java:1418)
 at org.apache.wicket.RequestCycle.request(RequestCycle.java:544)
 at org.apache.wicket.protocol.http.WicketFilter.doGet(WicketFilter.java:456)
 at
 org.apache.wicket.protocol.http.WicketFilter.doFilter(WicketFilter.java:289)
 at
 org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1089)
 at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:365)
 at
 org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:216)
 at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:181)
 at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:712)
 at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:405)
 at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:139)
 at org.mortbay.jetty.Server.handle(Server.java:295)
 at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:503)
 at
 org.mortbay.jetty.HttpConnection$RequestHandler.headerComplete(HttpConnection.java:827)
 at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:511)
 at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:210)
 at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:379)
 at
 org.mortbay.jetty.bio.SocketConnector$Connection.run(SocketConnector.java:226)
 at
 org.mortbay.thread.BoundedThreadPool$PoolThread.run(BoundedThreadPool.java:442)
 Any idea to fix this issue?
 How should I do to make the panel changeable without having this issue?

 Thanks in advance,
 Cheers!
 --
 Mauro Ciancio


-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



AjaxSelfUpdatingTimerBehavior: Leaving page not possible

2009-06-29 Thread Tokalak Ahmet
Hi Wicketians,

i have a problem with AjaxSelfUpdatingTimerBehavior.

I have added an AjaxSelfUpdatingTimerBehavior to a page, because of a 
background-thread running very long and the 
page checks (an AjaxSelfUpdatingTimerBehavior with 10 sec interval added at 
thread start to page) for the termination of the thread and showing the results 
of thread.

It is in theory possible to leave the page while the background thread is 
running and come back to it at a later time.
But in practice it isn't possible to leave it, the behavior reloads the page 
again and again until the thread ends and the behavior is removed from the 
page. 

Any idea how to solve this problem?
Thank you in advance.



  

Re: AjaxSelfUpdatingTimerBehavior: Leaving page not possible

2009-06-29 Thread Martin Funk


Am 29.06.2009 um 10:22 schrieb Tokalak Ahmet:


Hi Wicketians,

i have a problem with AjaxSelfUpdatingTimerBehavior.

I have added an AjaxSelfUpdatingTimerBehavior to a page, because of  
a background-thread running very long and the
page checks (an AjaxSelfUpdatingTimerBehavior with 10 sec interval  
added at thread start to page) for the termination of the thread and  
showing the results of thread.


It is in theory possible to leave the page while the background  
thread is running and come back to it at a later time.
But in practice it isn't possible to leave it, the behavior reloads  
the page again and again until the thread ends and the behavior is  
removed from the page.

In theory, practice is always easy :-)

Though I don't quite understand your problem.
The ASUTB generates some JavaScript that instructs the Browser to fire  
an AjaxRequest right back to that Behavior on the Server.
If the user leaves the page (on the browser) this JavaScript is  
disabled, no more calls to the browser.
If the user comes back to that page, even if it is loaded from the  
browser cache, those Ajax-calls start again.

Look at the clock example of the ajax examples in the wicket examples.
Also the AjaxRequest doesn't reload the whole page, it just reloads  
the components that are added to the target in the overridden  
'onTimer' method.


To stop the Timer a removal is not needed, a call to its 'stop()'  
method does the same trick.


Hopefully this helps, if not, come back,

mf


Any idea how to solve this problem?
Thank you in advance.






-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



AW: AjaxSelfUpdatingTimerBehavior: Leaving page not possible

2009-06-29 Thread Tokalak Ahmet
Thank you Martin for your quick answer.

I think the problem is caused by the background-thread. 
I do start the thread with a low priority and as daemon but the application 
seems still waiting for the termination of the started thread.
Very strange






Von: Martin Funk mafulaf...@googlemail.com
An: users@wicket.apache.org
Gesendet: Montag, den 29. Juni 2009, 11:10:51 Uhr
Betreff: Re: AjaxSelfUpdatingTimerBehavior: Leaving page not possible


Am 29.06.2009 um 10:22 schrieb Tokalak Ahmet:

 Hi Wicketians,
 
 i have a problem with AjaxSelfUpdatingTimerBehavior.
 
 I have added an AjaxSelfUpdatingTimerBehavior to a page, because of a 
 background-thread running very long and the
 page checks (an AjaxSelfUpdatingTimerBehavior with 10 sec interval added at 
 thread start to page) for the termination of the thread and showing the 
 results of thread.
 
 It is in theory possible to leave the page while the background thread is 
 running and come back to it at a later time.
 But in practice it isn't possible to leave it, the behavior reloads the page 
 again and again until the thread ends and the behavior is removed from the 
 page.
In theory, practice is always easy :-)

Though I don't quite understand your problem.
The ASUTB generates some JavaScript that instructs the Browser to fire an 
AjaxRequest right back to that Behavior on the Server.
If the user leaves the page (on the browser) this JavaScript is disabled, no 
more calls to the browser.
If the user comes back to that page, even if it is loaded from the browser 
cache, those Ajax-calls start again.
Look at the clock example of the ajax examples in the wicket examples.
Also the AjaxRequest doesn't reload the whole page, it just reloads the 
components that are added to the target in the overridden 'onTimer' method.

To stop the Timer a removal is not needed, a call to its 'stop()' method does 
the same trick.

Hopefully this helps, if not, come back,

mf
 
 Any idea how to solve this problem?
 Thank you in advance.
 
 
 


-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org


  

[BUG ? ] Disabling AjaxSelfUpdatingTimerBehavior

2009-05-28 Thread Objelean Alex
I am trying to disable AjaxSelfUpdatingTimerBehavior which I have
added to  some component  disable it when something happens. I found
that no matter what the isEnabled method of the behaviour returns, the
behaviour remains enabled. Is this a bug or I am doing something
wrong?

Alex Objelean

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Re: AjaxFallbackDefaultDataTable and AjaxSelfUpdatingTimerBehavior

2009-03-28 Thread Murat Yücel
Hi Guys

Does anyone have a clue how to solve my problem below?
The code can be found here:
https://ninan.svn.sourceforge.net/svnroot/ninan/branches/v2.0.0

The logic is in this class:
https://ninan.svn.sourceforge.net/svnroot/ninan/branches/v2.0.0/ninan-frontend/src/main/java/dk/team/ninan/frontend/wicket/overview/OverviewPanel.java

/Murat

2009/3/27 Murat Yücel kodeperke...@gmail.com

 Hi All

 I have a question regarding how to add AjaxSelfUpdatingTimerBehaviors to
 some of the cells in a datatable.
 What is the best practice and should i use something else?

 Today i have a list of items which is retrieved from the database each time
 there is a request. The refresh
 rate can be set by the user in a setting page. I have made a quick solution
 where i was adding an
 AjaxSelfUpdatingTimerBehavior to the whole table. It is working perfectly
 fine for high refresh rates, but
 if the user sets the refresh rate to 1 second then the refresh gives
 problem.

 The AjaxFallbackDefaultDataTable includes checkboxes and is inside a form.
 I am now trying to change
 the logic so only the relevant cells are updated. The problem is that i
 cannot figure out how to do it. Because
 the model for each item will be called but the dataprovider is not called
 to retrieve the newest data from the
 database.

 Hope that someone can help or suggest a better solution.

 The project is open source so if you need to see code you just say the word
 :)

 Kind regards

 /Murat



Re: AjaxFallbackDefaultDataTable and AjaxSelfUpdatingTimerBehavior

2009-03-28 Thread Igor Vaynberg
your problem is most likely that you are not using proper models.

in your idataprovider.model you should return a model that can load
the data from the database on its own. you are most likely just doing
return new model(object); which simply holds on to that object
forever, what you should do is return new entitymodel(object) that can
reload a fresh one.

-igor

2009/3/27 Murat Yücel kodeperke...@gmail.com:
 Hi All

 I have a question regarding how to add AjaxSelfUpdatingTimerBehaviors to
 some of the cells in a datatable.
 What is the best practice and should i use something else?

 Today i have a list of items which is retrieved from the database each time
 there is a request. The refresh
 rate can be set by the user in a setting page. I have made a quick solution
 where i was adding an
 AjaxSelfUpdatingTimerBehavior to the whole table. It is working perfectly
 fine for high refresh rates, but
 if the user sets the refresh rate to 1 second then the refresh gives
 problem.

 The AjaxFallbackDefaultDataTable includes checkboxes and is inside a form. I
 am now trying to change
 the logic so only the relevant cells are updated. The problem is that i
 cannot figure out how to do it. Because
 the model for each item will be called but the dataprovider is not called to
 retrieve the newest data from the
 database.

 Hope that someone can help or suggest a better solution.

 The project is open source so if you need to see code you just say the word
 :)

 Kind regards

 /Murat


-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Re: AjaxFallbackDefaultDataTable and AjaxSelfUpdatingTimerBehavior

2009-03-28 Thread Murat Yücel
Hi Igor

I am extending the SortableDataProvider and the model method is returning a
new CompountPropertyModel which includes my own entity model. The entity
model is a loadabledetacheabble model which only keeps the id. on load the
data will be retrieved from the database.

https://ninan.svn.sourceforge.net/svnroot/ninan/branches/v2.0.0/ninan-frontend/src/main/java/dk/team/ninan/frontend/wicket/overview/OverviewDataProvider.java

/Murat

2009/3/28 Igor Vaynberg igor.vaynb...@gmail.com

 your problem is most likely that you are not using proper models.

 in your idataprovider.model you should return a model that can load
 the data from the database on its own. you are most likely just doing
 return new model(object); which simply holds on to that object
 forever, what you should do is return new entitymodel(object) that can
 reload a fresh one.

 -igor

 2009/3/27 Murat Yücel kodeperke...@gmail.com:
  Hi All
 
  I have a question regarding how to add AjaxSelfUpdatingTimerBehaviors to
  some of the cells in a datatable.
  What is the best practice and should i use something else?
 
  Today i have a list of items which is retrieved from the database each
 time
  there is a request. The refresh
  rate can be set by the user in a setting page. I have made a quick
 solution
  where i was adding an
  AjaxSelfUpdatingTimerBehavior to the whole table. It is working perfectly
  fine for high refresh rates, but
  if the user sets the refresh rate to 1 second then the refresh gives
  problem.
 
  The AjaxFallbackDefaultDataTable includes checkboxes and is inside a
 form. I
  am now trying to change
  the logic so only the relevant cells are updated. The problem is that i
  cannot figure out how to do it. Because
  the model for each item will be called but the dataprovider is not called
 to
  retrieve the newest data from the
  database.
 
  Hope that someone can help or suggest a better solution.
 
  The project is open source so if you need to see code you just say the
 word
  :)
 
  Kind regards
 
  /Murat
 

 -
 To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
 For additional commands, e-mail: users-h...@wicket.apache.org




Re: AjaxFallbackDefaultDataTable and AjaxSelfUpdatingTimerBehavior

2009-03-28 Thread Igor Vaynberg
then somewhere down the stream your components are not properly
chaining their model through this one.

-igor

2009/3/28 Murat Yücel kodeperke...@gmail.com:
 Hi Igor

 I am extending the SortableDataProvider and the model method is returning a
 new CompountPropertyModel which includes my own entity model. The entity
 model is a loadabledetacheabble model which only keeps the id. on load the
 data will be retrieved from the database.

 https://ninan.svn.sourceforge.net/svnroot/ninan/branches/v2.0.0/ninan-frontend/src/main/java/dk/team/ninan/frontend/wicket/overview/OverviewDataProvider.java

 /Murat

 2009/3/28 Igor Vaynberg igor.vaynb...@gmail.com

 your problem is most likely that you are not using proper models.

 in your idataprovider.model you should return a model that can load
 the data from the database on its own. you are most likely just doing
 return new model(object); which simply holds on to that object
 forever, what you should do is return new entitymodel(object) that can
 reload a fresh one.

 -igor

 2009/3/27 Murat Yücel kodeperke...@gmail.com:
  Hi All
 
  I have a question regarding how to add AjaxSelfUpdatingTimerBehaviors to
  some of the cells in a datatable.
  What is the best practice and should i use something else?
 
  Today i have a list of items which is retrieved from the database each
 time
  there is a request. The refresh
  rate can be set by the user in a setting page. I have made a quick
 solution
  where i was adding an
  AjaxSelfUpdatingTimerBehavior to the whole table. It is working perfectly
  fine for high refresh rates, but
  if the user sets the refresh rate to 1 second then the refresh gives
  problem.
 
  The AjaxFallbackDefaultDataTable includes checkboxes and is inside a
 form. I
  am now trying to change
  the logic so only the relevant cells are updated. The problem is that i
  cannot figure out how to do it. Because
  the model for each item will be called but the dataprovider is not called
 to
  retrieve the newest data from the
  database.
 
  Hope that someone can help or suggest a better solution.
 
  The project is open source so if you need to see code you just say the
 word
  :)
 
  Kind regards
 
  /Murat
 

 -
 To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
 For additional commands, e-mail: users-h...@wicket.apache.org




-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Re: AjaxFallbackDefaultDataTable and AjaxSelfUpdatingTimerBehavior

2009-03-28 Thread Murat Yücel
Is it enough to do this to get the model refreshed?
cellItem.setOutputMarkupId(true);
cellItem.add(new AjaxSelfUpdatingTimerBehavior(1));

or should each cell have an entity id? Because the problem is that
populateItem doesnt get called. Unless i of course enter the page again.

/Murat

2009/3/28 Igor Vaynberg igor.vaynb...@gmail.com

 then somewhere down the stream your components are not properly
 chaining their model through this one.

 -igor

 2009/3/28 Murat Yücel kodeperke...@gmail.com:
  Hi Igor
 
  I am extending the SortableDataProvider and the model method is returning
 a
  new CompountPropertyModel which includes my own entity model. The entity
  model is a loadabledetacheabble model which only keeps the id. on load
 the
  data will be retrieved from the database.
 
 
 https://ninan.svn.sourceforge.net/svnroot/ninan/branches/v2.0.0/ninan-frontend/src/main/java/dk/team/ninan/frontend/wicket/overview/OverviewDataProvider.java
 
  /Murat
 
  2009/3/28 Igor Vaynberg igor.vaynb...@gmail.com
 
  your problem is most likely that you are not using proper models.
 
  in your idataprovider.model you should return a model that can load
  the data from the database on its own. you are most likely just doing
  return new model(object); which simply holds on to that object
  forever, what you should do is return new entitymodel(object) that can
  reload a fresh one.
 
  -igor
 
  2009/3/27 Murat Yücel kodeperke...@gmail.com:
   Hi All
  
   I have a question regarding how to add AjaxSelfUpdatingTimerBehaviors
 to
   some of the cells in a datatable.
   What is the best practice and should i use something else?
  
   Today i have a list of items which is retrieved from the database each
  time
   there is a request. The refresh
   rate can be set by the user in a setting page. I have made a quick
  solution
   where i was adding an
   AjaxSelfUpdatingTimerBehavior to the whole table. It is working
 perfectly
   fine for high refresh rates, but
   if the user sets the refresh rate to 1 second then the refresh gives
   problem.
  
   The AjaxFallbackDefaultDataTable includes checkboxes and is inside a
  form. I
   am now trying to change
   the logic so only the relevant cells are updated. The problem is that
 i
   cannot figure out how to do it. Because
   the model for each item will be called but the dataprovider is not
 called
  to
   retrieve the newest data from the
   database.
  
   Hope that someone can help or suggest a better solution.
  
   The project is open source so if you need to see code you just say the
  word
   :)
  
   Kind regards
  
   /Murat
  
 
  -
  To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
  For additional commands, e-mail: users-h...@wicket.apache.org
 
 
 

 -
 To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
 For additional commands, e-mail: users-h...@wicket.apache.org




Re: AjaxFallbackDefaultDataTable and AjaxSelfUpdatingTimerBehavior

2009-03-28 Thread Igor Vaynberg
populate item is only called when the repeater renders. you are not
rerendering the repeater, you are rerendering the repeater item - thus
populate item is not called.

-igor

2009/3/28 Murat Yücel kodeperke...@gmail.com:
 Is it enough to do this to get the model refreshed?
 cellItem.setOutputMarkupId(true);
 cellItem.add(new AjaxSelfUpdatingTimerBehavior(1));

 or should each cell have an entity id? Because the problem is that
 populateItem doesnt get called. Unless i of course enter the page again.

 /Murat

 2009/3/28 Igor Vaynberg igor.vaynb...@gmail.com

 then somewhere down the stream your components are not properly
 chaining their model through this one.

 -igor

 2009/3/28 Murat Yücel kodeperke...@gmail.com:
  Hi Igor
 
  I am extending the SortableDataProvider and the model method is returning
 a
  new CompountPropertyModel which includes my own entity model. The entity
  model is a loadabledetacheabble model which only keeps the id. on load
 the
  data will be retrieved from the database.
 
 
 https://ninan.svn.sourceforge.net/svnroot/ninan/branches/v2.0.0/ninan-frontend/src/main/java/dk/team/ninan/frontend/wicket/overview/OverviewDataProvider.java
 
  /Murat
 
  2009/3/28 Igor Vaynberg igor.vaynb...@gmail.com
 
  your problem is most likely that you are not using proper models.
 
  in your idataprovider.model you should return a model that can load
  the data from the database on its own. you are most likely just doing
  return new model(object); which simply holds on to that object
  forever, what you should do is return new entitymodel(object) that can
  reload a fresh one.
 
  -igor
 
  2009/3/27 Murat Yücel kodeperke...@gmail.com:
   Hi All
  
   I have a question regarding how to add AjaxSelfUpdatingTimerBehaviors
 to
   some of the cells in a datatable.
   What is the best practice and should i use something else?
  
   Today i have a list of items which is retrieved from the database each
  time
   there is a request. The refresh
   rate can be set by the user in a setting page. I have made a quick
  solution
   where i was adding an
   AjaxSelfUpdatingTimerBehavior to the whole table. It is working
 perfectly
   fine for high refresh rates, but
   if the user sets the refresh rate to 1 second then the refresh gives
   problem.
  
   The AjaxFallbackDefaultDataTable includes checkboxes and is inside a
  form. I
   am now trying to change
   the logic so only the relevant cells are updated. The problem is that
 i
   cannot figure out how to do it. Because
   the model for each item will be called but the dataprovider is not
 called
  to
   retrieve the newest data from the
   database.
  
   Hope that someone can help or suggest a better solution.
  
   The project is open source so if you need to see code you just say the
  word
   :)
  
   Kind regards
  
   /Murat
  
 
  -
  To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
  For additional commands, e-mail: users-h...@wicket.apache.org
 
 
 

 -
 To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
 For additional commands, e-mail: users-h...@wicket.apache.org




-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Re: AjaxFallbackDefaultDataTable and AjaxSelfUpdatingTimerBehavior

2009-03-28 Thread nino martinez wael
we had a thread about updating... when i did the wicket reaction
game... search for wicket reavtion game on nabble

2009/3/28 Murat Yücel kodeperke...@gmail.com:
 Is it enough to do this to get the model refreshed?
 cellItem.setOutputMarkupId(true);
 cellItem.add(new AjaxSelfUpdatingTimerBehavior(1));

 or should each cell have an entity id? Because the problem is that
 populateItem doesnt get called. Unless i of course enter the page again.

 /Murat

 2009/3/28 Igor Vaynberg igor.vaynb...@gmail.com

 then somewhere down the stream your components are not properly
 chaining their model through this one.

 -igor

 2009/3/28 Murat Yücel kodeperke...@gmail.com:
  Hi Igor
 
  I am extending the SortableDataProvider and the model method is returning
 a
  new CompountPropertyModel which includes my own entity model. The entity
  model is a loadabledetacheabble model which only keeps the id. on load
 the
  data will be retrieved from the database.
 
 
 https://ninan.svn.sourceforge.net/svnroot/ninan/branches/v2.0.0/ninan-frontend/src/main/java/dk/team/ninan/frontend/wicket/overview/OverviewDataProvider.java
 
  /Murat
 
  2009/3/28 Igor Vaynberg igor.vaynb...@gmail.com
 
  your problem is most likely that you are not using proper models.
 
  in your idataprovider.model you should return a model that can load
  the data from the database on its own. you are most likely just doing
  return new model(object); which simply holds on to that object
  forever, what you should do is return new entitymodel(object) that can
  reload a fresh one.
 
  -igor
 
  2009/3/27 Murat Yücel kodeperke...@gmail.com:
   Hi All
  
   I have a question regarding how to add AjaxSelfUpdatingTimerBehaviors
 to
   some of the cells in a datatable.
   What is the best practice and should i use something else?
  
   Today i have a list of items which is retrieved from the database each
  time
   there is a request. The refresh
   rate can be set by the user in a setting page. I have made a quick
  solution
   where i was adding an
   AjaxSelfUpdatingTimerBehavior to the whole table. It is working
 perfectly
   fine for high refresh rates, but
   if the user sets the refresh rate to 1 second then the refresh gives
   problem.
  
   The AjaxFallbackDefaultDataTable includes checkboxes and is inside a
  form. I
   am now trying to change
   the logic so only the relevant cells are updated. The problem is that
 i
   cannot figure out how to do it. Because
   the model for each item will be called but the dataprovider is not
 called
  to
   retrieve the newest data from the
   database.
  
   Hope that someone can help or suggest a better solution.
  
   The project is open source so if you need to see code you just say the
  word
   :)
  
   Kind regards
  
   /Murat
  
 
  -
  To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
  For additional commands, e-mail: users-h...@wicket.apache.org
 
 
 

 -
 To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
 For additional commands, e-mail: users-h...@wicket.apache.org




-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Re: AjaxFallbackDefaultDataTable and AjaxSelfUpdatingTimerBehavior

2009-03-28 Thread Murat Yücel
Hi,

Thank to both of you. I have solved the issue by adding
AjaxSelfUpdatingTimerBehavior to the panel which i add to my cellItem.
Another bug was as igor wrote that my models wasnt chained properly.

/Murat

2009/3/28 nino martinez wael nino.martinez.w...@gmail.com

 we had a thread about updating... when i did the wicket reaction
 game... search for wicket reavtion game on nabble

 2009/3/28 Murat Yücel kodeperke...@gmail.com:
  Is it enough to do this to get the model refreshed?
  cellItem.setOutputMarkupId(true);
  cellItem.add(new AjaxSelfUpdatingTimerBehavior(1));
 
  or should each cell have an entity id? Because the problem is that
  populateItem doesnt get called. Unless i of course enter the page again.
 
  /Murat
 
  2009/3/28 Igor Vaynberg igor.vaynb...@gmail.com
 
  then somewhere down the stream your components are not properly
  chaining their model through this one.
 
  -igor
 
  2009/3/28 Murat Yücel kodeperke...@gmail.com:
   Hi Igor
  
   I am extending the SortableDataProvider and the model method is
 returning
  a
   new CompountPropertyModel which includes my own entity model. The
 entity
   model is a loadabledetacheabble model which only keeps the id. on load
  the
   data will be retrieved from the database.
  
  
 
 https://ninan.svn.sourceforge.net/svnroot/ninan/branches/v2.0.0/ninan-frontend/src/main/java/dk/team/ninan/frontend/wicket/overview/OverviewDataProvider.java
  
   /Murat
  
   2009/3/28 Igor Vaynberg igor.vaynb...@gmail.com
  
   your problem is most likely that you are not using proper models.
  
   in your idataprovider.model you should return a model that can load
   the data from the database on its own. you are most likely just doing
   return new model(object); which simply holds on to that object
   forever, what you should do is return new entitymodel(object) that
 can
   reload a fresh one.
  
   -igor
  
   2009/3/27 Murat Yücel kodeperke...@gmail.com:
Hi All
   
I have a question regarding how to add
 AjaxSelfUpdatingTimerBehaviors
  to
some of the cells in a datatable.
What is the best practice and should i use something else?
   
Today i have a list of items which is retrieved from the database
 each
   time
there is a request. The refresh
rate can be set by the user in a setting page. I have made a quick
   solution
where i was adding an
AjaxSelfUpdatingTimerBehavior to the whole table. It is working
  perfectly
fine for high refresh rates, but
if the user sets the refresh rate to 1 second then the refresh
 gives
problem.
   
The AjaxFallbackDefaultDataTable includes checkboxes and is inside
 a
   form. I
am now trying to change
the logic so only the relevant cells are updated. The problem is
 that
  i
cannot figure out how to do it. Because
the model for each item will be called but the dataprovider is not
  called
   to
retrieve the newest data from the
database.
   
Hope that someone can help or suggest a better solution.
   
The project is open source so if you need to see code you just say
 the
   word
:)
   
Kind regards
   
/Murat
   
  
   -
   To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
   For additional commands, e-mail: users-h...@wicket.apache.org
  
  
  
 
  -
  To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
  For additional commands, e-mail: users-h...@wicket.apache.org
 
 
 

 -
 To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
 For additional commands, e-mail: users-h...@wicket.apache.org




AjaxFallbackDefaultDataTable and AjaxSelfUpdatingTimerBehavior

2009-03-27 Thread Murat Yücel
Hi All

I have a question regarding how to add AjaxSelfUpdatingTimerBehaviors to
some of the cells in a datatable.
What is the best practice and should i use something else?

Today i have a list of items which is retrieved from the database each time
there is a request. The refresh
rate can be set by the user in a setting page. I have made a quick solution
where i was adding an
AjaxSelfUpdatingTimerBehavior to the whole table. It is working perfectly
fine for high refresh rates, but
if the user sets the refresh rate to 1 second then the refresh gives
problem.

The AjaxFallbackDefaultDataTable includes checkboxes and is inside a form. I
am now trying to change
the logic so only the relevant cells are updated. The problem is that i
cannot figure out how to do it. Because
the model for each item will be called but the dataprovider is not called to
retrieve the newest data from the
database.

Hope that someone can help or suggest a better solution.

The project is open source so if you need to see code you just say the word
:)

Kind regards

/Murat


Re: AjaxSelfUpdatingTimerBehavior Once

2009-03-20 Thread Heidi Burn
Thank you very much, Kevin
May I ask why isTemporary is not working?

Heidi

On Thu, Mar 19, 2009 at 11:10 PM, Kevin Logue ke...@viableoptions.ie wrote:
 If you just want to stop AjaxSelfUpdatingTimerBehavior after a particular
 event(or one call even), you could always call the stop method on the
 AjaxSelfUpdatingTimerBehavior. No idea if this is the best practice but it's
 worked for me.

 Kevin

 Heidi Burn wrote:

 Hi, guys,

 I code AjaxSelfUpdatingTimerBehavior with isTemporary() {return true;}.
 After being called once I get

 ERROR - RequestCycle               -
 java.lang.NullPointerException
        at org.apache.wicket.request.

 target.component.listener.BehaviorRequestTarget.processEvents(BehaviorRequestTarget.java:96)
        at
 org.apache.wicket.request.AbstractRequestCycleProcessor.processEvents(AbstractRequestCycleProcessor.java:92)
        at
 org.apache.wicket.RequestCycle.processEventsAndRespond(RequestCycle.java:1236)
        at org.apache.wicket.RequestCycle.step(RequestCycle.java:1315)
        at org.apache.wicket.RequestCycle.steps(RequestCycle.java:1414)
        at org.apache.wicket.RequestCycle.request(RequestCycle.java:542)
        at
 org.apache.wicket.protocol.http.WicketFilter.doGet(WicketFilter.java:456)
        at
 org.apache.wicket.protocol.http.WicketFilter.doFilter(WicketFilter.java:289)


 What is my problem?
 Please, help me.

 Heidi

 -
 To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
 For additional commands, e-mail: users-h...@wicket.apache.org


 __ Information from ESET NOD32 Antivirus, version of virus
 signature database 3948 (20090319) __

 The message was checked by ESET NOD32 Antivirus.

 http://www.eset.com







 -
 To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
 For additional commands, e-mail: users-h...@wicket.apache.org



-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Re: AjaxSelfUpdatingTimerBehavior Once

2009-03-20 Thread Igor Vaynberg
because if you do not stop the behavior it will generate a callback on
the client for itself, but when istemporary() is true after it
generated the callback it will be removed. so now the callback points
to something that is not there. it should be ok to use istemporary()
but you also have to call stop()

-igor

On Fri, Mar 20, 2009 at 5:49 AM, Heidi Burn heidi.b...@gmail.com wrote:
 Thank you very much, Kevin
 May I ask why isTemporary is not working?

 Heidi

 On Thu, Mar 19, 2009 at 11:10 PM, Kevin Logue ke...@viableoptions.ie wrote:
 If you just want to stop AjaxSelfUpdatingTimerBehavior after a particular
 event(or one call even), you could always call the stop method on the
 AjaxSelfUpdatingTimerBehavior. No idea if this is the best practice but it's
 worked for me.

 Kevin

 Heidi Burn wrote:

 Hi, guys,

 I code AjaxSelfUpdatingTimerBehavior with isTemporary() {return true;}.
 After being called once I get

 ERROR - RequestCycle               -
 java.lang.NullPointerException
        at org.apache.wicket.request.

 target.component.listener.BehaviorRequestTarget.processEvents(BehaviorRequestTarget.java:96)
        at
 org.apache.wicket.request.AbstractRequestCycleProcessor.processEvents(AbstractRequestCycleProcessor.java:92)
        at
 org.apache.wicket.RequestCycle.processEventsAndRespond(RequestCycle.java:1236)
        at org.apache.wicket.RequestCycle.step(RequestCycle.java:1315)
        at org.apache.wicket.RequestCycle.steps(RequestCycle.java:1414)
        at org.apache.wicket.RequestCycle.request(RequestCycle.java:542)
        at
 org.apache.wicket.protocol.http.WicketFilter.doGet(WicketFilter.java:456)
        at
 org.apache.wicket.protocol.http.WicketFilter.doFilter(WicketFilter.java:289)


 What is my problem?
 Please, help me.

 Heidi

 -
 To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
 For additional commands, e-mail: users-h...@wicket.apache.org


 __ Information from ESET NOD32 Antivirus, version of virus
 signature database 3948 (20090319) __

 The message was checked by ESET NOD32 Antivirus.

 http://www.eset.com







 -
 To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
 For additional commands, e-mail: users-h...@wicket.apache.org



 -
 To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
 For additional commands, e-mail: users-h...@wicket.apache.org



-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



  1   2   >