Expand my Community achievements bar.

Custom widget property problem

Avatar

Level 3

Hi,I am trying to wirte a simple custom widget extending CQ.form.ColorField, this is my code. 

ColorScheme = CQ.Ext.extend(CQ.form.ColorField,{ constructor: function(){ ColorScheme.superclass.constructor.call(this,{ colors: ['FF9900'], showHexValue:true }); } }); CQ.Ext.reg('colorscheme', ColorScheme);

When I reference this in my jcr  and tried to set fieldLabel, it never picked up my fieldLabel value on the page. And fieldLabel only works when I  set the value in the constructor.

<backgroundColor jcr:primaryType="cq:Widget" fieldLabel="Background Color" name="./bgColor" xtype="colorscheme" />

 

Can someone help me this?

Thank you

1 Reply

Avatar

Level 10

So we know your project and all files -- can you please submit a screen shot of all files that you are using in your component - including dialog nodes.