CQ5 Gotchya: Component Creation #2

Hit another gotchya today when creating a custom CQ5 component. The component itself is very simple – a piece of text that opens a dialog when edited / double-clicked. The dialog has 5 fields – 3 simple text fields, one checkbox, and one multi value field. Simple enough.

But after adding the component to a page for testing, the dialog was never appearing. No amount of righ-click -> Edit or furious double-clicking would bring the dialog up. A tail of the error.log revealed absolutely nothing at all.

What it turned out to be was an incorrect xtype on one of the widgets. I used an ‘arraystore’, which I thought I’d used in the past for a multiple value field with no problem. Only after deleting widgets one by one and trying to open the dialog did I work out that this was the culprit. After looking further down the CQ5 xtypes page, I saw the ‘multifield’ xtype. After creating the widget again with the new xtype, the component dialog opened as expected.

Moral of the story: If one of your components is not displaying when expected, check your xtypes!!

This entry was posted in CQ5 and tagged , , , . Bookmark the permalink.

Add a comment...

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s