suppose i have two components in my current page
- TreeTable and
- Embedde (type → Browser)
If i want to reset the embedded on a button click or after some certain intervals, is it possible how?
I want to reload the web content at certain interval.
suppose i have two components in my current page
If i want to reset the embedded on a button click or after some certain intervals, is it possible how?
I want to reload the web content at certain interval.
I am not sure what you call “reset”, but to execute some operation every Xs, you can use this
addon
Can you explain what you exactly mean by “reset” ?
suppose currently my Embedded object is displaying a page
what i meant by reset is ==> i want to reload the page
Have you tried something like :
embedded.setSource(new ExternalResource(((ExternalResource)embedded.getSource()).getURL()));
Or if you know the URL :
embedded.setSource(new ExternalResource(url));
ok
It worked while executing that code after button click
however when i tried
timer = new ScheduledThreadPoolExecutor(5);
timer.scheduleAtFixedRate(new Runnable() {
public void run() {
otsRunStatus
.setSource(new ExternalResource(“http://vaadin.com”));
System.out.println("OTS Status Reloaded");
System.out.println(otsRunStatus.getSource().toString());
}
}, 0, 60 * 1000, TimeUnit.MILLISECONDS);
it didnt work
System.out.println(“OTS Status Reloaded”);
System.out.println(otsRunStatus.getSource().toString());
those two statements do work. But page doesnt get refresh. ANy idea?