|
|
Re: Access Widgets via Javascript on client side [message #502739 is a reply to message #502726] |
Wed, 09 December 2009 15:17 |
Ivan Furnadjiev Messages: 2427 Registered: July 2009 Location: Sofia, Bulgaria |
Senior Member |
|
|
Hi Oliver,
the widget id, used by WidgetManager#findWidgetById( id ) is assigned by
server side on widget creation ( see WidgetManager#newWidget ). You can
get the id:
- on the client: WidgetManager#findIdByWidget( widget )
- on the server: WidgetUtil.getId( widget )
HTH,
Ivan
On 12/9/2009 16:52, Oliver Specht wrote:
> Hi,
> I try to access the Widgets on clientside via Javascript. I use the
> Widgetmanager by:
>
> var wm = org.eclipse.swt.WidgetManager.getInstance();
> var widget = wm.findWidgetById();
> ..
>
> My problem is, that I do not know the IDs of the widgets. Is there any
> possibility to set the widget IDs? Or any possibility to access the
> widget by name ore something else?
>
> And: Is there any javascript side documentation (API, Tutorials, ...)
> for RAP?
>
> Thx,
> Oliver
|
|
|
|
Re: Access Widgets via Javascript on client side [message #502804 is a reply to message #502787] |
Wed, 09 December 2009 18:27 |
Stefan Messages: 316 Registered: July 2009 |
Senior Member |
|
|
Hi Oliver,
sorry, I forgot to mention that you have to set the System-Property
org.eclipse.rwt.enableUITests, too. See this page for more information:
http://www.eclipse.org/rap/noteworthy/news_11.php
Regards,
Stefan.
Oliver Specht schrieb:
> Hi, all,
> thanks for the replies. It seems that the ID is set but does not affect
> the javascript part.
>
> If I set the ID via WidgetUtil.CUSTOM_WIDGET_ID and debug it on button
> click, the ID is shown correctly.
>
> If I try to access the element via javascript, it only works by
> accessing by ID "w175" or "w34" etc.
>
> Does RAP ignore the widget settings?
>
> Greetings,
> Oliver
|
|
|
|
Powered by
FUDForum. Page generated in 0.95835 seconds