Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Remote Application Platform (RAP) » Text control for dates(Client side scripting for dates)
Text control for dates [message #1816776] Wed, 06 November 2019 16:52 Go to next message
Xi Jin is currently offline Xi JinFriend
Messages: 3
Registered: May 2018
Junior Member
Hello,

We have a text control for dates which has a VerifyListener attached to it but we are running into issues every time the end user starts quickly typing in values in the control. Has anyone else run into this issue? If so what you did to alleviate it? How are people in general handling date based text controls in RAP?

I am thinking of writing a script importing a 3rd party javascript library which will apply the formatting to the input being entered. How do I import the library into my Java RAP project? Do I just add it to the src/main/resources? Another option I can think of is to zero in on a formatting and apply it to the input.

The next question was how to to handle key board short cuts, say for instance, if I type in 'd' then I should get the current date. Should I keep implementing ClientListener for KeyUp and have another script take care of that?

Thanks

[Updated on: Wed, 06 November 2019 16:56]

Report message to a moderator

Re: Text control for dates [message #1816971 is a reply to message #1816776] Wed, 13 November 2019 08:37 Go to previous messageGo to next message
Ivan Furnadjiev is currently offline Ivan FurnadjievFriend
Messages: 2327
Registered: July 2009
Location: Sofia, Bulgaria
Senior Member
Hi,

why not using DateTime widget for it? If you need Text based solution with validation, you can use scripting to do the validation on the client [1].

[1] https://github.com/eclipse/rap/blob/master/examples/org.eclipse.rap.examples.pages/src/org/eclipse/rap/examples/pages/internal/scripting/CustomBehaviors.java

Regards,
Ivan
Re: Text control for dates [message #1817230 is a reply to message #1816971] Mon, 18 November 2019 17:19 Go to previous message
Xi Jin is currently offline Xi JinFriend
Messages: 3
Registered: May 2018
Junior Member
Ivan Furnadjiev wrote on Wed, 13 November 2019 08:37

Hi,

why not using DateTime widget for it? If you need Text based solution with validation, you can use scripting to do the validation on the client [1].

[1] https://github.com/eclipse/rap/blob/master/examples/org.eclipse.rap.examples.pages/src/org/eclipse/rap/examples/pages/internal/scripting/CustomBehaviors.java

Regards,
Ivan




Thanks for the reply. We need to allow user to type in the date as well need to allow them to type in some shortcut keys. I'll look into the custom validation you pointed to. Seems like I need to learn some regular expressions.
Previous Topic:RAP and SWT and Sirius
Next Topic:impossible to create a RAP application involving EMF model and RAP e4 ui.
Goto Forum:
  


Current Time: Fri Dec 06 10:19:28 GMT 2019

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

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

Back to the top