In rft, how does one obtain all data in jtable?

Source: Internet
Author: User

 

 

In rft, how does one obtain all data in jtable?

 

Public


Void

Testmain (object []
ARGs)

{

 

// Start classics Java application

Startapp

(
"Classicsjavaa"
);

 

// Navigate to existing order Grid

JMB (). Click (Atpath
(
"Order"
));

JMB (). Click (Atpath
(
"Order-> View
Existing order status ..."
));

 

// Frame: view order status

Namecombob (). Click ();

Namecombob (). Click (Attext
(
"Claire
STRATUS"
));

OK (). Click ();

 

// Frame: view existing orders

Existingtable (). Click (Atpoint
(172,92 ));

 

// Get the data for the table

Itestdatatable
Ordertable = (itestdatatable) existingtable (). gettestdata (
"Contents"
);

 

// Display the available data types for the grid, total
Rows and columns.

System.
Out

. Println (
"Available
Data Types :"
+ Existingtable (). gettestdatatypes
());

System.
Out

. Println (
"Total rows in
Table :"
+ Ordertable. getrowcount ());

System.
Out

. Println (
"Total cols in
Table :"
+ Ordertable. getcolumncount ());

 




// Cycle through all rows




For

(
Int

Row = 0; row <
Ordertable. getrowcount (); ++ row)



{




// Cycle through all columns




For

(
Int

Col = 0; Col <
Ordertable. getcolumncount (); ++ col)



{




// Print out values
Of cells at (row, Col
) Coordinates



System.
Out

. Println (
"Row"
+ Row +
","
+ Ordertable. getcolumnheader
(COL) +
":"
+ Ordertable. getcell
(Row, col ));


}


}

// Close the frame

Close (). Click ();

 

// Frame: classicscd

Classicsjava (
Any

,
May_exit

). Close ();

}

}

 

 

Console output:

Available data types: {contents = table content, visible contents = visible table content,
Selected = selected table cell, visible selected = selected visible table cell}

Total rows in table: 1

Total cols in table: 7

Row 0, order ID: 7

Row 0, order date:
3/11/98

Row 0, status: Order initiated

Row 0, Composer: Bach

Row 0, composition:
Brandenburg
Concertos nos. 1
& 3

Row 0, quantity: 5

Row 0, total: 84.9500

 

 

 

 

 

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.