Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>The reason your first code snippet is not working because of this <code>&lt;xp:dojoAttribute name="name" value="radio"&gt;&lt;/xp:dojoAttribute&gt;</code>. This statement sets the <code>name</code> attribute of <code>input</code> tag to <code>radio</code> rather than something like this <code>view:_id1:radio</code>. I removed the line it was working for me. You also don't need to add <code>&lt;xp:dojoAttribute name="value" value="yes"&gt;&lt;/xp:dojoAttribute&gt;</code> as <code>selectedValue</code> does the job for you.</p> <p>So you code becomes something like this -</p> <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:radio&gt; &lt;xp:radio text="No" id="radio2" groupName="radio" selectedValue="no" value="#{document1.radio}" dojoType="dijit.form.RadioButton"&gt; &lt;/xp:radio&gt; &lt;/xp:view&gt; </code></pre>
    singulars
    1. This table or related slice is empty.
    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. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      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