Error while setting value of widget | Community
Skip to main content
Level 5
October 16, 2015
Solved

Error while setting value of widget

  • October 16, 2015
  • 3 replies
  • 924 views

Hi

I have a dialog with textfield. I placed a listener to display a custom widget which is a dialog itself which render along with first dialog. Below is my listener under textfield. 

function(component){ var dialog = CQ.wcm.showTemplate('/content/geomatrixx/en'); dialog.show(); }

I need when i click on the items(templates) that display inside second dialog, there path should populate in the textfield of first dialog. I have below code :

var dialog = CQ.WCM.getDialog(tempplateDialog); dialog.on("beforesubmit", function() { if(dataView.getSelectedRecords()[0] && dataView.getSelectedRecords()[0].data){ alert("path is :"+dataView.getSelectedRecords()[0].data.path +" "+CQ.Ext.get('mytemplate')); var tempPath = CQ.Ext.get('mytemplate').setValue(dataView.getSelectedRecords()[0].data.path); hiddenTemplate.setRawValue(dataView.getSelectedRecords()[0].data.path); }else{ CQ.Ext.Msg.alert(CQ.I18n.getMessage("You must select a valid template")); return false; } });

Here when i try to apply setValue, it throw error Uncaught TypeError: undefined is not a function . But if i remove setValue the tempPath shows me [object Object].
    Here mytemplate is the id of textfield.

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by Sham_HC

custom implementation, without providing clear description on use case & implementation details not sure how to assist here.  You can look into various oob implementation like path predicate, tag input matches almost what you are doing.

3 replies

Sham_HC
Sham_HCAccepted solution
Level 10
October 16, 2015

custom implementation, without providing clear description on use case & implementation details not sure how to assist here.  You can look into various oob implementation like path predicate, tag input matches almost what you are doing.

vdhim23Author
Level 5
October 16, 2015

Sham HC wrote...

custom implementation, without providing clear description on use case & implementation details not sure how to assist here.  You can look into various oob implementation like path predicate, tag input matches almost what you are doing.

 

Hi Sham

Its worked, Do you have any idea how to get the payload in dialog participant step as in my dialog file there is listener, inside it i need the payload.

Thanks

Sham_HC
Level 10
October 16, 2015

vdhim23 wrote...

Sham HC wrote...

custom implementation, without providing clear description on use case & implementation details not sure how to assist here.  You can look into various oob implementation like path predicate, tag input matches almost what you are doing.

 

Hi Sham

Its worked, Do you have any idea how to get the payload in dialog participant step as in my dialog file there is listener, inside it i need the payload.

Thanks

 

Hi vdhim,

    Your implementation does not looks right. Refer [1] how to pass value between widgets.
 [1]   http://helpx.adobe.com/experience-manager/using/dynamically-updating-aem-custom-xtype.html
 
Thanks,
Sham
Tweet: @adobe_sham