Hello Charles. This single-item view is something I've wanted to do for a long time but haven't had a chance.
I think method 1 is your best option.
Create a facet on item label which provides a way to select a single item. Define a lens that shows an item the way that you like. Write javascript "click" event handler that programmatically modifies the facet selection based on the click. Then you can hide the facet itself, as it won't be directly used for visualization.

The javascript *should* be simple but I'm not sure anyone has tried using it this way. In list-facet.js there is a method called setSelection that can be used to set or clear a selection on the facet. You need to get hold of the facet object in order to invoke that method; it will take care of updating the view as a result.

-David


On 8/6/2012 5:21 AM, charles peguiron wrote:
Hello,

(I'm working with Exhibit 3 Scripted.)


I have a special need for my work.
I need to build a web page that display only one item of my database. This display follows the organization of a lense. The goal is to display an "ID card like" web page describing an item. My situation does not allow me to have only one JSON data file (I have too many items). So I buils as many JSON file as items types.

My need is: from a "classical" Exhibit page who allow filtering and other functionnalities, I want to be abble to point on one specific item and go to a separate web page who display that item. From this page it is possible to "navigate" from one item to another, depending on the properties in the database. The lense use to displays an item depend on the type of this last one.

I was thinking of two ways to implement this need but I'm not sure this is possible. I need help to make my choice before to go ahead:

First way: Buildind a classical Exhibit web page then make a filter (on the ID?) to display only one specific Item of my JSON file. The link to the datafile is dynamically implemented depending on the type of the item.

Second way: Building a specific Exhibit web page without facet and put in the URL the data describing the selected item. Insert this data _*in*_ the web page and use the Exhibit API to display the particular item. In this way there is no direct link with an external JSON file. I'm not sure where to put the data in the web page. If I want to display the "ID card" of another item, I must search in the ra JSON file, depending on the item type, and put again the data through the URL.

I'm not really sure this two ways are performant and which one will be the most simple to realize. Can you give me your feeling about this two approaches?

Is someone had already implement this kind of need or knows another solution to implement it?

Thanks in advance!

Best regards,

Charles





--
You received this message because you are subscribed to the Google Groups "SIMILE Widgets" group. To view this discussion on the web visit https://groups.google.com/d/msg/simile-widgets/-/TZen4igQ-pQJ.
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.

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