gpt4 book ai didi

jsf-2 - Primefaces roweditor 与其他按钮位于同一列

转载 作者:行者123 更新时间:2023-12-01 02:24:20 24 4
gpt4 key购买 nike

我有在其中使用 roweditor 的数据表。一切正常,但我需要在我有铅笔按钮进行编辑的列中添加更多按钮。那个“其他”按钮总是在铅笔下面。我试过 <p:panelgrid columns="3"...但是当我做那行编辑是不可能的。我想问题在于行编辑附带的其他两个按钮( ui-icon-checkui-icon-close )。任何人都可以给我一个想法吗?
这是我的数据表:

        <p:dataTable id="sifarnikTable" rowIndexVar="rowIndex" 
value="#{attrsBean.listOfDataBeans}" editable="true"
selectionMode="multiple" selection="#{attrsBean.selektovani}"
widgetVar="datatableWidget" var="row" rowKey="#{row.primaryKey}"
paginator="true" paginatorPosition="bottom"
paginatorTemplate="{CurrentPageReport} {FirstPageLink} {PreviousPageLink} {PageLinks} {NextPageLink} {LastPageLink}"
currentPageReportTemplate="{startRecord} - {endRecord} / {totalRecords}"
emptyMessage="#{messages['datatable.emptymessage']}" rows="15"
sortMode="multiple" paginatorAlwaysVisible="false"
filteredValue="#{attrsBean.filteredDatatableList}">
<f:facet name="header">
#{resources['db_parametri.title']}
</f:facet>

<p:ajax event="rowSelect" />
<p:ajax event="rowUnselect" />

<p:ajax event="rowEdit" listener="#{attrsBean.onEdit}"
update=":aswdatatable:form:messages, :aswdatatable:form:sifarnikTable, :aswdatatable:form:noviBtn" />

<p:ajax event="rowEditCancel" listener="#{attrsBean.onCancel}"
update=":aswdatatable:form:messages" />

<p:columns id="columns" var="column" value="#{attrsBean.columns}"
style="#{column.css}" width="#{column.width}"
sortBy="#{row[column.property]}"
filterStyle="#{attrsBean.columnCSS}"
filterBy="#{attrsBean.showFilter==false ? null : row[column.property]}">
<f:facet name="header">
<h:outputText value="#{column.header}" />
</f:facet>
<p:cellEditor>
<f:facet name="output">
<h:outputText value="#{row[column.property]}" />
</f:facet>
<f:facet name="input">
<p:inputText value="#{row[column.property]}" style="width:96%"></p:inputText>
</f:facet>
</p:cellEditor>

</p:columns>
<p:column style="width:6px" exportable="false" >
<p:rowEditor />
<div
onclick="datatableWidget.unselectAllRows();datatableWidget.selectRow(#{rowIndex}, false);">
<h:panelGroup layout="block">
<p:cellEditor>
<f:facet name="output">

<p:commandLink id="deleteBtn"
onclick="datatableWidget.unselectAllRows();datatableWidget.selectRow(#{rowIndex}, false);brisanjeWidget.show()"
process="@this"
update=":aswdatatable:form:brisanjeDisplay, :aswdatatable:form:sifarnikTable"
styleClass="ui-icon ui-icon-trash">

<f:setPropertyActionListener
target="#{attrsBean.modelForDelete}" value="#{row}" />
</p:commandLink>
</f:facet>
<f:facet name="input">
<h:outputText value="" />

</f:facet>
</p:cellEditor>
</h:panelGroup>
</div>
</p:column>


</p:dataTable>

最佳答案

在 Primefaces 5.x 中:

.ui-row-editor:after {
clear: none !important;
}

关于jsf-2 - Primefaces roweditor 与其他按钮位于同一列,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/17809656/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com