Ignore carriage return in a text area

Hi
I've a JTextArea of 3 rows on an applet screen.
I want to disable the carriage return key on the text area.
Thanx in advance

Look at the API documentation for JTextField; it contains an example of a class called UpperCaseField. You could modify this code to ignore line-end characters; the concept works with JTextArea as well as JTextField. This code would prevent people from pasting line-end characters as well as from keying them.

Similar Messages

  • SQLLDR ignoring carriage returns

    Can SQLLDR ignore carriage returns? I am trying to load records
    from Access to Oracle. The columns I am loading contain content
    for displaying on the web (Text inter-mixed with HTML code).
    Because these columns were created/updated via a web interface,
    they contain a lot of carriage returns. The problem I am having
    in SQLLDR is when it sees a carriage return, it thinks it is a
    new record. Can I prevent this without manually removing the
    carriage returns in the Access records?

    Hi William,
    The Workbench should help you since it uses the following SQL
    Loader syntax :-
    "str '<er>'" specifies that the end of record delimiter is <er>.
    This means carriage returns will be preserved. Also <ec> is the
    end of column delimiter.
    load data
    infile 'AUTHORS.dat' "str '<er>'"
    into table AUTHORS
    fields terminated by '<ec>'
    (AU_ID ,
    AU_LNAME ,
    AU_FNAME ,
    PHONE ,
    ADDRESS ,
    CITY ,
    STATE ,
    ZIP ,
    CONTRACT )

  • Carriage return  in a HTML AREA

    i have an HTML where i have put some line of text.
    But in the BOX of creation AREA i vie the line feed (carriage return =, but whe i see it on running it write all without carriage return .
    There ia way to soove this problem ??
    Thank's !

    ok, work very well !!
    Thank's'!

  • Carriage return inside help text

    Hello All,
    I have a requirement to put <ENTER> inside the tag area since i am displaying 2 fields in the same box.
    Example:
    <?ASSEMBLY_LINE?>
    <?OPERATOR_CODE?>
    This displays the output as "IE-10912".Here IE-109 is the assembly code and 12 is the operator code.
    I need something as this
    IE-109
    12
    Meaning there should be an enter or carriage return in between the 2 displayed values.
    Thanks
    Sk

    1. <?DEPTNO?><xsl:if xdofo:ctx="row" test="1<2"><xsl:attribute name="break-after"></xsl:attribute></xsl:if><?DNAME?>
    2. <?DEPTNO?><xsl:text>
    </xsl:text><?DNAME?>
    anyhow, not the efficient solutions..

  • Ignore carriage returns in select statement

    Within Oracle Report builder, I am using a select startment
    select descr
    from atable
    "descr" contains carriage returns at the end of the input ie people have enter 'enter' when inputting the data.
    how do write the select statement to ignore the carriage return 'enter' contain within "descr".
    Thanks

    SQL> SELECT 'aa' || chr(10) || 'bb' c FROM dual;
    C
    aa
    bb
    SQL> SELECT translate('aa' || chr(10) || 'bb', chr(10),' ') c FROM dual;
    C
    aa bb
    SQL> SELECT 'aa' || chr(13) || 'bb' c FROM dual;
    C
    aa
    bb
    SQL> SELECT translate('aa' || chr(13) || 'bb', chr(13),' ') c FROM dual;
    C
    aa bb
    SQL> "For Windows"
    Message was edited by:
    mennan
    Message was edited by:
    mennan

  • Carriage returns in a textarea are not being stored ??

    Hello developers,
    Ive been looking a couple hours for a solution but cant find it.
    In my app users enter text into a textbox like im doing now.
    When i want to display the text it has lost the carriage returns.
    Im using tomcat and mysql here.
    A solution to deal with the returns ?

    Super thanx, kinda stupid of me i once used that <pre> a couple years ago..
    Its working fine now execpt for the fact tha i have one space before the text starts
    Like this
    sfslfj
    sfsafa
    afsasff
    produced by this code
    <sql:query var="empList" scope="session">
              SELECT * FROM vragen
              ORDER BY vraagnr ASC
         </sql:query>     
         <table width="90%" border="1">
         <c:forEach items="${empList.rows}" var="row">
    <tr>      
    <td border ="0"><c:out value="${row.vraagnr}"/> <td/></tr>
    <tr><td> <pre> <c:out value="${row.vraag}"/> </pre>
         </td>
         </tr>
         </c:forEach>
         </table>

  • Carriage Return with the text in xdofx

    Hi
    I have to insert a carriage return with in a text I tried <?xdoxslt:chr(10)?>
    e.g <?xdofx:if x>'0' then 'Approved. Thank you.' else 'Disapprov.Thank you. ' end if?>
    so the output should be
    Approved
    Thank You
    I need carriage return between Approved and Thank You
    Thanks

    Use this:
    <?xdoxslt:ifelse(x>0, concat('Approved', xdoxslt:chr(10), 'Thank you.'), concat('Disapprov. ', xdoxslt:chr(10), 'Thank You.'))?>
    I tried this and it works
    <?xdoxslt:ifelse(10>9, concat('Approved', xdoxslt:chr(10), 'Thank you.'), concat('Disapprov. ', xdoxslt:chr(10), 'Thank You.'))?>
    Thanks,
    Bipuser

  • Carriage Return in line Text for invoice line item.

    Hi,
    I am trying to create an non PO invoice through calling a BAPI "BAPI_INVOICE_CREATE"
    in which  i am passing all the required data . I have a field called "SGTXT" which is item text and i am passing this field
    which has maximum length of 50 char i just want to add a new line characters on to it. i.e want to support Carriage Return
    just want to know whether it can hold Carrige Return.
    I just tried by entering some Characters and hitting Enter the value which i am passing is simillar to
    itemtext
    "abcdabcdabcdabcd#
    abacdabcdabcd#
    abcdabcd"   My program is not able to parse this values hence landing into dump.
    How should i support this scenario.
    Thanks,

    Here is the dump.
    The termination occurred in the ABAP program "SAPLZIBA_SSP_READ_CSV" in
    "LINE_TO_CELL_ESC_SEP".                                                 
    The main program was "ZIBA_SSP_INVOICELOAD ".                                                                               
    The termination occurred in line 149 of the source code of the (Include) 
    program "LZIBA_SSP_READ_CSVF01"                                       
    of the source code of program "LZIBA_SSP_READ_CSVF01" (when calling the
    editor 1490).                                                           
            IF i_string CS l_pipe.                     
              l_stringlength = strlen( i_string ).     
              DO l_stringlength TIMES.                 
                REPLACE '  ' WITH '""' INTO i_string.  
                IF sy-subrc NE 0.                      
                  EXIT.                                
                ENDIF.                                 
              ENDDO.                                   
            ENDIF.                                     
            ASSIGN I_STRING(L_INT) TO <L_CELL>.        
            I_INTERN_VALUE = <L_CELL>.                 
          endif.                                       
          L_INT = L_INT + 2.                           
          I_SIC_INT = L_INT.                           
          I_STRING = I_STRING+L_INT.                   
        ELSEIF I_STRING CS C_ESC.                      
        letzte Celle                                 
          L_INT = SY-FDPOS.                            
          if l_int = 0.                                
            clear i_intern_value.                      
          else.                                        
            ASSIGN I_STRING(L_INT) TO <L_CELL>.        
            I_INTERN_VALUE = <L_CELL>.                 
          endif.                                       
          L_INT = L_INT + 1.                           
          I_SIC_INT = L_INT.                           
          I_STRING = I_STRING+L_INT.                   
          L_INT = STRLEN( I_STRING ).                  
          IF L_INT > 0 . MESSAGE X001(KX) . ENDIF.     
        ELSE.                                          
          MESSAGE X001(KX) . "was ist mit csv-Format   
        ENDIF.                                         
      ENDIF.                                           
    Can you let me knwo how should i put my condition to support CR .
    thanks,

  • Carriage return in central text

    Hi,
    I'd like to know how to add a carriage return character in a central text of an order document.
    I use SAVE_TEXT BAPI to add central text in an order.
    Thank you for your help.

    carriage return is available in class CL_ABAP_CHAR_UTILITIES
    you just have to concatenate existing text with
    CL_ABAP_CHAR_UTILITIES=>CR_LF

  • Cfmail missing carriage returns in plain text

    CF8
    Im sending plain text mail and when my email arrives I dont'
    see carriage returns, it's all joined together.
    Using utf8 encoding, but does the same in all encodings.
    Any ideas why?

    I'm not putting ascii codes on the lines i want to line
    feed...
    I simply put text between the cfmail tags and hit enter...it
    has always worked in the past.
    cfmail
    text here
    text here
    text here, etc...
    /cfmail
    that would show up like that in outlook express when i read
    the mail...with the CR in place.

  • How to insert a "carriage return" in a text of a mail ?

    Hi to all,
    I'm facing a problem in an FB desktop app (WIN) which is supposed to automatically send emails.
    Everything works ok except that the line feed instructions inserted in the mail text are ok if i try to visualize the text in a preview textfield in FB, but are not taken in consideration in the message displayed on the recipient screen (both with outlook and thunderbird).
    I've tried various solutions such as "\n" or String.fromCharCode(13) + String.fromCharCode(10) without success.
    Thks in advance for help
    Best regards

    Post Author: gilles
    CA Forum: Data Integration
    Thanks a lot,
    I'll upgrade to 11.7 (currently 11.5.1)
    Gilles

  • Embedded carriage return

    We have  an application with a textarea that is used for comments, free form text. It seems that if the user enters a line of text, then uses the enter key to go to the next line, it captures the carriage return. When the form is brought up for review, it is completely empty, yet all the data that was entered is in the table.
    If the textarea is entered without using the enter key, the data displays when the form is reviewed.
    I have never encountered this problem before and tried it and it does indeed do what is described above. I entered the textarea without using the enter key and the data displays. I went back to edit and added the enter key to the textarea and the form is completely blank.
    What is going on and how can I prevent this from happening ?

    The data is not missing. It is in table after submit. It is just not showing up when using html/form to review. Using <cfinput type="text" name="field" value="qryField">, etc..., when there is a carriage return used in the textarea.
    We took the textarea data, scrubbed out the carrirage return characters, and reinserted in the table, and then entire form displayed. When I went back to edit the form and added the carriage returns, nothing displayed.
    We have isolated the problem to the carriage return in the text area becuause that is the only thing we have touched so far.

  • Importing XML Text files with Indesign friendly 'Carriage Returns'

    Hi,
    I have a question wrt importing XML into Indesign.  I have my text stored in Excel (Fig A) and intend to export as an XML file where each line will represent each page.  However, my first attempt failed to treat the 'carriage returns' as I'd envisaged:
    The 'carriage returns' used within an Excel cell (ALT-ENTER) are maintained when transforming to a CSV file (Fig B).  However, when converting to an XML file, the conversion only takes place on a line by line basis and hence the XML file becomes incomplete (Fig C).
    So, it appears I need to make sure that the CSV file contains one line per entry, while also maintaining the actual carriage returns in my source spreadsheet and for Indesign to recognise them.  In order to do this, I'll need to substitute the 'carriage returns' in my excel column to be represented by a new set of characters.  My question is how can I let Indesign know to recognise this set of characters to be converted to a carriage return, when importing text.
    For example, if this set of characters was '%%%%%%', then my new csv file would look like Figure D and the XML would be produced correctly, like Figure E.  Then importing this XML file to InDesign, the carriage returns would automatically be reinstated, hopefully.
    I hope someone can help me as I am only starting out in Indesign and feel Im running before I can walk by venturing into the XML/Indesign arena too soon.
    Best Regards
    Luke

    Hi,
    Thanks for all the responses.
    With regard to XML, it could well be an issue has crept in because I am using another utility to convert my csv's to xml and maybe there are better options out there. I will take a look for other utilities and try that (Its not possible from Excel easily, even though there is an option to save as an XML file).
    Secondly, because the XML was readable by internet explorer, I assumed it had a satisfactory standard XML format which would be accepted by any program, including InDesign.  This proved true, since the XML file i generated was actually recognised by my Indesign document and populated the tags correctly, albeit without any carriage returns. 
    When I save my excel sheet as a csv, it does actually hold the carriage returns causing multiple lines per entry, hence why I need to substitute the actual carriage returns in my excel sheet to a alternative character set so that the entry remains on one line.
    Re: Double quotes on text fields.  Im sorry, I didnt realise I had commas in my sample csv example.
    I should have corrected it, but I intend on using semi-colons as my csv delimiter and don't intend on having semi-colons in my excel sheet itself, so I possibly won't need any double-quotes.
    So, it looks like this is what I need to do ;
    i)   Add a column in Excel which substitutes all the carriage returns with a line break identifier (^n).
    ii)  Convert Excel file to a semi-colon csv holding this new column,
    iii) Convert csv file to XML using a good CSV->XML utility,
    iv)  Add the respective XML tags to my INDD document,
    v)   Add a GREP rule which does a find/replace on all instances of ^n and replace with a line break,
    vi)  Import the XML file,
    vii) Apply the find/replace GREP rule on the whole document. Carriage returns on my text fields should be consistent with my original excel sheet.
    Thanks for all your help fellas.  Will report on how I get on once Im done.
    Best Regards
    L

  • Read Only TextAreas with Carriage Return, Line Breaks and Word Wrapping

    Hi all,
    I know there are a few posts around this subject but I cannot find the answer to the exact problem I have.
    I have a page that has a 'TextArea with Character Counter' (4000 Chars) that is conditionally read only based on the users credentials (using the 'Read Only' attributes of the TextArea item).
    When the field is editable (not Read Only) everything works fine but when I make the field Read Only I start to have problems:
    The first problem is that the Carriage Return and Line Breaks are ignored and the text becomes one continuos block. I have managed to fix this by adding pre and post element text of pre and /pre tags. This has made the Carriage Return and Line Breaks word nicely and dispaly correctly.
    However, it has introduced a second problem. Long lines, with no Carriage Returns or Line Breaks, now extend to the far right of the page with no word wrapping, making my page potentially 4000+ characters wide.
    How can I get the field to be display only, with recognised Carriage Returns and Line Breaks, and Word Wrapping inside a fixed width of, say, 150 characters?
    Many thanks,
    Martin

    Hi,
    Just a cut and paste of yours with the field name changed:
    htp.p('<script>');
    htp.p('$x("P3_COMMENTS").readonly=true;');
    htp.p('</script>');I also have the following in the page HTML Header, could they be conflicting?
    <script type="text/javascript" language="JavaScript">
    function setReleaseToProd(wpTypeCode){
       //setReleaseToProd($v(this))
      var get = new htmldb_Get(null,$v('pFlowId'),'APPLICATION_PROCESS=set_release_to_prod',0);
      get.addParam('x01',wpTypeCode);
      gReturn = get.get();
      if(gReturn) {
         $s('P3_RELEASE_TO_PROD',gReturn);
      get = null;
    </script>I am a long way from knowing much about Javascript (this page code was written by someone else) so all help is much appreciated.
    Martin

  • XML is cluttered with carriage returns and line feeds - how to suppress?

    Hi all,
    at least within text paragraphs we would prefer 'clean' XML without carriage returns. Can Framemaker be configured to avoid these control character?
    Below is an example of a DITA file produced by Framemaker. Evidently this is related to the Pretty Printing feature and I do admit that it increases the readability. However they cause some issues for us. Note that the carriage returns in the paragraph are at arbitrary positions, not at the end of the lines as they appear in the Framemaker editor (I inserted the word "End" at the end of the first line).
    Robert

    By default, FrameMaker adds a CR at around 70-80 characters unless instructed to do otherwise.
    Also, soft returns (SHIFT+ENTER) are lost unless you're in a pre formatted element like a <codeblock> (which is probably why there's no CR after your "End" text.
    If you want to limit the seemingly arbitrary CRs, you must tell FM where to put them. Add the following rule to the structure application rules file ..
    element "p"
      writer line break is 99999 characters;
    …scott

Maybe you are looking for

  • Bursting program errors when no data - Check output before bursting

    Hello experts, I have a XML Publisher Report with a Data Template + Bursting Control File. This works perfectly when there is data. But, when there is no data, main concurrent program completes successfully but the Bursting concurrent Program errors.

  • XSD Data Type to ABAP Proxy Tech. Type

    I am working with an ABAP development team who is creating PROXYs from the Service Interfaces I have setup in the ESR (PI 7.11). I have been asked to set the type of a numeric field by the ABAP developer as this: "Yeah we can convert from string to c

  • Why do my applications keep unexpectedly closing?

    Everytime I open an application on my mac book pro it automatically sends me to an error message saying "insert name of application" quit unexpectedly click reopen to open the application again. This report will be sent to Apple automatically. Once i

  • Pending messages in queue consume cache and result slow processing

    Hi All           I have one stand alone java application which is consumer of one weblogic JMS queue.           What my application does, it take big messages in to xml format and convert it in to small chunk of xml using XSLT.           Here I am st

  • FLQAD: assignment for documents with local currency

    Dear Gurus, I'm just curious with is it FLQAD assignment program uses transaction currency and since a company would normally view their cash flow statement in local currency. The FLQAD does not work for documents with zero transaction amount such as