[no subject]

2009-04-03 Thread GWT GWT
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


















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 onModuleLoad().

*/
*

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
-~--~~~~--~~--~--~---



Need tutorial for GWT and struts integration

2009-03-31 Thread GWT GWT
Hi,
I am new to GWT.
We have an application developed using struts,spring,hibernate.
now we want to integrate GWT with this application( developed by using
struts,spring,hibernate).
I want tutorial which describe step by step how to integrate GWT with
struts.
thanks in advance

--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---



[no subject]

2009-03-05 Thread GWT GWT
Hi I have developed an application using using GWT,spring,Hibernate.
Now I am getting an warning of

[WARN] StandardContext[]Exception while dispatching incoming RPC call
com.google.gwt.user.server.rpc.UnexpectedException: Service method 'public
abstract java.util.List
com.company.client.rpc.TeacherService.getPupils(java.lang.Integer)' threw an
unexpected exception: java.lang.RuntimeException:
org.springframework.beans.factory.CannotLoadBeanClassException: Cannot find
class [org.apache.commons.dbcp.BasicDataSource] for bean with name
'dataSource' defined in class path resource [applicationContext.xml]; nested
exception is java.lang.ClassNotFoundException:
org.apache.commons.dbcp.BasicDataSource
 at
com.google.gwt.user.server.rpc.RPC.encodeResponseForFailure(RPC.java:361)
 at com.google.gwt.user.server.rpc.RPC.invokeAndEncodeResponse(RPC.java:547)
 at
com.google.gwt.user.server.rpc.RemoteServiceServlet.processCall(RemoteServiceServlet.java:265)
 at
com.google.gwt.user.server.rpc.RemoteServiceServlet.doPost(RemoteServiceServlet.java:187)
 at javax.servlet.http.HttpServlet.service(HttpServlet.java:709)
 at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
 at
com.google.gwt.dev.shell.GWTShellServlet.service(GWTShellServlet.java:252)
 at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
 at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:237)
 at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:157)
 at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:214)
Caused by: java.lang.RuntimeException:
org.springframework.beans.factory.CannotLoadBeanClassException: Cannot find
class [org.apache.commons.dbcp.BasicDataSource] for bean with name
'dataSource' defined in class path resource [applicationContext.xml]; nested
exception is java.lang.ClassNotFoundException:
org.apache.commons.dbcp.BasicDataSource
 at
com.company.server.gwt.TeacherServiceImpl.getPupils(TeacherServiceImpl.java:48)
 at com.google.gwt.user.server.rpc.RPC.invokeAndEncodeResponse(RPC.java:528)
 at
com.google.gwt.user.server.rpc.RemoteServiceServlet.processCall(RemoteServiceServlet.java:265)
 at
com.google.gwt.user.server.rpc.RemoteServiceServlet.doPost(RemoteServiceServlet.java:187)
 at javax.servlet.http.HttpServlet.service(HttpServlet.java:709)
 at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
 at
com.google.gwt.dev.shell.GWTShellServlet.service(GWTShellServlet.java:252)
 at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
 at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:237)
 at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:157)
 at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:214)
Caused by: org.springframework.beans.factory.CannotLoadBeanClassException:
Cannot find class [org.apache.commons.dbcp.BasicDataSource] for bean with
name 'dataSource' defined in class path resource [applicationContext.xml];
nested exception is java.lang.ClassNotFoundException:
org.apache.commons.dbcp.BasicDataSource
 at
org.springframework.beans.factory.support.AbstractBeanFactory.resolveBeanClass(AbstractBeanFactory.java:1141)
 at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.predictBeanType(AbstractAutowireCapableBeanFactory.java:524)
 at
org.springframework.beans.factory.support.AbstractBeanFactory.isFactoryBean(AbstractBeanFactory.java:1177)
 at
org.springframework.beans.factory.support.AbstractBeanFactory.isFactoryBean(AbstractBeanFactory.java:758)
 at
org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:422)
 at
org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:728)
 at
org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:380)
 at
org.springframework.context.support.ClassPathXmlApplicationContext.(ClassPathXmlApplicationContext.java:139)
 at
