[opencms-dev] Open source survey module has been released

weily li weily.li at gmail.com
Tue May 15 12:18:08 CEST 2007


Hi
the com.clicksandlinks.opencms.survey.CmsSurveyHandler
for checkbox field, getValue() can't return value correctly. The javadoc at
org.opencms.frontend.templateone.form.A_CmsField.toString() tell who can
return values correctly. So replace following line at CmsSurveyHandler:
                        if(xmlContent.getValue
("fields["+counter+"]/field",locale).getStringValue(adminCmsObject).equals(
current.getLabel())){

                            xmlContent.addValue
(adminCmsObject,"fields["+counter+"]/results[1]/result",locale,0).setStringValue(adminCmsObject,
current.getValue());

                            addedToExistingField=true;
                            counter=maxFields;
                        }

with

xmlContent.addValue
(adminCmsObject,"fields["+counter+"]/results[1]/result",locale,0).setStringValue(adminCmsObject,
current.toString());

it works. It is a workaround only. maybe templateone should fix it.

rgds
weily

On 5/15/07, weily li <weily.li at gmail.com> wrote:
>
> Sorry Olli,
> The templateone's source code tell it uses "|" as seperator. Now I can
> sepcify the options for Radio, checkbox..
> All other fields work fine except checkbox, whose result can't be stored
> in the survey result page.
>
> Is there any specific tips?
>
> thanks
> rgds
> weily
>
> On 5/15/07, weily li <weily.li at gmail.com> wrote:
> >
> > Thanks! Olli! It works.
> > However, when creating a checkbox/radio field, how to specify the
> > options?
> >
> > Thanks
> > rgds
> > weily
> >
> > On 5/14/07, Olli Aro <olli_aro at yahoo.co.uk> wrote:
> > >
> > > Hi Weily,
> > >
> > > That is not dependency but you need to set the template property to
> > > point to
> > > the template that you use for your site.
> > >
> > > However, since you mentioned dependencies :) There is dependency to
> > > templateOne forms content type, so you need to have that installed.
> > >
> > > Regards,
> > >
> > > Olli
> > >
> > > -----Original Message-----
> > > From: opencms-dev-bounces at opencms.org
> > > [mailto:opencms-dev-bounces at opencms.org ] On Behalf Of weily li
> > > Sent: 14 May 2007 08:35
> > > To: The OpenCms mailing list
> > > Subject: [Bulk] Re: [opencms-dev] Open source survey module has been
> > > released
> > >
> > > Hi Olli,
> > > Thanks for your great work!
> > > Now the module's manifest.xml includes following fregment:
> > > <type class="org.opencms.file.types.CmsResourceTypeXmlContent"
> > > name="survey"
> > > id="81">
> > >                 <properties>
> > >                     <property>
> > >                         <name>template-elements</name>
> > >                         <value
> > > type="shared"><![CDATA[/system/modules/com.clicksandlinks.opencms.survey/pag
> > >
> > > es/survey_empty.jsp]]></value>
> > >                     </property>
> > >                     <property>
> > >                         <name>template</name>
> > >                         <value
> > >
> > > type="shared"><![CDATA[<b>/system/modules/com.clicksandlinks.opencms.sites.d
> > > ingle/templates/contentTemplate.jsp</b>]]></value>
> > >                     </property>
> > >                     <property>
> > >                         <name>body-template</name>
> > >                         <value
> > >
> > > type="shared"><![CDATA[/system/modules/com.clicksandlinks.opencms.survey/pag
> > > es/detail_survey.jsp]]></value>
> > >                     </property>
> > >                 </properties>
> > >                 <param
> > >
> > > name="schema">/system/modules/com.clicksandlinks.opencms.survey/schemas/surv
> > > ey.xsd</param>
> > >             </type>
> > >
> > > When clicking such a survey xml content, it says "File not
> > > found.....". App
> > > can't find the file:
> > > /system/modules/com.clicksandlinks.opencms.sites.dingle/templates/contentTem
> > >
> > > plate.jsp
> > >
> > > Is there any other dependencies?
> > >
> > > thanks
> > > weily
> > >
> > >
> > > On 5/3/07, Olli Aro < olli_aro at yahoo.co.uk> wrote:
> > >
> > >         Yes, I did not upload the source anywhere, since it was extra
> > > hassle
> > > for me this time.
> > >
> > >
> > >
> > >         However, since there seems to be interest here it is :-) :
> > >
> > >
> > >
> > >
> > > http://www.clicksandlinks.com/opencms/opencms/CL_Solutions/products/open_sou
> > >
> > > rce/opencms/survey_module/index.html
> > > <http://www.clicksandlinks.com/opencms/opencms/CL_Solutions/products/open_so
> > >
> > > urce/opencms/survey_module/index.html>
> > >
> > >
> > >
> > >         Regards,
> > >
> > >
> > >
> > >         Olli
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > > ________________________________
> > >
> > >
> > >         From: opencms-dev-bounces at opencms.org [mailto:
> > > opencms-dev-bounces at opencms.org <mailto:opencms-dev-bounces at opencms.org >
> > > ]
> > > On Behalf Of Sami Nygard
> > >         Sent: 03 May 2007 14:08
> > >         To: The OpenCms mailing list
> > >         Subject: Re: [opencms-dev] Open source survey module has been
> > > released
> > >
> > >
> > >
> > >         Hi Olli,
> > >
> > >         Where can I find the source files?
> > >         Downloadable only contains compiled classes as far as I can
> > > tell.
> > >
> > >         Thanks
> > >         /Sami
> > >
> > >         On May 03, 2007 11:46 AM, Olli Aro wrote:
> > >
> > >
> > >
> > >
> > >         Hi all,
> > >
> > >
> > >
> > >         Just to let you know that we have made available a survey
> > > module for
> > > OpenCms today at
> > >
> > > http://www.clicksandlinks.com/opencms/opencms/CL_Solutions/products/open_sou
> > > rce/opencms/survey_module/index.html
> > > <http://www.clicksandlinks.com/opencms/opencms/CL_Solutions/products/open_so
> > > urce/opencms/survey_module/index.html> .
> > >
> > >
> > >
> > >         Regards,
> > >
> > >
> > >
> > >         Olli
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >         _______________________________________________
> > >         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
> > > <http://lists.opencms.org/mailman/listinfo/opencms-dev>
> > >
> > >
> > >
> > >
> > >
> > > _______________________________________________
> > > 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/20070515/173b8e95/attachment.htm>


More information about the opencms-dev mailing list