Hi can any one guide me. Thanks karun On Friday, July 13, 2012 1:37:29 AM UTC+5:30, karun wrote:
> Hi > > i have class in shared package, its very simple class which has a static > variable. i want to assign a value for this static variable in server class > and access the same value in client class. > > is it possible to access the value of static variable in client class, to > which i modify or assign a value in server class ? > > * > > package > *com.ca.csp.cso.project.shared;* > > public > **class* LocalisedString > > { > * > > public > **static* String *str_value;* > > **} > > *package* com.ca.csp.cso.project.server; > > impot com.ca.csp.cso.project.shared.LocalisedString; > ** > *public* *class* SimLookUpImpl *extends* RemoteServiceServlet { > * > > public > **void* init() *throws* ServletException {* > > super > *.init(); > > *try* { > > LocalisedString.*str_value = "samplestring";* > > *}* > > *catch* (Exception e) { > > } > > } > > } > * package* com.ca.csp.cso.project.client; > > * > > impot com.ca.csp.cso.project.shared.LocalisedString; > > public > **class* SimplePanel *extends* FlowPanel { > > public SimplePanel () > > { > > window.Alert(LocalisedString.*str_value *); // prints null; > > } > > } > > > > Thanks > > karun > -- You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group. To view this discussion on the web visit https://groups.google.com/d/msg/google-web-toolkit/-/Owk5rwmydFEJ. 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.