cancel
Showing results for 
Search instead for 
Did you mean: 

How to get a value of components inside widget

alf_ecm
Champ in-the-making
Champ in-the-making

var dialog = new AlfDialog({
            title: "Media Content",
             widgetsContent: [
                  {
                     name: "alfresco/forms/controls/DojoValidationTextBox",
                     config: {
                        id: "SEARCH",
                        name: "${fieldHtmlId}_searchText",
                        label: "Search",
                        description: "Enter text to search",
                        value: ""
                     }
                  }
               ],
               widgetsButtons: [
                  {
                     name: "alfresco/buttons/AlfButton",
                     config: {
                        label: "Search",
                        publishTopic: "${fieldHtmlId}_Search"
                     }
                  },
                  {
                     name: "alfresco/buttons/AlfButton",
                     config: {
                        label: "Cancel"
                     }
                  }
               ]
        });   
 



How do i get the value of DojoValidationTextBox? I have tried dijit.byId but doesnt work.
1 REPLY 1

ddraper
World-Class Innovator
World-Class Innovator
Could you provide a bit more context to this question please? E.g. how you're making use of this widget, etc. It's also worth bearing in mind that a lot of these widgets are still in beta and that the answer might depend on what version of Alfresco you're using. Typically though, when you click the buttons, the value of the fields (e.g. your text box) will be included in the published payload - therefore you should have another widget or service subscribed to the topic the button publishes on.