|
|
Re: [RAP] Obtaining URL Parameters and open outline with page [message #1397990 is a reply to message #1397355] |
Thu, 10 July 2014 12:55 |
A N Messages: 25 Registered: July 2014 |
Junior Member |
|
|
Thanks for your quick response. I tried using bookmarks but the problem there was that I can not properly open those from the rap.ui Plugin where I got the access to the parameters
Maybe I can do some digging and implement this myself but currently I am not even sure what the proper entry point (StandaloneRwtEnvironment probably isn't?!) for intercepting the parameters is.
I am open for any hints if someone got an idea.
[Updated on: Thu, 10 July 2014 12:55] Report message to a moderator
|
|
|
Re: [RAP] Obtaining URL Parameters and open outline with page [message #1420638 is a reply to message #1397990] |
Wed, 10 September 2014 08:55 |
|
Hi
You were on the right track, StandaloneRwtEnvironment is the class where you can intercept the parameters. Have a look at the following snippet:
public class StandaloneRwtEnvironment extends AbstractStandaloneRwtEnvironment {
public StandaloneRwtEnvironment() {
super(Activator.getDefault().getBundle(), ClientSession.class);
}
@Override
protected synchronized void init(Runnable additionalInitCallback) throws CoreException {
super.init(additionalInitCallback);
String parameter = RWT.getRequest().getParameter("create");
if ("person".equals(parameter)) {
Runnable job = new Runnable() {
@Override
public void run() {
PersonForm form;
try {
form = new PersonForm();
form.start();
}
catch (ProcessingException e) {
SERVICES.getService(IExceptionHandlerService.class).handleException(e);
}
}
};
invokeScoutLater(job, 5000);
}
}
}
With this you can open the url http://localhost:8082/web?create=person and the PersonForm should be displayed.
The important thing is to wrap your client logic with a client job and schedule it to the client job queue which is done with invokeScoutLater.
Hope it helps
Claudio
|
|
|
|
|
Re: [RAP] Obtaining URL Parameters and open outline with page [message #1429651 is a reply to message #1429521] |
Tue, 23 September 2014 14:31 |
Jeremie Bresson Messages: 1252 Registered: October 2011 |
Senior Member |
|
|
A N wrote on Tue, 23 September 2014 12:41When I try to deploy this to my tomcat server it will not work until I remove the required bundle (and also the RWT.getRequest line) from the MANIFEST.MF again. Is there any way I can avoid this problem?
I assume you build and deploy the application defined in a product file like this one:
\helloworld.ui.rap\products\production\helloworld-rap-client.product
When you have added the new dependency in the Manifest, have you checked if the product still validates?
(I have tried to provied an overview of concepts like target-platform, target-definition, product file... in an other thread)
When you start your application in Tomcat, have you error-log entries?
.
[Updated on: Tue, 23 September 2014 14:31] Report message to a moderator
|
|
|
|
Powered by
FUDForum. Page generated in 0.03674 seconds