Marco De Salvo wrote:
> Dear all,
> i would like to know if there exists one way to extract the selected
> values from a list-facet, to be able to reconstruct the state of its
> selections: actually i have a complicated way like this:
>
> var actualFacetSelection=getElementsByClassName("exhibit-facet-value
> exhibit-facet-value-selected","div");  // returns, for example:
> facet1item2,facet2item3,facet2item4
>
> which returns a comma-separated list of all the actual selected items
> of all my list-facets. That comma-separated list is then used by me to
> control an OpenLayers and a Timeline.
>
> I suppose there must be a more elegant way in the API to do so, but i
> don't know it. I use the exhibit-2.1 release.
>
> This is my case: http://www.archeoserver.it/demoMI/
>
> Please help me :-|
> >
>   
Marco,

First, give the facet an ID

    <div ex:role="facet" id="facet-x" ...></div>

Then this gets you an array of the selected values

    window.exhibit.getComponent("facet-x")._valueSet.toArray()

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
-~----------~----~----~----~------~----~------~--~---

Reply via email to