· 6 years ago · Dec 26, 2019, 10:48 AM
1<!-- $Header: ibuSRSolutionDetail.jsp 120.1 2005/10/12 11:27:27 wma noship $ -->
2
3<%--
4 *==========================================================================+
5 | Copyright (c) 1999 Oracle Corporation, Redwood Shores, CA, USA |
6 | All rights reserved. |
7 +==========================================================================+
8 | FILENAME |
9 | ibuSRSolutionDetail.jsp |
10 | |
11 | DESCRIPTION |
12 | Solution Details for Service Request |
13 | |
14 | NOTES |
15 | |
16 | DEPENDENCIES |
17 | |
18 | HISTORY |
19 | 115.0 31-JUL-03 mkcyee Initial creation |
20 | 115.1 21-AUG-03 mkcyee made changes to support changes in AK region |
21 | 115.2 11-SEP-03 mkcyee made changes to integrate with update SR |
22 | and support yes/no buttons for update SR |
23 | 115.3 11-SEP-03 mkcyee release connection before forwarding |
24 | 115.4 01-OCT-03 mkcyee do not retain the fromSolutionDetail param |
25 | 115.6 09-OCT-03 mkcyee pass in SolutionsDataCachedInPage=N when |
26 | returning to the Update SR page |
27 | 115.7 09-OCT-03 mkcyee change SolutionsDataCachedInPage=N to |
28 | SolutionsDataCachedInPage=false |
29 | 115.8 22-OCT-03 mkcyee support no comment on solutions; add |
30 | security check on update usefulness section |
31 | 115.9 24-OCT-03 mkcyee reformat page header |
32 | 115.10 30-OCT-03 mkcyee pass solutionNumber to doNo, gotoPage |
33 | Add fViewed logic |
34 | 115.11 09-FEB-04 mkcyee add logic for fViewedId logic so create SR can|
35 | create links to the solution |
36 | 115.12 14-FEB-04 fix bug 3442476 |
37 | 115.13 20-FEB-04 output top region code to source |
38 | 115.14 15-MAR-2004 WZLI Change the way to construct the region key|
39 | for fetching subregion. |
40 | 115.15 05-APR-2004 WZLI Implement iHelp |
41 | 115.16 29-JUN-2004 WZLI Implemented security(encrypt/decrypt) |
42 | functionality. |
43 | 115.17 18-NOV-2004 mkcyee fix bug 4017417 |
44 | 115.16.11510.2 |
45 | 06-DEC-2004 mkcyee backport mainline 115.17 to 11510 branch |
46 | 115.16.11510.3 |
47 | 11-MAR-2005 mkcyee fix bug 4097091 |
48 | 115.16.11510.4 |
49 | 11-APR-2005 WZLI Fix bug#4295046 |
50 | 115.18 11-APR-2005 WZLI This version is the copy of version |
51 | 115.16.11510.4 from PKM11510. |
52 | 120.1 12-OCT-2005 WMA remove the dependency on contractutil. |
53 +==========================================================================*
54--%>
55
56<%@ include file="ibucincl.jsp" %>
57
58<%
59 /* No permssion required. No region name for AK prompts required */
60%>
61
62<%@ page import="oracle.apps.jtf.security.base.SecurityManager" %>
63<%@ page import="oracle.apps.jtf.util.GeneralPreference" %>
64<%@ page import="oracle.apps.ibu.admin.UserFinder" %>
65<%@ page import="oracle.apps.ibu.admin.UserFinder.UserInfo" %>
66<%@ page import="oracle.apps.ibu.common.IBUUtil" %>
67<%@ page import="oracle.apps.ibu.common.IBUDateUtil" %>
68<%@ page import="java.net.URLEncoder" %>
69<%@ page import="java.sql.Timestamp" %>
70<%@ page import="java.sql.Date" %>
71<%--@ page import="oracle.apps.ibu.contracts.ContractUtil" --%>
72<%@ page import="oracle.apps.ibu.config.ConfigContextValuesInfo" %>
73<%@ page import="oracle.apps.ibu.config.ConfigDataLoader" %>
74<%@ page import="oracle.apps.ibu.config.ConfigFlowPageInfo" %>
75<%@ page import="oracle.apps.ibu.config.ConfigItemInfo" %>
76<%@ page import="oracle.apps.ibu.config.ConfigPageFlow" %>
77<%@ page import="oracle.apps.ibu.config.ConfigRegionItems" %>
78<%@ page import="oracle.apps.ibu.config.ConfigRegionKey" %>
79<%@ page import="oracle.apps.ibu.requests.SearchResultsInfo" %>
80<%@ page import="oracle.apps.cs.knowledge.bean.KBSearchConstants" %>
81<%@ page import="oracle.apps.jtf.search.SearchResult" %>
82<%@ page import="oracle.apps.ibu.requests.SolutionPageRequestHandler" %>
83<%@ page import="oracle.apps.jtf.search.SearchItem" %>
84<%@ page import="oracle.apps.cs.knowledge.bean.Utilities" %>
85<%@ page import="oracle.apps.cs.knowledge.bean.KMSearchUtil" %>
86<%@ page import="oracle.apps.cs.knowledge.bean.KMSearchRepository" %>
87<%@ page import="oracle.apps.cs.knowledge.bean.Set" %>
88<%@ page import="oracle.apps.cs.knowledge.bean.SetPvt" %>
89<%@ page import="oracle.apps.fnd.common.WebAppsContext"%>
90<%@ page import="oracle.apps.jtf.infrastructure.SecurityUtil" %>
91
92<%@ page buffer="100kb" %>
93
94
95<%@ include file="ibucinit.jsp" %>
96
97<%
98 pageContext.setAttribute ("ibuCHeaderFunc", "IBU_SR_CNFG_SOL_DETAIL_TOP");
99 pageContext.setAttribute ("ibuCLeftFunc", "IBU_SR_CNFG_SOL_DETAIL_LEFT");
100 pageContext.setAttribute ("ibuCRightFunc", "IBU_SR_CNFG_SOL_DETAIL_RIGHT");
101 pageContext.setAttribute ("ibuCBottomFunc", "IBU_SR_CNFG_SOL_DETAIL_BOTTOM");
102 pageContext.setAttribute ("ibuConfigOn", "y");
103
104%>
105
106
107<%
108
109 String suggestedSolutionsPage = IBUUtil.getWebHTMLCall((WebAppsContext)_fwSession.getFWAppsContext(), "IBU_SR_CR_SUGGESTED_SOLUTIONS");
110
111 String solutionDetailsPage = IBUUtil.getWebHTMLCall((WebAppsContext)_fwSession.getFWAppsContext(), "IBU_SR_CR_SOLUTION_DETAIL");
112
113 String problemResolvedPage = IBUUtil.getWebHTMLCall((WebAppsContext)_fwSession.getFWAppsContext(), "IBU_SR_CR_PROBLEM_RESOLVED");
114
115 String updateSRPage = IBUUtil.getWebHTMLCall((WebAppsContext)_fwSession.getFWAppsContext(), "IBU_SR_DETAILS");
116
117
118 int requestHandlerReturnValue = 0;
119
120 SolutionPageRequestHandler requestHandler = new SolutionPageRequestHandler();
121
122 requestHandlerReturnValue = requestHandler.handlePageRequest(_connection, request, _context);
123
124 if (requestHandlerReturnValue == requestHandler.PAGENAVIGATION)
125 {
126 forwardURL = requestHandler.getForwardURL();
127 if (forwardURL != null && !forwardURL.equals(""))
128 {
129 TransactionScope.releaseConnection(_connection);
130%>
131 <jsp:forward page = '<%=forwardURL%>' />
132<% }
133 }
134
135
136 ConfigFlowPageInfo[] configFlowPagesInfo = null;
137 ConfigRegionItems buttonItems = null;
138 int l_trainSteps = 0;
139 int l_trainSelectedIndex = 0;
140 String [] l_trainPageNames = null;
141 ConfigRegionItems configRegionItems = null;
142
143 String solutionId = request.getParameter("nSetId");
144 String solutionNumber = "";
145 String solutionSummary = "";
146 String returnURL = request.getParameter("pReturnURL");
147 String fromPage = request.getParameter("pFromPage");
148
149 int pageRequestReturnValue = 0;
150
151 if (fromPage == null)
152 {
153 fromPage = "";
154 }
155
156 if (returnURL == null)
157 {
158 returnURL = "";
159 } else {
160 returnURL = ServletSessionManager.getURL(returnURL);
161 }
162
163 Set solutionSet = null;
164
165 // get the context values ; If this is passed to me as an object in the
166 // page context, then I don't need to do this at all
167
168 String l_srtype_id = request.getParameter("IBU_CF_SR_REQUEST_TYPE_ID"); // from creation flow
169 if (l_srtype_id == null) { // from detail page
170 l_srtype_id = request.getParameter("RequestTypeID");
171 }
172 int l_srTypeId = 0;
173 int l_respId = _context.getRespID();
174 int l_respApplId = _context.getRespAppID();
175 int l_applId = _context.getApplicationID();
176
177 if (l_srtype_id == null || "".equals(l_srtype_id))
178 {
179 l_srTypeId = 0;
180 }
181 else {
182 l_srtype_id =IBUUtil.decrypt(l_srtype_id);
183 if ("".equals(l_srtype_id)) {
184 l_srTypeId = 0;
185 }
186 else {
187 l_srTypeId = Integer.parseInt(l_srtype_id);
188 }
189 }
190
191 // Instantiate object
192 // Call ak api to retrieve regions
193
194
195 ConfigContextValuesInfo configContextValuesInfo = new ConfigContextValuesInfo( l_srTypeId,
196 l_respId,
197 l_respApplId,
198 l_applId);
199
200 ConfigDataLoader configDataLoader = new ConfigDataLoader();
201
202 if (fromPage.equals("IBU_SR_CR_SUGGESTED_SOLUTIONS"))
203 {
204 configRegionItems = configDataLoader.fetchPageItems(_connection, "IBU_SR_CR_SOLUTION_DETAILS", configContextValuesInfo);
205 } else {
206 configRegionItems = configDataLoader.fetchPageItems(_connection, "IBU_SR_SOLUTION_DETAILS", configContextValuesInfo);
207 }
208
209 if (configRegionItems != null)
210 {
211 String topRegionCode = configRegionItems.getRegionKey().getRegionCode();
212 out.println("<!--Top Region Code: " + topRegionCode + "-->");
213 }
214
215 ConfigRegionItems subRegionItems = null;
216
217
218 ConfigItemInfo itemInfo = null;
219 ConfigItemInfo headerPrompt = null;
220 ConfigItemInfo trainItemInfo = null;
221 ConfigItemInfo subItemInfo = null;
222
223 if (configRegionItems != null)
224 {
225 itemInfo = configRegionItems.getItembyCode("IBU_CF_PAGE_HDR", true);
226 }
227
228 if (itemInfo == null)
229 {
230 ibuPageTitle = "";
231 } else {
232 ibuPageTitle = itemInfo.getPrompt();
233 // Set title
234 if (itemInfo.getShowFlag())
235 {
236 caboMgr.setTitle(ibuPageTitle);
237
238 if (itemInfo.getHintMessageCode() != null)
239 {
240 // Set instruction text
241 caboMgr.setInstruction(Architecture.getMessageManagerInstance().getMessage(itemInfo.getHintMessageCode()));
242 }
243 }
244 // Add page buttons
245 }
246
247 // call config API to fetch page flow information
248
249 ConfigPageFlow configPageFlow = configDataLoader.fetchPageFlow(_connection, configContextValuesInfo, "IBU_SR_CRE");
250
251 // Get the solution information
252 if (solutionId != null && !solutionId.equals(""))
253 {
254 solutionSet = SetPvt.getSolution(_connection, Integer.parseInt(solutionId));
255 }
256 if (solutionSet != null)
257 {
258 solutionNumber = solutionSet.getSetNumber();
259
260 if (fromPage.equals("IBU_SR_CR_SUGGESTED_SOLUTIONS"))
261 {
262 ibuPageTitle = ibuPageTitle + " " + solutionNumber;
263 } else {
264 headerPrompt = configRegionItems.getItembyCode("IBU_CF_SOLUTION_DETAILS", true);
265
266 String srNum = request.getParameter("IBU_CF_SR_SERVICE_REQUEST_NUM");
267
268 if (srNum != null && !srNum.equals(""))
269 {
270 srNum = oracle.apps.jtf.infrastructure.SecurityUtil.decrypt(srNum);
271 }
272 String probSummary = request.getParameter("IBU_CF_SR_PROB_SUMMARY");
273
274 if (headerPrompt != null)
275 {
276 ibuPageTitle = ibuPageTitle + " " + srNum + "-" + probSummary + ": " + headerPrompt.getPrompt();
277 }
278 }
279 solutionSummary = solutionSet.getName();
280 }
281
282 ibuHelpTarget = "IbuSRSolutionDetail";
283%>
284
285<%@ include file="ibuchst2.jsp" %>
286<%@ include file="ibuchend.jsp" %>
287<%@ include file="ibucbst.jsp" %>
288
289
290<script language=javascript src="ibuSRSolutionDetail.js"> </script>
291
292<NOSCRIPT>
293<p>
294<%
295 out.println(oracle.apps.jtf.base.resources.AOLMessageManager.getMessageSt("JTF_CAL_NO_JAVASCRIPT"));
296%>
297</p>
298</NOSCRIPT>
299<form name="SRSolutionDetail" action="<%=solutionDetailsPage%>" method="post">
300<!-- Render the train -->
301<TABLE width="100%" border="0" cellpadding="0" cellspacing="0" summary="">
302<%
303
304 if (configRegionItems != null)
305 {
306
307 trainItemInfo = configRegionItems.getItembyCode("IBU_CF_TRAIN", true);
308 }
309 if (trainItemInfo != null && trainItemInfo.getShowFlag())
310 {
311
312 if (configPageFlow != null)
313 {
314
315 l_trainSteps = configPageFlow.getTotalPagesNumber();
316 configFlowPagesInfo = configPageFlow.getFlowPages();
317
318 if (configFlowPagesInfo != null)
319 {
320 l_trainPageNames = new String[configFlowPagesInfo.length];
321
322 for (int i=0; i < configFlowPagesInfo.length; i++)
323 {
324 l_trainPageNames[i] = configFlowPagesInfo[i].getFlowPageName();
325 }
326%>
327<tr>
328<%
329 out.println(RendererUtil.blankCell(2,null));
330%>
331</tr>
332<tr>
333<td colspan="2" align="center">
334<%
335
336 l_trainSelectedIndex = configPageFlow.positionOfCurrentPage("IBU_SR_CR_SUGGESTED_SOLUTIONS");
337
338 RendererUtil.train(l_trainSteps, l_trainPageNames, l_trainSelectedIndex, _renderingContext);
339%>
340</td>
341</tr>
342<tr>
343<td colspan="2" align="center">
344<%
345 RendererUtil.separator(_renderingContext);
346%>
347</td>
348</tr>
349<%
350
351 } // if configFlowPagesInfo != null
352 } // if configPageFlow != null
353 } // end if trainItemInfo.getShowFlag()
354%>
355</TABLE>
356<%
357 String fNotUseful = request.getParameter("fNotUseful");
358 if (fNotUseful == null)
359 fNotUseful = "";
360
361 // mkcyee 10/22/2003 - added to keep track of no-comment solutions
362 String fNoComment = request.getParameter("fNoComment");
363 if (fNoComment == null)
364 fNoComment = "";
365
366 // mkcyee 10/30/2003 - added to keep track of viewed solutions
367 String fViewed = request.getParameter("fViewed");
368 if (fViewed == null)
369 fViewed = "";
370
371 // mkcyee 02/09/2004 - added to keep track of viewed solutions id
372 String fViewedId = request.getParameter("fViewedId");
373 if (fViewedId == null)
374 fViewedId = "";
375
376
377
378%>
379
380<input type=hidden name="solActionCode" value="">
381<input type=hidden name="feedbackSetId" value="">
382<input type=hidden name="fNotUseful" value="<%=fNotUseful%>">
383<input type=hidden name="fNoComment" value="<%=fNoComment%>">
384<input type=hidden name="fViewed" value="<%=fViewed%>">
385<input type=hidden name="fViewedId" value="<%=fViewedId%>">
386
387
388<input type=hidden name="feedback" value="">
389<input type=hidden name="fromSolutionDetail" value="">
390<input type=hidden name="forwardURL" value="">
391<input type=hidden name="PageCode" value="">
392
393
394<%
395
396 // Set title
397 if (itemInfo.getShowFlag())
398 {
399 caboMgr.setTitle(ibuPageTitle);
400
401 if (itemInfo.getHintMessageCode() != null)
402 {
403 // Set instruction text
404 caboMgr.setInstruction(Architecture.getMessageManagerInstance().getMessage(itemInfo.getHintMessageCode()));
405 }
406 }
407
408 // Add page buttons
409
410 if (configRegionItems != null)
411 {
412 itemInfo = configRegionItems.getItembyCode("IBU_CF_PAGE_BUTTON_RG", true);
413 if (itemInfo != null && itemInfo.getShowFlag())
414 {
415 out.println("<!--IBU_CF_PAGE_BUTTON_RG: " + itemInfo.getSubRegionCode() + "-->");
416 // get the items of the subregion
417 buttonItems = configDataLoader.fetchRegionItemsByRegion(_connection, new ConfigRegionKey(itemInfo.getSubRegionCode(), itemInfo.getSubRegionAppID()));
418
419 if (buttonItems != null)
420 {
421 while (buttonItems.hasMoreItem())
422 {
423 subItemInfo = buttonItems.getNextItem();
424
425 if (subItemInfo != null && subItemInfo.getShowFlag())
426 {
427 if (fromPage.equals("IBU_SR_CR_SUGGESTED_SOLUTIONS"))
428 {
429 caboMgr.addButton(new CaboUtil.Button("SRSolutionDetail", "ReturnButton", subItemInfo.getPrompt(), "javascript:gotoPage('" + ServletSessionManager.getURL(suggestedSolutionsPage) + "'," + solutionNumber + "," + solutionId + ")", CaboUtil.CUSTOM_BUTTON));
430 } else {
431 caboMgr.addButton(new CaboUtil.Button("SRSolutionDetail", "ReturnButton", subItemInfo.getPrompt(), "javascript:gotoPage('" + ServletSessionManager.getURL(updateSRPage) + "'," + solutionNumber + "," + solutionId + ")", CaboUtil.CUSTOM_BUTTON));
432 }
433 }
434 } // end while buttonItems has more items
435 } // end if buttonItems != null
436 } // end if itemInfo != null
437 } // end if configRegionItems != null
438
439 caboMgr.getHeader().render(_renderingContext);
440
441 if (true)
442 //if (solutionSet != null)
443 {
444 if (configRegionItems != null)
445 {
446 // loop through all the attributes of the page
447 while (configRegionItems.hasMoreItem())
448 {
449 //get Next Item
450 itemInfo = configRegionItems.getNextItem();
451
452 if (itemInfo.getAttrCode().equals("IBU_CF_SR_SOLUTION_DETAIL") && itemInfo.getShowFlag())
453 {
454%>
455<br>
456<table width="100%" border="0" summary="">
457<%
458
459 out.println(RendererUtil.sectionHeader(
460 itemInfo.getPrompt() + " " + solutionNumber + ":" + " " + solutionSummary,
461 null,
462 1));
463
464%>
465</table>
466<%
467 // place the object in the page context so it can be used by
468 // the KM snippet
469 if (solutionSet != null)
470 {
471 pageContext.setAttribute("SolutionObject", solutionSet);
472%>
473<%@include file="csksxvint.jsp" %>
474<br>
475<%
476 }
477%>
478
479
480
481<%
482 } else if (itemInfo.getAttrCode().equals("IBU_CF_SR_USEFULNESS_SOLN_RG") && itemInfo.getShowFlag()) {
483
484 // mkcyee - 10/24/2003
485 // show this region if drilled down from create SR
486 // or drilled down from update SR and the user
487 // has the permission to update the solution link and status
488
489 if (fromPage.equals("IBU_SR_CR_SUGGESTED_SOLUTIONS") ||
490 (!fromPage.equals("IBU_SR_CR_SUGGESTED_SOLUTIONS") && SecurityManager.check("IBU_Request_Update_Solution_Usefulness")))
491 {
492 out.println("<!--IBU_CF_SR_USEFULNESS_SOLN_RG: " + itemInfo.getSubRegionCode() + "-->");
493 subRegionItems = configDataLoader.fetchRegionItemsByRegion(_connection, new ConfigRegionKey(itemInfo.getSubRegionCode(), itemInfo.getSubRegionAppID()));
494
495 if (subRegionItems != null)
496 {
497 // get the sub section header
498 subItemInfo = subRegionItems.getItembyCode("IBU_CF_SUB_SECTION_HDR", true);
499 if (subItemInfo != null && subItemInfo.getShowFlag())
500 {
501%>
502<table width="100%" border="0" summary="" cellpadding="0" cellspacing="0">
503<%
504 out.println(RendererUtil.subSectionHeader(subItemInfo.getPrompt(), subItemInfo.getHintMessageCode(), 1));
505%>
506</table>
507<br>
508
509
510<table width="100%" border="0" summary="" cellpadding="0" cellspacing="0">
511<tr>
512<%
513 subItemInfo = subRegionItems.getItembyCode("IBU_CF_SOLVE_PROBLEM", true);
514 if (subItemInfo != null)
515 {
516%>
517 <td width="50%" class=OraInstructionText> <%=subItemInfo.getPrompt() %>
518<%
519 }
520
521 while (subRegionItems.hasMoreItem())
522 {
523 subItemInfo = subRegionItems.getNextItem();
524 if (subItemInfo.getAttrCode().equals("IBU_CF_YES")&& subItemInfo.getShowFlag())
525 {
526 if (fromPage.equals("IBU_SR_CR_SUGGESTED_SOLUTIONS"))
527 {
528 caboMgr.renderButton("SRSolutionDetail", subItemInfo.getPrompt(), "javascript:doYes("+solutionId+",'"+ ServletSessionManager.getURL(problemResolvedPage) +"')", _renderingContext, true);
529 } else {
530 caboMgr.renderButton("SRSolutionDetail", subItemInfo.getPrompt(), "javascript:doYesForUpdate("+solutionId+",'"+ ServletSessionManager.getURL(updateSRPage+"?SolutionsDataCachedInPage=false") +"')", _renderingContext, true);
531 }
532 } else if (subItemInfo.getAttrCode().equals("IBU_CF_NO") && subItemInfo.getShowFlag()) {
533 if (fromPage.equals("IBU_SR_CR_SUGGESTED_SOLUTIONS"))
534 {
535 caboMgr.renderButton("SRSolutionDetail", subItemInfo.getPrompt(), "javascript:doNo("+solutionId+",'" + ServletSessionManager.getURL(suggestedSolutionsPage) + "',"+ solutionNumber + ")", _renderingContext, true);
536 } else {
537 caboMgr.renderButton("SRSolutionDetail", subItemInfo.getPrompt(), "javascript:doNoForUpdate("+solutionId+",'" + ServletSessionManager.getURL(updateSRPage+"?SolutionsDataCachedInPage=false") + "')", _renderingContext, true);
538 }
539 }
540 } // end while
541%>
542 </td>
543 </tr>
544</table>
545<%
546 } // end if subItemInfo.getShowFlag()
547 } // end if subRegionItems != null
548 } // end if !fromPage.equals("IBU_CF_SR_SUGGESTED_SOLUTIONS
549 } // end if getAttrCode = IBU_CF_SR_USEFULNESS_SOLN_RG
550 } // end while configRegionItems has more items
551 } // end if configRegionItems != null
552 } // end if solutionSet != null
553
554 // output the page footer with buttons and instruction text
555 caboMgr.getFooter().render(_renderingContext);
556%>
557
558<!-- Render the hidden parameters -->
559<%
560 String avoidParams [] = {"feedbackSetId", "fNotUseful", "fNoComment","fViewed", "fViewedId", "solActionCode", "forwardURL", "PageCode"};
561
562 // render all the hidden parameters
563 out.println(RendererUtil.retainRequestParameters(request, avoidParams));
564
565%>
566
567<!-- end of hidden parameters -->
568</form>
569
570<%@ include file="ibucbend.jsp" %>