Expand my Community achievements bar.

Don’t miss the AEM Skill Exchange in SF on Nov 14—hear from industry leaders, learn best practices, and enhance your AEM strategy with practical tips.

Resource Type property not saving

Avatar

Community Advisor

Hi All,

I am facing an issue with classic components which are used in touch UI framework that are included as <cq:include path="articleintro" resourceType="/apps/intel/commons/components/content/articleintro"/>

but when i am trying to edit the component and save it sling:resourceType property is not saving for that include component.

Whereas for the same component in classic UI i am able to see that property as saved.

Could you please help me understand why and where exactly this POST request for the dialog are formed and saving

 

THanks,

Mani Kumar K

5 Replies

Avatar

Administrator

Can you please provide me steps to reproduce it, so that we can help you.

For how dialog saves data, please refer to this post:- http://help-forums.adobe.com/content/adobeforums/en/experience-manager-forum/adobe-experience-manage...

//When you submit a dialog, data in all the fields will be sent a post request to aem default servlet and from there it will be stored in nodes. This is very similar to the way a web form works, values in all the fields will be sent to the path specified in actions. 

When you open dialog, get request will be made to the current node all properties are fetched and shown on dialog.

You can see those request when you look into browser network tabs

~kautuk



Kautuk Sahni

Avatar

Level 10

The best practice for a component is to have 2 dialog JCR branches. One for Touch Ui and the other for classic. See this article as an example: https://helpx.adobe.com/experience-manager/using/creating-touchui-component.html.

Avatar

Community Advisor

@Mani_kumar_,

I was able to replicate your problem.

In detail, I will repeat your problem, so that the next reader understands a clearer picture.

What's Happening?

Within the Touch UI page editor, A Classic UI component, component-a, is added to the page. The component-a has a  "cq:include"  to incclude another component, component-b, to the page. Component-b is also only Classic UI. The author was able to configure component-b with Classic UI in the Touch UI page editor. All the properties configured on component-b was saved as expected (confirmed in CRX/DE) except for the sling:resourceType property. The sling:resourceType property was not saved. However, in the Classic UI page editor, the component-b is saving as expected. 

Why is the sling:resourceType not saved?

When dealing with the Touch UI page editor, I've noticed that whenever a component is included into a page via JSP or Sightly, if the component included only has Classic UI, then the problem will persist with sling:resourceType as not being saved. The included component must have Touch UI enabled.

Take Aways:

  • Touch UI Page Editor with a component that includes another component with only Classic UI enabled, the sling:resourceType does not save.
  • Touch UI Page Editor with a component that includes another component with Touch UI enabled, the sling:resourceType will be saved.
  • Classic UI Page Editor with a component that includes another component with only Classic UI enabled, the sling:resourceType will be saved. 

I hope this helps.

  •  

Avatar

Employee

How do we enable Touch UI in a component where we necessarily want a Classic UI dialog? Is there any other way apart from dialog conversion tool?

Avatar

Employee

How do we enable Touch UI in a component where we necessarily want a Classic UI dialog?