Start Building Professional
Web Apps Today


 
Categories Question details Back To List
Question  posted by Udhayabalachadnar on Apr 09, 2008 06:34
open dhtmlx forum
Grid doesnt Load when Below 45 records in my JSP

I am using Struts Application with Grid.

I am loading data from mysql Database with 45 columns.

When I load less than 45 rows the grid doesnt load.

The load XML error is displayed...

When I load more than 45 rows the DHML Grid is displayed..


Please Help me to fix the issues

Thanks and Regards
Udhayabalachandar.C
Answer posted by Support on Apr 09, 2008 06:49
The grid has not any hardcoded limitation , it must work the same for any dataset size.
If problem still occurs for you - please send a sample of data for which problem occurs.
Answer posted by Udhayabalachandar on Apr 12, 2008 08:06

Hai Dude...

 

Here by I have attached my Sample in Struts Application..

 

In Zip file it contains Source of Struts Application smsAjax and Gundam.sql file...The database which we used is MYSQL

 

 

 

 

Answer posted by Support on Apr 14, 2008 03:02
The code looks correct, there is no any real problem with it, but while generating XML output you not using any kind of escaping, so it possible that data rendered as part of XML will contain some dangerous characters , which may break XML structure. You may try to use

  sb.append("   <cell><![CDATA[" +rs.getString("c_sms_wbstask_no")+ "]]></cell>");

In such case XML will be safe with any content.
If problem still occurs - please try to use debug version of dhtmlxcommon.js - it will show exact response value, in case of error it may contain additional info related to error.
    http://dhtmlx.com/docs/products/kb/index.shtml?cat=search&q=2545&ssr=yes&s=dhtmlxcommon


Answer posted on Apr 16, 2008 00:42

Hi thankyou for your answers..

when I load empty rows the Load XML error is occured...

for example:

this is the XML wiich I have using in JSP page

<?xml version="1.0" encoding="shift-jis" ?><rows> <head>     <column width="35" type="link" sort="na"></column>      <column width="80" type="ed" id="WBSNo" sort="na">WBS No</column>     <column width="140" type="ed"  sort="na" id="c_sms_wbstask_pic3">担当者3</column>     <column width="140" type="ed"  sort="na" id="c_sms_wbstask_pic1load">担当者1負荷率</column>     <column width="140" type="ed"  sort="na" id="c_sms_wbstask_pic2load">担当者2負荷率</column>     <column width="140" type="ed"  sort="na" id="c_sms_wbstask_pic3load">担当者3負荷率</column>     <column width="140" type="ed"  sort="na" id="c_sms_wbstask_ut1">ユーザータイプ1</column>     <column width="140" type="ed"  sort="na" id="c_sms_wbstask_ut3">ユーザータイプ3</column>     <column width="140" type="ed"  sort="na" id="c_sms_wbstask_status">ステータス</column>     <column width="140" type="ed"  sort="na" id="c_sms_wbstask_prgsrate">進捗率</column>     <column width="140" type="ed" sort="na" id="c_sms_wbstask_name">Level1</column>     <column width="140" type="ed" sort="na" id="c_sms_wbstask_name">Level2</column>     <column width="140" type="ed" sort="na" id="c_sms_wbstask_name">Level3</column>     <column width="140" type="ed" sort="na" id="c_sms_wbstask_name">Level4</column>     <column width="140" type="ed" sort="na" id="c_sms_wbstask_name">Level5</column>     <column width="140" type="ed" sort="na" id="c_sms_wbstask_name">Level6</column>     <column width="140" type="ed" sort="na" id="c_sms_wbstask_name">Level7</column>     <column width="140" type="ed" sort="na" id="c_sms_wbstask_name">Level8</column>     <column width="140" type="ed" sort="na" id="c_sms_wbstask_name">Level9</column>     <column width="140" type="ed" sort="na" id="c_sms_wbstask_name">Level10</column>     <column width="140" type="ed"  sort="na" id="c_sms_wbstask_parent">親タスク</column>     <column width="140" type="ed"  sort="na" id="c_sms_early_wbstask_no">先行タスク</column>     <column width="140" type="ed"  sort="na" id="c_sms_wbstask_pic1">担当者1</column>     <column width="140" type="ed"  sort="na" id="c_sms_wbstask_dlydays">遅延日数</column>     <column width="140" type="ed"  sort="na" id="c_sms_wbstask_startplan">開始予定</column>     <column width="140" type="ed"  sort="na" id="c_sms_wbstask_endplan">終了予定</column>     <column width="140" type="ed"  sort="na" id="c_sms_wbstask_startexpect">開始見通</column>     <column width="140" type="ed"  sort="na" id="c_sms_wbstask_endexpect">終了見通</column>     <column width="140" type="ed"  sort="na" id="c_sms_wbstask_manhr_plan">工数予定</column>     <column width="140" type="ed"  sort="na" id="c_sms_wbstask_manhr_expect">工数見通</column>     <column width="140" type="ed"  sort="na" id="c_sms_wbstask_manhr_result">工数実績</column>     <column width="140" type="ed"  sort="na" id="c_sms_wbstask_dlyreason">遅延理由</column>     <column width="140" type="ed"  sort="na" id="c_sms_wbstask_lupdtd_dtime">更新日</column>     <column width="140" type="ed" sort="na" id="c_sms_wbstask_cap_name4">Text11</column>     <column width="140" type="ed" sort="na" id="c_sms_wbstask_cap_name5">Text12</column>     <column width="140" type="ed" sort="na" id="c_sms_wbstask_cap_name6">Text13</column>     <column width="140" type="ed"  sort="na" id="c_sms_wbstask_msr">対策</column>     <column width="140" type="ed"  sort="na" id="c_sms_wbstask_startresult">開始実績</column>     <column width="140" type="ed"  sort="na" id="c_sms_wbstask_endresult">終了実績</column>     <column width="140" type="ed"  sort="na" id="c_sms_wbstask_lupdtd_pname">更新者</column>     <column width="140" type="ed" sort="na" id="c_sms_wbstask_cap_name1">Text1</column>     <column width="140" type="ed" sort="na" id="c_sms_wbstask_cap_name2">Text2</column>     <column width="140" type="ed" sort="na" id="c_sms_wbstask_cap_name3">Text3</column>     <column width="140" type="ed"  sort="na" id="c_sms_wbstask_rps_name">成果物名称</column>     <column width="140" type="ed"  sort="na" id="c_sms_wbstask_rps_plan">成果物量予定</column> </head><row id="1"> <cell></cell> <cell></cell> <cell></cell> <cell></cell> <cell></cell> <cell></cell> <cell></cell> <cell></cell> <cell></cell> <cell></cell> <cell></cell> <cell></cell> <cell></cell> <cell></cell> <cell></cell> <cell></cell> <cell></cell> <cell></cell> <cell></cell> <cell></cell> <cell></cell> <cell></cell> <cell></cell> <cell></cell> <cell></cell> <cell></cell> <cell></cell> <cell></cell> <cell></cell> <cell></cell> <cell></cell> <cell></cell> <cell></cell> <cell></cell></row></rows>

 

The Error Message which is shown iin your Debug dhtmlcommon.js is the

XML is False  and Response is empty in the Alert messages...

Please give some suggestion for this one

 

 

Answer posted by Support on Apr 16, 2008 02:35
Please be sure that you data sent to client with correct content type
    Content-type: text/xml

The same XML as in your sample, sent from static XML file works correctly in my case.