Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Remote Application Platform (RAP) » custom controls and http requests: Combobox isn't updating when a request is sent imperatively
custom controls and http requests: Combobox isn't updating when a request is sent imperatively [message #102453] Fri, 15 August 2008 08:31 Go to next message
Dmitry Pryadkin is currently offline Dmitry PryadkinFriend
Messages: 146
Registered: July 2009
Senior Member
Gentleman,

I have a custom control in development which performs checking whether a
font is monotype (i.e. fixed-width) or not.

The qooxdoo part has a function:

checkFont : function(fontname)
{
// ... routine code skipped ...

// this is how I return the result
var req = org.eclipse.swt.Request.getInstance();
req.addParameter( this._id + ".result", fontname );
req.send(); // this is to make things faster
}

The java part of an LCA could be simplified as follows:

void checkFont(Widget widget, String fontName)
{
writer.call(widget, "checkFont", new Object[]{fontName});
}

and then I'm reading the result back with

public void readData(Widget widget)
{
String prop = WidgetLCAUtil.readPropertyValue( widget, "result" );
if (null != prop)
{
((MyControl)widget).fCombo.add(prop); // this code gets
executed, but the combo doesn't update its items; I've added a
debug-watch to fCombo and I can see added items are present there
}

}


Everything is OK. I do get the right result in time. However the
Combobox isn't updating its items even if I trigger the other controls
to let happen the next ajax iteration.

Removing req.send seems like a solution. But it requires quite a lot of
time to transmit the results back to the host.

Thanks
Re: custom controls and http requests: Combobox isn't updating when a request is sent imperatively [message #102466 is a reply to message #102453] Fri, 15 August 2008 08:59 Go to previous messageGo to next message
Dmitry Pryadkin is currently offline Dmitry PryadkinFriend
Messages: 146
Registered: July 2009
Senior Member
me again,

The problem persists even if I remove req.send.

Dmitry Pryadkin wrote:
> Removing req.send seems like a solution. But it requires quite a lot of
> time to transmit the results back to the host.


Thanks
Re: (solved) custom controls and http requests: Combobox isn't updating when a request is sent imper [message #102476 is a reply to message #102453] Fri, 15 August 2008 09:36 Go to previous message
Dmitry Pryadkin is currently offline Dmitry PryadkinFriend
Messages: 146
Registered: July 2009
Senior Member
Finally, I came with Display#asyncExec in LCA#readData. *happy*
Previous Topic:How to disable closing a view?
Next Topic:i18n localization
Goto Forum:
  


Current Time: Thu Apr 25 20:53:26 GMT 2024

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

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

Back to the top