Subversion Repositories SmartDukaan

Rev

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

Rev 650 Rev 781
Line 4... Line 4...
4
package in.shop2020.serving.controllers;
4
package in.shop2020.serving.controllers;
5
 
5
 
6
 
6
 
7
import org.apache.juli.logging.Log;
7
import org.apache.juli.logging.Log;
8
import org.apache.juli.logging.LogFactory;
8
import org.apache.juli.logging.LogFactory;
-
 
9
import org.apache.struts2.convention.annotation.InterceptorRef;
-
 
10
import org.apache.struts2.convention.annotation.InterceptorRefs;
9
import org.apache.struts2.convention.annotation.Result;
11
import org.apache.struts2.convention.annotation.Result;
10
import org.apache.struts2.convention.annotation.Results;
12
import org.apache.struts2.convention.annotation.Results;
11
 
13
 
12
/**
14
/**
13
 * @author rajveer
15
 * @author rajveer
14
 *
16
 *
15
 */
17
 */
16
 
18
 
-
 
19
@InterceptorRefs({
-
 
20
    @InterceptorRef("login"),
-
 
21
    @InterceptorRef("myDefault")
-
 
22
})
-
 
23
 
17
@Results({
24
@Results({
18
    @Result(name="redirect", type="redirectAction", 
25
    @Result(name="redirect", type="redirectAction", 
19
    		params = {"actionName" , "login"})
26
    		params = {"actionName" , "login"})
20
})
27
})
21
public class MyaccountController extends BaseController {
28
public class MyaccountController extends BaseController {
Line 31... Line 38...
31
    
38
    
32
 
39
 
33
	public String index(){
40
	public String index(){
34
    	log.info("this.request=" + this.request);
41
    	log.info("this.request=" + this.request);
35
 
42
 
36
		if(!userinfo.isLoggedIn()){
-
 
37
			setRedirectUrl();
-
 
38
			return "redirect";
-
 
39
		}
-
 
40
 
-
 
41
		htmlSnippets.put("MYACCOUNT_HEADER", pageLoader.getMyaccountHeaderHtml());
43
		htmlSnippets.put("MYACCOUNT_HEADER", pageLoader.getMyaccountHeaderHtml());
42
		htmlSnippets.put("MYACCOUNT_DETAILS", pageLoader.getMyaccountDetailsHtml(userinfo.getUserId()));
44
		htmlSnippets.put("MYACCOUNT_DETAILS", pageLoader.getMyaccountDetailsHtml(userinfo.getUserId()));
43
		return "index";
45
		return "index";
44
    	
46
    	
45
    }
47
    }