extract widget from dialog | Community
Skip to main content
New Participant
January 22, 2016
Solved

extract widget from dialog

  • January 22, 2016
  • 4 replies
  • 1167 views

Hi,

I have a lot of components with a richtext inside the dialog and i need to unify the code.

Is there a way to extract the widget from the dialog and move it in a common folder?

Each component must has a link to this common widget.

Thanks

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 edubey

Yes, there is a way

You should use cqinclude and xpath to do this

Here the articles that will help you...

https://helpx.adobe.com/experience-manager/kb/XtypeCqInclude.html

https://adobeaemtherightway.wordpress.com/2014/07/31/reusing-tabs-or-fields-from-an-existing-dialog/comment-page-1/

4 replies

New Participant
February 4, 2016

I'm not working with a touch ui and the structure is the same of a working rte, i have only extracted an inner part

smacdonald2008
New Participant
February 4, 2016

Under retPlugins - is the proper nodes there. If they are not set properly or are missing - this error may result.

Are you working in Touch UI? 

New Participant
February 4, 2016

I'm trying to extract the rteplugin from a richtext:

 

<?xml version="1.0" encoding="UTF-8"?> <jcr:root xmlns:cq="http://www.day.com/jcr/cq/1.0" xmlns:jcr="http://www.jcp.org/jcr/1.0" xmlns:nt="http://www.jcp.org/jcr/nt/1.0" jcr:primaryType="cq:Dialog" height="700" width="900" xtype="dialog"> <items jcr:primaryType="cq:WidgetCollection"> <tabs jcr:primaryType="cq:TabPanel"> <items jcr:primaryType="cq:WidgetCollection"> <panel1 jcr:primaryType="cq:Widget" title="Edit component" xtype="panel"> <items jcr:primaryType="cq:WidgetCollection"> <text jcr:primaryType="cq:Widget" boxMaxHeight="80" fieldLabel="Text" name="./text" removeSingleParagraphContainer="{Boolean}true" xtype="richtext"> <rtePlugins jcr:primaryType="nt:unstructured" path="/mypath/sharedCode/rtePlugins.infinity.json" xtype="cqinclude"/> </text> </items> </panel1> </items> </tabs> </items> </jcr:root>

 

 

<?xml version="1.0" encoding="UTF-8"?> <jcr:root xmlns:cq="http://www.day.com/jcr/cq/1.0" xmlns:jcr="http://www.jcp.org/jcr/1.0" xmlns:nt="http://www.jcp.org/jcr/nt/1.0" jcr:primaryType="nt:unstructured"> <links jcr:primaryType="nt:unstructured" features="*"/> <format jcr:primaryType="nt:unstructured" features="*"/> <justify jcr:primaryType="nt:unstructured" features="*"/> <undo jcr:primaryType="nt:unstructured" features="*"/> <misctools jcr:primaryType="nt:unstructured" features="*"> <specialCharsConfig jcr:primaryType="nt:unstructured"> <chars jcr:primaryType="nt:unstructured"> <arrow jcr:primaryType="nt:unstructured" entity="&amp;rarr;"/> </chars> </specialCharsConfig> </misctools> </jcr:root>

 

This code raises the following error:

Error during processing of /mypath/sharedCode/rtePlugins: javax.jcr.nodetype.ConstraintViolationException: No child node definition for rtePlugins

Why?

Thanks

edubey
edubeyAccepted solution
New Participant
January 22, 2016