Hi,
We are on WEM8.1. We would like to extend the default CIF. As part of this we want to get the GUID of the content item in the Content Input Form rendering JSP. How can I get this?
Thanks, Raju
The content management id of the content instance is equal to the id of the editor.
To access this value simple refer to the java variable editorId which is set by header.jspf that you *must* include at the beggining of your V8 CIF.
ciao
Mario
From: eLink Entry: Discussion Group - Web Experience Management [mailto:v7webcontentmanagement@elinkkc.opentext.com] Sent: Monday, October 10, 2011 12:22 PMTo: eLink RecipientSubject: How to get the GUID of the content item in the Content Input Form rendering JSP?
How to get the GUID of the content item in the Content Input Form rendering JSP?
Posted by raju.dachepally@wellsfargo.com (Dachepally, Raju) On 2011/10/10 06:17
[To post a comment, use the normal reply function]
Forum:
Discussion Group - Web Experience Management
Livelink Server:
knowledge-wlweb01
Raju,
You can use the below code
MapHelper item = MapHelper.get(request, VCMConstant.ITEM_ATTRIBUTE);
String editorId = item.getString(AsObjectMappingConstants.CONTENT_MANAGEMENT_ID_ATTRIBUTE);
String ciType = item.getString(AsObjectMappingConstants.AS_OBJECT_TYPE_ATTRIBUTE);
editorId is the Content ID, hope this helps.
Thanks & Regards,
Gangi Reddy NandyalaConsultant-Technology
Phone: +91 40 4452 8000Ext: 63105 | Mobile: +91 9849789364
VOIP - 7681 -US Mobile: 781 - 530 - 8472
From: eLink Entry: Discussion Group - Web Experience Management [mailto:v7webcontentmanagement@elinkkc.opentext.com]Sent: Monday, October 10, 2011 6:22 AMTo: eLink RecipientSubject: How to get the GUID of the content item in the Content Input Form rendering JSP?
Posted byraju.dachepally@wellsfargo.com (Dachepally, Raju) On 2011/10/10 06:17
Hi Mario,
I have tried including the header.jspf like below. But our JSP "Test_CIF-he-editor.jsp" is not detecting the header.jsp and also the editorId.
Please let me know, If I am doing wrong.
1) <%@ include file="/appsvcs-extensions/common/widget/header.jspf"%>
2) <%@ include file="../header.jspf"%>
3) <% ServletContext shared = application.getContext("/appsvcs-extensions");
RequestDispatcher rd = shared.getRequestDispatcher("/common/widget/header.jspf");
rd.include(request, response);
System.out.println("editorId" + editorId); %>
Please find the attached custom CIF jsp "Test_CIF-he-editor.jsp". We are configuring this JSP with “Content Editor - JSP URI: ” and deploying as part of our custom war file "cms-aid-0729” using the runtime console.
Hi Gangi,
I have placed "vcm-ui.jar" & "vcm-api.jar" in the lib dir of my custom web app. And imported the following classes and used your code.
<%@ page import="com.vignette.as.client.common.AsObjectMappingConstants" %><%@ page import="com.vignette.ui.api.VCMConstant" %><%@ page import="com.vignette.ui.vcm.util.MapHelper" %>
<%System.out.println("111111");MapHelper item = MapHelper.get(request, VCMConstant.ITEM_ATTRIBUTE);System.out.println("2222222");String editorId = item.getString(AsObjectMappingConstants.CONTENT_MANAGEMENT_ID_ATTRIBUTE);String ciType = item.getString(AsObjectMappingConstants.AS_OBJECT_TYPE_ATTRIBUTE);%>
The code the failing at the following line.MapHelper item = MapHelper.get(request, VCMConstant.ITEM_ATTRIBUTE);
Please find the attached custom CIF JSP "Test_CIF-he-editor.jsp".
Thanks,Raju
Gangi,
I have observed the following error in the log. To which jar "com/vignette/ui/util/CollectionsUtil" it belongs to?
"Caused by: java.lang.NoClassDefFoundError: com/vignette/ui/util/CollectionsUtil at com.vignette.ui.vcm.util.MapHelper.get(MapHelper.java:70) at jsp_servlet._secure._sheets.__test_cif_45_he_45_editor._jspService(__test_cif_45_he_45_editor.java:142) at weblogic.servlet.jsp.JspBase.service(JspBase.java:34)"
Hi Raju,
How did you configured your custom CIF ? I assume you configured using Content Editor - JSP URI:, this doesn’t work.
Sample Extensions and WEM extensions has examples, you can use those examples.
https://knowledge.opentext.com/knowledge/llisapi.dll?func=ll&objId=17821751&objAction=browse&sort=name
From: eLink Entry: Discussion Group - Web Experience Management [mailto:v7webcontentmanagement@elinkkc.opentext.com]Sent: Tuesday, October 11, 2011 9:07 AMTo: eLink RecipientSubject: RE How to get the GUID of the content item in the Content Input Form rendering JSP? 2
RE How to get the GUID of the content item in the Content Input Form rendering JSP? 2
Posted byraju.dachepally@wellsfargo.com (Dachepally, Raju) On 2011/10/11 09:03
Topic:
I have resolved the class not found error by adding ui jar files randomly. Now the code is executing and "MapHelper " object is getting created but I am not getting any values for editorId or ciType.
Please find the code and output below. Do I need to do anything else?
Code ====
<% MapHelper item = MapHelper.get(request, VCMConstant.ITEM_ATTRIBUTE); System.out.println("item ##############" +item ); String editorId = item.getString(AsObjectMappingConstants.CONTENT_MANAGEMENT_ID_ATTRIBUTE); System.out.println("editorId ##############" +editorId ); String ciType = item.getString(AsObjectMappingConstants.AS_OBJECT_TYPE_ATTRIBUTE); System.out.println("ciType ##############" +ciType ); %>
OutPut =====
item ##############com.vignette.ui.vcm.util.MapHelper@15e93785 editorId ############## ciType ##############
As mentioned in my last thread, this code doesn’t work if you configure CIF usingContent Editor - JSP URI. Go through the Sample extensions.