Skip to main content
Level 5
Oct 16, 2015 2:27 AM UTC
Solved

Error while setting value of widget

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.
Sham_HC
Sham_HCAccepted solution
Level 10
Oct 16, 2015 2:27 AM UTC

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
Level 10
Oct 16, 2015 2:27 AM UTC

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

Translate
vdhim23Author
Level 5
Oct 16, 2015 2:27 AM UTC

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

Translate
Sham_HC
Sham_HCAccepted solution
Level 10
Oct 16, 2015 2:27 AM UTC

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.

Translate