Returns the value of the tagId attribute.
<netui:getNetuiTagName
[id="id"]
tagId="string_tagId" />
Returns the value of the tagId attribute. This tag allows you to track the value of the tagId attribute, the value of which will be re-written if the web application is part of a Portal application. This tag is especially useful when you need to pass the tagId value to an HTML tag, or to some other tag that is not within the <netui...> tag library. In the following example, the tagId value is passed from the tag <netui:radioButtonOption> to the HTML tag <label>.
<netui:radioButtonOption tagId="radio1" value="value1"/> <label for="<netui:getNetuiTagName tagId="radio1"/>">Display Text 1</label>
If the tagId attribute in the
id | The id attribute is deprecated, use the tagId attribute instead. The id attribute of the rendered HTML tag. | ||||||
|
|||||||
|
|||||||
tagId | String value. Sets the For example, assume that some tag's <netui:textBox tagId="foo" /> Then the following JavaScript function will return the real id attribute rendered in the browser: getNetuiTagName( "foo", this ) To get a <netui:form> element and all of its children elements in JavaScript, use
the same JavaScript function <netui:form tagId="bar" > Then the following JavaScript function will return the <netui:form> element and its children (packaged as an array). document[getNetuiTagName( "bar", this )] To retreive the value entered into a <netui:textBox> within the <netui:form> tag, use the following JavaScript expression. document[getNetuiTagName("bar", this)][getNetuiTagName("foo", this)].value The second parameter ensures that the JavaScript function
begins its search within the correct Portlet scope. Pass the
JavaScript keyword |
||||||
|
|||||||
|
<netui:form action="processData"> <netui:radioButtonGroup dataSource="{actionForm.selection}"> <label for="<netui:getNetuiTagName tagId="radio1"/>">Display Text 1</label><netui:radioButtonOption tagId="radio1" value="value1"/><br> <label for="<netui:getNetuiTagName tagId="radio2"/>">Display Text 2</label><netui:radioButtonOption tagId="radio2" value="value2"/><br> <label for="<netui:getNetuiTagName tagId="radio3"/>">Display Text 3</label><netui:radioButtonOption tagId="radio3" value="value3"/><br> </netui:radioButtonGroup> <netui:button value="Submit" /> </netui:form>