2 Replies Latest reply: Sep 12, 2012 6:25 AM by raghav1212 RSS

    How to Right Align the number in PanelFormLayout

    932737
      Hi,

      I have a requirement where I need to display contents of a table using iterator and need formatting as below.

      1. We should use <af:panelLabelAndMessage> for displaying the label
      2. Message should have two fields combined. Once numeric and other Text.
      3. Numeric should be right aligned and Text should be left aligned.

      Below is my current Code:

      <af:panelFormLayout id="pfl1">
      <af:iterator value="#{bindings.Total.collectionModel}" var="row"
      rows="#{bindings.Total.rangeSize}" id="t1">
      <af:panelLabelAndMessage label="#{row.DisplayName}" id="plam1">
      <af:panelGroupLayout id="pgl1" halign="end" layout="horizontal">
      <af:outputText value="#{row.TotalAmount}" id="ot3"
      inlineStyle="text-align:right;">
      <af:convertNumber pattern="#{applCorePrefs.numberFormatPattern}"/>
      </af:outputText>
      <af:spacer width="10" height="10" id="s1"/>
      <af:outputText value="#{row.CurrencyCode}" id="ot4"
      inlineStyle="text-align:right;"/>
      </af:panelGroupLayout>
      <f:facet name="end"/>
      </af:panelLabelAndMessage>
      </af:iterator>
      </af:panelFormLayout>

      But Alignment is not as per my requirement. Numeric field (TotalAmount) is not right aligned.

      Please help !! I want to align the numeric field to the right.