[opencms-dev] set widget parameter of self-made widget, reading property of resource

Andy Bicksbo schlachtzeuger at gmail.com
Wed Oct 4 14:57:15 CEST 2006


HI
May set the Listener to null and may call the garbageCollector.
Build a loop which sets it to null if nothing is checked.
But i don't know if there are some bugs...but for my expirience the opencms
source is very structured and doesn't provides code which will not work,
maybe a few methods should be set to pulbic ;)
Andy


2006/10/2, peter felkel <peter_hamburg at fastmail.fm>:
>
> Hello *,
>
> i´m experiencing the following problem:
>
> I have created my own widget containing some checkboxes.
> after editing a resource containing this widget the checkbox values are
> set via
> I_CmsWidgetParameter.setStringValue. (merged String of all active
> checkboxes)
>
>
> Here is the setEditorValue method of my Widget:
>
>    public void setEditorValue(CmsObject cms, Map formParameters,
>    I_CmsWidgetDialog widgetDialog, I_CmsWidgetParameter param) {
>        LOG.error("executed: setEditorValue");
>        String[] values = (String[]) formParameters.get(param.getId());
>        if (values != null) {
>            param.setStringValue(cms, createParamValue(values));
>        }
>        else {
>            param.setStringValue(cms, null);
>        }
>    }
>
> In addition i have implemented the Cms Event Listener, which reads the
> property of an edited Resource.
>
>
> Everything works fine. Selected checkboxes are set after editing a
> resource, and the property, read at the eventlistener contains the right
> value.
> But if i uncheck all checkboxes (expecting to get a nullproperty at the
> listener), i get the "old" propertyvalue containing the string of the
> pre-edit status.
>
>
> Is there any known bug ?
> I´m looking at my sourcecode now for a while but can´t find any semantic
> errors.
>
>
> Any hint/help appreciated
>
> regards Peter F.
>
>
>
> --
> peter felkel
> peter_hamburg at fastmail.fm
>
> --
> http://www.fastmail.fm - The way an email service should be
>
>
> _______________________________________________
> This mail is sent to you from the opencms-dev mailing list
> To change your list options, or to unsubscribe from the list, please visit
> http://lists.opencms.org/mailman/listinfo/opencms-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://webmail.opencms.org/pipermail/opencms-dev/attachments/20061004/51c2a0c3/attachment.htm>


More information about the opencms-dev mailing list