Home > Java > Trinidad and text wrapping

Trinidad and text wrapping

by paul on May 29, 2009

While using Trinidad 1.0.1 I came across a problem where text did not wrap when displaying read only text fields. This meant that everything was pushed off the right hand side of the page.

I had to change the fields from:


<tr:inputText label="#{msgs['message1']}" styleClass="labelRight"
                              required="false"
                              value="#{mybean.value}"
                              id="mybean" columns="10"
                              readOnly="true"/>

to


               <tr:panelLabelAndMessage label="#{msgs['message1']}">
                  <tr:outputText value="#{mybean.value}" />
               </tr:panelLabelAndMessage>

and added the following to my style sheet:


.af_panelFormLayout_content-cell {
    white-space: normal;
}

Note outputText instead of inputText. It was tricky to get it working in FF and IE at the same time.

Leave a Comment

Previous post:

Next post: