Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Remote Application Platform (RAP) » Clientside Input Validation
Clientside Input Validation [message #1065924] Fri, 28 June 2013 10:44 Go to next message
Tiburon T is currently offline Tiburon TFriend
Messages: 61
Registered: October 2011
Member
Hello!

I am trying to integrate the client side input validation into our current RAP 2.0.1 project. I downloaded the 2.0 tagged org.eclipse.clientscripting from git(1). Then I imported the org.eclipse.rap.clientscripting plugin into my workspace and made our own plugin depend on it. I copied the classes CustomBehaviors and ResourceLoaderUtil along with the .js files from the demo project and changed them so that all resources are found and read correctly (I tried org.eclipse.rap.clientscripting.demo as well as org.eclipse.rap.demo.clientscripting). Finally I tried to make a Textfield Digit-Only :
CustomBehaviors.addDigitsOnlyBehavior(inputText);

Unfortunately I get this error when the containing dialog is opened:
Error: Error: Operation "create" on target "cs513" of type "null" failed:
No Handler for type rwt.clientscripting.Listener
Properties: 
code = var handleEvent = function( event ) {

  var regexp = /^[0-9]*$/;
  var text = event.widget.getText();
  if( text.match( regexp ) === null ) {
    event.widget.setBackground( [ 255, 255, 128 ] );
    event.widget.setToolTip( "Only digits allowed!" );
  } else {
    event.widget.setBackground( null );
    event.widget.setToolTip( null );
  }

};


Could somebody please explain to me, what I am missing here?

Thanks,
Tiburon

[1]http://git.eclipse.org/c/rap/incubator/org.eclipse.rap.incubator.clientscripting.git/tag/?id=2.0.0-M4-20121218
Re: Clientside Input Validation [message #1065954 is a reply to message #1065924] Fri, 28 June 2013 13:22 Go to previous messageGo to next message
Thorsten Lichtenwalter is currently offline Thorsten LichtenwalterFriend
Messages: 12
Registered: February 2013
Junior Member
Obviously there is no registered handler for 'rwt.clientscripting.Listener'. This handler is defined by ListenerAdapter.js which is located in the clientscripting bundle. Did you do any modifications at this bundle? Especially within the class ClientScriptingResources (this one loads all that javascript stuff).



Thorsten Lichtenwalter
Software Development
msgGillardon AG, Bretten, Germany
Re: Clientside Input Validation [message #1065966 is a reply to message #1065954] Fri, 28 June 2013 13:55 Go to previous messageGo to next message
Tiburon T is currently offline Tiburon TFriend
Messages: 61
Registered: October 2011
Member
Hi,

Thanks for your hint!
I left the whole org.eclipse.rap.clientscripting plugin unchanged and even made sure by debugging, that all the contained .js files are loaded properly.
Re: Clientside Input Validation [message #1066161 is a reply to message #1065966] Mon, 01 July 2013 10:04 Go to previous messageGo to next message
Tim Buschtoens is currently offline Tim BuschtoensFriend
Messages: 396
Registered: July 2009
Senior Member
Hi.

How did you confirm that the js file is loaded?
Can you check in the network tab of your browsers developer tools if
clientscripting.js is transfered to the client? Are there any other
errors in the javascript console? What browser are you using?

Also, any details regarding your application setup (how is it launched,
do you use workbench) might also help.

Greetings,
Tim

Am 28.06.2013 15:55, schrieb Tiburon T:
> Hi,
>
> Thanks for your hint!
> I left the whole org.eclipse.rap.clientscripting plugin unchanged and
> even made sure by debugging, that all the contained .js files are loaded
> properly.

--
Tim Buschtöns

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

Professional services for RAP and RCP?
http://eclipsesource.com/services/rap/
Re: Clientside Input Validation [message #1068124 is a reply to message #1066161] Fri, 12 July 2013 09:47 Go to previous message
Tiburon T is currently offline Tiburon TFriend
Messages: 61
Registered: October 2011
Member
Hi!

Thanks for you answer Tim. Unfortunately I didn't have enough time to work on this subject until now, and couldn't reply earlier. But I managed to fix my problem today by switching to the streams/2.0 Version from your git. With that version everythings works as expected.

Thanks,
Tiburon
Previous Topic:I have a white screen when I wait for the response of the server
Next Topic:CVS Integration in RAP
Goto Forum:
  


Current Time: Thu Apr 18 13:41:52 GMT 2024

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

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

Back to the top