HI I have wote The below Behaviour Class and Jsp Page to display A DATAgrid and populating it with a query Pleas see Below:
****************************
JSP For DATAGRID
***************************
<%@ page contentType="text/html"%>
<%@ page errorPage="/wdk/errorhandler.jsp" %>
<%@ taglib uri="/WEB-INF/tlds/dmform_1_0.tld" prefix="dmf" %>
<%@ taglib uri="/WEB-INF/tlds/dmformext_1_0.tld" prefix="dmfx" %>
<dmf:datagrid name="dgCustomList" width="100%">
<dmf:datagridRow>
<dmf:datagridRowTd>
<dmf:label datafield="r_object_id" />
</dmf:datagridRowTd>
<dmf:datagridRowTd>
<dmf:label datafield="object_name" />
</dmf:datagridRowTd>
</dmf:datagridRow>
</dmf:datagrid>
**********************
Behaviour Clas File
***********************
package com.documentum.webtop.webcomponent.about;
import com.documentum.fc.common.DfException;
import com.documentum.web.common.ArgumentList;
import com.documentum.web.common.WrapperRuntimeException;
import com.documentum.web.form.control.databound.Datagrid;
import com.documentum.web.formext.component.Component;
import com.documentum.web.common.ArgumentList;
import com.documentum.web.formext.component.Component;
import com.documentum.web.form.control.Label;
import com.documentum.fc.client.IDfSession;
import com.documentum.fc.common.DfException;
public class DummyComponent extends Component
{
public void onInit(ArgumentList args)
{
super.onInit(args);
String ownerName = null;
try {
ownerName = getDfSession().getLoginUserName();
} catch (DfException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
//String fullQuery = getQueryForUsersDocuments(ownerName);
Datagrid dg = (Datagrid)getControl("dgCustomList",Datagrid.class);
dg.getDataProvider().setDfSession(getDfSession());
dg.getDataProvider().setQuery("SELECT r_object_id, object_name " +
"FROM dm_document " +
"WHERE owner_name ='AdminDMP4'");
dg.getDataProvider().refresh();
}
}
*******************
Everything Seems to be fine Still When I am initiating this Datagrid I am getting Error stating Query Error,....
Any1 can please give some insight I am getting bugged with this small task