AnsweredAssumed Answered

custom datalist

Question asked by vincent-kali on Oct 29, 2014

I've added a new datalist type which is working fine.
I want now to fill up automatically a datalist property with the name of
the current logged in user.
I've created a webscript that return the expected string (GetCurrentUser).
I tried to call it using control in share-config-custom.xml (instead of form/controls/..ftl files, without success).

Is this the right way to do this ?
Could somebody tell me how to call a webscript from control in share-config-custom.xml ?


<!– ks2dl:invitationsDatalist type create form config–>
   <config evaluator="model-type" condition="ks2dl:invitationsDatalist">
           <!– Create item form –>
                   <show id="ks2dl:guestFirstName" />
                   <show id="ks2dl:guestLastName" />
                   <show id="ks2dl:guestEmail" />
                   <show id="ks2dl:guestCompany" />
                   <show id="ks2dl:guestJobTitle" />
                   <show id="ks2dl:guestPhoneOffice" />
                   <show id="ks2dl:guestPhoneMobile" />
                   <show id="ks2dl:guestNotes" />
               <show id="ks2dl:memberContact" />
               <show id="ks2dl:payedBy" />
               <create-form template="../data-lists/forms/dataitem.ftl" />
                   <field id="ks2dl:guestNotes">
                       <control template="/org/alfresco/components/form/controls/textarea.ftl" />
               <!–field id="ks2dl:memberContact">
                       <control template="/alfresco/service/getCurrentUser" />