Subversion Repositories SmartDukaan

Rev

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

Rev 650 Rev 822
Line 5... Line 5...
5
 
5
 
6
import java.io.UnsupportedEncodingException;
6
import java.io.UnsupportedEncodingException;
7
 
7
 
8
import org.apache.juli.logging.Log;
8
import org.apache.juli.logging.Log;
9
import org.apache.juli.logging.LogFactory;
9
import org.apache.juli.logging.LogFactory;
-
 
10
import org.apache.struts2.convention.annotation.InterceptorRef;
-
 
11
import org.apache.struts2.convention.annotation.InterceptorRefs;
10
import org.apache.struts2.convention.annotation.Result;
12
import org.apache.struts2.convention.annotation.Result;
11
import org.apache.struts2.convention.annotation.Results;
13
import org.apache.struts2.convention.annotation.Results;
12
 
14
 
13
/**
15
/**
14
 * @author rajveer
16
 * @author rajveer
15
 *
17
 *
16
 */
18
 */
17
 
19
 
-
 
20
@InterceptorRefs({
-
 
21
    @InterceptorRef("myDefault"),
-
 
22
    @InterceptorRef("login")
-
 
23
})
-
 
24
 
18
@Results({
25
@Results({
19
    @Result(name="redirect", type="redirectAction", 
26
    @Result(name="redirect", type="redirectAction", 
20
    		params = {"actionName" , "login"})
27
    		params = {"actionName" , "login"})
21
})
28
})
22
public class CompletedOrdersController extends BaseController {
29
public class CompletedOrdersController extends BaseController {
Line 31... Line 38...
31
	
38
	
32
    // GET /completed-orders
39
    // GET /completed-orders
33
    public String index() throws UnsupportedEncodingException {
40
    public String index() throws UnsupportedEncodingException {
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
		htmlSnippets.put("MYACCOUNT_HEADER", pageLoader.getMyaccountHeaderHtml());
43
		htmlSnippets.put("MYACCOUNT_HEADER", pageLoader.getMyaccountHeaderHtml());
41
		htmlSnippets.put("MYACCOUNT_DETAILS", pageLoader.getCompletedOrdersHtml(userinfo.getUserId()));
44
		htmlSnippets.put("MYACCOUNT_DETAILS", pageLoader.getCompletedOrdersHtml(userinfo.getUserId()));
42
		return "index";
45
		return "index";
43
    	
46
    	
44
    }
47
    }