I create my custom Widget, How to show the changes for UI in js? [message #531469] |
Wed, 05 May 2010 06:49 |
zezhenyan 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 |
Ivan Furnadjiev Messages: 2427 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
>
|
|
|
|
Powered by
FUDForum. Page generated in 0.03906 seconds