使用JSF将数据传递到引导模式

问题描述 投票:0回答:1

对于JSF和Hibernate来说还很陌生,并且也可以进行引导。所以我有一个带有“编辑”命令按钮的表格,当单击该按钮时,我想将数据行传递给模式形式,但我不知道该怎么做

enter image description here

请告诉我该怎么做

hibernate bootstrap-4 jsf-2 bootstrap-modal
1个回答
0
投票

例如,如果我有这样的数据表:

<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-->                           

© www.soinside.com 2019 - 2024. All rights reserved.