| Summary: | Provide a public JSExecutor API | ||
|---|---|---|---|
| Product: | [RT] RAP | Reporter: | Benjamin Wolff <eclipse> |
| Component: | RWT | Assignee: | Project Inbox <rap-inbox> |
| Status: | RESOLVED FIXED | QA Contact: | |
| Severity: | enhancement | ||
| Priority: | P3 | CC: | a.thanbichler, elias, fr.appel, hihn, ronald.so, ruediger.herrmann, tibersept |
| Version: | 1.4 | ||
| Target Milestone: | 2.0 M3 | ||
| Hardware: | All | ||
| OS: | All | ||
| Whiteboard: | plan-version=2.0 plan-theme=alternative-clients plan-status=committed | ||
|
Description
Benjamin Wolff
We should also consider to provide an API that allows to read request parameters. I agree that there should be API to execute custom script code on the client. We're going to provide a dedicated slot for this in the protocol. However, I currently don't think that such an API should be limited to JavaScript. Even though the current RAP client can only handle JavaScript, it may become possible to execute code in different languages on a RAP client. I'm thinking about an API with an additional type parameter along the lines of <script type="text/javascript">... in HTML. We implemented the JavaScriptExecutor as a web client service. Usage:
JavaScriptExecutor executor = RWT.getClient().getService( JavaScriptExecutor.class );
if( executor != null ) {
executor.execute( javaScriptCode );
}
|