Note that there are some explanatory texts on larger screens.

plurals
  1. POLotus Xpages TypeAhead option changes the DOM id of the label
    primarykey
    data
    text
    <p><a href="/questions/tagged/lotus" class="post-tag" title="show questions tagged 'lotus'" rel="tag">lotus</a> changes the generated id of a label for an input text field, if the <a href="/questions/tagged/type-ahead" class="post-tag" title="show questions tagged 'type-ahead'" rel="tag">type-ahead</a> field is enabled for that field.</p> <p>1. The source on the <a href="/questions/tagged/xpage" class="post-tag" title="show questions tagged 'xpage'" rel="tag">xpage</a> without <a href="/questions/tagged/type-ahead" class="post-tag" title="show questions tagged 'type-ahead'" rel="tag">type-ahead</a>:</p> <p><code>&lt;xp:tr&gt; &lt;th scope="row"&gt;<br> &lt;xp:label id="labelClientRapporteur" for="clientRapporteur"&gt; &lt;xp:this.value&gt;&lt;![CDATA[${javascript:clientData['clientRapporteur']}]]&gt;&lt;/xp:this.value&gt; &lt;/xp:label&gt; &lt;/th&gt; &lt;xp:td&gt; &lt;xp:inputText id="clientRapporteur" value="#{complaintDocument.clientRapporteur}"&gt;<br> &lt;/xp:inputText&gt; &lt;/xp:td&gt; &lt;/xp:tr&gt;</code></p> <p> 2. And the source of the page in the browser:</p> <p><code>&lt;tr&gt; &lt;th scope="row"&gt; &lt;label id="view:_id1:_id2:_id31:_id45:labelClientRapporteur" class="xspTextLabel" for="view:_id1:_id2:_id31:_id45:clientRapporteur"&gt;Ügyfélreferens&lt;/label&gt; &lt;/th&gt; &lt;td&gt; &lt;input id="view:_id1:_id2:_id31:_id45:clientRapporteur" class="xspInputFieldEditBox" type="text" name="view:_id1:_id2:_id31:_id45:clientRapporteur"&gt; &lt;/td&gt; &lt;/tr&gt;</code></p> <p>3. The code of the <a href="/questions/tagged/xpage" class="post-tag" title="show questions tagged 'xpage'" rel="tag">xpage</a> in case of <a href="/questions/tagged/type-ahead" class="post-tag" title="show questions tagged 'type-ahead'" rel="tag">type-ahead</a> enabled for the same input:</p> <p><code>&lt;xp:tr&gt; &lt;th scope="row"&gt;<br> &lt;xp:label id="labelClientRapporteur" for="clientRapporteur"&gt; &lt;xp:this.value&gt;&lt;![CDATA[${javascript:clientData['clientRapporteur']}]]&gt;&lt;/xp:this.value&gt; &lt;/xp:label&gt; &lt;/th&gt; &lt;xp:td&gt; &lt;xp:inputText id="clientRapporteur" value="#{complaintDocument.clientRapporteur}"&gt; &lt;xp:typeAhead mode="partial" minChars="1" ignoreCase="true" valueList="#{javascript:return namesTypeAhead();}" var="lupkey" valueMarkup="true"&gt; &lt;/xp:typeAhead&gt; &lt;/xp:inputText&gt; &lt;/xp:td&gt; &lt;/xp:tr&gt;</code></p> <p>4. And the source of the page with <a href="/questions/tagged/type-ahead" class="post-tag" title="show questions tagged 'type-ahead'" rel="tag">type-ahead</a> field in the browser:</p> <p><code>&lt;tr&gt; &lt;th scope="row"&gt; &lt;label id="view:_id1:_id2:_id31:_id45:clientRapporteur_label" class="xspTextLabel" for="view:_id1:_id2:_id31:_id45:clientRapporteur"&gt;Ügyfélreferens&lt;/label&gt; &lt;/th&gt; &lt;td&gt; &lt;span id="view:_id1:_id2:_id31:_id45:_id78" mode="partial" jsid="view__id1__id2__id31__id45__id78" dojotype="ibm.xsp.widget.layout.data.TypeAheadReadStore"&gt;&lt;/span&gt; &lt;div id="widget_view:_id1:_id2:_id31:_id45:clientRapporteur" class="dijit dijitReset dijitInlineTable dijitLeft xspInputFieldEditBox dijitTextBox dijitComboBox" role="combobox" widgetid="view:_id1:_id2:_id31:_id45:clientRapporteur" aria-labelledby="view:_id1:_id2:_id31:_id45:clientRapporteur_label"&gt; &lt;/td&gt; &lt;/tr&gt;</code></p> <p>5. The generated id for the label is: </p> <p><code>view:_id1:_id2:_id31:_id45:clientRapporteur_label</code></p> <p>, instead of the </p> <p><code>view:_id1:_id2:_id31:_id45:clientRapporteur</code></p> <p>. The problem is, that I use</p> <p><code>setTextLabelForRequired("#{id:labelClientRapporteur}");</code> <p>to change the style of the label, and this code does not work in this case, because of the changed id of the label.</p> <p>I would like to know how to fix this id-changing, or what is the best work-around?</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.
 

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