Whitebeam Object Definition

Site Map
 
Home
 
Application Guide
Reference
  Installation
  Configuration
  XML Markup
  JavaScript Classes
  ROM
  Templates
  Environment
  Dev Process
  Tools
  External Links
  Example libraries
Community
Contact Whitebeam
To-Do
Download
Credits
Licence
Whitebeam Users
 
 
 

Whitebeam Object Definition

Method Description

iterator.getNextRow()

Get the data from the next row.

Syntax

bool = iterator.getNextRow()

Parameters

The 'iterator.getNextRow' method takes no parameters

Results

The 'iterator.getNextRow' method returns bool:

Type/Value Range/Length Description
bool   Returns 'true' if the method found another row in the table, 'false' if the end of the table has been reached.

Remarks

This method loads the iterator with property values for the next row in the table. If this is the first operation on the iterator since it was created then the method will return the first row in the table. The initial or current position in a table can be modified using iterator.setNextRow().

The return value from the method indicates whether new row values were available - or whether the end of the table had been reached.

Example

This example uses the rb.page.iterateHeader to create an iterator and then steps through each row in the virtual table - in this case each row represents one of the HTTP headers provided by the client.

rb.page.write('<h1>HTTP Headers</h1>\n');

var iter = rb.page.iterateHeader();

rb.page.write('<table border="1">\n');
while (iter.getNextRow()) {
   rb.page.write('<tr><td>'+iter.name+'</td><td>'+iter.value+'</td></tr>\n');
}
rb.page.write('</table>\n');

The typical output produced by this code fragment would be as follows:

HTTP Headers

Accept*/*
Accept-Encodinggzip, deflate
Accept-Languageen-gb
ConnectionKeep-Alive
CookieRed60urne=TestContextId
Hostclient1
User-AgentMozilla/4.0 (compatible; MSIE 5.5; Windows NT 5.0)
Whitebeam release 1.3.36
(loadtime : 9ms)