Subversion Repositories SmartDukaan

Rev

Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
405 rajveer 1
/**
2
 * 
3
 */
4
package in.shop2020.serving.controllers;
5
 
6
 
7
import org.apache.juli.logging.Log;
8
import org.apache.juli.logging.LogFactory;
413 rajveer 9
import org.apache.struts2.convention.annotation.Result;
10
import org.apache.struts2.convention.annotation.Results;
405 rajveer 11
 
12
/**
413 rajveer 13
 * @author rajveer
405 rajveer 14
 *
15
 */
413 rajveer 16
 
637 rajveer 17
@Results({
18
    @Result(name="redirect", type="redirectAction", 
19
    		params = {"actionName" , "login"})
20
})
650 rajveer 21
public class MyaccountController extends BaseController {
405 rajveer 22
 
650 rajveer 23
	private static final long serialVersionUID = 1L;
24
 
405 rajveer 25
	private static Log log = LogFactory.getLog(MyaccountController.class);
26
 
27
 
28
	public MyaccountController() {
29
		super();
30
	}
650 rajveer 31
 
32
 
33
	public String index(){
34
    	log.info("this.request=" + this.request);
35
 
36
		if(!userinfo.isLoggedIn()){
37
			setRedirectUrl();
38
			return "redirect";
413 rajveer 39
		}
40
 
650 rajveer 41
		htmlSnippets.put("MYACCOUNT_HEADER", pageLoader.getMyaccountHeaderHtml());
42
		htmlSnippets.put("MYACCOUNT_DETAILS", pageLoader.getMyaccountDetailsHtml(userinfo.getUserId()));
43
		return "index";
419 rajveer 44
 
405 rajveer 45
    }
46
 
507 rajveer 47
 
48
	public String getMyaccountHeaderSnippet(){
49
		return htmlSnippets.get("MYACCOUNT_HEADER");
50
	}
51
 
52
	public String getMyaccountDetailsSnippet(){
53
		return htmlSnippets.get("MYACCOUNT_DETAILS");
54
	}
55
 
405 rajveer 56
}