Subversion Repositories SmartDukaan

Rev

Rev 10283 | Rev 10384 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 10283 Rev 10300
Line 19... Line 19...
19
 
19
 
20
import org.apache.log4j.Logger;
20
import org.apache.log4j.Logger;
21
import org.apache.struts2.interceptor.ServletRequestAware;
21
import org.apache.struts2.interceptor.ServletRequestAware;
22
import org.apache.struts2.interceptor.ServletResponseAware;
22
import org.apache.struts2.interceptor.ServletResponseAware;
23
 
23
 
-
 
24
import com.google.gson.Gson;
24
import com.opensymphony.xwork2.ValidationAwareSupport;
25
import com.opensymphony.xwork2.ValidationAwareSupport;
25
 
26
 
26
/**
27
/**
27
 * Base class for all user action handlers i.e. controllers
28
 * Base class for all user action handlers i.e. controllers
28
 * 
29
 * 
Line 125... Line 126...
125
		}
126
		}
126
		return cookieVal;
127
		return cookieVal;
127
	}
128
	}
128
 
129
 
129
 
130
 
130
	public void setResultJson(String resultJSon) {
131
	public void setResultJson(Object resultJSon) {
-
 
132
		if(!resultJSon.getClass().equals(String.class)) {
-
 
133
			this.resultJson = new Gson().toJson(resultJSon);
-
 
134
		} else {
131
		this.resultJson = resultJSon;
135
			this.resultJson = (String)resultJSon;
-
 
136
		}
132
	}
137
	}
133
 
138
 
134
 
139
 
135
	public String getResultJson() {
140
	public String getResultJson() {
136
		return resultJson;
141
		return resultJson;