Hello
I am displaying custom attribute value in webtop by implementing ICustomAttributeDataHandler below is method description
public void getData(IDfSession sess, ICustomAttributeRecordSet rs) {
int rowCnt = rs.getCount();
String policyId = "";
IDfCollection collection = null;
for(int i=0;i<rowCnt;i++)
{
String objId = rs.getAttributeValue(i,"r_object_id");
try {
String currentLabel = "";
IDfPersistentObject object = sess.getObject(new DfId(objId));
if(object.isInstanceOf("dm_folder")){
policyId = getFolderID(sess, objId); // custom logic
} else if (object.isInstanceOf("dm_document")){
String versionDQLString = "select r_version_label from dm_document where r_object_id='"
+ objId + "';";
IDfQuery query = new DfQuery(versionDQLString);
// Get collection object
collection = query.execute(sess, DfQuery.DF_READ_QUERY);
while (collection.next()) {
final String versionLabel = collection.getAllRepeatingStrings(
"r_version_label", ",");
String versions[] = versionLabel.split(",");
currentLabel = versions[0];
}
if(currentLabel.equalsIgnoreCase("CURRENT")) {
policyId = getDocumentID(sess, objId); //custom method with my logic
}
}
} catch (DfException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
rs.setCustomAttributeValue(i, POLICY_ATTRIBUTE , policyId); // line no 62
}
}
extended the "objectlist:webtop/config/objectlist_component.xml" to add my custom attribute column working fine in case of all other screens except of Virtual document
In case of virtual document its throwing error on line no 62 when i converted normal document to virtual document , and when iwas adding the normal document to this virtual document then this error was thrown
following is the stack trace
Stack Trace:
com.documentum.web.common.WrapperRuntimeException: Attempt to set non custom attribute value
at com.documentum.web.common.WrapperRuntimeException.fillInStackTrace(WrapperRuntimeException.java:128)
at java.lang.Throwable.<init>(Throwable.java:218)
at java.lang.Exception.<init>(Unknown Source)
at java.lang.RuntimeException.<init>(Unknown Source)
at com.documentum.web.common.WrapperRuntimeException.<init>(WrapperRuntimeException.java:77)
at com.documentum.web.common.WrapperRuntimeException.<init>(WrapperRuntimeException.java:54)
at com.documentum.web.form.control.databound.DFCQueryDataHandler$CustomAttributeRecordSetView.setCustomAttributeValue(DFCQueryDataHandler.java:2249)
at com.connector.AspectAttributeHandler.getData(AspectAttributeHandler.java:62)
at com.documentum.web.form.control.databound.DFCQueryDataHandler.getCustomAttributeValues(DFCQueryDataHandler.java:700)
at com.documentum.web.form.control.databound.DFCQueryDataHandler.getCustomAttributeValues(DFCQueryDataHandler.java:714)
at com.documentum.web.form.control.databound.DFCQueryDataHandler.getNextBlockCustomAttributeValues(DFCQueryDataHandler.java:680)
at com.documentum.web.form.control.databound.DFCQueryDataHandler.getDataField(DFCQueryDataHandler.java:299)
at com.documentum.web.formext.control.docbase.VDMTreeGrid$VDMResultSet.getResultSetData(VDMTreeGrid.java:1435)
at com.documentum.web.formext.control.docbase.VDMTreeGrid$VDMResultSet.populateResultSetData(VDMTreeGrid.java:1245)
at com.documentum.web.formext.control.docbase.VDMTreeGrid.buildVDMresultSet(VDMTreeGrid.java:494)
at com.documentum.web.formext.control.docbase.VDMTreeGridTag.renderStart(VDMTreeGridTag.java:197)
at com.documentum.web.form.ControlTag.doStartTag(ControlTag.java:834)
at org.apache.jsp.webtop.classic.vdm.vdmlist_jsp._jspService(vdmlist_jsp.java:346)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:393)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:320)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:266)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at com.documentum.web.servlet.ResponseHeaderControlFilter.doFilter(ResponseHeaderControlFilter.java:317)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at com.documentum.web.servlet.CompressionFilter.doFilter(CompressionFilter.java:84)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at com.documentum.web.env.WDKController.processRequest(WDKController.java:98)
at com.documentum.web.env.WDKController.doFilter(WDKController.java:86)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:263)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:584)
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
at java.lang.Thread.run(Unknown Source)
What should be the problem in this case
Regards