You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by Mathias Nilsson <wi...@gmail.com> on 2011/05/03 10:27:04 UTC
Re: Monitoring progress of business layer service in presentation
layer
// Service
public class Service implements IService{
public List<AnyObject> getObjects(){
// return list from dao or whatever
}
}
// wicket class
public MyPage extends WebPage{
@SpringBean( name = "service )
private IService service;
public MyPage(){
// in some component
List<AnyObject> objs = service.getObjects();
for( AnyObject obj : objs ){
// Update progressbar or whatever
}
}
}
--
View this message in context: http://apache-wicket.1842946.n4.nabble.com/Monitoring-progress-of-business-layer-service-in-presentation-layer-tp3490683p3491996.html
Sent from the Users forum mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org
Re: Monitoring progress of business layer service in presentation layer
Posted by Pedro Santos <pe...@gmail.com>.
I Mathias, you can add an AbstractAjaxTimerBehavior in the page plus
an component presenting the service status.
e.g.
page{
add(new Label("id", new abstractreadyonlymodel(){
getobject(){
return service.getStatus();
}
}));
add(new AbstractAjaxTimerBehavior (){
onTimer(target){
target.add(label);
if(service.ended()){this.sto();}
}
});
On Tue, May 3, 2011 at 5:27 AM, Mathias Nilsson
<wi...@gmail.com> wrote:
>
> // Service
> public class Service implements IService{
> public List<AnyObject> getObjects(){
> // return list from dao or whatever
> }
> }
>
> // wicket class
> public MyPage extends WebPage{
> @SpringBean( name = "service )
> private IService service;
>
> public MyPage(){
>
> // in some component
> List<AnyObject> objs = service.getObjects();
> for( AnyObject obj : objs ){
> // Update progressbar or whatever
> }
> }
> }
>
> --
> View this message in context: http://apache-wicket.1842946.n4.nabble.com/Monitoring-progress-of-business-layer-service-in-presentation-layer-tp3490683p3491996.html
> Sent from the Users forum mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
--
Pedro Henrique Oliveira dos Santos
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org