Subversion Repositories SmartDukaan

Rev

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

Rev 507 Rev 555
Line 66... Line 66...
66
		pageManager = PageManager.getPageManager();
66
		pageManager = PageManager.getPageManager();
67
	}
67
	}
68
 
68
 
69
 
69
 
70
    public HttpHeaders index() throws SecurityException, IOException {
70
    public HttpHeaders index() throws SecurityException, IOException {
71
    	log.info("id=" + id);
71
    	log.info("userinfo:" + userinfo.toString());
72
    	Map<PageContentKeys, String> params = new HashMap<PageContentKeys, String>();
72
    	Map<PageContentKeys, String> params = new HashMap<PageContentKeys, String>();
73
    	
73
    	
74
    	params.put(PageContentKeys.USER_ID, new Long(userinfo.getUserId()).toString());
74
    	params.put(PageContentKeys.USER_ID, new Long(userinfo.getUserId()).toString());
75
    	params.put(PageContentKeys.CART_ID, new Long(userinfo.getCartId()).toString());
75
    	params.put(PageContentKeys.CART_ID, new Long(userinfo.getCartId()).toString());
76
    	params.put(PageContentKeys.SESSION_ID, new Long(userinfo.getSessionId()).toString());
-
 
77
    	params.put(PageContentKeys.USER_NAME, userinfo.getNameOfUser());
76
    	params.put(PageContentKeys.USER_NAME, userinfo.getNameOfUser());
78
    	params.put(PageContentKeys.ITEM_COUNT, new Long(userinfo.getTotalItems()).toString());
77
    	params.put(PageContentKeys.ITEM_COUNT, new Long(userinfo.getTotalItems()).toString());
-
 
78
    	params.put(PageContentKeys.IS_LOGGED_IN, new Boolean(userinfo.isLoggedIn()).toString());
79
    	
79
    	
80
    	htmlSnippets = pageManager.getPageContents(PageEnum.HOME_PAGE, params);
80
    	htmlSnippets = pageManager.getPageContents(PageEnum.HOME_PAGE, params);
81
    	
81
    	
82
        return new DefaultHttpHeaders("index");
82
        return new DefaultHttpHeaders("index");
83
    }
83
    }
Line 96... Line 96...
96
	/* (non-Javadoc)
96
	/* (non-Javadoc)
97
	 * @see com.opensymphony.xwork2.ModelDriven#getModel()
97
	 * @see com.opensymphony.xwork2.ModelDriven#getModel()
98
	 */
98
	 */
99
	@Override
99
	@Override
100
	public Object getModel() {
100
	public Object getModel() {
101
		System.out.println(" getModer  is called");
101
		System.out.println(" getModel  is called");
102
		return htmlSnippets;
102
		return htmlSnippets;
103
		//return this.id;
103
		//return this.id;
104
	}
104
	}
105
	
105
	
106
	/**
106
	/**