Hi David,
So i've tried defining the lens inside the viewPanel along side the
tabular view. however, the .label doesn't pick up as a item :(
my html is:
<div id="exhibit-view-panel" ex:role="viewPanel">
<div ex:role="exhibit-lens" ex:itemTypes="Port" style="display:
none;">
<h3><span ex:content=".device"></span> port <span
ex:content=".port"></span></h3>
</div>
<div ex:role="view"
ex:viewClass="Tabular"
ex:label="Table"
ex:columns
=
".device
, .port
, .opStatusIcon
, .alias, .connected_peer, .speed, .duplex, .vlans, .last_seen, .label"
ex:columnLabels="device, port, opr, alias, peer, speed, duplex,
vlans, last_seen, action"
ex:columnFormats="list, number, image, list, list, list, list,
number, date, item">
<table style="display: none;">
<tr>
<td><span ex:content=".device"></span></td>
<td><span ex:content=".port"></span></td>
<td><img ex:src-content=".opStatusIcon"/></td>
<td><span ex:content=".alias"></span></td>
<td><span ex:content=".connected_peer"></span></td>
<td><span ex:content=".speed"></span></td>
<td><span ex:content=".duplex"></span></td>
<td><span ex:content=".vlans"></span></td>
<td><span ex:content=".last_seen"></span></td>
<td><span ex:content=".label"></span></td>
</tr>
</table>
</div>
</div>
and my data structure is like:
{
"op_status": "enabled",
"connected_param": null,
"speed": null,
"last_seen": "2008-02-12 17:20:13",
"port_fast": "disabled",
"slot": null,
"admStatusIcon": "/images/status-green.png",
"connected_ip": null,
"port": "VLAN-1003",
"adm_status": "enabled",
"device": "swh-cgb4.slac.stanford.edu",
"duplex": null,
"vlans": [],
"opStatusIcon": "/images/status-green.png",
"connected_peer": null,
"type": "Port",
"label": "233",
"alias": null
},
any ideas?
thanks!
Yee.
On 14 Feb 2008, at 10:39, David Huynh wrote:
> Yee-Ting Li wrote:
>> thanks David that worked :)
>>
>> related to my other thread about lenses, i am using your recommended
>> method to substitute a field by defining the <table/> within the <div
>> ex:role="view" ex:viewClass="Tabular"/>... but i also wish to have a
>> lens on this over-riden tabular view... how can i do this? simply
>> defining the lens along with the <table/> does not appear to work :(
>>
> Hmm, you're right, that wouldn't work...
>
> If the tabular view is not inside a view panel, then you can wrap it
> with a view panel and put the lens template inside the view panel:
>
> <div ex:role="viewPanel">
> <div ex:role="lens"...>...</div>
> <div ex:role="view" ex:viewClass="Tabular"...>...</div>
> </div>
>
> David
> _______________________________________________
> General mailing list
> [email protected]
> http://simile.mit.edu/mailman/listinfo/general
_______________________________________________
General mailing list
[email protected]
http://simile.mit.edu/mailman/listinfo/general