September 2017
Intermediate to advanced
408 pages
9h 25m
English
The j:while tag is used to perform the while loop. The while loop continues till the test expression condition evaluates to true. The while loop breaks once the condition evaluates to false. We can also manually break out of the j:while loop using the j:break tag. The j:while tag accepts the following attributes:
For example:
<g:evaluatevar="jvar_gr" object="true">
var gr = new GlideRecord("incident");
gr.addQuery("active", true);
gr.query();
gr;
</g:evaluate>
<ul>
<j:while test="${jvar_gr.next()}">
<li>${jvar_gr.getValue('number')}</li>
</j:while>
</ul>
Read now
Unlock full access