0
我想在modal
中放置一個outputText
,點擊commandButton
時會打開modal
。通過點擊jsf commandButton打開實現模態
我試過這段代碼:
<div class="row section">
<div class="col">
<!-- Modal Trigger -->
<h:commandButton value="submit" class="waves-effect waves-light btn modal-trigger" href="#modal1" action="#{someBean.someMethod}" />
</div>
</div>
<!-- Modal Structure -->
<div id="modal1" class="modal">
<div class="modal-content">
<h:outputText value="#{someBean.someData}" />
</div>
<div class="modal-footer">
<a href="#!" class=" modal-action modal-close waves-effect waves-green btn-flat">Agree</a>
</div>
</div>
和JS:
$(document).ready(function(){
// the "href" attribute of .modal-trigger must specify the modal ID that wants to be triggered
$('.modal-trigger').leanModal();
});
然而,這並不工作,我只是用用JSF兌現開始
任何JSF擴展? –
無論JSF擴展如何,**爲什麼**會將'leanModal'應用於commandButton? – Kukeltje
@SubodhJoshi不,我剛剛在pom上導入了javax.faces,並在頭標上實現了 – mhery