When a page in a notebook is displayed, if server-side code changes invisibility state to 'true', the page tab is hidden, but its content is not.
EG :
For this piece of view :
<notebook colspan="6">
<page string="Page1" id="id_page1">
<label name="field1"/><field name="field1"/>
</page>
<page string="Page2" id="id_page2">
<label name="field2"/><field name="field2"/>
</page>
</notebook>
And this piece of code asking for invisibility :
@classmethod
def view_attributes(cls):
return super(MyModel, cls).view_attributes() + [
('//page[@id="page2"]', 'states', {'invisible': Eval('field0') != 'P',}),
]
If 'page2' is displayed, and the conditions asks for hidding, the content div is still displayed
It seems that the content is still marked as active.
Below is the div state that is unchanged before and after the server side code asked for invisibility :
<div role="tabpanel" class="tab-pane active" id="ui-id-30">