a href problem‏

19 views
Skip to first unread message

pbonastre

unread,
Aug 13, 2008, 8:23:09 AM8/13/08
to SIMILE Widgets
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

David Huynh

unread,
Aug 19, 2008, 11:42:26 PM8/19/08
to simile-...@googlegroups.com

paula bonastre

unread,
Aug 20, 2008, 1:37:56 PM8/20/08
to simile-...@googlegroups.com
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 <dfh...@alum.mit.edu>

David Huynh

unread,
Sep 13, 2008, 5:07:42 PM9/13/08
to simile-...@googlegroups.com, paul...@gmail.com
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 <dfh...@alum.mit.edu <mailto:dfh...@alum.mit.edu>>

paula bonastre

unread,
Sep 26, 2008, 3:27:59 AM9/26/08
to SIMILE Widgets
Hy,
Thanks it works fine.
Paula

2008/8/13 pbonastre <paul...@gmail.com>

paula bonastre

unread,
Sep 26, 2008, 3:29:21 AM9/26/08
to SIMILE Widgets
Hello everyone,

I´m trying to do something like the main table in the Recent United States Senate Bills example, but I couldn´t figured out how
to do the colums for sponsored and cosponsored, just watching the code, maybe I´d forgot to see something,
I had senate-bills.js, senate-committees.js and the html senate.html,but I don´t see it, can anyone explain it to me please.

THanks for all,

Paula

David Huynh

unread,
Sep 26, 2008, 4:59:04 PM9/26/08
to simile-...@googlegroups.com
Any URL to your exhibit that we can look at?

David

Gudmundur Thorisson

unread,
Nov 11, 2008, 7:24:36 AM11/11/08
to SIMILE Widgets
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"
}
]
> > 2008/8/20 David Huynh <dfhu...@alum.mit.edu <mailto:dfhu...@alum.mit.edu>>
>
> >     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

David Huynh

unread,
Nov 11, 2008, 11:32:41 AM11/11/08
to simile-...@googlegroups.com
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
Reply all
Reply to author
Forward
0 new messages