WE HAVE SUNSET THIS LISTSERV - Join us at collectionspace@lyrasislists.org
View all threadsHi all,
I'm currently working on advanced search functionalities on SMK's Structure Date.
Search on an isolated Structure Date works fine, but I've a hard time trying to have it working coupled with an autocomplete field within a same repeat group.
Here is an example on an advanced-search-on-exhibition.
Let say I've got the following configuration file (in Application --> tenant --> smk --> domain-procedure-exhibition.xml):
<root> <services-record-path id="smk">exhibitions_smk:http://collectionspace.org/services/exhibition/local/smk,exhibitions_smk</services-record-path>
<section id="domaindata">
<repeat id="smkExhibitionVenueGroupList/smkExhibitionVenueGroup" section="smk">
<field id="smkExhibitionVenue" ui-search="repeatable" autocomplete="person-person" section="smk"/>
[remark in passing: the autocomplete field won't be generated in the corresponding advanced-search webpage page if you set a selector tag for this field. It took me eon to figure that out.]
<group id="smkExhibitionDateFrom" ui-search="range" ui-type="groupfield/structureddateSMK"
primarykey="dateSMKDisplayText" ui-func="cspace.structuredDateSMK" section="smk"> </group>
</repeat>
</section>
</root>
This configuration works as for the creation/modification-of-exhibition webpage.
But if I create a SearchFieldsTemplate-exhibition.html in UI, I will get an error trying to reach the corresponding advanced-search-on-exhibition webpage.
I found out that fields with two different types of ui-search (i.e. "repeatable" and "range") couldn't work together in a same repeat group.
Of course, if I give the same value to the two ui-search, one of the field won't work in the advanced-search-on-exhibition webpage (depending on the value I set).
My last guess was to create two different sections (I know, it sounds quite strange, but I was quite desperate at this point):
<root> <services-record-path id="smk">exhibitions_smk:http://collectionspace.org/services/exhibition/local/smk,exhibitions_smk</services-record-path>
<section id="domaindata">
<section id="section1">
<repeat id="smkExhibitionVenueGroupList/smkExhibitionVenueGroup" section="smk">
<group id="smkExhibitionDateFrom" ui-search="range" ui-type="groupfield/structureddateSMK"
primarykey="dateSMKDisplayText" ui-func="cspace.structuredDateSMK" section="smk"> </group>
</repeat>
</section>
<section id="section2">
<repeat id="smkExhibitionVenueGroupList/smkExhibitionVenueGroup" section="smk">
<field id="smkExhibitionVenue" ui-search="repeatable" autocomplete="person-person" section="smk"/>
</repeat>
</section>
</section>
</root>
Surprisingly it worked for the advanced-search-on-exhibition webpage... but this time the creation/modification-of-exhibition webpage was out of order.
Now I'm running low on ideas.
Does somebody has an idea how to solve/bypass this ui-search problem?
Many thanks!
(by the way, my dev platform is under v2.6)
Best regards,
Sébastien
Hi all,
For information, and for those who would have the same problem as the one I described below, I found an answer here:
http://issues.collectionspace.org/browse/UCBG-117
Thanks Ray!
Cheers,
Sébastien
Fra: Talk [mailto:talk-bounces@lists.collectionspace.org] På vegne af Sébastien Brossard
Sendt: 5. april 2013 16:18
Til: 'talk@lists.collectionspace.org'
Emne: [Talk] Advanced search functionalities - Different ui-search types in a same repeat group
Hi all,
I'm currently working on advanced search functionalities on SMK's Structure Date.
Search on an isolated Structure Date works fine, but I've a hard time trying to have it working coupled with an autocomplete field within a same repeat group.
Here is an example on an advanced-search-on-exhibition.
Let say I've got the following configuration file (in Application --> tenant --> smk --> domain-procedure-exhibition.xml):
<root> <services-record-path id="smk">exhibitions_smk:http://collectionspace.org/services/exhibition/local/smk,exhibitions_smk</services-record-path>
<section id="domaindata">
<repeat id="smkExhibitionVenueGroupList/smkExhibitionVenueGroup" section="smk">
<field id="smkExhibitionVenue" ui-search="repeatable" autocomplete="person-person" section="smk"/>
[remark in passing: the autocomplete field won't be generated in the corresponding advanced-search webpage page if you set a selector tag for this field. It took me eon to figure that out.]
<group id="smkExhibitionDateFrom" ui-search="range" ui-type="groupfield/structureddateSMK"
primarykey="dateSMKDisplayText" ui-func="cspace.structuredDateSMK" section="smk"> </group>
</repeat>
</section>
</root>
This configuration works as for the creation/modification-of-exhibition webpage.
But if I create a SearchFieldsTemplate-exhibition.html in UI, I will get an error trying to reach the corresponding advanced-search-on-exhibition webpage.
I found out that fields with two different types of ui-search (i.e. "repeatable" and "range") couldn't work together in a same repeat group.
Of course, if I give the same value to the two ui-search, one of the field won't work in the advanced-search-on-exhibition webpage (depending on the value I set).
My last guess was to create two different sections (I know, it sounds quite strange, but I was quite desperate at this point):
<root> <services-record-path id="smk">exhibitions_smk:http://collectionspace.org/services/exhibition/local/smk,exhibitions_smk</services-record-path>
<section id="domaindata">
<section id="section1">
<repeat id="smkExhibitionVenueGroupList/smkExhibitionVenueGroup" section="smk">
<group id="smkExhibitionDateFrom" ui-search="range" ui-type="groupfield/structureddateSMK"
primarykey="dateSMKDisplayText" ui-func="cspace.structuredDateSMK" section="smk"> </group>
</repeat>
</section>
<section id="section2">
<repeat id="smkExhibitionVenueGroupList/smkExhibitionVenueGroup" section="smk">
<field id="smkExhibitionVenue" ui-search="repeatable" autocomplete="person-person" section="smk"/>
</repeat>
</section>
</section>
</root>
Surprisingly it worked for the advanced-search-on-exhibition webpage... but this time the creation/modification-of-exhibition webpage was out of order.
Now I'm running low on ideas.
Does somebody has an idea how to solve/bypass this ui-search problem?
Many thanks!
(by the way, my dev platform is under v2.6)
Best regards,
Sébastien