Text Areas in Apex 4.2.2 - Can't be read dynamically - Bug?

Hi,
i encountered a big problem after upgrading Apex from 4.1 to 4.2.2.
On an application page there is a Text Area which will be read and processed after clicking a button. I didn't want a refresh of the page and did it with a dynamic action.
All this worked like a charm with 4.1.
Since the upgrade, the value of the Text Area is always returned as null while processing the dynamic action, but the value is filled by the user!
When i change the type of the Element to Rich Text Area everything works fine, but i don't want this because i don't want HTML in the corresponding table.
Is this a bug? How can i workaround it?
Thank you
Regards
Daniel

Yep - it's a bug. But it only occurs when there is also a rich text editor present. The issue is in the initialization of an apex.item instance. When using jQuery .val() the value of the textarea can be retrieved, but not when using $v. And $v is a shortcut to apex.item.getValue. Since a dynamic action is an apex thing, it'll use apex.item.getValue to get the value. And that is returning nothing. The reason is not getValue being wrong, but an incorrect init of the apex.item object when the item concerns a textarea and there is a rich text editor present.
To explain this somewhat:
In getValue there is this code:
            if( !lArray ) {
                switch( _self.item_type ) {
                    /* check single checkbox entry */
                    case 'CHECKBOX'             :lReturn = ( _self.node.checked ) ? _self.node.value : ""; break;
                    /* check single radio entry */
                    case 'RADIO'                :lReturn = ( _self.node.checked ) ? _self.node.value : ""; break;
                    case 'TEXT'                 :lReturn = _self.node.value; break;
                    case 'POPUP_LOV'            :lReturn = _self.node.value; break;
                    case 'POPUP_KEY_LOV'        :lReturn = apex.jQuery( '#' + _self.node.id + "_HIDDENVALUE", apex.gPageContext$ ).val(); break;
                    case 'DATEPICKER'           :lReturn = _self.node.value; break;
                    case 'HIDDEN'               :lReturn = _self.node.value; break;
                    case 'DISPLAY_SAVES_STATE'  :lReturn = _self.node.value; break;
                    case 'DISPLAY_ONLY'         :lReturn = _self.node.innerHTML; break;
                    case 'TEXTAREA'             :lReturn = _self.node.value; break;
                    case 'FCKEDITOR'            :
                            oEditor = FCKeditorAPI.GetInstance( _self.node.id ) ;
                            lReturn = oEditor.GetHTML();
                            break;
                    default                     :lReturn = ""; break;
            return lReturn;
When textarea you'd expect a return of the value, but nope. Obviously when performing $v on the textarea nothing is returned so what occurs is the default clause.
Using
document.getElementById("P1_TEXTAREA").value
//or
$("#P1_TEXTAREA").val()
will return the value.
However, what is being tested is _self.item_type and _self.node.value.
These are properties instantiated when apex.item is called, as such
apex.item("P1_TEXTAREA")
Checking the console will show all the properties assigned. The node is correct, but item_type is empty... That explains the empty return from getValue.
So why is the item_type empty when there is a text editor?
item.js, line 147 (for those interested)
    if( lNodeType === 'FIELDSET' ) {
        //snipped out since irrelevant
    }else if( lNodeType === 'INPUT' ) {
        //snipped out since irrelevant
        // if the node type is not a fieldset or an input, initialise item_type accordingly
    } else {
        _self.item_type = lNodeType;
        switch( _self.item_type ) {
            case 'TEXTAREA':
                if( _self.node.parentNode.className === 'html_editor' && _self.node.parentNode.tagName === 'FIELDSET' ) {
                    _self.item_type = 'FCKEDITOR';
                } else {
                    try {
                        if (CKEDITOR.instances[ _self.id ] ) {
                            _self.item_type = 'CKEDITOR3';
                        } else {
                            _self.item_type = null;
                    } catch( e ) {}
                break;
            case 'SELECT':
                break;
            case 'SPAN':
                if( _self.node.className === 'display_only' ) {
                    _self.item_type = 'DISPLAY_ONLY';
                break;
            default:
                _self.item_type = false;
    } // end if on lNodeType
} //end if (_self.node)
The relevant parts here is the else clause on node type. You can see that firstly item_type is assigned the nodetype. In the case of a textarea the nodetype will be set to "TEXTAREA". Good.
Then, case TEXTAREA. First if? Nope, not an htmleditor. Else. Try. And in this try is the mistake. If there are no rich text editors then attempting to call CKEDITOR will throw an error since it will not be instantiated. That is good though, and makes sure that when there are no RTE's that the item_type will correctly be textarea since there is no re-assigment happening of item_type.
Consider now when there are RTE's. The CKEDITOR object will be instantiated, so no error. However, the textarea is obviously not in the array of editors since it is no editor, so it won't be found and we land in the else clause. There the item type is assigned "null". Thus, no longer "TEXTAREA".
So subsequently, when calling getValue the code will return nothing because of the "unknown" itemtype of the item.
So all that to say that yes, there is a bug in the apex code when you mix a textarea and a rich text editor on a page. Is there anything you can do to solve this? No, not really, save for editing item.js to account for the faulty assignment.
If you still have this requirement to have a textarea and RTE on the same page, then I can only advise you not to use a dynamic action, but using an ondemand process and calling it yourself, providing the correct value by using jQuery calls instead of apex ones.
(plus: should be logged as a bug by someone...)

Similar Messages

  • Hello, I am trying to use a photo,that I've opened up in pages on a blank landscape, taken from my camera roll and use it as album cover art. All the custom text's will not paste when I copy.  Pic and texts are saved as a PDF, how can I paste the doc ?

    Hello, I am trying to use a photo,that I've opened up in pages on a blank landscape, taken from my camera roll and use it as album cover art. All the custom text's will not paste when I copy.  Pic and texts are saved as a PDF, how can I paste the doc ?

    Hello, I am trying to use a photo,that I've opened up in pages on a blank landscape, taken from my camera roll and use it as album cover art. All the custom text's will not paste when I copy.  Pic and texts are saved as a PDF, how can I paste the doc ?

  • Texts are going through twice. How can I fix this?

    Hello I am getting complaints that my texts are going through to people twice. How can I fix this? I do not get messages twice, only my outgoing (although it only shows once on my phone)

    Contact your carrier.
    If being done by your iPhone, the outgoing messages would be shown twice on your iPhone.

  • Since downloading the most current iTunes software I can no longer print the insert (label) for a jewel case.  The songs are printed over each other and can not be read.  Any suggestions?  Thanks.

    Since downloading the most current iTunes software I am no longer able to print an insert (label) for a jewel case.  I click on print, choose jewel case and then it doesn't matter which option I choose for the insert it will only print the songs over each other in a 1 inch section so that it can not be used or read.  If instead of clicking on the jewel case I click on list it works fine and prints an appropriate list.  I have always updated the iTunes software the first time I am offered to do so and I have never had a problem printing the jewel case inserts.  Since this issue is not about a piece of hardware iTunes help will not help me. 

    Did you ever get a response?
    If you so how did you correct the problem?
    I have the exact problem you had.
    Please let me know.
    Thank you
    <Edited by Host>

  • How can I use javascript in a Text Area with HTML editor??

    My question is... how can I use javascript in Text Area with HTML editor??
    I can use javascript functions that change the content of Text Areas but i can´t if i try in text area with html editor....
    I need to limit number of characters in a text area with html editor and i can´t.
    could anybody help me please?

    I have been experiencing similar problems with the HTML Editor and have managed to find an answer that should start to answer some of my questions. The Apex HTML Editor Standard is actually an HTML editor called FCKeditor. The FCKeditor has a Javascript API that can be found at http://docs.fckeditor.net/FCKeditor_2.x/Developers_Guide/JavaScript_API. Unfortuately this doesn't seem to give the whole answer and I found more at http://www.houseoffusion.com/groups/cf-talk/thread.cfm/threadid:49607.
    I needed to get the text entered within my html editor standard (e.g. P1_MYTEXT) and use it within my javascript function. I did this by using the following script
    <script language="JavaScript" type="text/javascript">
    function showtext(){
    var oEditor = FCKeditorAPI.GetInstance('P1_MYTEXT');
    var editortext = escape(oEditor.GetXHTML(oEditor.FormatOutput));
    alert(editortext);
    </script>
    Hope this helps.
    Matthew

  • How can I change a PDF document to have an enlarged text area and smaller margins?

    I've just been reading a long discussion initiated by a guy who wanted to recompose a PDF file to print in fewer pages. I'm not asking about that. I'm aware that Acrobat Pro 9 will not recompose the pages of a pdf for you; as someone said, it's not a word processing program. I want to copy a PDF to a new file with an enlarged text area and smaller margins, so I can read it more easily. My eyesight isn't so great.
    I'm trying to print a decision of the US Supreme Court, for my study. The problem is that these PDF files of such decisions are composed in 10-point type with generous margins, in folio-size pages smaller than 8 1/2 x 11". When you open PDF files of these decisions, you get extremely wide margins and relatively small type. Essentially, I'd like to re-rasterize the document so it prints on my 8 1/2 x 11" paper in a larger apparent type size, but in the same high resolution as the original. By the way, the decision I'm working on is almost 200 pages long, so I don't want to do this, obviously, in a page by page manner.  
    I guess I could do this in Photoshop, by blowing pages up and cropping them. Photoshop does a good job of eliminating the jaggies when you do this. But it would seem better to re-rasterize the pages from the PDF source file. So would any reader be kind enough to explain this process to me? (I'm fairly savvy in Photoshop, Illustrator, and computer printer concepts, but a complete newb in Acrobat.)

    If you just want this for printing, one thing you can easily do is crop all of the pages to remove the margins. For example, you can rop 2" off the left and right sides, and 1.5" off the top and bottom. Then print using a Page Scaling of "Fit to Printable Area".
    To crop in Acrobat 9, select: Document > Crop Pages
    be sure to select All for the Page Range.

  • I deleted text messages over the last six months, and I want to get them back. I didn't have my I-Phone 4S backed up. Can I still retrieve those texts??  I read somewhere that texts are never really deleted for good.

        I have a I-Phone 4S and I deleted text messages over the last 6 months. I didn't have my phone backed up with I-Tunes or anything. Is there a way to retrieve all of those deleted text messages??  I read somewhere a while back, that texts are never really deleted permanently. Can't find information on that. Can anyone help please?

    dskillen1987 wrote:
        I have a I-Phone 4S and I deleted text messages over the last 6 months. I didn't have my phone backed up with I-Tunes or anything. Is there a way to retrieve all of those deleted text messages??  I read somewhere a while back, that texts are never really deleted permanently. Can't find information on that. Can anyone help please?
    Where would you expect to retrieve those deleted message if you didn't backup your phone?

  • Need to show some values from Lookup in Text Area of Request Dataset

    Hi,
    I have a requirement where I need to display values(which are roles) coming from a lookup in text area. The reason behind is to show to end users list of roles. They should not be able to select these roles.They will just refer the list and enter desired role in a text field. I thought of using text area as the component to be used for showing these roles. However, I cannot use lookup property for widget="textarea" in the request dataset.
    Can we do this or is there any other component where I can show list of roles so that users can just refer the list.
    Thanks.

    Lookup Property ??
    TextArea is different type of widget. It doesn't come with lookup.
    Search developer's guide.
    – textarea: Specifies a large text field for entering multiple lines of text.
    Even if they select then don't use that field for further processing. You can use Attribute instead of AttributeReference.
    Workaround:
    Have one text are and use Prepopulate adapter to populate those values.

  • Why if using a composition widget as a dropdown target links fade if they extend over a text area

    I am working on a site using the composition widget for a drop down menu. I find that if the target links extend over a text area, they fade out before one can click the link and while this can be overcome for desktop and tablet layouts, it cannot for phone layouts. The link below shows the issue. Any suggestions?
    Sandy Paws || Contacts

    Hi, No luck sorry! I have posted this a few times in the forum and also as a bug but no reply from Adobe! Really annoying as Im having to do a total redesign as a result and its not ideal. If you do manage to work it please do let me know!
    ADOBE PLEASE RESPOND!

  • How to set html bullet effect for text in text area

    Hi All,
    How can i set html bullet effect for my text in text area.
    i need like      hello world
    Can any help me.
    thanks
    Raghu

    Use the htmltext property of TextArea. For example...
    <?xml version="1.0" encoding="utf-8"?>
    <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute">
        <mx:Script>
            <![CDATA[
                [Bindable] private var theHTML:String = "<ul><li>First</li><li>Second</li><li>Third</li></ul>";
            ]]>
        </mx:Script>
        <mx:TextArea htmlText="{theHTML}" width="400" height="400"/>
    </mx:Application>

  • Untranslated OTR texts are missing in BSP when language EN

    Hi!
    We just upgraded our backend system to Unicode and ERP2005. Now we just discovered that our BSP solutions running from the portal does not show any text for people logging on in other languanges than english or norwegian. We have only translated our texts to norwegian and earlier the other portal languages automatically got english texts. After the upgrade they don't get english - just blank. We suppose this is because now we have entered a lot of new languages in the backend system. Are there any customizing we can do to force the OTR system to use english when a text is not translated?
    Regards, Tine

    try the below steps. i had the same problem earlier and it got fixed after going through these steps.
    1) In Transaction 'SOTR_EDIT', check if the texts are in the requiredlanguage. You can display a complete overview by entering the 'SUS' character string in the 'alias' field. Select the 'BBP_SUS_UI' package (Display). You can identify the alias in the language 'German', for example, 'BBP_SUS_UI/NAME'. You can use this alias in Transaction 'SOTR_EDIT' to check whether texts for the desired language are incorrect or are missing.
    (2) Check whether refreshing the OTR temporary storage corrects the error. To do that, call Transaction '/$OTR'.
    (3) If the texts are still not displayed, see Note 797257.
    (4) If existing texts are translated directlyin the customer system (for example, because it is not possible to wait for the next Support Package), refer to Note 484888.
    regards,
    manasa

  • All of a sudden my text are arriving as downloads which i am unable to download . what is happening

    All of a sudden my text are arriving as downloads. and I can not download the downloads

    Open your messages app, click menu - settings. Should be an option in there to change if group sms comes in as mms.  Not certain this is the fix for you, but worth a try.

  • Print table and text area

    Hi,
    I use JFrame to get table at the top and text area at the bottom. How can I code a program to print them? (I use Jtable for data and Jtext for notes.
    Any one can help me please?
    Thank first.

    http://www.javaworld.com/javaworld/jw-10-2000/jw-1020-print.html

  • How to assign the output of a function to a text area: a PLSQL challenge

    I have a function that returns a PLSQL table of varchar4(4000)
    Here is its signature in a package:
    create or replace package researcher_request_pk
    is
    TYPE query_table_type is table of varchar2(4000) index by binary_integer;
    FUNCTION RequestSQL(P_RRQ_ID in number) return query_table_type;
    end;
    I use this to get around the 32k limit on clobs and varchar2 variables
    I want to assign the output of the function to a text area. I've tried the following PLSQL in a dynamic action and also as the source attribute of the Text Area but it doesn't populate the text area.
    Here is the code i'm using
    declare
    v_table researcher_request_pk.query_table_type;
    begin
    v_table:=researcher_request_pk.RequestSQL(:P64_RRQ_ID);
    for i in 1..v_table.count loop
    htp.prn(v_table(i));
    end loop;
    end;
    Any ideas on the correct syntax to do this?
    thanks in advance
    PaulP

    Thanks for your reply
    The function does populate the PLSQL table with data. e.g. If I place that exact code in a PLSQL region it generates the output on the screen with no problems. The problem is just generating the output into the text area.
    I want the text area to display the output of the PLSQL table (-a dynamic select SQL statement) which I then plan to execute to return records.( i.e. I've build my own runtime query builder)
    My plan is to allow the user to edit the SQL output first before sending the statement for execution.
    Funnily enough I do get the very first word of the first cell appearing, namely 'SELECT' but nothing else. Maybe the "||" that follows has something to do with the rest of it not appearing?? hmmm... will experiment more.
    thanks
    PaulP

  • Printing a text area?

    anyone know how to do this?

    Basically i have a text area contianing some data which is retrieved from an access database. Those data are display inside the text area. Now, what I want to do is print the text area contianing those data. Anyone has any suggestion.

Maybe you are looking for

  • How to get rid of a few cents (21 cents) on my itunes store to change country (from an american account to a german itunes gift card)

    I have an american itunes account that I've been using for years, but I don't live in america anymore therefor would like to change my account to a German account... But itunes doesn't let me do that until I get rid of my last 21 cents... Thanks

  • Black screen & all menu items grayed out -help!

    Sorry folks, total AE nube here, in over my head already. Having just purchased AE CS3 I'm completely adrift. I was in the process of looking at & changing preferences when shortly thereafter my screen went All black. A friend suggested it may have s

  • Old version of SAP Business Connector (4.6)

    Hi, where can I download old versions of SAP Business Connector? in BC section ([http://service.sap.com/sbc-download|http://service.sap.com/sbc-download]) there are only 4.7 and 4.8 installation package and upload. thanks Damiano

  • Line Graph - 0 quantity display

    All, The requirements for my line graph are as follows: -Map the data to the graph based on hours and quantity.  -When the quantity is 0 - break the line.   The line should not dip down to 0 and back up to the quantity.   The line should stop at that

  • Loading variable into URL

    I have a php file that holds a certain variable (the name of an image). Then I have a SWF that shows the location of the file and then shows the actual picture itself. Here is a snippet from the PHP file: quote: print("&location=$image"); Below is my