I have added a new tab to page properties. The tab consists of a multifieldpanel (acs-aem-commons bundle). I am trying to add a textfield, a dropdown and a number of checkboxes. The issue is that when I select the value under dropdown and select the checkboxes, everything looks fine but when I open the Page properties again it doesn't look like the values have been saved. Here is the code
<tab_myuhc_suppression xmlns:social="http://www.adobe.com/social/1.0" jcr:primaryType="cq:Panel" title="Suppression"> <items jcr:primaryType="cq:WidgetCollection"> <idsuppress jcr:primaryType="cq:Widget" fieldDescription="Press + to add more" fieldLabel="Configure ID card suppress" name="./idsuppress" width="1000" xtype="multifield"> <fieldConfig jcr:primaryType="cq:Widget" name="./fieldConfig" xtype="multifieldpanel"> <items jcr:primaryType="cq:WidgetCollection"> <providedValue jcr:primaryType="cq:Widget" allowBlank="false" fieldDescription="Please provide the value for option selected above" fieldLabel="Provide value here" key="providedValue" labelStyle="width:150px" name="./providedValue" xtype="textfield"/> <selectList jcr:primaryType="cq:Widget" defaultValue="0" fieldLabel="Business Rules" name="./suppress" type="select" xtype="selection"> <options jcr:primaryType="cq:WidgetCollection"> <one jcr:primaryType="nt:unstructured" text="Vanity URL" value="Vanity"/> <two jcr:primaryType="nt:unstructured" text="PV/RC" value="PVRC"/> <three jcr:primaryType="nt:unstructured" text="SA/OI" value="SAOI"/> <four jcr:primaryType="nt:unstructured" text="Market Type" value="Market"/> <five jcr:primaryType="nt:unstructured" text="Product Code" value="Product"/> <six jcr:primaryType="nt:unstructured" text="Div Code" value="Div"/> <seven jcr:primaryType="nt:unstructured" text="State of Issue" value="State"/> <eight jcr:primaryType="nt:unstructured" text="Government Program Code" value="Government"/> </options> </selectList> <suppressOptions jcr:primaryType="cq:Widget" title="Selection Options" xtype="dialogfieldset"> <items jcr:primaryType="cq:WidgetCollection"> <whole jcr:primaryType="cq:Widget" fieldLabel="Suppress View ID Card Functionality" labelStyle="width:240px" name="./whole" type="checkbox" width="auto" xtype="selection"/> <order jcr:primaryType="cq:Widget" fieldLabel="Suppress Order ID card Functionality" labelStyle="width:239px" name="./order" type="checkbox" width="auto" xtype="selection"/> <view jcr:primaryType="cq:Widget" fieldLabel="Suppress View ID Card Functionality" labelStyle="width:238px" name="./view" type="checkbox" width="auto" xtype="selection"/> </items> </suppressOptions> </items> </fieldConfig> </idsuppress> </items> </tab_myuhc_suppression>
Solved! Go to Solution.
Views
Replies
Total Likes
Did you overlay the page props dialog - as discussed here:
https://helpx.adobe.com/experience-manager/kb/CQ5PageProps.html
Also - i modified my first comment - i was thinking the use case of widgets on the web page.
Views
Replies
Total Likes
Hi,
Have you added the checkbox within the multifield panel or outside the panel ?
Can you also share your multifield widget script
Views
Replies
Total Likes
Are you saying that you enter values and then close and when you open - the values are gone? Dialog fields do not need persist logic. (when I stated saved - i was thinking the widgets on the web page - in which case - yeah - you need to write persist logic).
Views
Replies
Total Likes
Can you remove the name attribute from the multifield items(select and text box) and then check?
Views
Replies
Total Likes
smacdonald2008 wrote...
There is no app logic to save/persist these values. When you enter values into a dialog, the values are retrieved and used in the components JSP. To save them you have to write logic and store them somewhere like the JCR.
Thanks for the response. So, does that mean that every time I have to include a checkbox or a dropdown in Page properties I have to write some custom logic. What about the textfield ? I haven't written any custom logic for that. Also, what about the Page Properties that are by default included on /libs/foundation/page template. I am sure they have some sort of dropdown too. Is there any logic implemented there as well ? I have added dropdowns and checkboxes to Page Properties before but never had to write custom logic to save the values. Is it because I am implementing this whole thing inside a multifled, that is why I have to write some logic.
Views
Replies
Total Likes
bsloki wrote...
Hi,
Have you added the checkbox within the multifield panel or outside the panel ?
Can you also share your multifield widget script
The checkboxes have been added inside the multifieldpanel. Also, the multifieldpanel is the part of the acs-aem-commons bundle. It's not something that I have written.
Views
Replies
Total Likes
Can you post a screen shot of the dialog.
Views
Replies
Total Likes
kalyanar wrote...
Can you remove the name attribute from the multifield items(select and text box) and then check?
Not helping either.
Views
Replies
Total Likes
smacdonald2008 wrote...
Can you post a screen shot of the dialog.
Here are four screenshots. I have attached. Let me know if you need any further information.
Views
Replies
Total Likes
Did you overlay the page props dialog - as discussed here:
https://helpx.adobe.com/experience-manager/kb/CQ5PageProps.html
Also - i modified my first comment - i was thinking the use case of widgets on the web page.
Views
Replies
Total Likes
Can you please package you your apps example (with the overlay page props as talked about in the KB above) into a package and send to scottm@adobe.com. Also tell me what version you are using. I want to look at your code to get to the bottom of this.
Views
Replies
Total Likes
smacdonald2008 wrote...
Can you please package you your apps example (with the overlay page props as talked about in the KB above) into a package and send to scottm@adobe.com. Also tell me what version you are using. I want to look at your code to get to the bottom of this.
I have sent the package to you. I am using AEM 6.0 and using the version 1.9.4 of the acs-aem-commons package.
Views
Replies
Total Likes
Views
Likes
Replies
Views
Likes
Replies