That sounds good. But requires some JSON preprocessing. Could it be smarter to patch the _loadItems function in Exhibit so it automatically adds in the database any nested objects it meets?
Envoyé de mon iPhone > Le 2 sept. 2016 à 18:33, Luis Miguel Morillas <[email protected]> a écrit : > > 2016-09-02 12:18 GMT+02:00 Olivier Rossel <[email protected]>: >> Making the nested objects first class items would pollute my facets, no? > > No, because you'll work with your default collection. Look at the > collection's definition. > >> (In my case, the nested objects are really nested. They are a part of an >> item, not item themselves). >> >> Envoyé de mon iPhone >> >>> Le 2 sept. 2016 à 09:25, Luis Miguel Morillas <[email protected]> a écrit : >>> >>> Maybe you should use a normalized json: >>> >>> { >>> "items": [{ >>> "interests": ["xx", "yy"], >>> "label": "toto", >>> "type": "x", >>> "a": "1.1", >>> "id": "1" >>> }, >>> { "b": "1", "label": "tata", "id": "1.1", "type": "y" }], >>> "properties": { >>> "a": { >>> "valueType": "item" >>> } >>> } >>> } >>> >>> And create a default collection: <div >>> data-ex-role="exhibit-collection" data-ex-item-types="x"></div> >>> >>> I've never used a nested structure in the json data. >>> >>> Saludos, >>> >>> -- luismiguel (@lmorillas) >>> >>> >>> 2016-09-01 23:55 GMT+02:00 Olivier Rossel <[email protected]>: >>>> Yes. >>>> >>>> I made them available at those URLs: >>>> http://search.datao.net/test/index.html >>>> http://search.datao.net/test/index2.html >>>> >>>> The first one fails to display the .a.b for an item. >>>> The second one displays fine the .label of an item >>>> >>>> >>>> >>>> On Wed, Aug 31, 2016 at 5:51 PM, Luis Miguel Morillas >>>> <[email protected]> wrote: >>>>> Are you exhibit example online? It's easier to test it. >>>>> >>>>> Saludos, >>>>> >>>>> -- luismiguel (@lmorillas) >>>>> >>>>> >>>>> 2016-08-25 18:23 GMT+02:00 David Karger <[email protected]>: >>>>>> On quick glance this looks right. I am traveling till Monday will look >>>>>> then. >>>>>> >>>>>> Sent from BlueMail >>>>>> >>>>>> On Aug 25, 2016, at 12:14 PM, Olivier Rossel <[email protected]> >>>>>> wrote: >>>>>>> >>>>>>> Hi everyone. >>>>>>> >>>>>>> I need some help about lens configuration in Exhibit 3. >>>>>>> >>>>>>> My items have a nested structure where the property "a" >>>>>>> contains an object with a property "b": >>>>>>> { "items": [ >>>>>>> { >>>>>>> "label":"toto", >>>>>>> "type":"x", >>>>>>> "a": {"b":"1"} >>>>>>> } >>>>>>> ] >>>>>>> } >>>>>>> >>>>>>> I wish I could define my item thumbnail to be its .a.b value wrapped in >>>>>>> a >>>>>>> div. >>>>>>> >>>>>>> Such HTML does not seem to work in that case: >>>>>>> >>>>>>> <div data-ex-role="viewPanel"> >>>>>>> <div data-ex-role="view" >>>>>>> data-ex-view-class="Thumbnail" >>>>>>> data-ex-show-all="true" >>>>>>> data-ex-paginate="true" >>>>>>> <table data-ex-role="lens" class="itemThumbnail" style="display: none;"> >>>>>>> <tr> >>>>>>> <td style="vertial-align:bottom" >>>>>>> class="itemThumbnail-thumbnailContainer"> >>>>>>> <div style="position: relative"> >>>>>>> <div >>>>>>> data-ex-content=".a.b"/> >>>>>>> </div> >>>>>>> </td> >>>>>>> </tr> >>>>>>> </table> >>>>>>> </div> >>>>>>> </div> >>>>>>> >>>>>>> I get nothing displayed in my view panel. >>>>>>> >>>>>>> What kind of syntax must be used to display a nested valye inside a >>>>>>> <div> >>>>>>> ? >>>>>>> >>>>>>> Any help is welcome! >>>>>>> >>>>>>> PS: are there some Exhibit examples managing such nested data >>>>>>> structures? >>>>>> >>>>>> -- >>>>>> You received this message because you are subscribed to the Google Groups >>>>>> "SIMILE Widgets" group. >>>>>> To unsubscribe from this group and stop receiving emails from it, send an >>>>>> email to [email protected]. >>>>>> To post to this group, send email to [email protected]. >>>>>> Visit this group at https://groups.google.com/group/simile-widgets. >>>>>> For more options, visit https://groups.google.com/d/optout. >>>>> >>>>> -- >>>>> You received this message because you are subscribed to the Google Groups >>>>> "SIMILE Widgets" group. >>>>> To unsubscribe from this group and stop receiving emails from it, send an >>>>> email to [email protected]. >>>>> To post to this group, send email to [email protected]. >>>>> Visit this group at https://groups.google.com/group/simile-widgets. >>>>> For more options, visit https://groups.google.com/d/optout. >>>> >>>> -- >>>> You received this message because you are subscribed to the Google Groups >>>> "SIMILE Widgets" group. >>>> To unsubscribe from this group and stop receiving emails from it, send an >>>> email to [email protected]. >>>> To post to this group, send email to [email protected]. >>>> Visit this group at https://groups.google.com/group/simile-widgets. >>>> For more options, visit https://groups.google.com/d/optout. >>> >>> -- >>> You received this message because you are subscribed to the Google Groups >>> "SIMILE Widgets" group. >>> To unsubscribe from this group and stop receiving emails from it, send an >>> email to [email protected]. >>> To post to this group, send email to [email protected]. >>> Visit this group at https://groups.google.com/group/simile-widgets. >>> For more options, visit https://groups.google.com/d/optout. >> >> -- >> You received this message because you are subscribed to the Google Groups >> "SIMILE Widgets" group. >> To unsubscribe from this group and stop receiving emails from it, send an >> email to [email protected]. >> To post to this group, send email to [email protected]. >> Visit this group at https://groups.google.com/group/simile-widgets. >> For more options, visit https://groups.google.com/d/optout. > > -- > You received this message because you are subscribed to the Google Groups > "SIMILE Widgets" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > To post to this group, send email to [email protected]. > Visit this group at https://groups.google.com/group/simile-widgets. > For more options, visit https://groups.google.com/d/optout. -- You received this message because you are subscribed to the Google Groups "SIMILE Widgets" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at https://groups.google.com/group/simile-widgets. For more options, visit https://groups.google.com/d/optout.
