[opencms-dev] Curious problem to generate select widget with method getDialogWidget()

Kunicke, Holger holger.kunicke at av-studio.de
Wed Jan 11 14:52:15 CET 2012


Hello List,

I created a new widget class from A_CmsSelectWidget:
1. override the three constructors,
2. override getDialogWidget(...) to generate a simple static select button with 
some options for first tests
3. override getWidgetStringValue(...) with copy of code from standard class 
CmsSelectWidget
4. add "public I_CmsWidget newInstance() { return new 
CmsSelectWidget(getConfiguration()); }"
5. register the widget in opencms-vfs.xml

When I test the widget, the options defined in getDialogWidget() are not 
displayed. Only get an empty Selector.
If I define options as for standard SelectorWidget then these options are displayed.

It looks my defined HTML in getDialogWidget() is ignored. But why? Exists such 
situations? What were the reasons?

To verify that I actually work with the new class, I deleted the *.class file 
from classes directory in the rfs, and I get the expected error (after tomcat 
restart) when I want to edit a corresponding xmlcontent resources.
I work with OpenCMS 7.5.4.

A few years ago I'd created widgets in OpenCMS 7.0.4 in the self manner as 
described above, and these works correctly.

Exists differences between OpenCMS version 7 and 7.5, which explain this?

Regards
Holger

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://webmail.opencms.org/pipermail/opencms-dev/attachments/20120111/5a8f86fe/attachment.htm>


More information about the opencms-dev mailing list