Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Remote Application Platform (RAP) » I create my custom Widget, How to show the changes for UI in js?(Use js code to change the ui content.)
icon5.gif  I create my custom Widget, How to show the changes for UI in js? [message #531469] Wed, 05 May 2010 06:49 Go to next message
zezhenyan  is currently offline zezhenyan Friend
Messages: 16
Registered: March 2010
Junior Member
this is my js code
var req = org.eclipse.swt.Request.getInstance();
req.addParameter( gmapId + ".address", document.body.innerHTML );
req.addParameter( gmapId + ".centerLocation", a );
alert("gettt::"+req.getParameter(gmapId + ".centerLocation"));
req.send();\\this code will run the LCA class

then this attribute "centerLocation" in my model. I add the listener for this model.

when change the attribute "centerLocation", I will add some logic for my rap view

IWorkbenchPage page = getViewSite().getWorkbenchWindow()
.getActivePage();
page.showView("org.eclipse.ui.views.PropertySheet");

but I can not find this view as a active view? what's the reason?

Thanks

[Updated on: Wed, 05 May 2010 06:51]

Report message to a moderator

Re: I create my custom Widget, How to show the changes in js? [message #531548 is a reply to message #531469] Wed, 05 May 2010 11:41 Go to previous messageGo to next message
Ivan Furnadjiev is currently offline Ivan FurnadjievFriend
Messages: 2359
Registered: July 2009
Location: Sofia, Bulgaria
Senior Member
Hi,

does your listener triggered at all? If not, maybe the event is fired in
a wrong phase. Use:
ProcessActionRunner.add( new Runnable() {
public void run() {
// Fire event here
}
} );
to fire the event in the process action phase.

HTH,
Ivan

On 05/05/2010 9:49 AM, zezhenyan wrote:
> this is my js code
> var req = org.eclipse.swt.Request.getInstance();
> req.addParameter( gmapId + ".address", document.body.innerHTML );
> req.addParameter( gmapId + ".centerLocation", a );
> alert("gettt::"+req.getParameter(gmapId + ".centerLocation"));
> req.send();\\this code will run the LCA class
>
> then this attribute "centerLocation" in my model. I add the listener
> for this model.
>
> when change the attribute "centerLocation", I will add some logic for
> my rap view
>
> IWorkbenchPage page = getViewSite().getWorkbenchWindow()
> .getActivePage();
> page.showView("org.eclipse.ui.views.PropertySheet");
>
> but I can not find this view as a active view? what's the reason?
>
> Thanks
>
Re: I create my custom Widget, How to show the changes in js? [message #531745 is a reply to message #531548] Thu, 06 May 2010 01:58 Go to previous message
zezhenyan  is currently offline zezhenyan Friend
Messages: 16
Registered: March 2010
Junior Member
Ivan:
It runs great!!
Thank you very much, you help me to solve a big problem.
You are my hero. Very Happy


Tyki
Previous Topic:Eclipse RAP and OSGi DS
Next Topic:Updates to upload widget
Goto Forum:
  


Current Time: Mon Nov 29 03:40:32 GMT 2021

Powered by FUDForum. Page generated in 0.02643 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top