1

I'm using panelLabelAndMessage with multiple vertically aligned values. I would like my label to be always aligned with the top value (not center aligned as it is by default). In order to achieve that I use labelStyle="vertical-align: top;".

Below is my code:

<af:panelFormLayout maxColumns="3" rows="1" labelWidth="200" fieldWidth="200px">
     <af:panelLabelAndMessage label="Label" labelStyle="vertical-align: top;">
         <af:panelGroupLayout layout="vertical">
              <af:iterator value="#{someBean.someCollection}" var="var1">
                        <af:outputText value="#{var1.value}"/>
               </af:iterator>
               <f:facet name="separator">
                 <af:spacer height="10"/>
               </f:facet>
       </af:panelGroupLayout>
    </af:panelLabelAndMessage>
</af:panelFormLayout>

This works fine when I have two values in the iterator:

enter image description here

But when there is only one value the label and value become uneven:

enter image description here

I'm new to ADF, so I don't know how (and if) this can be corrected.

Edit: I'm tagging this also as trinidad, as I suspect that the behaviour there is similar.

Edit2: What I've found out is that the same problem occurs even if there is no panelGroupLayout, no iterator and the value is hardcoded, so the code is like this:

<af:panelFormLayout maxColumns="3" rows="1" labelWidth="200" fieldWidth="200px">
     <af:panelLabelAndMessage label="Label" labelStyle="vertical-align: top;">
            <af:outputText value="Value"/>
    </af:panelLabelAndMessage>
</af:panelFormLayout>
Chanandler Bong
  • 403
  • 1
  • 11
  • 23
  • I can't recall ever having seen this on Trinidad. It seems to me though, that this can easily be worked around using CSS. – Jasper de Vries Jan 28 '16 at 16:21
  • @JasperdeVries Thanks. I already workarounded it with adding vertical-align: top only if there is more than one value in the iterator (using EL). However since it's a workaround I'm leaving this question open. I'm hoping that someone will either point out that my code is incorrect/incomplete or confirm it's a proper behaviour. Based on my finding described in Edit2 I suspect it's the latter. – Chanandler Bong Jan 28 '16 at 21:26

0 Answers0