当前位置: 动力学知识库 > 问答 > 编程问答 >

html - jsf commandbutton align top in h:panelGrid

问题描述:

I've got a problem with vertical alignment of a4j:commandButton on jsf page. The piece of code looks like this:

 <rich:collapsiblePanel

header="Выбор ответственного за выполнение услуги"

switchType="client">

<h:panelGrid columns="2" style = "vertical-align:top">

<ui:include src="/forms/kontrollerForm.xhtml">

<ui:param name="entityHome"

value="#{groupAssignmentList.kontrollerHome}" />

</ui:include>

<a4j:commandButton id="send" value="Назначить" render=""

oncomplete="#{rich:component('popup')}.show();" execute="@form" />

</h:panelGrid>

</rich:collapsiblePanel>

The included page is quite simple:

 <h:panelGrid id="kontrollerPanel" columns="1">

<s:decorate template="/layout/edit.xhtml">

<ui:define name="label">Контроллер</ui:define>

<util:autoComplete key="#{entityHome.currentKontroller}"

keyLabel = "#{var.lastName} #{var.firstName} #{var.middleName}"

searchList="#{entityHome.kontrList}" var="var"

itemValue="#{var}"

itemLabel="#{var.lastName} #{var.firstName} #{var.middleName}"

id="kontrollerSelectOne"

/>

</s:decorate>

<h:commandButton value="Выбрать из отчета о загруженности контролеров" action="#{entityHome.selectObject()}" id="kontrollerSelectFromRec" immediate="true" render = "kontrollerSelectOne"/>

</h:panelGrid>

The problem is - the button in the right column aligned in the center of column and is on the level between elements in the left column. I tried to set style "vertical-align:top" to button or to column - but nothing helps.

Is there any solution for my problem?

网友答案:

Add following css in your application

td.topalign {
    vertical-align: top;
}

Call it in proper column

<h:panelGrid columns="2" columnClasses="topalign, topalign">
分享给朋友:
您可能感兴趣的文章:
随机阅读: