function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
VibrateVibrate 

How to wrap text in apex:outputField

 

Hi,

I need help getting the text to wrap in an "apex:outputField".  The code below is not working.  Any help will be appreciated.

 

<apex:pageBlockSection title="Work Details:" columns="2" >
<apex:outputField value="{!Car_Permit__c.Description_of_Work__c}" label="Description of Work :" style="width:40%;"/>
</apex:pageBlockSection>

 

Thanks,

Vibrate

Best Answer chosen by Admin (Salesforce Developers) 
bob_buzzardbob_buzzard

Just using the apex:outputField should do the trick.

All Answers

bob_buzzardbob_buzzard

Take a look at this thread:

 

http://boards.developerforce.com/t5/Visualforce-Development/Wrapping-text-inside-table-cell/td-p/174589

 

(The style classes should work anywhere).

VibrateVibrate

bob_buzzard,

 

Thanks for the quick response.  I just realized that I need to output the text from a multi-line textbox (textarea).  So you know how I can accomplish that?

 

Thanks,

Vibrate

bob_buzzardbob_buzzard

Just using the apex:outputField should do the trick.

This was selected as the best answer
VibrateVibrate

You are right it works with normal english sentences.  The tester was putting in a long continated list of characters (e.g. - rrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrr).  That will not work.  I am chcking to make sure they need to do that.

 

Thanks,

Vibrate

VibrateVibrate

concatenated text in an "apex:outputField".  They want to wrap text like "===========================================================" in an  "apex:outputField".  Do you have any idea how to do that?

VibrateVibrate
I think I can get it done with a disabled "inputTextArea" by using these attributes: disabled="true" readonly="true". Thanks for taking the time to help me with this one.