Skip to main content

This content has been archived and is no longer being updated. Links may not function; however, this content may be relevant to outdated versions of the product.

Support Article

No expandable icon for read-only text area fields

SA-17217

Summary



Read-only textareas are used in the application. Application is upgraded from PRPC 6.x to Pega 7.1.6. In PRPC 6.x, an icon was used for the textarea to expand-collapse the read-only text. However, in Pega 7, this option is unavailable. 


Error Messages



Not Applicable


Steps to Reproduce



1. Create a section with multiple textareas in it 
2. For textareas, have the edit options of that field to edit mode and make the field as read-only. You can now see the expand/collapsible icon with the read-only field. 
3. Have a button on that section such that on click of the button, section refresh is performed.

 

Root Cause



The reported issue occurs because there is large content to be refreshed. Once the DOM is loaded, then height of the textarea is set at the client side.

Resolution



Use the following local-change, in the UserWorkForm:

<script> 

if(pega && pega.u && pega.u.d) 
pega.u.d.attachOnload(autoTextAreaResize,true); 

function autoTextAreaResize(reloadElement){ 

    if(!(reloadElement && reloadElement.tagName)) reloadElement = document; 
    if(pega && pega.c && pega.c.ITextArea){ 
        var textAreaIComp = new pega.c.ITextArea(); 
        var textAreaElems = reloadElement.getElementsByTagName("textarea"); 

        for(var i=0;i<textAreaElems.length;i++){ 
            if(textAreaElems[i].getAttribute("data-ctl") && textAreaElems[i].getAttribute("data-ctl").indexOf("TextArea") > -1 && textAreaElems[i].className && textAreaElems[i].className.indexOf"TAEXP") >-1) 
            textAreaIComp.heightUpdate(textAreaElems[i],true,true); 
        
    


</script>

Suggest Edit

Published January 31, 2016 - Updated October 8, 2020

Did you find this content helpful? Yes No

Have a question? Get answers now.

Visit the Collaboration Center to ask questions, engage in discussions, share ideas, and help others.

We'd prefer it if you saw us at our best.

Pega Community has detected you are using a browser which may prevent you from experiencing the site as intended. To improve your experience, please update your browser.

Close Deprecation Notice
Contact us