Skip to Main Content

Java Development Tools

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Howto vertical align outputtext inside column

775886Sep 2 2010 — edited Sep 3 2010
Hi all,

Been googling all over te place for the answer but cant find it. I need to align the data in my table to the top of the cells.

I have a number of columns in my af:table, and the description column is multiline, using escape="false" like this:
<af:column sortProperty="Description" sortable="false"
           headerText="#{bindings.DossierLine.hints.Description.label}"
           id="columnDescription" visible="true" width="400">
  <af:outputText value="#{row.Description}" id="ot14" escape="false"/>
</af:column>
<af:column sortProperty="Discount" sortable="false"
           headerText="#{bindings.DossierLine.hints.Discount.label}"
           id="c4" width="50">
  <af:outputText value="#{row.Discount}" id="ot15"/>
</af:column>
The data is split over multiple lines with
<br/>
Default, the other single-line cells are now aligned left, and vertically centered, but the requirement is they must be aligned "top". (top-left)

But I don't even get horizontal alignment working! I've tried about everything:
- on <af:column>: align="right" and/or inlineStyle="vertical-align:text-top;"
- on <af:outputText>: inlineStyle="vertical-align:top; text-align:right;"
- using <af:inputtext> instead of <af:outputtext> with above options
- have also set contentDelivery="true" on the table, because maybe the problem is that the table doesn't know the height of the cell when rendering?

Putting a border on outputtext shows actually that outputtext doesn't occupy all space of its parent.
So I've also experimented with PanelStretchLayout, AFStretchWidth, etc.

No results so far.

Any ideas or suggestions on how to get alignment working here?

Thanks and regards,
Gerben
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Oct 1 2010
Added on Sep 2 2010
3 comments
2,627 views