Closed GoogleCodeExporter closed 9 years ago
I implemented a StandardTable, which supports the following formats
table
thead
tr
td
...
td
tbody
tr
td
...
td
...
tbody (multiple tbodies)
tr
td
...
td
...
tfoot
tr
td
...
td
As a result, you can define the UI modules as follows,
ui.StandardTable(uid: "table1", clocator: [id: "std"]) {
UrlLink(uid: "header: 2", clocator: [text: "%%Filename"])
UrlLink(uid: "header: 3", clocator: [text: "%%Uploaded"])
UrlLink(uid: "header: 4", clocator: [text: "%%Size"])
TextBox(uid: "header: all", clocator: [:])
Selector(uid: "tbody: 1, row:1, column: 3", clocator: [name:
"can"])
SubmitButton(uid: "tbody: 1, row:1, column:4", clocator: [value:
"Search", name: "btn"])
InputBox(uid: "tbody: 1, row:2, column:3", clocator: [name:
"words"])
InputBox(uid: "tbody: 2, row:2, column:3", clocator: [name:
"without"])
InputBox(uid: "tbody: 2, row:*, column:1", clocator: [name:
"labels"])
TextBox(uid: "foot: all", clocator: [tag: "td"])
}
ui.StandardTable(uid: "table2", clocator: [id: "normal"]) {
Selector(uid: "row: 1, column: 1", clocator: [name: "can", id:
"can"])
TextBox(uid: "row: 2, column: 1", clocator: [tag: "span"])
InputBox(uid: "row: 3, column: 1", clocator: [name: "q"])
SubmitButton(uid: "row: 4, column: 1", clocator: [value:
"Search"])
}
where tbody = 1 if not specified.
I also added the following methods to DslContext,
int getTableFootColumnNum(String uid)
int getTableMaxRowNumForTbody(String uid, int ntbody)
int getTableMaxColumnNumForTbody(String uid, int ntbody)
int getTableMaxTbodyNum(String uid)
Original comment by John.Jian.Fang@gmail.com
on 7 Mar 2009 at 6:38
Original issue reported on code.google.com by
John.Jian.Fang@gmail.com
on 27 Feb 2009 at 3:51