Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
CQ5 - disable dialog field when content is loaded
<?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" jcr:primaryType="cq:Dialog"
xtype="dialog">
<listeners jcr:primaryType="nt:unstructured"
loadcontent="function(dialog) {
// call servlet or perform arbitrary javascript functions
dialog.getField('./operator').disable();
}" />
<items jcr:primaryType="cq:WidgetCollection">
<tabs jcr:primaryType="cq:TabPanel">
<items jcr:primaryType="cq:WidgetCollection">
<tab jcr:primaryType="cq:Widget" title="Profile Property" xtype="panel">
<items jcr:primaryType="cq:WidgetCollection">
<operator jcr:primaryType="cq:Widget" fieldLabel="Property Name" name="./operator"
type="select" xtype="selection" optionsProvider="getPropertyNameOptions"
allowBlank="{Boolean}false" />
</items>
</tab>
</items>
</tabs>
</items>
</jcr:root>
@cleatuskeetz

This comment has been minimized.

Copy link

commented Sep 20, 2018

Where I can provide this dialog.xml?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.