Re: IAjaxIndicatorAware - busy indicator running forever

2017-03-07 Thread Sergiu
Thank you! It worked perfectly!

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/IAjaxIndicatorAware-busy-indicator-running-forever-tp4677251p4677262.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



IAjaxIndicatorAware - busy indicator running forever

2017-03-06 Thread Sergiu
Hello,
I have a main Panel implementing IAjaxIndicatorAware . The panel contains
multiple AjaxTabbedPanel. and in one tab I have a form with a list of items
and an AjaxButton that I use to trigger a download based on selected items.
Now the content of the AjaxButton looks like this:
AbstractResourceStreamWriter resourceStream = new
AbstractResourceStreamWriter() {
@Override
public void write(OutputStream output) throws IOException {
writeFileContent(output);
};
ResourceStreamRequestHandler handler = new
ResourceStreamRequestHandler(resourceStream, "Package.zip") 
getRequestCycle().scheduleRequestHandlerAfterCurrent(handler);

It seems that scheduleRequestHandlerAfterCurrent leaves the busy indicator
spinning forever after the download of the file gets completed. Is there
anything that I am missing or is this a bug?

I'm using Wicket 7.3  

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/IAjaxIndicatorAware-busy-indicator-running-forever-tp4677251.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



AjaxFallbackLink and Component visibility

2009-04-08 Thread Sergiu Sapojnic
Hi to all!
I am new to Wicket and am beginning to love it.
I have the following question:
--
There's the following markup:


This Ajax link has
been clicked [123] times.
[VISIBLE ONLY WHEN LINK WAS CLICKED AT
LEAST ONCE]

--
and the following corresponding Java code:

public class HelloPage extends WebPage {

int counter;
Label ghostLabel;
Label clickLabel;

public HelloPage() {

add(new AjaxFallbackLink("clickAjaxLink") {
@Override
public void onClick(AjaxRequestTarget target) {
counter++;
if(target != null) {
target.addComponent(clickLabel);
target.addComponent(ghostLabel);
}
}
});

// clickLabel displays how many times the link was clicked
clickLabel = new Label("clickAjaxLabel", new PropertyModel(this,
counter));
clickLabel.setOutputMarkupId(true);
add(clickLabel);

   // ghostLabel should be visible only when the link was clicked at
least once
   ghostLabel = new Label("ghost", "I should be visible only when the
link was clicked at least once") {
   @Override
   public boolean isVisible() {
   return counter > 0;
   }
   };
  add(ghostLabel);
}

}
---

clickLabel works properly and displays the value of counter. But my aim with
ghostLabel is that it is visible only when the AjaxFallbackLink was clicked
at least once. I added it to the request target so that it should be
updated. However, it remains invisible. How can I solve this problem?

Thanks in advance!