对于JSF和Hibernate来说还很陌生,并且也可以进行引导。所以我有一个带有“编辑”命令按钮的表格,当单击该按钮时,我想将数据行传递给模式形式,但我不知道该怎么做
请告诉我该怎么做
例如,如果我有这样的数据表:
<h:form id="master">
<h:dataTable value="#{bean.entities}" var="entity">
<h:column>#{entity.property1}</h:column>
<h:column>#{entity.property2}</h:column>
<h:column>#{entity.property3}</h:column>
...
<h:column>
<a class='btn btn-primary btn-sm' role='button' data-toggle="modal" data-target="#modal-lg"><span class='glyphicon glyphicon-pencil' aria-hidden='true'></span></a>
</h:column>
</h:dataTable>
<div class="modal fade" id="modal-lg">
<div class="modal-dialog modal-lg">
<div class="modal-content">
<div class="modal-header">
<h4 class="modal-title">TITLE</h4>
<div class="modal-body">
<!--here i want to show for example one row of the data table-->