|
1 | 1 | <% |
2 | | - /* |
3 | | - * Copyright (c) 2016 LabKey Corporation |
4 | | - * |
5 | | - * Licensed under the Apache License, Version 2.0 (the "License"); |
6 | | - * you may not use this file except in compliance with the License. |
7 | | - * You may obtain a copy of the License at |
8 | | - * |
9 | | - * http://www.apache.org/licenses/LICENSE-2.0 |
10 | | - * |
11 | | - * Unless required by applicable law or agreed to in writing, software |
12 | | - * distributed under the License is distributed on an "AS IS" BASIS, |
13 | | - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
14 | | - * See the License for the specific language governing permissions and |
15 | | - * limitations under the License. |
16 | | - */ |
| 2 | +/* |
| 3 | + * Copyright (c) 2016 LabKey Corporation |
| 4 | + * |
| 5 | + * Licensed under the Apache License, Version 2.0 (the "License"); |
| 6 | + * you may not use this file except in compliance with the License. |
| 7 | + * You may obtain a copy of the License at |
| 8 | + * |
| 9 | + * http://www.apache.org/licenses/LICENSE-2.0 |
| 10 | + * |
| 11 | + * Unless required by applicable law or agreed to in writing, software |
| 12 | + * distributed under the License is distributed on an "AS IS" BASIS, |
| 13 | + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 14 | + * See the License for the specific language governing permissions and |
| 15 | + * limitations under the License. |
| 16 | + */ |
17 | 17 | %> |
18 | 18 | <%@ page import="org.json.JSONArray" %> |
19 | 19 | <%@ page import="org.json.JSONObject" %> |
| 20 | +<%@ page import="org.labkey.api.util.JavaScriptFragment" %> |
20 | 21 | <%@ page import="org.labkey.api.util.UniqueID" %> |
21 | 22 | <%@ page import="org.labkey.api.view.HttpView" %> |
22 | 23 | <%@ page import="org.labkey.api.view.JspView" %> |
|
39 | 40 | TrialShareController.CubeObjectDetailForm bean = me.getModelBean(); |
40 | 41 |
|
41 | 42 | String renderId = "study-details-" + UniqueID.getRequestScopedUID(HttpView.currentRequest()); |
42 | | - String cubeObjectJson = bean.getCubeObject() == null ? "null" : new JSONObject(bean.getCubeObject()).toString(2); |
| 43 | + JavaScriptFragment cubeObjectJson = bean.getCubeObject() == null ? JavaScriptFragment.NULL : new JSONObject(bean.getCubeObject()).getJavaScriptFragment(2); |
43 | 44 | List<StudyAccess> accessList = bean.getCubeObject() == null ? null :((StudyBean) bean.getCubeObject()).getStudyAccessList(); |
44 | 45 |
|
45 | 46 | JSONArray jsonArray = new JSONArray(); |
|
51 | 52 | } |
52 | 53 | } |
53 | 54 |
|
54 | | - String studyaccesslist = jsonArray.toString(2); |
| 55 | + JavaScriptFragment studyaccesslist = jsonArray.getJavaScriptFragment(2); |
55 | 56 | %> |
56 | 57 | <labkey:errors/> |
57 | 58 | <div id="<%= h(renderId)%>" class="requests-editor"></div> |
|
64 | 65 | objectName : 'Study', |
65 | 66 | renderTo: <%=q(renderId)%>, |
66 | 67 | accessListId : <%= bean.getAccessListId() %>, |
67 | | - cubeObject : <%= text( cubeObjectJson )%>, |
68 | | - studyaccesslist: <%= text( studyaccesslist )%>, |
| 68 | + cubeObject : <%= cubeObjectJson %>, |
| 69 | + studyaccesslist: <%= studyaccesslist %>, |
69 | 70 | cubeContainerPath: "<%=h(bean.getCubeContainerPath())%>" |
70 | 71 | }); |
71 | 72 | }); |
|
0 commit comments