Reputation: 37
I need to refresh page in include tag, but this is load dynamically using forEach property, this is a fragment of my code:
<button onClick="... refresh include page ..."/>
<tabbox id="tb" orient="vertical" >
<tabs>
<tab forEach="${vm.columnList}" label="${each}" hflex="true"/>
</tabs>
<tabpanels>
<tabpanel forEach="${vm.columnList}" >
<include height="90%" rc="/Campaigns.zul" rca="${each}" date="${vm.date}" />
</tabpanel>
</tabpanels>
</tabbox>
I want that when the button is pressed, the page that is in the include will reload, not whole page. Try using an id to use invalidate function, but using the forEach property to load the page gave an error with repeated id.
The page is loaded using forEach because depending of the parameter that is passed the content is different and different tabs are generated.
Upvotes: 0
Views: 1665
Reputation: 838
In the onClick of the button try this
<button onClick="tb.getSelectedPanel().getFirstChild().invalidate()" />
Upvotes: 1