Subversion Repositories SmartDukaan

Rev

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

Rev 1549 Rev 1614
Line 118... Line 118...
118
			context.put("itemList", itemList);
118
			context.put("itemList", itemList);
119
			
119
			
120
		} catch(Exception e){
120
		} catch(Exception e){
121
			
121
			
122
		}
122
		}
123
		/*
-
 
124
		finally{
-
 
125
			catalogServiceClient.closeConnection();
-
 
126
		}
-
 
127
		*/
-
 
128
 
-
 
129
		
123
		
130
		htmlString = getHtmlFromVelocity(templateFile, context);
124
		htmlString = getHtmlFromVelocity(templateFile, context);
131
		return htmlString;	
125
		return htmlString;	
132
	}
126
	}
133
 
127
 
Line 154... Line 148...
154
			}
148
			}
155
			context.put("itemList", itemList);
149
			context.put("itemList", itemList);
156
			
150
			
157
		} catch(Exception e){
151
		} catch(Exception e){
158
			e.printStackTrace();
152
			e.printStackTrace();
159
		}finally{
-
 
160
			catalogServiceClient.closeConnection();
-
 
161
		}
153
		}
162
		
154
		
163
		htmlString = getHtmlFromVelocity(templateFile, context);
155
		htmlString = getHtmlFromVelocity(templateFile, context);
164
		return htmlString;
156
		return htmlString;
165
	}
157
	}
Line 190... Line 182...
190
			// TODO Auto-generated catch block
182
			// TODO Auto-generated catch block
191
			e.printStackTrace();
183
			e.printStackTrace();
192
		} catch (Exception e) {
184
		} catch (Exception e) {
193
			// TODO Auto-generated catch block
185
			// TODO Auto-generated catch block
194
			e.printStackTrace();
186
			e.printStackTrace();
195
		} finally{
-
 
196
			catalogServiceClient.closeConnection();
-
 
197
		}
187
		} 
198
		
188
		
199
		htmlString = getHtmlFromVelocity(templateFile, context);
189
		htmlString = getHtmlFromVelocity(templateFile, context);
200
		return htmlString;
190
		return htmlString;
201
	}
191
	}
202
 
192
 
Line 231... Line 221...
231
	}
221
	}
232
 
222
 
233
 
223
 
234
 
224
 
235
	public String getMyResearchHtml(long userId, boolean isLoggedIn) {
225
	public String getMyResearchHtml(long userId, boolean isLoggedIn) {
236
		if(isLoggedIn)
-
 
237
			return getWidgetDiv(userId, WidgetType.MY_RESEARCH, "myresearch.vm");
226
		return getWidgetDiv(userId, WidgetType.MY_RESEARCH, "myresearch.vm");
238
		else
-
 
239
			return getWidgetDiv(0, WidgetType.MY_RESEARCH, "myresearch.vm");
-
 
240
	}
227
	}
241
 
228
 
242
	public String getBrowseHistoryHtml(long userId, boolean isLoggedIn) {
229
	public String getBrowseHistoryHtml(long userId, boolean isLoggedIn) {
243
		return getWidgetDiv(userId, WidgetType.BROWSE_HISTORY, "browsehistory.vm");
230
		return getWidgetDiv(userId, WidgetType.BROWSE_HISTORY, "browsehistory.vm");
244
	}
231
	}
Line 505... Line 492...
505
				widget = client.getBrowseHistory(userId);
492
				widget = client.getBrowseHistory(userId);
506
			}
493
			}
507
			
494
			
508
		} catch (Exception e) {
495
		} catch (Exception e) {
509
			e.printStackTrace();
496
			e.printStackTrace();
510
		}finally{
-
 
511
			if (userServiceClient != null) {
-
 
512
				userServiceClient.closeConnection();
-
 
513
			}
-
 
514
		}
497
		}
515
 
498
 
516
 
499
 
517
		List<Map<String, String>> itemDetails = null;
500
		List<Map<String, String>> itemDetails = null;
518
		
501