So, I'm encountering a weird problem with CQ5. One of the custom xtypes that I've created is correctly writing data to, but not pulling back saved data from, the repository. Just to be super clear, when I say pulling back saved data from, I mean when I refresh the page and then open the dialog again, all of the dialog fields for my xtype are blank. I can post the full code I'm working with if necessary but basically the custom xtype works in this way:
//pseudo code getValue() { return field1.getValue() + "|" + field2.getValue() + "|"+ field3.getValue() } setValue(value) { var splitArray = value.split("|"); field1.setValue(splitArray[0]) //etc } updateHidden() { this.hiddenField.setValue(this.getValue()) }
and then the hiddenField has this.name as its name so it stores/retrieves from the repository. This works fine for storing the data in the repository. But it doesn't retrieve it back properly when I reopen the dialog after page refresh. What's bizarre is that the custom xtype DOES work properly for both storing and retrieving when it's within a multifield. I've debugged the JS and there's nothing immediately obvious that comes to mind. Anyone witnessed this before? Many thanks for your help.
Solved! Go to Solution.
Views
Replies
Total Likes
See these xtype articles - they will answer your questions:
http://helpx.adobe.com/experience-manager/using/creating-aem-multifield-components.html
http://helpx.adobe.com/experience-manager/using/dynamically-updating-aem-custom-xtype.html
the 2nd one shows you how to dynamically update the component's fields. First one builds the component.
Views
Replies
Total Likes
We have plenty of examples of manipulating the CQ JCR using Java code and OSGi bundles (including how to persist and query data from OSGi bundles using the JCR API). However -- looks like we will need to beef up how to manipulate the JCR (that is storing and retrieving node values) from ExtJS components such as dialogs.
Take a look at this stack overflow thread. It may help in this use case:
http://stackoverflow.com/questions/12319982/widget-dialogue-that-creates-new-nodes-adobe-cq5
HTH
Views
Replies
Total Likes
See these xtype articles - they will answer your questions:
http://helpx.adobe.com/experience-manager/using/creating-aem-multifield-components.html
http://helpx.adobe.com/experience-manager/using/dynamically-updating-aem-custom-xtype.html
the 2nd one shows you how to dynamically update the component's fields. First one builds the component.
Views
Replies
Total Likes
Thanks for the response! I think I might not have been clear in my original email, so apologize for that. I have no problem getting CQ5 to manipulate the node values that I want. It actually works perfectly and I can retrieve values and place them on pages using my jsps. The issue is that once they are stored, I can't get my dialog to recognize that they're there. So the dialog just shows blank fields when there is in fact data stored in the underlying node. Except for when my xtype is part of a multifield - it works then.
As a side note, I also noticed that one of my other custom xtypes is encountering this same issue :( and I swear it used to be working in the past!
Views
Replies
Total Likes
Hi mdp3,
I am also encountering same issue. Please let me know if you got any resolution for same.
Views
Replies
Total Likes