Skip to main content



      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 11:52 Go to next message
Eclipse UserFriend
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 11:56] by Moderator

Re: Text control for dates [message #1816971 is a reply to message #1816776] Wed, 13 November 2019 03:37 Go to previous messageGo to next message
Eclipse UserFriend
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 12:19 Go to previous message
Eclipse UserFriend
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: Mon May 19 18:03:30 EDT 2025

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

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

Back to the top