[opencms-dev] problem with the CmsColorPickerWidget

kk fenghuohou at hotmail.com
Fri Dec 19 15:02:54 CET 2008


Hi All,

I encountered a problem with the CmsColorPickerWidget.
I am trying to get a ColorSelector into my own CmsWidgetDialog.

I used this line in defineWidgets()

addWidget(new CmsWidgetDialogParameter(mybase, "myPropertyColor", 
PAGE_ARRAY[0], new CmsColorpickerWidget()));

I can see the ColorSelector on the JSP-Page displaying the my Extension of 
CmsWidgetDialog Class, but when I want to actionCommit(), it broke down.

I get this ErrorMessage:

java.lang.ClassCastException: org.opencms.workplace.CmsWidgetDialogParameter 
cannot be cast to org.opencms.xml.types.CmsXmlColorValue
	at 
org.opencms.widgets.CmsColorpickerWidget.setEditorValue(CmsColorpickerWidget.java:164)


With every other Widget e.g. CmsDiplayWidget or CmsInputWidget, it works 
just fine.
I really get confused about this problem. It looks to me like a bug, or am I 
just doing sth. wrong?

I didn't find any examples on the usage of this ColorPickerWidget, so I am 
really not sure, it works at all.

Is somebody able to tell me more about this problem?

thanks a lot

kunkun 




More information about the opencms-dev mailing list