Commit 80f4c8dd authored by pborate's avatar pborate

Updated changes in dashboardUtil class for obj actions

git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@192367 ce508802-f39f-4f6c-b175-0d175dae99d5
parent 633238b3
......@@ -269,6 +269,7 @@ public class DashboardUtil
componentData.put("FM_API_KEY", fmApiKey);
String responseStr = "";
String objActionStr = "";
String objName=componentData.optString("obj_name");
System.out.println("objName:::"+objName);
JSONObject objNameobj=componentData.optJSONObject("obj_name");
......@@ -286,9 +287,12 @@ public class DashboardUtil
responseStr = dbAccess.getAllActionLinksJson(objName, userInfo);
System.out.println("response from dbAccess getAllActionLinksJson...["+responseStr+"]");
objActionStr = dbAccess.getAllActionsJson(objName,userInfo.getProfileId(), userInfo.getUserLevel(),userInfo);
JSONObject jsonObject = new JSONObject(responseStr);
JSONArray objActionObject = new JSONArray(objActionStr);
System.out.println("Returned AllActionLinksJson...[" + jsonObject + "]");
System.out.println("Returned AllActionJson...[" + objActionObject + "]");
JSONArray objLinksArray = jsonObject.optJSONArray("LinkActions");
if( objLinksArray != null )
{
......@@ -298,6 +302,15 @@ public class DashboardUtil
{
componentData.put("obj_links", new JSONArray());
}
if( objActionObject.length()>0 )
{
componentData.put("obj_actions", objActionObject);
}
else
{
componentData.put("obj_actions", new JSONArray());
}
}
/* FOR DISPLAYING DASHBOARD BASED ON OB_RIGHTS */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment