I know this is probably a simple question, but I'm new to CQ5 and AEM in general.
I have cq: Widget node, which is a simple text field.
<rowtitlevalue
jcr:primaryType="cq:Widget"
fieldLabel="Row Title Value"
name="./rowtitlevalue"
xtype="textfield"
disabled="true"/>
Now, currently in my JavaScript, I am currently viewing it through
var textfield = panel.findByType('textfield')[1];
which works fine (there is another text box before that, therefore 1 in the array.
MY QUESTION: how to search for this field using the NAME attribute in my javascript.
Any help would be appreciated.
In addition, I use this object to run the following:
if (show != undefined) {
textfield.enable();
textfield.show();
}
else if (show == undefined) {
textfield.disable();
textfield.hide();
}
JavaScript is found in component-based client emails.
And this is the Listener that I have with the checkbox that defines the SHOW value in javascript (which works fine).
<listeners
jcr:primaryType="nt:unstructured"
loadcontent="function(field,rec,path){Ejst.toggleRowTitle(field);}"
selectionchanged="function(field,value){Ejst.toggleRowTitle(field);}"/>
Please let me know if you have any problems with this.