Instead of {{.id}}, could you try {{value}}? I've been meaning to
support .id for a long time since Johan requested it, but I still
haven't gotten around it.
David
Gudmundur Thorisson wrote:
> Can I ask a related question about the <table> template markup? I'm
> doing a similar thing for one of my Exhibit which has worked fine
> previously, but now I have altered the JSON data somewhat and use
> the .id property in the table itself which wasn't the case before.
> Funny thing is that .id is simply not displayed at all, but everything
> else is. Same happens in other Exhibits I'm working on where the .id
> property should be displayed.
> Is .id a hidden property or something like that? It's not a big
> problem, I can just put the public identifier for my items in .label
> or .identifier. I was just wondering if I was doing something
> wrong! .id seems to work fine as a foreign key to link related items
> to one another.
>
> See below for the HTML template and some sample JSON data.
>
>
> Mummi, Leicester
>
>
> <div ex:role="view" style="padding-left:16px;"
> ex:label="Summary"
> ex:showToolbox="false"
> ex:viewClass="TabularView"
> ex:collectionID="study-collection"
> ex:itemTypes="study"
> ex:formats="date {template: 'yyyy-MM-dd'; show: date}"
> ex:columns=".id, .label, .timecreated, !study.genotypingplatform"
> ex:columnLabels="Study ID, Study name, Date submitted, Genotyping
> platform"
> ex:sortColumn="2"
> ex:sortAscending="false">
> <table>
> <tr>
> <td style="width: 10em"><a ex:content=".id" ex:href-
> subcontent="/study/{{.id}}"></a></td>
> <td style="width: 45em"><span ex:content=".label"></span></td>
> <td style="width: 10em"><span ex:content=".timecreated"></
> span></td>
> <td style="width: 15em"><span ex:content="!
> study.genotypingplatform"></span></td>
>
> </tr>
> </table>
> </div>
>
> ...
> {
> "items" : [
> {
> "genotypingplatform" : [
> "Illumina HumanHap300"
> ],
> "id" : "HGVEyyyyy",
> "label" : "Association analysis results",
> "type" : "experiment",
> "description" : "more info about this experiment, if
> desired",
> "study" : "HGVSTxxxx"
> },
> {
> "genotypingplatform" : [
> "Illumina HumanHap300"
> ],
> "id" : "HGVEyyyyy1",
> "label" : "Association analysis results II",
> "type" : "experiment",
> "description" : "Another experiment within this study,
> investigating the same phenotype but\n with different
> panels",
> "study" : "HGVSTxxxx"
> },
> {
> "timecreated" : "2008-11-07 16:41:00",
> "id" : "HGVSTxxxx",
> "label" : "Test study for regression test suite",
> "type" : "study",
> "description" : "Mummi's test Study entry, for use in
> regression test suite"
> }
> ]
> }
>
>
>
> On Sep 13, 9:07 pm, David Huynh <[EMAIL PROTECTED]> wrote:
>
>> Hi Paula,
>>
>> I was referring to this part of the code
>>
>> <div ex:role="view"
>> ex:viewClass="Tabular"
>> ex:label="Details"
>> ex:columns=".term, .label, .party, .presidency.inDate,
>> .presidency.outDate, add(foreach(.presidency, date-range(.inDate,
>> .outDate, 'day')))"
>> ex:columnLabels="term, name, party, took office, left office,
>> days in office"
>> ex:formats="date { mode: medium; show: date }"
>> ex:sortColumn="4"
>> ex:sortAscending="false"
>> >
>> <table style="display: none;">
>> <tr ex:background-style-content="if(exists(.death), '#ccc',
>> 'white')">
>> <td><span ex:content=".term"></span></td>
>> <td><b ex:content=".label"></b><br/><img
>> ex:src-content=".imageURL" /></td>
>> <td><span ex:content=".party"></span></td>
>>
>> <td><span ex:content=".presidency.inDate"></span></td>
>> <td><span ex:content=".presidency.outDate"></span></td>
>> <td><span ex:content="add(foreach(.presidency,
>> date-range(.inDate, .outDate, 'day')))"></span></td>
>> </tr>
>> </table>
>> </div>
>>
>> See how there is a <table> inside the <div>? The <tr> of the <table>
>> serves as a template for how to render each row. You can do fancy things
>> with row templates. For example, in the second cell, I display the label
>> followed by the photo of the president.
>>
>> David
>>
>> paula bonastre wrote:
>>
>>> Hi,
>>>
>>> I was checking the US President example but I don´t see what you
>>> refert to, can you explain me a bit
>>> more what you mean whith row template inside the tabular view.
>>>
>>> Thanks for all,
>>> Paula
>>>
>>> 2008/8/20 David Huynh <[EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]>>
>>>
>>> pbonastre wrote:
>>> > Hello everyone,
>>>
>>> > I have a problem but I couldn´t find and answer, soo I ask all
>>> off you
>>> > if you have any idea.
>>>
>>> > I have a TabularView, with 3 different info to show, name, Rol,and
>>> > judgement.
>>>
>>> > <td ex:role='viewPanel'>
>>> > <div ex:role='exhibit-view'
>>> > ex:viewClass='Exhibit.TabularView'
>>>
>>> > ex:columns='.persona.nombre, .rol,
>>> .sentencia_Relacion.numero_sentencia'
>>> > ex:columnLabels='NOMBRE,ROL, SENTENCIA'
>>> > ex:columnFormats='list,list, list'
>>> > ex:sortColumn='0'
>>> > ex:sortAscending='false' class='tabular'
>>>
>>> > The thing is thant I want every line and every different info,like
>>> > name, Rol and judgement has to have a different URL,
>>> > so when you press in any off then you will be redirect to a
>>> different
>>> > page.
>>>
>>> > Thanks to all.
>>>
>>> Paula,
>>>
>>> Try to use a row template inside the tabular view.
>>>
>>> http://groups.google.com/group/simile-widgets/browse_thread/thread/86...
>>>
>>> David
>>>
> >
>
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"SIMILE Widgets" 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/simile-widgets?hl=en
-~----------~----~----~----~------~----~------~--~---