Home » Eclipse Projects » Remote Application Platform (RAP) » BrowserFunction in custom widget
| |
Re: BrowserFunction in custom widget [message #543497 is a reply to message #543455] |
Tue, 29 June 2010 15:07   |
Eclipse User |
|
|
|
Hi Benjamin,
we are using a graphical js-editor based on mxGraph
(http://www.jgraph.com/mxgraph.html) which currently uses a webservice
to perform CRUD operations and runs in an org.eclipse.swt.browser.Browser.
Because a) we experience massive XSS-related issue in our development
environment and b) need to connect to the RAP-Lifecycle chain to receive
events generated by a PhaseListener, we decided to wrap it into a custom
widget.
Since we also want to remove the direct access to the webservice, we
want to proxy all CRUD operations through the RAP application. To
simplify these proxy operations, it would be great to reuse the
BrowserFunction-Infrastructure.
For now, I came up with a Copy&Paste-Solution, which seems to work ok
(widget is a Browser-subclass, the LCA is mainly
org.eclipse.swt.internal.browser.browserkit.BrowserLCA but with some
altered static Strings, the JS-resource is a copied Browser.js with some
modifications.)
Since I don not like such hacks, maybe in the future an infrastructure
may be provided, to simplify use-cases like this. Maybe by Mixins and a
non-final BrowserLCA.
I hope you got my use-case and my approach. Hope there was no one-liner
solution which I didn't see to solve my task ;)
Regards,
Philipp
Am 29.06.2010 15:21, schrieb Benjamin Muskalla:
> Hi Philipp,
>
> I'm not sure what you expect from exposing a BrowserFunction in a custom
> widget. Could you please explain your usecase?
>
> Regards,
> Ben
>
> Philipp Leusmann wrote:
>> Hi all,
>>
>> is there any way to expose a BrowserFunction in a custom widget?
>>
>> Regrads,
>> Philipp
>
>
|
|
|
Re: BrowserFunction in custom widget [message #544001 is a reply to message #543497] |
Thu, 01 July 2010 09:54   |
Eclipse User |
|
|
|
Hi Philipp,
I think I understood your usecase. But what strikes me: Why do you need
to modify the BrowserWidget? Is it not possible to use the browser
widget as is? I don't really get why you need to touch the BrowserLCA in
this case.
Regards,
Ben
Philipp Leusmann wrote:
> Hi Benjamin,
>
> we are using a graphical js-editor based on mxGraph
> (http://www.jgraph.com/mxgraph.html) which currently uses a webservice
> to perform CRUD operations and runs in an org.eclipse.swt.browser.Browser.
> Because a) we experience massive XSS-related issue in our development
> environment and b) need to connect to the RAP-Lifecycle chain to receive
> events generated by a PhaseListener, we decided to wrap it into a custom
> widget.
> Since we also want to remove the direct access to the webservice, we
> want to proxy all CRUD operations through the RAP application. To
> simplify these proxy operations, it would be great to reuse the
> BrowserFunction-Infrastructure.
>
> For now, I came up with a Copy&Paste-Solution, which seems to work ok
> (widget is a Browser-subclass, the LCA is mainly
> org.eclipse.swt.internal.browser.browserkit.BrowserLCA but with some
> altered static Strings, the JS-resource is a copied Browser.js with some
> modifications.)
> Since I don not like such hacks, maybe in the future an infrastructure
> may be provided, to simplify use-cases like this. Maybe by Mixins and a
> non-final BrowserLCA.
>
> I hope you got my use-case and my approach. Hope there was no one-liner
> solution which I didn't see to solve my task ;)
>
> Regards,
> Philipp
>
>
> Am 29.06.2010 15:21, schrieb Benjamin Muskalla:
>> Hi Philipp,
>>
>> I'm not sure what you expect from exposing a BrowserFunction in a custom
>> widget. Could you please explain your usecase?
>>
>> Regards,
>> Ben
>>
>> Philipp Leusmann wrote:
>>> Hi all,
>>>
>>> is there any way to expose a BrowserFunction in a custom widget?
>>>
>>> Regrads,
>>> Philipp
>>
>>
>
--
Benjamin Muskalla | EclipseSource Karlsruhe
http://www.eclipsesource.com | http://twitter.com/eclipsesource
|
|
|
Re: BrowserFunction in custom widget [message #544956 is a reply to message #544001] |
Tue, 06 July 2010 08:30  |
Eclipse User |
|
|
|
Hi Ben,
since I needed to do some custom stuff on the JS-side, I decided to use
a Copy&Past version of Browser.js, but I changed the class-name.
This change clashed with the QX_TYPE, EXECUTED_FUNCTION_NAME,
EXECUTED_FUNCTION_RESULT and EXECUTED_FUNCTION_ERROR static strings in
the BrowserLCA, so I also needed a copy of it.
I hope, it's clear now. Maybe this is a not so uncommon use-case, so
propably there should be a way to simplify things like this.
Regards,
Philipp
Am 01.07.2010 11:54, schrieb Benjamin Muskalla:
> Hi Philipp,
>
> I think I understood your usecase. But what strikes me: Why do you need
> to modify the BrowserWidget? Is it not possible to use the browser
> widget as is? I don't really get why you need to touch the BrowserLCA in
> this case.
>
> Regards,
> Ben
>
> Philipp Leusmann wrote:
>> Hi Benjamin,
>>
>> we are using a graphical js-editor based on mxGraph
>> (http://www.jgraph.com/mxgraph.html) which currently uses a webservice
>> to perform CRUD operations and runs in an
>> org.eclipse.swt.browser.Browser.
>> Because a) we experience massive XSS-related issue in our development
>> environment and b) need to connect to the RAP-Lifecycle chain to
>> receive events generated by a PhaseListener, we decided to wrap it
>> into a custom widget.
>> Since we also want to remove the direct access to the webservice, we
>> want to proxy all CRUD operations through the RAP application. To
>> simplify these proxy operations, it would be great to reuse the
>> BrowserFunction-Infrastructure.
>>
>> For now, I came up with a Copy&Paste-Solution, which seems to work ok
>> (widget is a Browser-subclass, the LCA is mainly
>> org.eclipse.swt.internal.browser.browserkit.BrowserLCA but with some
>> altered static Strings, the JS-resource is a copied Browser.js with
>> some modifications.)
>> Since I don not like such hacks, maybe in the future an infrastructure
>> may be provided, to simplify use-cases like this. Maybe by Mixins and
>> a non-final BrowserLCA.
>>
>> I hope you got my use-case and my approach. Hope there was no
>> one-liner solution which I didn't see to solve my task ;)
>>
>> Regards,
>> Philipp
>>
>>
>> Am 29.06.2010 15:21, schrieb Benjamin Muskalla:
>>> Hi Philipp,
>>>
>>> I'm not sure what you expect from exposing a BrowserFunction in a custom
>>> widget. Could you please explain your usecase?
>>>
>>> Regards,
>>> Ben
>>>
>>> Philipp Leusmann wrote:
>>>> Hi all,
>>>>
>>>> is there any way to expose a BrowserFunction in a custom widget?
>>>>
>>>> Regrads,
>>>> Philipp
>>>
>>>
>>
>
>
|
|
|
Goto Forum:
Current Time: Mon Feb 17 18:59:23 GMT 2025
Powered by FUDForum. Page generated in 0.03694 seconds
|