-
Bug
-
Resolution: Fixed
-
Normal
-
6.0.0, 8.5.2.1
-
Security Level: Jimmy
-
ZK 8.6.0 S2
-
None
Steps to Reproduce
run the example native-zk-if.zul
Current Result
the red label component in the 4th div doesn't render even though the condition around it is true <zk if="true"> in the lines above this problem doesn't occur
Expected Result
all labels (zk components inside native elements render correctly)
Debug Info
it seems only the last zk component inside native elements is affected (adding an additional unconditional zk component at the end fixes the problem - commented out in the example)
Root Cause
native elements compress into a single zk.Native widget with prolog/epilog, the last conditional <zk> element is missed somehow in this process
Workaround
1. don't use <zk if=> within native element and add the condition directly to the native element
instead of
<zk if="${true}"> <n:div>Visible <label value="ZK label" style="color:red"/> </n:div> </zk>
use
<n:div if="true">Visible <label value="ZK label" style="color:red"/> </n:div>
2. (Alternative) add a <nodom> as the last child of the parent native element (commented out in attachment native-zk-if.zul)