|
NOTE:
These slides have not been updated since 2003. They have been superseded by the book
Anders Møller and Michael Schwartzbach, February 2006 |
|
| INTERACTIVE WEB SERVICES WITH JAVA |
|
This is in fact just another JWIG service, TempMan.jwig
In particular, we can interactively modify the graphical design during the lifetime of a running session thread!
This requires that we use the get operation:
import dk.brics.jwig.runtime.*;
public class TempEx extends Service {
static XML templateWrapper;
static XML templateHello;
static XML templateGoodbye;
public TempEx() {refresh();}
static void refresh() {
try {
templateWrapper = get "file:/home/mis/TempEx/templates/Wrapper";
templateHello = get "file:/home/mis/TempEx/templates/Hello";
templateGoodbye = get "file:/home/mis/TempEx/templates/Goodbye";
} catch (Exception e) { e.printStackTrace(); }
}
public class Refresh extends Page {
public void main() {
refresh();
}
}
public class Example extends Session {
public void main() {
show templateWrapper<[what=templateHello];
exit templateGoodbye;
}
}
}
|
|
| COPYRIGHT © 2002-2003 ANDERS MØLLER & MICHAEL I. SCHWARTZBACH |
|