Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Remote Application Platform (RAP) » Migrating to RAP 2.1-RC3: Extending behaviour of DateTime widget(RAP-ClientScripting still missing some essential features?)
Migrating to RAP 2.1-RC3: Extending behaviour of DateTime widget [message #1064256] Tue, 18 June 2013 09:02 Go to next message
Thorsten Lichtenwalter is currently offline Thorsten Lichtenwalter
Messages: 12
Registered: February 2013
Junior Member
While migrating to RAP 2.1-RC3 I want to add some pieces of behaviour to the client-component of a DateTime widget. Instead of writing a custom widget I would like to use ClientScripting (as recommended). Unfortunately there are only a few methods on client side to read the actual (server-)state of a widget. Text widgets are the only widgets which are currently supported by get-methods. Are there any plans to fully supoprt the DateTime widget in the coming releases (RAP 2.1, 2.2, 2.x, 3.x)?

Thx for any support / hints in advance
Thorsten Lichtenwalter


---
Thorsten lichtenwalter
Software Development
msgGillardon AG, Bretten, Germany


Thorsten Lichtenwalter
Software Development
msgGillardon AG, Bretten, Germany
Re: Migrating to RAP 2.1-RC3: Extending behaviour of DateTime widget [message #1064310 is a reply to message #1064256] Tue, 18 June 2013 11:32 Go to previous messageGo to next message
Ivan Furnadjiev is currently offline Ivan Furnadjiev
Messages: 1794
Registered: July 2009
Senior Member
Hi Thorsten,
this is an interesting idea. Please open an enhancement request and we
will discuss the possibilities there.
Thanks,
Ivan

On 6/18/2013 4:02 PM, Thorsten Lichtenwalter wrote:
> While migrating to RAP 2.1-RC3 I want to add some pieces of behaviour
> to the client-component of a DateTime widget. Instead of writing a
> custom widget I would like to use ClientScripting (as recommended).
> Unfortunately there are only a few methods on client side to read the
> actual (server-)state of a widget. Text widgets are the only widgets
> which are currently supported by get-methods. Are there any plans to
> fully supoprt the DateTime widget in the coming releases (RAP 2.1,
> 2.2, 2.x, 3.x)?
>
> Thx for any support / hints in advance
> Thorsten Lichtenwalter
>
>
> ---
> Thorsten lichtenwalter
> Software Development
> msgGillardon AG, Bretten, Germany
>

--
Ivan Furnadjiev

Twitter: @EclipseRAP
Blog: http://eclipsesource.com/blogs/

Professional services for RAP and RCP?
http://eclipsesource.com/services/rap/
Re: Migrating to RAP 2.1-RC3: Extending behaviour of DateTime widget [message #1064445 is a reply to message #1064310] Wed, 19 June 2013 06:17 Go to previous messageGo to next message
Thorsten Lichtenwalter is currently offline Thorsten Lichtenwalter
Messages: 12
Registered: February 2013
Junior Member
Just opened an enhancement bug: https://bugs.eclipse.org/bugs/show_bug.cgi?id=411101



Thorsten Lichtenwalter
Software Development
msgGillardon AG, Bretten, Germany
Re: Migrating to RAP 2.1-RC3: Extending behaviour of DateTime widget [message #1065793 is a reply to message #1064445] Thu, 27 June 2013 09:43 Go to previous messageGo to next message
Thorsten Lichtenwalter is currently offline Thorsten Lichtenwalter
Messages: 12
Registered: February 2013
Junior Member
As long as I can't use ClientScripting for modfying my DateTime widget I started a migration towards RAP 2.1 recently.

I am using rap-internal qooxdoo classes. After replacing all qt.* objects within my widget by rwt.* objects I finally created the TypeHandler. My java and javascript compile successfully but the widget isn't displayed. I suppose there is a link missing which inserts my widget into the actual dom tree of the browser.

I looked at the CKEditor example and noticed a remarkable difference. In constructor of CKEditor a parent is set:
this.remoteObject.set("parent", WidgetUtil.getId(this));


On client side (javascript) the created widget is added to the dom tree:
this.parent = rap.getObject( properties.parent );
this.element = document.createElement( "div" );
this.parent.append( this.element );


I adopted this pattern to my widget. But my app crashes while accessing 'properties.parent' in javascript with the following error: "entry is undefined".

I debugged a little bit and ended up in this method of rap-client.js:
getObject : function( id ) {
var entry = rwt.remote.ObjectRegistry.getEntry( id );
var result;
if( entry && entry.handler.isPublic ) {
result = entry.object;
} else {
result = this._.getWrapperFor( entry.object );
}
return result;
}


'entry' is null here (while debugging CKEditor I got a value). Why is my parent object of my DateTime widget null while there is a value in CKEditor? I don't see the difference.

Any ideas what's going wrong?



Thorsten Lichtenwalter
Software Development
msgGillardon AG, Bretten, Germany

[Updated on: Thu, 27 June 2013 09:44]

Report message to a moderator

Re: Migrating to RAP 2.1-RC3: Extending behaviour of DateTime widget [message #1066142 is a reply to message #1065793] Mon, 01 July 2013 05:10 Go to previous messageGo to next message
Tim Buschtoens is currently offline Tim Buschtoens
Messages: 382
Registered: July 2009
Senior Member
Hi.

Can you sysout/console.log what the value of "WidgetUtil.getId( this )"
on the Server and "properties.parent" on the client is? Also, is the
widget you attach to a Composite?

Greetings,
Tim


Am 27.06.2013 15:43, schrieb Thorsten Lichtenwalter:
> As long as I can't use ClientScripting for modfying my DateTime widget I
> started a migration towards RAP 2.1 recently.
>
> I am using rap-internal qooxdoo classes. After replacing all qt.*
> objects within my widget by rwt.* objects I finally created the
> TypeHandler. My java and javascript compile but the widget isn't
> displayed. I suppose there is a link missing which inserts my widget
> into the actual dom tree of the browser.
>
> I looked at the CKEditor example and noticed a remarkable difference. In
> constructor of CKEditor a parent is set:
> this.remoteObject.set("parent", WidgetUtil.getId(this));
>
>
> On client side (javascript) the created widget is added to the dom tree:
> this.parent = rap.getObject( properties.parent );
> this.element = document.createElement( "div" );
> this.parent.append( this.element );
>
>
> I adopted this pattern to my widget. But my app crashes while accessing
> 'properties.parent' in javascript with the following error: "entry is
> undefined".
>
> I debugged a little bit and ended up in this method of rap-client.js:
> getObject : function( id ) {
> var entry = rwt.remote.ObjectRegistry.getEntry( id );
> var result;
> if( entry && entry.handler.isPublic ) {
> result = entry.object;
> } else {
> result = this._.getWrapperFor( entry.object );
> }
> return result;
> }
>
>
> 'entry' is null here (while debugging CKEditor I got a value). Why is my
> parent object of my DateTime widget null while there is a value in
> CKEditor? I don't see the difference.
>
> Any ideas what's going wrong?
>
>

--
Tim Buschtöns

Twitter: @EclipseRAP
Blog: http://eclipsesource.com/blogs/

Professional services for RAP and RCP?
http://eclipsesource.com/services/rap/
Re: Migrating to RAP 2.1-RC3: Extending behaviour of DateTime widget [message #1067485 is a reply to message #1066142] Mon, 08 July 2013 23:41 Go to previous message
Thorsten Lichtenwalter is currently offline Thorsten Lichtenwalter
Messages: 12
Registered: February 2013
Junior Member
Tim Buschtoens wrote on Mon, 01 July 2013 05:10
Hi.

Can you sysout/console.log what the value of "WidgetUtil.getId( this )"
on the Server and "properties.parent" on the client is? Also, is the
widget you attach to a Composite?

Greetings,
Tim


Hi Tim,

in the meantime I changed my strategy for migrating the DateTime widget. I just migrated the UI and made the necessary modifications on the LCAs... and it's fully functional now. Next step might be switching the protocol from LCAs to the new JSON based one...

Up to now it feels a lot better and easier to write custom widgets using the new protocol instead of those LCAs... I think this is a solid foundation starting with RAP 2.0.

Regards
Thorsten


Thorsten Lichtenwalter
Software Development
msgGillardon AG, Bretten, Germany
Previous Topic:In a MARKUP_ENABLED table, clicking on the link with img tag in a tag will not trigger an SWT.Select
Next Topic:Need example to deploy a RAP 2.1 app on Tomcat server
Goto Forum:
  


Current Time: Fri Aug 29 12:19:17 EDT 2014

Powered by FUDForum. Page generated in 0.01827 seconds