문제

I'm using JSP & Struts2 for development.

When I login, I call an action, which inturn takes some time to load the data on the page.

While the data is getting loaded, I want to show a busy cursor and once the page is completely loaded, remove off that.

Also I'm using jQuery to a large extent. Is there a way to achieve this?

도움이 되었습니까?

해결책

Based on your question, it sounds like you might get a better user experience by postponing the long-running action call until after your page has loaded.

To achieve that, have your JSP render a busy indicator of some sort, get the data from your action with an ajax call that runs on the page's onload event, and finally place the content where you'd like it. I'm sure jQuery does all of this for you very easily.

다른 팁

I've used plain Struts2 (no jquery) for this scenario with the ExecuteAndWait Interceptor. See my response here.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top