UI templates with List and Table are supported now. For example, the
following UI module
ui.Container(uid: "subnav", clocator: [tag: "ul", id: "subnav"]) {
Container(uid: "CoreLinks", clocator: [tag: "li", id: "core_links"])
{
List(uid: "links", clocator: [tag: "ul"], separator: "li") {
UrlLink(uid: "all", clocator: [:])
}
}
UrlLink(uid: "subscribe", clocator: [tag: "li", id: "subscribe"])
}
generates the html source as follows,
<ul id="subnav">
<li id="core_links">
<ul>
<li>
<a/>
</li>
</ul>
</li>
<li id="subscribe"/>
</ul>
Similarly for table, UI module:
ui.Table(uid: "issueResult", clocator: [id: "resultstable", class:
"results"], group: "true") {
TextBox(uid: "header: 1", clocator: [:])
UrlLink(uid: "header: 2", clocator: [text: "*ID"])
UrlLink(uid: "header: 3", clocator: [text: "*Type"])
UrlLink(uid: "header: 4", clocator: [text: "*Status"])
UrlLink(uid: "header: 5", clocator: [text: "*Priority"])
UrlLink(uid: "header: 6", clocator: [text: "*Milestone"])
UrlLink(uid: "header: 7", clocator: [text: "*Owner"])
UrlLink(uid: "header: 9", clocator: [text: "*Summary + Labels"])
UrlLink(uid: "header: 10", clocator: [text: "*..."])
//define table elements
//for the border column
TextBox(uid: "row: *, column: 1", clocator: [:])
TextBox(uid: "row: *, column: 8", clocator: [:])
TextBox(uid: "row: *, column: 10", clocator: [:])
//For the rest, just UrlLink
UrlLink(uid: "all", clocator: [:])
}
generated HTML source:
<table id="resultstable" class="results">
<tbody>
<tr>
<th>
</th>
<th>
<a>ID</a>
</th>
<th>
<a>Type</a>
</th>
<th>
<a>Status</a>
</th>
<th>
<a>Priority</a>
</th>
<th>
<a>Milestone</a>
</th>
<th>
<a>Owner</a>
</th>
<th>
</th>
<th>
<a>Summary + Labels</a>
</th>
<th>
<a>...</a>
</th>
</tr>
<tr>
<td>
</td>
<td>
<a/>
</td>
<td>
<a/>
</td>
<td>
<a/>
</td>
<td>
<a/>
</td>
<td>
<a/>
</td>
<td>
<a/>
</td>
<td>
</td>
<td>
<a/>
</td>
<td>
</td>
<td>
<a/>
</td>
</tr>
</tbody>
</table>
On Fri, Jul 24, 2009 at 11:26 AM, John <[email protected]> wrote:
>
> We provided the following new method in DslContext to do reverse
> engineering to generate Html source from UI modules (Tellurium Core
> 0.7.0 SNAPSHOT),
>
> public String generateHtml(String uid)
>
> This may be useful for some scenarios that you need to trace problem
> in other people's code without access to the HTML source.
>
> Be aware, this method only works for Composite locator and does not
> work for UI templates for the time being. We will add UI template
> support later.
>
> Thanks,
>
> Jian
> >
>
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"tellurium-users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/tellurium-users?hl=en
-~----------~----~----~----~------~----~------~--~---