Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p><strong>NOTE: See EDIT below for a different approach than the one given here</strong></p> <p>How about <code>requirementConstraint</code>?</p> <pre><code>&lt;my:customSelect requirementConstraint="Mandatory"&gt; &lt;option value="1"&gt;A&lt;/option&gt; &lt;option value="2"&gt;B&lt;/option&gt; &lt;option value="3"&gt;C&lt;/option&gt; &lt;/my:customSelect&gt; </code></pre> <p>Another possiblity is not to tri-state the value in the first place. For example, you can instead provide two separate properties: <code>required</code> (<code>"yes" | "no"</code>), and <code>selectAll</code> (<code>"yes" | "no"</code>) to make the intent clearer.</p> <hr/> <p><strong>EDIT</strong>: Actually, I can see how a tri-state might still be useful, if I understand your requirements correctly. Another possibility would be to call the property <code>mustSelect</code> and make the allowed values <code>one</code> (mandatory), <code>any</code> (optional), and <code>all</code> (select all). Also, since "Select All" is a possibility, I'm assuming your <code>customSelect</code> tag renders each option as a checkbox. An example of how <code>mustSelect</code> might be used:</p> <p><strong>Mandatory (at least one)</strong></p> <pre><code>&lt;my:customSelect mustSelect="one"&gt; &lt;option value="1"&gt;A&lt;/option&gt; &lt;option value="2"&gt;B&lt;/option&gt; &lt;option value="3"&gt;C&lt;/option&gt; &lt;/my:customSelect&gt; </code></pre> <p><strong>Optional (zero or more)</strong></p> <pre><code>&lt;my:customSelect mustSelect="any"&gt; &lt;option value="1"&gt;A&lt;/option&gt; &lt;option value="2"&gt;B&lt;/option&gt; &lt;option value="3"&gt;C&lt;/option&gt; &lt;/my:customSelect&gt; </code></pre> <p><strong>Select all</strong></p> <pre><code>&lt;my:customSelect mustSelect="all"&gt; &lt;option value="1"&gt;A&lt;/option&gt; &lt;option value="2"&gt;B&lt;/option&gt; &lt;option value="3"&gt;C&lt;/option&gt; &lt;/my:customSelect&gt; </code></pre>
    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. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. 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