|
Re: Empty Table [message #708383 is a reply to message #708339] |
Tue, 02 August 2011 18:12 |
|
Johannes,
The fetch script is called for every row of data. And each call must
return true or false. Returning true means there are more rows.
Returning false means there are no more rows. Your fetch processes all
rows in one call. You need to do something like:
if( iter.hasNext() ){
myObject = iter.next();
row["outtercol"] = myObject.getValue().toString();
return true;
}else{
return false;
}
See attached exmaple.
Jason
On 8/2/2011 1:52 PM, Johannes.Koshy wrote:
> I have another curious Problem,
>
> I have a Table i fill with Java Script from an Java Class.
> I Know that iam getting the Data within the Java Script:
> <method name="fetch"><![CDATA[while(iter.hasNext()&&count<10){
> mp = iter.next();
> row["columnTime"] = mp.getTime();
> row["columnMemory"] = mp.getValue();
> Packages.java.lang.System.out.println (mp.getValue());
> count ++
> }
> return false;]]></method>
>
> returns Data in the console.
> mp.getTime() return a long Value and mp.getValue() returns a Number object.
>
> What did i do wrong?
>
> thanks for your time.
|
|
|
|
Powered by
FUDForum. Page generated in 0.02965 seconds