Subversion Repositories SmartDukaan

Rev

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

Rev 2718 Rev 2949
Line 46... Line 46...
46
		super();
46
		super();
47
		try {
47
		try {
48
			userServiceClient = new UserContextServiceClient();
48
			userServiceClient = new UserContextServiceClient();
49
			client = userServiceClient.getClient();
49
			client = userServiceClient.getClient();
50
		} catch (Exception e) {
50
		} catch (Exception e) {
51
			e.printStackTrace();
51
		    log.error("Unable to initialize the user service client", e);
52
		}
52
		}
53
	}
53
	}
54
 
54
 
55
	@Action(value="myresearch",interceptorRefs={@InterceptorRef("myDefault")})
55
	@Action(value="myresearch",interceptorRefs={@InterceptorRef("myDefault")})
56
	public String index() {
56
	public String index() {
Line 61... Line 61...
61
            for (WidgetItem wItem : widgetItems) {
61
            for (WidgetItem wItem : widgetItems) {
62
                itemsJson.put(wItem.getItem_id());
62
                itemsJson.put(wItem.getItem_id());
63
            }
63
            }
64
            itemsInJson = itemsJson.toString();
64
            itemsInJson = itemsJson.toString();
65
        } catch (WidgetException e) {
65
        } catch (WidgetException e) {
66
            e.printStackTrace();
66
            log.error("Unable to get the myresearch widget", e);
67
        } catch (TException e) {
67
        } catch (TException e) {
68
            e.printStackTrace();
68
            log.error("Unable to get the myresearch widget", e);
69
        }
69
        }
70
		return "index";
70
		return "index";
71
	}
71
	}
72
	
72
	
73
	//myresearch/[1,2,3]
73
	//myresearch/[1,2,3]
Line 129... Line 129...
129
		try {
129
		try {
130
			UserContextServiceClient userServiceClient = new UserContextServiceClient();
130
			UserContextServiceClient userServiceClient = new UserContextServiceClient();
131
			in.shop2020.model.v1.user.UserContextService.Client userClient = userServiceClient.getClient();
131
			in.shop2020.model.v1.user.UserContextService.Client userClient = userServiceClient.getClient();
132
			userClient.deleteItemFromMyResearch(userId, itemId);
132
			userClient.deleteItemFromMyResearch(userId, itemId);
133
		} catch (WidgetException e) {
133
		} catch (WidgetException e) {
134
			e.printStackTrace();
134
		    log.error("Unable to delete item from the myresearch widget", e);
135
		} catch (TException e) {
135
		} catch (TException e) {
136
			e.printStackTrace();
136
		    log.error("Unable to delete item from the myresearch widget", e);
137
		} catch (Exception e) {
137
		} catch (Exception e) {
138
			e.printStackTrace();
138
		    log.error("Unable to delete item from the myresearch widget", e);
139
		}
139
		}
140
	}
140
	}
141
	
141
	
142
	public String getHtmlSnippet(){
142
	public String getHtmlSnippet(){
143
		if(htmlSnippet == "")	{
143
		if(htmlSnippet == "")	{