From: Günther Z. <zeh...@mo...> - 2010-03-30 12:08:16
|
Ok than you might note the following points: The master/slave setup works only with plistbox not pcombobox In the test setup for which it was developed the list of properties to choose from in the first field shouldn't be a list of all properties in the wiki but only a selected list which was defined in a type 'string' property 'Available properties' which contained a 'allowed values' property which specified the list of property names to be included. As you can include (some) SQFT parameters (like filter) in the values= SF field definition this selection was implemented with the 'allows' filter (which filters for the values of the 'allowed values' property of the named property): {{{field | propname | input type=plistbox | values=_properties,filter:allows:::Available properties | slave=PropertyValue1}}} Note also the width parameter in the slave field {{{field|PropertyValue1|width=40,30|input type=plistbox|values=}}} It turned out that too long property values completely mess up the form. The width parameter defines therefore how much of a string is displayed (plus '...'): either width=#characters ('abcdefgh' -> 'abcd ...') or width=#characters,#characters-from-front ('abcdefgh' -> 'ab ... gh') In general width specifies characters for plistbox and pixels for pcombobox Cheers, Gu --- On Tue, 3/30/10, Neill Mitchell <ne...@nl...> wrote: > From: Neill Mitchell <ne...@nl...> > Subject: Re: [Semediawiki-user] SF Page property listbox problem > To: zeh...@mo... > Cc: "Sem...@li..." <Sem...@li...> > Date: Tuesday, March 30, 2010, 11:20 AM > Sounds great. The dynamic slave > property selection is something I've > been wanting for ages! > > Thanks for the info. I'll go have a play :) > > Cheers > Neill. > On 30/03/10 10:08, Günther Zehetner wrote: > > Hi, > > unfortunately a disc crash a few weeks ago destroyed > the MW database which also contained the SQFT docs and > examples. I could only recover it from a September 2009 > backup and therefore it's a bit out of date and the docs > don't mention these SF result types right now. > > > > The syntax is standard, as 'input type=' use > 'plistbox' or 'pcombobox' and for 'values=' use the name of > the property (or 'propertyname#n' for the nth part of an > n-ary property or the string '_properties' for a list of > property names) > > > > |- > > ! Value of the Property (mandatory): > > | {{{field|PropertyValue1|input > type=plistbox|values=PROPERTYNAME}}} > > |- > > > > There is also a 'slave' parameter if you use > 'values=_properties' which allows to link two fields, the > first to select a property name and the second to show the > values of the selected property dynamically. > > > > ! Select the first Property to be queried > (mandatory): > > | {{{field|PropertySelected1|input > type=plistbox|values=_properties|slave=PropertyValue1}}} > > |- > > ! Value of the Property (mandatory): > > | {{{field|PropertyValue1|width=40,30|input > type=plistbox|values=}}} > > |- > > > > I'm not really using SF myself but here you can see a > *test* implementation for which I helped someone to add that > feature: http://micssrv22.epfl.ch/index.php/Special:RunQuery/AdvancedSearchMetadata > > > > Cheers, > > Gu > > > > --- On Tue, 3/30/10, Neill Mitchell<ne...@nl...> > wrote: > > > > > >> From: Neill Mitchell<ne...@nl...> > >> Subject: Re: [Semediawiki-user] SF Page property > listbox problem > >> To: zeh...@mo... > >> Cc: "Sem...@li..."<Sem...@li...> > >> Date: Tuesday, March 30, 2010, 10:14 AM > >> Hi there. > >> > >> I'll give SQFT a go. Thanks for the tip! > >> > >> Cheers > >> Neill. > >> On 29/03/10 23:36, Günther Zehetner wrote: > >> > >>> Recent versions of the SQFT extension also > implement > >>> > >> two new SF input types (plistbox and pcombobox) > which give > >> the option to enter/choose existing values of a > specified > >> property (values from property=). > >> > >>> Cheers, > >>> Gu > >>> > >>> --- On Mon, 3/29/10, Neill Mitchell<ne...@nl...> > >>> > >> wrote: > >> > >>> > >>> > >>>> From: Neill Mitchell<ne...@nl...> > >>>> Subject: [Semediawiki-user] SF Page > property > >>>> > >> listbox problem > >> > >>>> To: "Sem...@li..."<Sem...@li...> > >>>> Date: Monday, March 29, 2010, 3:56 PM > >>>> Hi. > >>>> > >>>> I have a property "Company Name" of type > page. > >>>> > >> This > >> > >>>> property now has a > >>>> value assigned to it via a "Company > Details" > >>>> > >> form. > >> > >>>> I have a Person form where a persons > details are > >>>> > >> entered > >> > >>>> including the > >>>> company they work for. > >>>> Now I need it to only allow the selection > of > >>>> > >> values of the > >> > >>>> Company Names > >>>> that have been entered into the system. So > I > >>>> > >> have: > >> > >>>> ! Company: > >>>> | {{{field|Company|property=Company > Name|input > >>>> type=listbox}}} > >>>> > >>>> But it's giving me an empty listbox. I'm > sure I've > >>>> > >> had this > >> > >>>> working before. > >>>> > >>>> Any ideas? > >>>> > >>>> Thanks > >>>> Neill. > >>>> > >>>> > >>>> > >>>> > >> > ------------------------------------------------------------------------------ > >> > >>>> Download Intel® Parallel Studio Eval > >>>> Try the new software tools for yourself. > Speed > >>>> > >> compiling, > >> > >>>> find bugs > >>>> proactively, and fine-tune applications > for > >>>> > >> parallel > >> > >>>> performance. > >>>> See why Intel Parallel Studio got high > marks > >>>> > >> during beta. > >> > >>>> http://p.sf.net/sfu/intel-sw-dev > >>>> > _______________________________________________ > >>>> Semediawiki-user mailing list > >>>> Sem...@li... > >>>> https://lists.sourceforge.net/lists/listinfo/semediawiki-user > >>>> > >>>> > >>>> > >>> > >>> > >>> > >>> > >> > >> > ------------------------------------------------------------------------------ > >> Download Intel® Parallel Studio Eval > >> Try the new software tools for yourself. Speed > compiling, > >> find bugs > >> proactively, and fine-tune applications for > parallel > >> performance. > >> See why Intel Parallel Studio got high marks > during beta. > >> http://p.sf.net/sfu/intel-sw-dev > >> _______________________________________________ > >> Semediawiki-user mailing list > >> Sem...@li... > >> https://lists.sourceforge.net/lists/listinfo/semediawiki-user > >> > >> > > > > > > > > > > > ------------------------------------------------------------------------------ > Download Intel® Parallel Studio Eval > Try the new software tools for yourself. Speed compiling, > find bugs > proactively, and fine-tune applications for parallel > performance. > See why Intel Parallel Studio got high marks during beta. > http://p.sf.net/sfu/intel-sw-dev > _______________________________________________ > Semediawiki-user mailing list > Sem...@li... > https://lists.sourceforge.net/lists/listinfo/semediawiki-user > |