Note that there are some explanatory texts on larger screens.

plurals
  1. POXpages, dijit.form.RadioButton how to save value?
    primarykey
    data
    text
    <p>I plan to use <a href="/questions/tagged/dijit.form.radiobutton" class="post-tag" title="show questions tagged 'dijit.form.radiobutton'" rel="tag">dijit.form.radiobutton</a> on a <a href="/questions/tagged/xpage" class="post-tag" title="show questions tagged 'xpage'" rel="tag">xpage</a>. I try to find a solution without using the <a href="/questions/tagged/xpages-extlib" class="post-tag" title="show questions tagged 'xpages-extlib'" rel="tag">xpages-extlib</a>. If I add the <a href="/questions/tagged/dijit.form.radiobutton" class="post-tag" title="show questions tagged 'dijit.form.radiobutton'" rel="tag">dijit.form.radiobutton</a> to the <a href="/questions/tagged/xpage" class="post-tag" title="show questions tagged 'xpage'" rel="tag">xpage</a>, the value of the button is not saved.<br /></p> <h2>Not working code</h2> <hr> <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt; &lt;xp:view xmlns:xp="http://www.ibm.com/xsp/core"&gt; &lt;xp:this.data&gt; &lt;xp:dominoDocument var="document1" formName="tstRadio"&gt;&lt;/xp:dominoDocument&gt; &lt;/xp:this.data&gt; &lt;xp:this.resources&gt; &lt;xp:dojoModule name="dijit.form.RadioButton"&gt;&lt;/xp:dojoModule&gt; &lt;/xp:this.resources&gt; &lt;xp:button value="Label" id="button1"&gt; &lt;xp:eventHandler event="onclick" submit="true" refreshMode="complete"&gt; &lt;xp:this.action&gt; &lt;xp:saveDocument var="document1"&gt;&lt;/xp:saveDocument&gt; &lt;/xp:this.action&gt; &lt;/xp:eventHandler&gt; &lt;/xp:button&gt; &lt;xp:radio text="Yes" id="radio1" groupName="radio" selectedValue="yes" value="#{document1.radio}" dojoType="dijit.form.RadioButton"&gt; &lt;xp:this.dojoAttributes&gt; &lt;xp:dojoAttribute name="name" value="radio"&gt;&lt;/xp:dojoAttribute&gt; &lt;xp:dojoAttribute name="value" value="yes"&gt;&lt;/xp:dojoAttribute&gt; &lt;/xp:this.dojoAttributes&gt; &lt;/xp:radio&gt; &lt;xp:radio text="No" id="radio2" groupName="radio" selectedValue="no" value="#{document1.radio}" dojoType="dijit.form.RadioButton"&gt; &lt;xp:this.dojoAttributes&gt; &lt;xp:dojoAttribute name="name" value="radio"&gt;&lt;/xp:dojoAttribute&gt; &lt;xp:dojoAttribute name="value" value="no"&gt;&lt;/xp:dojoAttribute&gt; &lt;/xp:this.dojoAttributes&gt; &lt;/xp:radio&gt; &lt;/xp:view&gt; </code></pre> <hr> <h2>Working code</h2> <p>Without the <a href="/questions/tagged/dijit.form.radiobutton" class="post-tag" title="show questions tagged 'dijit.form.radiobutton'" rel="tag">dijit.form.radiobutton</a> the value saved properly.<br /></p> <hr> <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt; &lt;xp:view xmlns:xp="http://www.ibm.com/xsp/core"&gt; &lt;xp:this.data&gt; &lt;xp:dominoDocument var="document1" formName="tstRadio"&gt;&lt;/xp:dominoDocument&gt; &lt;/xp:this.data&gt; &lt;xp:this.resources&gt; &lt;xp:dojoModule name="dijit.form.RadioButton"&gt;&lt;/xp:dojoModule&gt; &lt;/xp:this.resources&gt; &lt;xp:button value="Label" id="button1"&gt; &lt;xp:eventHandler event="onclick" submit="true" refreshMode="complete"&gt; &lt;xp:this.action&gt; &lt;xp:saveDocument var="document1"&gt;&lt;/xp:saveDocument&gt; &lt;/xp:this.action&gt; &lt;/xp:eventHandler&gt; &lt;/xp:button&gt; &lt;xp:radio text="Yes" id="radio1" groupName="radio" selectedValue="yes" value="#{document1.radio}"&gt; &lt;xp:this.dojoAttributes&gt; &lt;xp:dojoAttribute name="name" value="radio"&gt;&lt;/xp:dojoAttribute&gt; &lt;xp:dojoAttribute name="value" value="yes"&gt;&lt;/xp:dojoAttribute&gt; &lt;/xp:this.dojoAttributes&gt; &lt;/xp:radio&gt; &lt;xp:radio text="No" id="radio2" groupName="radio" selectedValue="no" value="#{document1.radio}"&gt; &lt;xp:this.dojoAttributes&gt; &lt;xp:dojoAttribute name="name" value="radio"&gt;&lt;/xp:dojoAttribute&gt; &lt;xp:dojoAttribute name="value" value="no"&gt;&lt;/xp:dojoAttribute&gt; &lt;/xp:this.dojoAttributes&gt; &lt;/xp:radio&gt; &lt;/xp:view&gt; </code></pre> <hr> <h2>Question</h2> <p>I am not sure that the Not working code I wrote in the first example is correct, something may be missing from it. Is it possible to use dijit.form.Radio with working saving functionality on an Xpage ? If yes, then how?</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload