I don't understand internalPaths in jWt
Added by Pieter Laeremans over 12 years ago
When I add the following code to hello world:
internalPathChanged().addListener(this, new Signal1.Listener() {
public void trigger(String arg) {
nameEdit.setText(arg);
}
});
I would expect jWt to call the listener when I enter http://localhost:8080/some/random/url
With arg="/some/random/url". However the listener is never invoked.
The listener is invoked when I call setInternalPath myself.
How can I make my Jwt application respond to a visit to a "random" url?
Thanks,
Pieter
Replies (1)
RE: I don't understand internalPaths in jWt - Added by Pieter Libin over 12 years ago
Hi,
when changing the URL of an application in the address bar, (J)Wt always starts a new application.
You can get the internal path in the constructor of your WApplication subclass using WApplication#getInternalPath().
Kind regards,
Pieter