Subversion Repositories SmartDukaan

Rev

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

Rev 555 Rev 569
Line 373... Line 373...
373
			return getWidgetDiv(userId, WidgetType.MY_RESEARCH, "myresearch.vm");
373
			return getWidgetDiv(userId, WidgetType.MY_RESEARCH, "myresearch.vm");
374
		else
374
		else
375
			return getWidgetDiv(0, WidgetType.MY_RESEARCH, "myresearch.vm");
375
			return getWidgetDiv(0, WidgetType.MY_RESEARCH, "myresearch.vm");
376
	}
376
	}
377
 
377
 
378
	private String getBrowseHistoryHtml(long userId, boolean isLoggedIn) {
378
	public String getBrowseHistoryHtml(long userId, boolean isLoggedIn) {
379
		if(isLoggedIn)
379
		if(isLoggedIn)
380
			return getWidgetDiv(userId, WidgetType.BROWSE_HISTORY, "browsehistory.vm");
380
			return getWidgetDiv(userId, WidgetType.BROWSE_HISTORY, "browsehistory.vm");
381
		else
381
		else
382
			return getWidgetDiv(0, WidgetType.BROWSE_HISTORY, "browsehistory.vm");
382
			return getWidgetDiv(0, WidgetType.BROWSE_HISTORY, "browsehistory.vm");
383
	}
383
	}
Line 1245... Line 1245...
1245
		String htmlString = "";
1245
		String htmlString = "";
1246
		VelocityContext context = new VelocityContext();
1246
		VelocityContext context = new VelocityContext();
1247
		String templateFile = "templates/personaldetails.vm";
1247
		String templateFile = "templates/personaldetails.vm";
1248
		String email = "";
1248
		String email = "";
1249
		String name = "";
1249
		String name = "";
1250
		int year = 0, month = 0, day = 0;
1250
		String dateOfBirth = "";
1251
		String sex = "";
1251
		String sex = "";
1252
		String subscribe = "false";
1252
		String subscribe = "false";
1253
		UserContextServiceClient userContextServiceClient = null;
1253
		UserContextServiceClient userContextServiceClient = null;
1254
		in.shop2020.model.v1.user.UserContextService.Client userClient = null;
1254
		in.shop2020.model.v1.user.UserContextService.Client userClient = null;
1255
		try{
1255
		try{
Line 1259... Line 1259...
1259
			user = userClient.getUserById(userId);
1259
			user = userClient.getUserById(userId);
1260
			
1260
			
1261
			email = user.getCommunicationEmail();
1261
			email = user.getCommunicationEmail();
1262
			name = user.getName();
1262
			name = user.getName();
1263
			
1263
			
1264
			Calendar calendar = Calendar.getInstance();
-
 
1265
			calendar.setTimeInMillis(user.getDateOfBirth());
1264
			dateOfBirth = user.getDateOfBirth();
1266
			month = calendar.get(Calendar.MONTH);
-
 
1267
			year = calendar.get(Calendar.YEAR);
-
 
1268
			day = calendar.get(Calendar.DAY_OF_MONTH);
-
 
1269
		}catch (Exception e){
1265
		}catch (Exception e){
1270
			e.printStackTrace();
1266
			e.printStackTrace();
1271
		}
1267
		}
1272
		context.put("name", name);
1268
		context.put("name", name);
1273
		context.put("email", email);
1269
		context.put("email", email);
1274
		context.put("month", month+"");
1270
		context.put("dateOfBirth", dateOfBirth+"");
1275
		context.put("day", day+"");
-
 
1276
		context.put("year", year+"");
-
 
1277
		context.put("subscribe", subscribe);
1271
		context.put("subscribe", subscribe);
1278
		context.put("sex", sex);
1272
		context.put("sex", sex);
1279
		htmlString = getHtmlFromVelocity(templateFile, context);
1273
		htmlString = getHtmlFromVelocity(templateFile, context);
1280
		return htmlString;
1274
		return htmlString;
1281
	}
1275
	}