Yes, I tried a normal thread but that of course didn't work
final WebMarkupContainer container = new WebMarkupContainer( "container" );
container.add( new AjaxSelfUpdatingTimerBehavior(
Duration.ONE_SECOND){
protected void onPostProcessTarget(AjaxRequestTarget
target){
target.addComponent(container);
System.out.println( "hejsan" );
try {
Preview[] previews =
getDatabasePublishingWebService().getPreviews(
frontPage.getPreviewId() ,getSetting().getCredentials() );
if( previews != null ){
for( Preview preview : previews
){
System.out.println(
preview.getPath() + preview.getName() );
container.addOrReplace(
new Label( "preview", new Model(
preview.getPath() + preview.getName() ) ) );
stop();
}
}
} catch (RemoteException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}
});
container.addOrReplace( previewLabel );
this worked better. Is this the best approach to get ths to work?
--
View this message in context:
http://www.nabble.com/Checking-for-file-tp16941623p16942582.html
Sent from the Wicket - User mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]