【问题标题】:Show the button in the right corner in jsf在jsf中显示右上角的按钮
【发布时间】:2021-09-03 12:28:30
【问题描述】:

我尝试在右上角设置按钮,但是按钮被accordionPanel隐藏了。

我做了很多尝试,但没有成功..

请帮忙!


            <p:panel id="previewPanel" styleClass="col-12">
            <h:commandButton name="saveFile" value="save"   --> here the problem.. 
                styleClass="GreenButton"
                actionListener="#{Upload.save()}"
                onclick="saveFunction()"
                style="float:right;width:90px;height:40px">
            </h:commandButton>
                <h:form id="preview" rendered="#{Upload.fileUpload}">
                    <p:accordionPanel widgetVar="basic">
                        <p:tab title="Data Table">
                            <p class="p-m-0">
                                <p:dataTable id="datas" var="data"
<p:dataTable id="datas" var="data"
                                    value="#{Upload.DataRead}"
                                    styleClass="ui-datatable-striped ui-datatable-sm"
                                    tableStyle="width: auto; max-width:100%; white-space:nowrap"
                                    rowKey="#{zre.number}" paginator="true"
                                    paginatorTemplate="{FirstPageLink} {PreviousPageLink} {PageLinks} {NextPageLink} {LastPageLink}"
                                    paginatorPosition="bottom"
                                    rowClasses="tableRowOdd,tableRowEven" rows="12" cellpadding="3">
                                    <p:column headerText="Nummer">
                                        <h:outputText value="#{zre.Number}" />
                                    </p:column>
                </p:dataTable>
                            </p>
                        </p:tab>
</p:accordionPanel>
                </h:form>
            </p:panel>

如果我将它添加到面板之外,它也会被隐藏。我需要在第一行然后在第一个选项卡中添加按钮。 谢谢


这里:一个例子: https://www.primefaces.org/showcase/ui/panel/accordionPanel.xhtml?jfwid=588de

【问题讨论】:

  • 如何移动手风琴面板的内容并将我的按钮放在上方?

标签: css jsf


【解决方案1】:

使用

display: block;
margin-left: auto;
width: 90px;
height: 40px;

而不是

float: right;
width: 90px;
height: 40px;

这将使按钮右对齐,并且不会被手风琴覆盖。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2016-08-18
    • 2016-10-16
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2015-03-15
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多