TheCoder4eu / BootsFaces-OSP

BootsFaces - Open Source Project
Apache License 2.0
246 stars 102 forks source link

b:panel collapsed closes on ajax #779

Closed chongma closed 5 years ago

chongma commented 7 years ago

Maybe i need to create a test for this but it seems like if i have a collapse b:panel with an ajax form inside it the panel collapses. pseudocode:

<h:form>
<b:panel collapsed="true">
<h:commandButton value="Click me"><f:ajax render="@form"/></h:commandButton>
</b:panel>
</h:form>

obviously rendering the form reinitialises the b:panel and recollapses it. but i would have expected collapsed to represent the initial state only. the collapsed property could be stored inside a @ViewScoped bean manually but i would have expected this to be handled by BootsFaces...

stephanrauh commented 5 years ago

Bind the collapsed state to a bean variable. One of the showcase demos does that, too.