Subversion Repositories SmartDukaan

Rev

Rev 832 | Rev 1044 | Go to most recent revision | Blame | Compare with Previous | Last modification | View Log | RSS feed

/**
 * 
 */
package in.shop2020.serving.controllers;


import org.apache.juli.logging.Log;
import org.apache.juli.logging.LogFactory;
import org.apache.log4j.Logger;
import org.apache.struts2.convention.annotation.InterceptorRef;
import org.apache.struts2.convention.annotation.InterceptorRefs;
import org.apache.struts2.convention.annotation.Result;
import org.apache.struts2.convention.annotation.Results;

/**
 * @author rajveer
 *
 */

@InterceptorRefs({
    @InterceptorRef("myDefault"),
    @InterceptorRef("login")
})

@Results({
    @Result(name="redirect", type="redirectAction", 
                params = {"actionName" , "login"})
})
public class MyaccountController extends BaseController {

        private static final long serialVersionUID = 1L;

        private static Logger log = Logger.getLogger(Class.class);      
        
        public MyaccountController() {
                super();
        }
    

        public String index(){
        log.info("this.request=" + this.request);

                htmlSnippets.put("MYACCOUNT_HEADER", pageLoader.getMyaccountHeaderHtml());
                htmlSnippets.put("MYACCOUNT_DETAILS", pageLoader.getMyaccountDetailsHtml(userinfo.getUserId()));
                return "index";
        
    }
    
        
        public String getMyaccountHeaderSnippet(){
                return htmlSnippets.get("MYACCOUNT_HEADER");
        }
        
        public String getMyaccountDetailsSnippet(){
                return htmlSnippets.get("MYACCOUNT_DETAILS");
        }
        
}