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