setValue is not work? Why it happen?

2007-03-07
2013-04-11
  • Nobody/Anonymous

    Hi Michael Hall, I'm using JCaiF 0.6 (because I can not build on version 0.7) the setValue method is not work?

    I want catch the user inputted value in the input field, so I can't! Here is some code in XML file, can you correct it for me?!

    <SurveyQuestion id="respnum" class="org.JCaiF.CoreComponents.NumberInputQuestion" pattern="\d+" min="1" max="100">
                <text>This is the old respnum text</text>
                <onLoad lang="java"><![CDATA[
                    respnum.setText("This is the new respnum text");
                    respnum.setText(respnum.getText() + ": ");
                ]]></onLoad>
                <onContinue><![CDATA[
                    respnum.setText("Enter again, last value: (" + respnum.getValue() + ") is not valid!");
                    respnum.setValue(respnum.getValue());
                ]]>
                </onContinue>
            </SurveyQuestion>

     
    • Michael hall

      Michael hall - 2007-03-13

      I'm not sure what you are trying to do, but the last line in onContinue "respnum.setValue(respnum.getValue())" isn't necessary.  Remember though, that onLoad is run every time a question is displayed, so even though you set the text in the onContinue block, it will be reset by onLoad before the question gets displayed again.  Are you using Sonar App or Sonar Web?

       

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

JavaScript is required for this form.





No, thanks