AnsweredAssumed Answered

custom datalist

Question asked by vincent-kali on Oct 29, 2014
Hi,

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 ?

Thanks
Vincent


<!– ks2dl:invitationsDatalist type create form config–>
   <config evaluator="model-type" condition="ks2dl:invitationsDatalist">
       <forms>
           <!– Create item form –>
           <form>
               <field-visibility>
                   <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" />
               </field-visibility>
               <create-form template="../data-lists/forms/dataitem.ftl" />
               <appearance>
                   <field id="ks2dl:guestNotes">
                       <control template="/org/alfresco/components/form/controls/textarea.ftl" />
                   </field>
               <!–field id="ks2dl:memberContact">
                       <control template="/alfresco/service/getCurrentUser" />
                   </field–>
               </appearance>

Outcomes