|
|
|
|
|
|
|
|
Re: readData() behaviour [message #81031 is a reply to message #80986] |
Wed, 02 April 2008 17:58 |
Eclipse User |
|
|
|
Originally posted by: rherrmann.innoopract.com
Hi Mike,
as others already said;) the readData method is called whenever a
request is sent. There is no condition under which readData is not
called.
As your code looks like it should do what you expect, I can only
give some guesses:
- can you ensure that the request is actually sent?
Write req.debug( "sent" ); before req.snd() and have the
debug window/Firebug open.
- Is your LCA called at all? The LCA's that is responsibe for
a certain class is resolved by a naming convention. Maybe
there is a typo?
- does the client-side widget-id match the one you expect
on the server-side? (use WidgetUtil#getId(Widget) to determine
server-side id)
Cheers,
Rüdiger
Mike Wrighton wrote:
> Ok here are a few snippets. The actual editor is inside an html page in
> a qx.ui.embed.Iframe. I'm polling the editor code in the html page to
> check for the editor_is_dirty flag, then sending a request:
>
>
> var timer2 = new qx.client.Timer(100);
> timer2.addEventListener("interval", function(e) {
> if (this.getIframeWindow() && this.getIframeWindow().loaded) {
> if(this.getIframeWindow().editor_is_dirty == 1){
> this.getIframeWindow().editor_is_dirty = 0;
> this.fireDirtyEvent();
> }
> }
> }, this);
> timer2.start();
>
>
> fireDirtyEvent : function() {
> var wm = org.eclipse.swt.WidgetManager.getInstance();
> var id = wm.findIdByWidget(this);
> var req = org.eclipse.swt.Request.getInstance();
> req.addParameter(id + ".dirty", "yes");
> req.send();
> }
>
>
> My readData method of my LCA:
>
>
> public void readData( final Widget widget ) {
> final GMap map = (GMap) widget;
> final String isDirty = WidgetLCAUtil.readPropertyValue(map, "dirty");
>
> if (isDirty != null){
> ProcessActionRunner.add(new Runnable(){
> public void run() {
> map.fireDirtyEvent();
> }
> });
> }
>
>
> Hope this makes it clearer.
>
> Mike
>
>
> Martin wrote:
>> Ok then, this should work, how did you implement this, could you post
>> some code?
>>
|
|
|
Powered by
FUDForum. Page generated in 0.03766 seconds