Skip to main content


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 13:02 Go to next message
Thorsten Lichtenwalter is currently offline Thorsten LichtenwalterFriend
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 15:32 Go to previous messageGo to next message
Ivan Furnadjiev is currently offline Ivan FurnadjievFriend
Messages: 2426
Registered: July 2009
Location: Sofia, Bulgaria
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 10:17 Go to previous messageGo to next message
Thorsten Lichtenwalter is currently offline Thorsten LichtenwalterFriend
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 13:43 Go to previous messageGo to next message
Thorsten Lichtenwalter is currently offline Thorsten LichtenwalterFriend
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 13: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 09:10 Go to previous messageGo to next message
Tim Buschtoens is currently offline Tim BuschtoensFriend
Messages: 396
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] Tue, 09 July 2013 03:41 Go to previous message
Thorsten Lichtenwalter is currently offline Thorsten LichtenwalterFriend
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:Can RAP be used to convert/transform web application to desktop application?
Next Topic:Clientscripting: Trigger traverse programmatically
Goto Forum:
  


Current Time: Fri Apr 19 22:51:16 GMT 2024

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

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

Back to the top