Welcome to the IBM Collaboration Solutions Community IQJam.
UsernamePassword
Reset Password | Register
   
Home | Leader Board | Tags | Help
Getting Non Breaking Spaces in Multi-Line Edit control (Text Area) 
I have a multi-line control that is bound to a text field.  When I type comments into a field and go to later view the field on a web page - each space is converted to non-breaking spaces - &nbsp.
 
Why does it do this and how can this be prevented.  It's not wrapping correctly and throwing off the layout of the page.
 
Thanks!
Domino Development / XPages
David Leedy - about 1 year ago |  |  | Viewed 217 times

There are 2 answers

0votes
Comment: It seems to be a problem as well in IBM's "Lotus Notes and Domino Application Development wiki" - open up a document and text runs past the right margin. Here's an instance. Hopefully this can be addressed soon - either by another developer or IBM.


Deborah Miller - about 1 year ago | 
Voting
Vote on the answer to show whether you think the answer is correct or useful to the rest of the community.

Answers with more votes are more visible to the rest of the community


0votes
Not sure my situation is the same as yours.  My text fields are defined as multi-value on the form with "New Line" as the only valid separators defined.  I experienced inappropriate wrapping as well & line breaks in weird places when using the multi-line edit box control (I don't use the "multiple separator" parameter at all).  How I got around it was to use a custom converter for the edit box:
 
 <xp:this.converter>
      <xp:customConverter>
           <xp:this.getAsObject><![CDATA[#{javascript:@Explode(value,"\n");}]]>          </xp:this.getAsObject>
            <xp:this.getAsString><![CDATA[#{javascript:@Implode(value,"\n");}]]></xp:this.getAsString>
      </xp:customConverter>
 </xp:this.converter>

And I also changed it so the edit box is only used for EDIT mode.  For READ mode I use a computed field, displayed as HTML:
 
@Implode(<datasource>.getItemValue("<fieldName>"),"<br>")
 
A bit of a pain to have to have 2 fields for every mutli-line text field, but it works.


Judy Kilpinen - about 1 year ago | 
Voting
Vote on the answer to show whether you think the answer is correct or useful to the rest of the community.

Answers with more votes are more visible to the rest of the community