org.springframework.context.support.ClassPathXmlApplicationContext.(ClassPathXmlApplicationContext.java:83)
 at com.company.spring.ContextUtil.getContext(ContextUtil.java:12)
Caused by: java.lang.ClassNotFoundException:
org.apache.commons.dbcp.BasicDataSource
 at
org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1340)
 at
org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1189)
 at org.springframework.util.ClassUtils.forName(ClassUtils.java:211)
 at
org.springframework.beans.factory.support.AbstractBeanDefinition.resolveBeanClass(AbstractBeanDefinition.java:385)
 at
org.springframework.beans.factory.support.AbstractBeanFactory.resolveBeanClass(AbstractBeanFactory.java:1138)
 at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.predictBeanType(A

Facing problem in GWT,Spring,hibernate application

2009-02-25 Thread GWT GWT
Hi
I have done an GWT,Spring,hibernate application using the link
http://eggsylife.blogspot.com/2008/02/hibernate-spring-google-web-too...
 .

My application got open in hosted mode. When i click on search button "
onFailure "  method of  "TeacherModel " class got called.

When I am trying to debug the code, the flow from the following line

PupilCollection collection = (PupilCollection) ContextUtil.*getContext
*().getBean("pupilCollection");
is returning back to "TeacherModel" class.
but I am not getting any exception on this line.

Thanks in advance.

--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---



Struts+GWT

2009-02-11 Thread GWT GWT
Hi ,
I am trying to develp an application using GWT+Struts .
I had search on net But I am not getting tutorial to develop  an application
using GWT+Struts.
So from where will I get that tutorial.

--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---



[no subject]

2009-02-08 Thread GWT GWT
Hi ,
I am new in GWT.
I am trying to develp an application using GWT+Spring .

following  are application code

1) MyApplication .java

package com.client;
import com.google.gwt.core.client.EntryPoint;
import com.google.gwt.core.client.GWT;
import com.google.gwt.user.client.rpc.AsyncCallback;
import com.google.gwt.user.client.rpc.ServiceDefTarget;
import com.google.gwt.user.client.ui.*;


// Referenced classes of package csw.client MyService, MyServiceAsync
public class MyApplication implements EntryPoint {
public MyApplication() {
}
public void onModuleLoad() {
final Label label = new Label();
final MyServiceAsync svc = (MyServiceAsync)
GWT.create(com.client.MyService.class);
ServiceDefTarget endpoint = (ServiceDefTarget) svc;
endpoint.setServiceEntryPoint("services/myService");
final AsyncCallback callback = new AsyncCallback() {
public void onSuccess(Object result) {
label.setText(result.toString());
}
public void onFailure(Throwable ex) {
label.setText(ex.toString());
}
};
Button button = new Button("Click ME");
button.addClickListener(new ClickListener() {
public void onClick(Widget w) {
svc.myMethod("Do Something", callback);
}
});
RootPanel.get("testing").add(button);
RootPanel.get("testing2").add(label);
}
}



Myapplication.html





  


MyApplication


  
  




 
 
 
 
  


Myapplication.gwt.xml


  
  

  
  
  
  
  
  
  

  
  

  
  




when I run  MyApplication-shell  command

I got click me button.
But when i click on click me button I got following exception.

[WARN] StandardContext[]Error loading WebappClassLoader
  delegate: false
  repositories:
--> Parent Classloader:
sun.misc.launcher$appclassloa...@11b86e7
 org.springframework.web.servlet.DispatcherServlet
java.lang.ClassNotFoundException:
org.springframework.web.servlet.DispatcherServlet
 at
org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1340)
 at
org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1189)
 at
org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:964)
 at
org.apache.catalina.core.StandardWrapper.allocate(StandardWrapper.java:687)
 at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:144)
 at
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
 at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
 at
org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:198)
 at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:152)
 at
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
 at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
 at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:137)
 at
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
 at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:118)
 at
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:102)
 at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
 at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
 at
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
 at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
 at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:929)
 at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:160)
 at
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:799)
 at
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:705)
 at
org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:577)
 at
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:683)
 at java.lang.Thread.run(Unknown Source)

--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---