Hi, I have developed simple GWT application which conatian firsrname,lastname, birthYear field. Now I am trying to add validation for birthYear field . I have added 1) gwt-validation-1[1].0.jar 2)gwt-vl-hibernate-0.5b.jar
in classpath of environment variable. my application code are: MyApplication.gwt.xml <module> <!-- Inherit the core Web Toolkit stuff. --> <inherits name='com.google.gwt.user.User'/> <inherits name='com.google.gwt.validation.Validation'/> <!-- Specify the app entry point class. --> <entry-point class= 'com.google.gwt.sample.MyApplication.client.MyApplication'/> </module> MyApplication.java * package* com.google.gwt.sample.MyApplication.client; * import* com.google.gwt.core.client.EntryPoint; * import* com.google.gwt.user.client.ui.Button; * import* com.google.gwt.user.client.ui.ClickListener; * import* com.google.gwt.user.client.ui.Label; * import* com.google.gwt.user.client.ui.RootPanel; * import* com.google.gwt.user.client.ui.Widget; * import* com.google.gwt.user.client.ui.TextBox; * import* eu.maydu.gwt.validation.client.ValidationProcessor; * import* eu.maydu.gwt.validation.client.actions.LabelTextAction; * import* eu.maydu.gwt.validation.client.actions.StyleAction; * import* eu.maydu.gwt.validation.client.validators.numeric.IntegerValidator; /** * Entry point classes define <code>onModuleLoad()</code>. */ * public* *class* MyApplication *implements* EntryPoint { /** * This is the entry point method. */ *public* *void* onModuleLoad() { *final* Button button = *new* Button("Click me"); *final* Label label = *new* Label(); *final* Label firstName = *new* Label(); *final* Label lastName = *new* Label(); *final* TextBox textBox=*new* TextBox(); *final* TextBox firstNameTxt=*new* TextBox(); *final* TextBox lastNameTxt=*new* TextBox(); TextBox birthYearTextBox = *new* TextBox(); Label errorLabel = *new* Label(""); Button validateButton = *new* Button("Validate!"); ValidationProcessor validator = *new* ValidationProcessor(); validator.addValidators( "birthYear", *new* IntegerValidator(birthYearTextBox, 1890, 2009) .addActionForFailure(*new* StyleAction("validationFailedBorder")) .addActionForFailure(*new* LabelTextAction(errorLabel)) ); button.addClickListener(*new* ClickListener() { *public* *void* onClick(Widget sender) { *if* (label.getText().equals("")) label.setText("Hello World!"); *else * label.setText(""); } }); // Assume that the host HTML has elements defined whose // IDs are "slot1", "slot2". In a real app, you probably would not want // to hard-code IDs. Instead, you could, for example, search for all // elements with a particular CSS class and replace them with widgets. // firstName.setText("FirstName"); lastName.setText("LastName"); RootPanel.*get*("slot1").add(firstName); RootPanel.*get*("slot2").add(firstNameTxt); RootPanel.*get*("slot3").add(lastName); RootPanel.*get*("slot4").add(lastNameTxt); RootPanel.*get*("slot4").add(birthYearTextBox); RootPanel.*get*("slot5").add(button); RootPanel.*get*("slot6").add(label); } } when I compile my application i get following error.: Analyzing source in module 'com.google.gwt.sample.MyApplication.MyApplication' [ERROR] Errors in 'D:\NIMS_Gadgets\GWTvalidation\MyApplication\src\com\google\gwt\sample\MyApplication\client\MyApplication.java' [ERROR] Line 11: The import eu cannot be resolved [ERROR] Line 12: The import eu cannot be resolved [ERROR] Line 13: The import eu cannot be resolved [ERROR] Line 14: The import eu cannot be resolved [ERROR] Line 40: ValidationProcessor cannot be resolved to a type [ERROR] Line 40: ValidationProcessor cannot be resolved to a type [ERROR] Line 43: IntegerValidator cannot be resolved to a type [ERROR] Line 44: StyleAction cannot be resolved to a type [ERROR] Line 45: LabelTextAction cannot be resolved to a type Finding entry point classes [ERROR] Unable to find type 'com.google.gwt.sample.MyApplication.client.MyApplication' [ERROR] Hint: Previous compiler errors may have made this type unavailable [ERROR] Hint: Check the inheritance chain from your module; it may not be inheriting a required module or a module may not be adding its source path entries properly Is there something obvious that I am missing? --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group. To post to this group, send email to Google-Web-Toolkit@googlegroups.com To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/Google-Web-Toolkit?hl=en -~----------~----~----~----~------~----~------~--~---