[
https://issues.apache.org/jira/browse/OFBIZ-2959?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13277648#comment-13277648 ]
Sumit Pandit commented on OFBIZ-2959:
-------------------------------------
Hello Jacques,
I tested and it is working fine. Please find two screenshots for reference : screen-error.GIF(represent error screen) and screen-solution.GIF (after applying patch).
It can be reproduced in following steps -
1) Go to :
https://demo-trunk.ofbiz.apache.org:8443/content/control/EditSurveyQuestions?surveyId=1000OR
https://demo-trunk.ofbiz.apache.org:8443/content/control/EditSurveyQuestions?surveyId=1000&surveyQuestionId=10000&surveyQuestionCategoryId=1000#edit2) Create New Question with "Survey Question Type Id" = "Selected Option"
3) ERROR Screen : screen-error.GIF
4) Question starts appearing in list.
5) Page rendering exception is coming in create question option section.
6) Apply patch and observe screen : screen-solution.GIF
> Can not add "Question Options" within the Survey section of the Content application.
> ------------------------------------------------------------------------------------
>
> Key: OFBIZ-2959
> URL:
https://issues.apache.org/jira/browse/OFBIZ-2959> Project: OFBiz
> Issue Type: Bug
> Components: content
> Affects Versions: SVN trunk
> Reporter: Brant Levinson
> Attachments: OFBIZ-2959.patch
>
>
> When editing a question in Content --> Survey which has a "Selected Option" Question Type, the page does not allow for the creation of a Question Option.
> Live URL:
https://demo.ofbiz.org/content/control/EditSurveyQuestions?surveyId=1002&surveyQuestionId=1033#edit> A stack trace is shown:
> Method public java.io.StringWriter org.ofbiz.widget.html.HtmlFormWrapper.renderFormString() throws java.io.IOException threw an exception when invoked on org.ofbiz.widget.html.HtmlFormWrapper@1f304b8 with arguments of types [] The problematic instruction: ---------- ==> ${createSurveyOptionWrapper.renderFormString()} [on line 306, column 5 in component://content/webapp/content/survey/EditSurveyQuestions.ftl] ---------- Java backtrace for programmers: ---------- freemarker.template.TemplateModelException: Method public java.io.StringWriter org.ofbiz.widget.html.HtmlFormWrapper.renderFormString() throws java.io.IOException threw an exception when invoked on org.ofbiz.widget.html.HtmlFormWrapper@1f304b8 with arguments of types [] at freemarker.ext.beans.OverloadedMethodModel.exec(OverloadedMethodModel.java:134) at fr
> ...
> Caused by: java.lang.NullPointerException at org.ofbiz.widget.form.ModelFormField$EntityOptions.addOptionValues(ModelFormField.java:1722) at org.ofbiz.widget.form.ModelFormField$FieldInfoWithOptions.getAllOptionValues(ModelFormField.java:1526) at org.ofbiz.widget.html.HtmlFormRenderer.renderDropDownField(HtmlFormRenderer.java:697
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspaFor more information on JIRA, see:
http://www.atlassian.com/software/jira