hi,
i am trying to populate a datagrid with the values of an object type, but once it runs, it is populated with only the last row generated by the query..
PFB the code that i'm using by following the WDK Datagrid manual.
JSP:
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/custom_1_0.tld" prefix="cst" %>
dmf:html>
<dmf:head>
<dmf:webform validation='false'/>
<h3>Test Datagrid</h3>
</dmf:head>
<dmf:body>
<div style="{margin-top: 30px; width: 400px;}">
<dmf:form>
<dmf:datagrid name="TestDatagrid" cellpadding="2" query="select label from testdatagrid">
<dmf:datagridRow>
<dmf:datagridRowTd><dmf:label datafield="label"/></dmf:datagridRowTd>
</dmf:datagridRow>
</dmf:datagrid>
</dmf:form>
</div>
</dmf:body>
dmf:html>
JAVA CODE:
Public class TestDatagrid extends Component{
private Datagrid _testDatagrid=null;
public void onInit(ArgumentList args)
super.onInit(args);
_testDatagrid = (Datagrid)getControl("TestDatagrid", Datagrid.class);
_testDatagrid.getDataProvider().setDfSession(getDfSession());
the object type that i'm querying for returns rows, but in the datagrid only the last row is fetched.
Kindly assist.