Subversion Repositories SmartDukaan

Rev

Rev 620 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 620 Rev 637
Line 28... Line 28...
28
/**
28
/**
29
 * @author rajveer
29
 * @author rajveer
30
 *
30
 *
31
 */
31
 */
32
 
32
 
-
 
33
@Results({
-
 
34
    @Result(name="redirect", type="redirectAction", 
-
 
35
    		params = {"actionName" , "login"})
-
 
36
})
33
public class MyaccountController extends BaseController 
37
public class MyaccountController extends BaseController 
34
	implements ParameterAware {
38
	implements ParameterAware {
35
 
39
 
36
	
40
	
37
	/**
41
	/**
Line 77... Line 81...
77
		return "failure";
81
		return "failure";
78
    }
82
    }
79
 
83
 
80
    
84
    
81
    // GET /test
85
    // GET /test
82
    public HttpHeaders index() throws UnsupportedEncodingException {
86
    public String index(){
83
    	log.info("this.request=" + this.request);
87
    	log.info("this.request=" + this.request);
84
    	
88
    	
85
    	String userId = "";
89
    	String userId = "";
86
    	
90
    	
87
    	if(this.userinfo.isLoggedIn()){
91
    	if(this.userinfo.isLoggedIn()){
Line 90... Line 94...
90
			params.put(PageContentKeys.CUSTOMER_ID, userId);
94
			params.put(PageContentKeys.CUSTOMER_ID, userId);
91
			params.put(PageContentKeys.ITEM_COUNT, userinfo.getTotalItems()+"");
95
			params.put(PageContentKeys.ITEM_COUNT, userinfo.getTotalItems()+"");
92
			params.put(PageContentKeys.IS_LOGGED_IN, userinfo.isLoggedIn()+"");
96
			params.put(PageContentKeys.IS_LOGGED_IN, userinfo.isLoggedIn()+"");
93
			params.put(PageContentKeys.USER_NAME, userinfo.getNameOfUser());
97
			params.put(PageContentKeys.USER_NAME, userinfo.getNameOfUser());
94
			htmlSnippets = PageManager.getPageManager().getPageContents(PageEnum.MY_ACCOUNT_PAGE, params);
98
			htmlSnippets = PageManager.getPageManager().getPageContents(PageEnum.MY_ACCOUNT_PAGE, params);
95
			
-
 
96
			return new DefaultHttpHeaders("index").disableCaching();
99
			return "index";
97
    	
-
 
98
    	}else{
100
    	}else{
99
    		return new DefaultHttpHeaders("login").disableCaching();
101
    		return "redirect";
100
    	}
102
    	}
101
    	
103
    	
102
    }
104
    }
103
    
105
    
104
    public HttpHeaders show(){
106
    public HttpHeaders show(){