Subversion Repositories SmartDukaan

Rev

Rev 1868 | Rev 1957 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 1868 Rev 1904
Line 27... Line 27...
27
 *
27
 *
28
 */
28
 */
29
 
29
 
30
@Results({
30
@Results({
31
    @Result(name = "success", type = "redirectAction", params = {"actionName" , "home"}),
31
    @Result(name = "success", type = "redirectAction", params = {"actionName" , "home"}),
32
    @Result(name = "failure", type = "redirectAction", params = {"actionName" , "register"}),
32
    @Result(name = "failure", type = "redirectAction", params = {"actionName" , "login"}),
-
 
33
    @Result(name = "redirect-to-login", type = "redirectAction", params = {"actionName" , "login"}),
33
    @Result(name = "redirect", location = "${redirectUrl}", type = "redirect")
34
    @Result(name = "redirect", location = "${redirectUrl}", type = "redirect")
34
   		
-
 
35
})
35
})
36
public class RegisterController extends BaseController{
36
public class RegisterController extends BaseController{
37
		
37
	
38
	private static final long serialVersionUID = 1L;
38
	private static final long serialVersionUID = 1L;
39
	private static Logger log = Logger.getLogger(Class.class);
39
	private static Logger log = Logger.getLogger(Class.class);
40
	private DesEncrypter desEncrypter = new DesEncrypter("saholic");
40
	private DesEncrypter desEncrypter = new DesEncrypter("saholic");
41
	
41
	
42
	private String redirectUrl = null;
42
	private String redirectUrl = null;
Line 47... Line 47...
47
 
47
 
48
    public String index() throws SecurityException, IOException {
48
    public String index() throws SecurityException, IOException {
49
    	if(userinfo.isLoggedIn()){
49
    	if(userinfo.isLoggedIn()){
50
    		return "success";
50
    		return "success";
51
    	}
51
    	}
52
    	htmlSnippets.put("REGISTRATION_HEADER",pageLoader.getRegistrationHeaderHtml());
52
//    	htmlSnippets.put("REGISTRATION_HEADER",pageLoader.getRegistrationHeaderHtml());
53
    	htmlSnippets.put("REGISTRATION_FORM",pageLoader.getRegistrationFormHtml());
53
//    	htmlSnippets.put("REGISTRATION_FORM",pageLoader.getRegistrationFormHtml());
54
    	return "index";
54
    	return "redirect-to-login";
55
    }
55
    }
56
 
56
 
57
    public String create() throws SecurityException, Exception {
57
    public String create() throws SecurityException, Exception {
58
    	
58
    	
59
    	if(registerUser())
59
    	if(registerUser())