you are welcome

-Igor


On 10/4/06, Martin Funk <[EMAIL PROTECTED]> wrote:

cool,

thank you for the code and thank you for the link to it.

Martin

Igor Vaynberg schrieb:
> see here
>
>
https://sourceforge.net/tracker/?func=detail&atid=684978&aid=1539101&group_id=119783
>
>
> -Igor
>
>
> On 10/4/06, Martin Funk <[EMAIL PROTECTED]> wrote:
>>
>> Sorry if this gets crossposted, but wicket-user seems to have gone
>> terribly boink!
>>
>> Hi,
>>
>> my webapp asynchronously kicks of a a process that takes some (1-2
>> minutes) time till a result is provided. After the kickoff and before
>> the result is available I'd like the Page to reload itself untill the
>> result is there, stopping the reload.
>>
>> So far I tried two approaches.
>> First I worked with the pages meta tag. I controlled it's attributes
>> using AttributeModifier.
>> something like:
>>
>> Markup:
>> <meta wicket:id="refresh" id="refresh" content="" />
>>
>> Code:
>>         final Label refresh = new Label("refresh");
>>         final AttributeModifier http_equiv = new AttributeModifier(
>>                 "http-equiv", true, new Model("refresh")) {
>>             private static final long serialVersionUID = 1L;
>>
>>             @Override
>>             public boolean isEnabled() {
>>                 return !isRequestTokenDone();
>>             }
>>         };
>>         final AttributeModifier content = new
>> AttributeModifier("content",
>>                 true, new PropertyModel(this, "content")) {
>>             private static final long serialVersionUID = 1L;
>>
>>             @Override
>>             public boolean isEnabled() {
>>                 return !isRequestTokenDone();
>>             }
>>         };
>>         refresh.add(http_equiv);
>>         refresh.add(content);
>>         add(refresh);
>>
>> This was ok, except that the performance was bad. The whole page is
>> reloaded, even on localhost this took 2 seconds. Too much.
>>
>> On the second aproach I added a AjaxSelfUpdatingTimerBehavior to the
>> panel I wanted to reload.
>>
>>         myPanel panel = new MyPanel("myPanel");
>>         panel.add(new AjaxSelfUpdatingTimerBehavior(Duration.seconds
>> (10)));
>>         add(panel);
>>
>> Performance is great now, but I don't see a way for disabeling the
>> UpdateBehaviour, once the result is available.
>>
>> Any ideas?
>>
>> Martin
>>
>>
>>
>


Reply via email to