-
Notifications
You must be signed in to change notification settings - Fork 102
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
JSF page lost style after partial update #926
Comments
No idea. These things happened in the past when we updated the wrong part of the DOM tree. But BootsFaces 1.2.0 has been published several months ago and there are 2000+ downloads per month. So I don't think it's really a BootsFaces bug. Nonetheless, I'll hunt the bug if you provide us a reproducer. That's a small but complete GitHub project (or a zip file containing the sources, including the pom.xml). It shouldn't need any database. Ideally it's just a simple project that runs on a simple Tomcat out-of-the-box. I know that's demanding a lot (and I know how much work it is to create such a reproducer), but usually that's the key to solve the issue fast and efficiently. Thanks in advance, |
thank you for your effort <div id="myModalUpdate" class="modal fade" role="dialog">
<div class="modal-dialog">
<div class="modal-content">
<div class="content">
<div class="container-fluid">
<div class="row">
<div class="col-md-12">
<div class="card">
<div class="card-content">
<h:form id="modalFormUpdate">
.
.
.
<div class="col-md-6">
<div class="form-group label-floating">
<label class="control-label">Origine de la piece</label>
<h:selectOneMenu class="selectpicker"
value="#{documentBean.document.originePiece}">
<f:converter converterId="entiteConverter" />
<f:selectItems value="#{administrationBean.origines}"
var="originePiece" itemValue="#{originePiece}"
itemLabel="#{originePiece.libelleEntite}" />
</h:selectOneMenu>
</div>
</div>
.
.
.
</h:form>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div> in my template page i have the include of my js and css files : <h:outputStylesheet name="assets/css/bootstrap-select.min.css" /> (head part) when i open my modal to add a new row to my b:datatable all work fine and i have the right style and the right behavior javascript <b:dataTableColumn label="Action">
<b:commandButton icon="edit" ajax="true"
update=":modalFormUpdate"
oncomplete="$('#myModalUpdate').modal('show')"
action="#{documentBean.getDocToUpdate(doc)}">
</b:commandButton>
</b:dataTableColumn> i retrieve the data to update at the components of my form |
So you've used a standard If you need to use oncomplete="$('#myModalUpdate').modal('show');$('.selectpicker').selectpicker();" Hope that helps! |
fixed ^^ $('.selectpicker').val('Mustard'); so to fix the problem i had to add at the "oncomplete" attribute $('.selectpicker').selectpicker('render');
now it work correctly ^^ |
yes exactly that's what I just shared with you 👍 |
when i try to update the content of modal using jsf + bootsfaces with
all work fine: i retrieve data in the modal but i lose the javascript and style of my components
any idea??
note well : i use a template page and i include in it the modal panel using ui:include
The text was updated successfully, but these errors were encountered: