AnsweredAssumed Answered

Post Request

Question asked by riadhazzouz on Mar 28, 2019
Latest reply on Apr 1, 2019 by riadhazzouz

I made this model 


      <type name="sp:configuration">
                  <property name="sp:username">
                  <property name="sp:users">


I' m trying to make a form in which a user can choose a list of users, I tried this code in the js file of the new page


ConfigurationFormWidget = [
      name : "alfresco/forms/controls/MultiSelectInput",
      config : {
            label : "Select Users",
            name : "prop_config_users",
            optionsConfig : {
                  queryAttribute : "shortName",
                  publishTopic : "ALF_GET_FORM_CONTROL_OPTIONS",
                  publishPayload : {
                        url : page.url.context
                        + "api/groups/ALFRESCO_ADMINISTRATORS/children",
                  resultsProperty : "options",
                  itemsAttribute : "data",
                  labelAttribute : "displayName",
                  valueAttribute : "shortName"


var form = {
      name: "alfresco/forms/Form",
      config: {
            showOkButton: true,
            okButtonLabel: "Save",
            showCancelButton: false,
            cancelButtonLabel: "",
            //Specify the TOPIC here
            okButtonPublishTopic: "ALF_CRUD_CREATE",
            okButtonPublishGlobal: true,
            okButtonPublishPayload: {
                  //Specify the URL here to POST the data
                  url: "/hdp/ws/configUserSpace",
                 //To create the folder under document library, we need the documberLibrary nodeRef,So POST that too.
      widgets: ConfigurationFormWidget




the issue is that the users are not being displayed in the MultiSelectInput, and I didn't find the URI to display all users not only ALFRESCO_ADMINISTRATORS.

Finally how can I make the POST request to send the data and save it in contents?