Limit width of TitledPane in a ScrollBox

Hi
This is probably a beginnersquestion but i wasn't able to solve that by myself (and the Help of Google).
I have several TitledPanes in a VBox in a ScrollPane. The ScrollBox should only scroll in vertical direction. If the TitledPanes have a title which is longer than the width they increase the width of the ScrollPane/VBox. How can i limit the width of these so that no horizontal scrolling is possible?
Thanks
Fabian
    <?xml version="1.0" encoding="UTF-8"?>
    <?import java.lang.*?>
    <?import java.util.*?>
    <?import javafx.geometry.*?>
    <?import javafx.scene.control.*?>
    <?import javafx.scene.layout.*?>
    <?import javafx.scene.paint.*?>
    <AnchorPane id="AnchorPane" maxHeight="-Infinity" maxWidth="-Infinity" minHeight="-Infinity" minWidth="-Infinity" prefHeight="454.0" prefWidth="260.0" xmlns:fx="http://javafx.com/fxml">
      <children>
        <ScrollPane fitToWidth="true" hbarPolicy="AS_NEEDED" hmax="1.0" pannable="false" prefHeight="200.0" prefViewportWidth="100.0" prefWidth="200.0" vbarPolicy="AS_NEEDED" AnchorPane.bottomAnchor="0.0" AnchorPane.leftAnchor="0.0" AnchorPane.rightAnchor="0.0" AnchorPane.topAnchor="0.0">
          <content>
            <VBox maxWidth="200.0" prefHeight="500.0" prefWidth="480.0" spacing="5.0">
              <children>
                <TitledPane animated="false" maxWidth="200.0" text="Very long title, should be clipped. Very long title, should be clipped. " textOverrun="CLIP" wrapText="true">
                  <content>
                    <AnchorPane id="Content" minHeight="0.0" minWidth="0.0" prefHeight="500.0" prefWidth="200.0">
                      <children>
                        <ListView prefHeight="500.0" prefWidth="200.0" AnchorPane.bottomAnchor="0.0" AnchorPane.leftAnchor="0.0" AnchorPane.rightAnchor="0.0" AnchorPane.topAnchor="0.0" />
                      </children>
                    </AnchorPane>
                  </content>
                </TitledPane>
              </children>
              <padding>
                <Insets bottom="5.0" left="5.0" right="5.0" top="5.0" />
              </padding>
            </VBox>
          </content>
        </ScrollPane>
      </children>
    </AnchorPane>

Leaving aside the fact that one of my program always has Font as
"ControlFont" on the 1st call of GetCtrlAttribute/ATTR_TEXT_FONT,
consider the complete code below. Why does the value of font changes ?
When I create a meta font, I'm not asking it to assign it to some control!
#include <userint.h>
int main (int argc, char *argv[]) {
char font[255]="", Typeface[255];
int fontSize, bold, italics, underline, strikeout;
char Str[]="Some long string of text";
int Pnl, Ctrl, TextWidth=0, r;
Pnl = NewPanel (0, "Test", 20, 20, 200, 200);
Ctrl = NewCtrl (Pnl, CTRL_RING_LS, "Test", 0, 0);
InsertListItem (Pnl, Ctrl, -1, Str, 0);
GetCtrlAttribute (Pnl, Ctrl, ATTR_TEXT_POINT_SIZE, &fontSize);
GetCtrlAttribute (Pnl, Ctrl, ATTR_TEXT_BOLD, &bold);
GetCtrlAttribute (Pnl, Ctrl, ATTR_TEXT_ITALIC, &italics);
GetCtrlAttribute (Pnl, Ctrl, ATTR_TEXT_UNDERLINE, &underline);
GetCtrlAttribute (Pnl, Ctrl, ATTR_TEXT_STRIKEOUT, &strikeout);
GetFontTypefaceName (font, Typeface);
GetCtrlAttribute (Pnl, Ctrl, ATTR_TEXT_FONT, font);
r=CreateMetaFont ("Something", font, fontSize, bold, italics,
underline, strikeout);
r=GetTextDisplaySize(Str, "Something", 0, &TextWidth);
// font is now NIDialogMetaFont
GetCtrlAttribute (Pnl, Ctrl, ATTR_TEXT_FONT, font);
r=CreateMetaFont ("SomethingElse", font, fontSize, bold,
italics, underline, strikeout);
r=GetTextDisplaySize(Str, "SomethingElse", 0, &TextWidth);
// font is now Something
GetCtrlAttribute (Pnl, Ctrl, ATTR_TEXT_FONT, font);
r=CreateMetaFont ("YetAnotherThing", font, fontSize, bold,
italics, underline, strikeout);
r=GetTextDisplaySize(Str, "YetAnotherThing", 0, &TextWidth);
// font is now SomethingElse
return 0;
Guillaume Dargaud
http://www.gdargaud.net/

Similar Messages

  • Image select, resize and locally store (flex3 air example)

    Hi there,
    After a few days of struggling with images, resize functions
    and file dialog boxes I created a nice example application that
    shows how you can select an image, resize it and save the resized
    image in the application storing directory.
    I hope you can profit from it.
    Greets, jacob
    example code for flex 3 air.
    <?xml version="1.0" encoding="utf-8"?>
    <mx:WindowedApplication xmlns:mx="
    http://www.adobe.com/2006/mxml"
    layout="absolute">
    <mx:Script>
    <![CDATA[
    import mx.graphics.codec.PNGEncoder;
    public var imageFile:File;
    public var fileresultimage:Object;
    public var fileresultlabel:Object;
    // File.applicationStorageDirectory gets you to the local
    storage dir
    //On Windows, this is the "projectname" directory
    //(for example, C:\Documents and Settings\application
    data\projectname).
    // On Mac OS, it is /Users/userName/Documents.
    public var docsDir:File = File.applicationStorageDirectory;
    public function
    imageFileDialog(image:Object,label:Object):void
    fileresultimage=image;
    fileresultlabel=label;
    var imagesFilter:FileFilter =
    new FileFilter("Foto (*.jpg, *.gif, *.png)",
    "*.jpg;*.gif;*.png");
    if(imageFile==null)
    imageFile = new File();
    imageFile.addEventListener(Event.SELECT, imageSelected);
    imageFile.browseForOpen("Select an Image",[imagesFilter]);
    // if there is a file selected
    public function imageSelected(event:Event):void
    var newFile:File = event.target as File;
    //if there is a file object on the screen
    if(fileresultimage!=null)
    fileresultimage.source=imageFile.url;
    //if there is a label object on the screen
    if(fileresultlabel!=null)
    fileresultlabel.text=imageFile.url;
    if (newFile.exists==true)
    var loader:Loader = new Loader();
    loader.contentLoaderInfo.addEventListener(Event.COMPLETE,
    handleImageComplete);
    loader.load(new URLRequest(imageFile.url));
    // when load of the selected image is complete we save a
    smaller version of it.
    public function handleImageComplete(event:Event):void
    var loader:Loader = Loader(event.target.loader);
    // width and heigt of selected image
    var originalimgwidth:Number=event.target.width;
    var originalimgheight:Number=event.target.height;
    //put original image into bitmapdata
    var bitmapje:BitmapData;
    bitmapje=new BitmapData(originalimgwidth, originalimgheight,
    true, 0x00000000);
    //bitmapje.draw(loaderInfo.loader.content,null,null,null,null,true);//null
    object reference
    bitmapje.draw(loader.content,null,null,null,null,true);
    // call the resize function and give the original
    image,maxx,and maxy with it.
    var thumb:BitmapData=resizeimage(bitmapje,150,150);
    var newimagefile:File=new File();
    // T = Thumbnail
    // 1 = next id in the db
    // for now we use a random number
    var random:Number= Math.random();
    random = Math.ceil(random*100);// to get a positive number
    var filenameForSave:String="T"+random; //new filename;
    newimagefile=docsDir.resolvePath("Thumbs/" + filenameForSave
    + ".png"); //image path
    var stream:FileStream = new FileStream; // create new
    filestream
    stream.open(newimagefile, FileMode.WRITE); // open
    filestream
    var data:ByteArray = encodeToPng(thumb); // convert
    bitmapdata to a png bytearry
    stream.writeBytes(data, 0, data.length); // writing the
    image
    stream.close();
    // show the saved thumb
    savedthumb.source=newimagefile.nativePath;
    bitmapje=null;
    thumb=null;
    // resize function
    private function
    resizeimage(image:BitmapData,maxx:Number,maxy:Number):BitmapData
    var bmp:BitmapData =image;
    var true_width:Number = bmp.width;
    var true_height:Number = bmp.height;
    var resize:Boolean=false;
    if (true_width>maxx) resize=true;
    if (true_height>maxy) resize=true;
    if (resize==true)
    var width:Number=maxx;
    var height:Number = (width / true_width) * true_height;
    true_width=width;
    true_height=height;
    if (true_height>maxy)
    height=maxy;
    width = (height/true_height)*true_width;
    else
    width=true_width;
    height=true_height;
    else
    width=true_width;
    height=true_height;
    //new calculated width and heigt relative to the given maxx
    and maxy.
    width=Math.ceil(width);
    height=Math.ceil(height);
    //create a new image object with the calculated widht and
    height for the smaller image
    var mysmallimage:Image=new Image();
    mysmallimage.width=width;
    mysmallimage.height=height;
    //new matrix for smaller image
    var m : Matrix = new Matrix() ;
    //scale the matrix to the correct sizes.
    m.scale( mysmallimage.width / bmp.width, mysmallimage.height
    / bmp.height ) ;
    //draw the image into the image object
    mysmallimage.graphics.beginBitmapFill( bmp, m, false, true )
    mysmallimage.graphics.drawRect( 0, 0, mysmallimage.width,
    mysmallimage.height ) ;
    mysmallimage.graphics.endFill();
    //put the smaller image into bitmapdata so it can be
    returned.
    var littlebitmapdata:BitmapData=new
    BitmapData(mysmallimage.width,mysmallimage.height,true,0x00000000);
    littlebitmapdata.draw(mysmallimage);
    // set the temporary small image to null so the GC can
    remove it from the memmory.
    mysmallimage=null;
    bmp=null;
    //returning the small image.
    return littlebitmapdata;
    // encoder to png
    private function encodeToPng(bmd:BitmapData):ByteArray
    var png:PNGEncoder= new PNGEncoder();
    return png.encode(bmd);
    ]]>
    </mx:Script>
    <!--<mx:Image id="tempimage" x="404" y="36"
    complete="temploadcomplete()"/>-->
    <mx:Image id="myimg" x="10" y="55" width="314"
    height="227" verticalAlign="middle" horizontalAlign="center"/>
    <mx:TextInput id="imageurl" x="53" y="303" width="160"
    maxWidth="160"/>
    <mx:Button x="221" y="303" label="Bladeren"
    click="imageFileDialog(myimg,imageurl)"/>
    <mx:Image x="346" y="55" id="savedthumb"/>
    <mx:Text x="23" y="0" text="Original image with limit
    width and height to show it on the screen." height="47"
    width="177"/>
    <mx:Text x="346" y="0" text="Local stored thumbnail"/>
    </mx:WindowedApplication>
    To bad the attach code button still isn't fixed :(

    Hi there,
    Will you be able to provide the backend script for saving the
    file data?Will you be able to provide the backend script for saving
    the file data?
    This example is created for a desktop application. Saving the
    file is included in this example, it saves in the application
    storage directory.
    // File.applicationStorageDirectory gets you to the local
    storage dir
    //On Windows, this is the "projectname" directory
    //(for example, C:\Documents and Settings\application
    data\projectname).
    // On Mac OS, it is /Users/userName/Documents.
    If you attempt to use certain functionality in a website, you
    need other functionality for storing the image on the server. There
    are lots of examples on that one.. Perhaps i need it in the future.
    If i do i will post an example on the forum.
    Also, may I post your link to other forums, so that others may
    benefit?
    Sure you may post the example on other websites and forums.
    I found it difficult to find nice examples, so the more the
    better ;)
    Just put underneath the example something like:
    Created By: Jacob Hingst From Holland
    No copyright attached, so free for your use.

  • DATABASE_LINK with CURRENT_USER for user identified externally

    Hi,
    My database is in standard edition 10.2.0.5 on windows.
    I have a user OPS$xxx identified externally.
    the connection with this user "sqlplus /@service_name" is ok.
    A database link has been created with these options :
    select * from dba_db_links;
    OWNER DB_LINK USERNAME HOST CREATED
    OPS$xxx TEST_DB CURRENT_USER SERVICE_NAME 19/10/11
    This database link references the same database
    ( it is an external application which has created it).
    if we test with sqlplus, we have :
    sqlplus /@service_nameSQL*Plus: Release 10.2.0.5.0 Production on Fri. Oct. 21 09:58:40 201
    Copyright (c) 1982, 2010, Oracle. All rights reserved.
    Connected to :
    SQLPLUS> select count(*) from user_tables@TEST_DB;
    ORA-1017: invalid username/password; logon denied
    So is it possible to use this type of database link ? And if it is, how can you do that ?
    Or only "user identified globally " can use database links with current_user...
    Thank you in advance for your help.
    Best regards
    Marie

    A connected user link should work per the reference:
    The ability to use a connected user database link depends on several factors, chief among them whether the
    user is authenticated by the database using a password, or externally authenticated by the operating system or
    a network authentication  service. If the user is externally  authenticated, then the ability to use a connected user link
    also depends on whether the remote database accepts remote authentication of users, which is set by the
    REMOTE_OS_AUTHENT initialization parameter.HTH -- Mark D Powell --
    insert line breaks to try to limit width
    Edited by: Mark D Powell on Oct 21, 2011 9:17 AM
    Edited by: Mark D Powell on Oct 21, 2011 9:18 AM

  • Adjusting max import size: total pixel size VS 10000x10000 max (for panoramas)

    1.1 has been an amazing update. However, I found out there is a 10,000 pixel limit width and height. While I understand the reason for this (a 10,000 x 10,000 pixel image is huge) I create a lot of panoramics. Most are imported, but some exceed the 10,000 pixel limit on one side only (example: width) while the hight is a mere ~1800 pixels.
    Is there a way to adjust the import function so that it can import images that might be panoramics at 10000-20000 pixels but not as tall, so that I do not have to keep copies of my originals and crop down to 10,000 on one side?

    <[email protected]> wrote in message <br />news:[email protected]..<br />> Robert,<br />><br />> This was a perfectly logical decision by Thomas and the team. There simply <br />> aren't any cameras that produce RAWs with pixel dimensions over 10,000 <br />> pixels. The trouble came when they gave Camera *RAW* the ability to <br />> process non-RAW images, and then incorporated that capability into <br />> Lightroom. The issue is the obviously-needed change to the pixel <br />> dimensions was harder to implement than the change to processing non-RAW <br />> images, and/or there wasn't time to do both.<br /><br /><br />That is suck a load of bull. There are plenty of digital backs that do and <br />in fact last you a company release a monster of a digital panorama camera <br />that does. No the plain simple fact is they did use their brains when <br />deciding that and they can't say well we just didn't figure it would be a <br />problem. They were blasted for years because of the size limit in Photoshop <br />that clearly indicates that photographers and others do work on images <br />larger than 10,000 pixels in size.<br /><br />Robert

  • Clear white space under layer divs

    Is there a way to clear the white space under layer divs?  See below.  There are three layers, and then another div tag below that that has "Text".  The red area is pointing to the white space I need to get rid of.
    Here is the code:
    <html>
    <head>
    <style type="text/css">
      div.layer1 {
      background-color:lime;
      width:150px;
      height:150px;
      position:relative;
      top:10px;
      left:80px;
      z-index:2
      div.layer2 {
      background-color:yellow;
      width:100px;
      height:100px;
      position:relative;
      top:-60px;
      left:35px;
      z-index:1
      div.layer3 {
      background-color:orange;
      width:120px;
      height:120px;
      position:relative;
      top:-180px;
      left:175px;
      z-index:3
    </style>
    </head>
    <body>
    <div class="layer1">
      Layer One<br>
      Layer One<br>
      Layer One<br>
      Layer One<br>
      Layer One<br>
    </div>
    <div class="layer2">
      Layer Two<br>
      Layer Two<br>
      Layer Two<br>
      Layer Two<br>
      Layer Two<br>
    </div>
    <div class="layer3">
      Layer Three<br>
      Layer Three<br>
      Layer Three<br>
      Layer Three<br>
      Layer Three<br>
    </div>
    <div> Text </div>
    </body>
    </html>

    There is really no such thing as a "layer div". Old versions of Dreamweaver used the name "layer" to mean an absolutely positioned div.
    What you have done is to create relatively positioned divs. A relatively positioned element is moved from its normal place in the flow of the document without affecting other elements.
    Your three divs have a combined height of 370px. As a result, your text is placed that far down the page.
    If you wanted to move it up, you would need to give the Text div an ID and a negative top margin of -170px.
    #textdiv {
        margin-top: -170px;

  • Disallowing panel resize below minimum?

    Is there a way to forbid active resizing of a panel below minimums?  I've read this post and looked up example projects, but they mostly deal with the EVENT_PANEL_SIZE event (after the resize is done).  
    I'd like to utilize the EVENT_PANEL_SIZING event which is while the resizing is happening.  The idea is this:
    As you click and drag the size of a panel, I would like the panel to stop resizing with your mouse cursor once the minimum height and width dimensions are reached.  This seams like it should be easy.  But I can't quite crack it.
    Solved!
    Go to Solution.

    Yes, there's a trick to EVENT_PANEL_SIZING to constrain sizes (I think it's in the list of examples, otherwise search for it).
    But personally I find it easier to use EVENT_PANEL_SIZE and GetPanelAttribute(...ATTR_WIDTH) and "if (Width<Limit) Width=Limit" before doing the disposition of my controls. This way you avoid errors (negative size or position controls) while still allowing the user to give the panel a tiny size to get it 'out of the way'. There's no real drawback to this. I think.

  • Project presets width limit?

    I'm working on a special venue show and the screen width is 7552 pixels wide. I can't seem to input that width into Motion presets and I suspect there is a limit.
    If so, is there a script or something I can change the values like you can in Shake?

    hi
    welcome to the posts.
    I make TV commercials that are 768 pixels wide, but the TV I watch it on is way bigger than that. The point I'm making is of course that it is not necessarily the display screen that determines the size of your project. Further what kind of media will it be played from. If for example it were to played from a DVD player than there would be no point making a project at that huge size since it would be down sized to TV ratio anyway. Also working on a project canvas of that size, even if it were possible in Motion, would more than likely be totally unworkable.
    hope this helps
    adam

  • A SharePoint theme to limit the width of the page to 960px (without limiting width of top ribbon and top navigation)?

    I can reduce the width by some CSS inside the page CEWP or Master Page that's fine.
    BUT
    I need a SharePoint theme - which simply reduces the width of the page content to 960px. (Without affecting the top ribbon and top navigation which should stay as they are).
    Any clue how to do that please? Any sample theme?
    Thanks.

    Not sure what you are asking here exactly. By theme, do you mean a design package (masterpage + css)?
    Nikolas Charlebois-Laprade Microsoft Certified Professional & Software Engineer http://nikcharlebois.com

  • Is there a limit to stage width?

    Whenever I try to set stage width to anything larger than
    1000px, Flash doesn't actually cap the number to 1000 but creates a
    file that's significantly less than a target width. I traced the
    Stage.width and what's really bizzare is that numbers are not
    consistent across projects and even change after restarting!!! Like
    I would try to set the width to 1200, 1500 or 2000 px in one
    project and the traced value would always be 1023 but 1173 in
    another. Then after restarting, 1023 would change to 1025 and 1173
    to 1186!!!. Am I going crazy?

    visitor13 wrote:
    > Whenever I try to set stage width to anything larger
    than 1000px, Flash doesn't
    > actually cap the number to 1000 but creates a file
    that's significantly less
    > than a target width. I traced the Stage.width and what's
    really bizzare is that
    > numbers are not consistent across projects and even
    change after restarting!!!
    > Like I would try to set the width to 1200, 1500 or 2000
    px in one project and
    > the traced value would always be 1023 but 1173 in
    another. Then after
    > restarting, 1023 would change to 1025 and 1173 to
    1186!!!. Am I going crazy?
    2880x2880
    Best Regards
    Urami
    <urami>
    If you want to mail me - DO NOT LAUGH AT MY ADDRESS
    </urami>

  • How to limit the size of the main window width according to the line items?

    Hi,
           In my requirement,I created one page with main window....Suppose say main window can accomodate 40 line items.
          I am getting 5 pages data.And in my last page ( ie 5'th page ) I will have only 20 line items.But for the remaing 20 line items,
         it showing empty area .I created widow with borders and one vertical line between the columns.....I created two columns.
         Please I dont want any horizontal lines between the line items but I created one vertical line between the columns..
           Any right help would be appreciated.
    Thanks,
    Chinnu
    Moderator message - Welcome to SCN.
    But duplicate posting is not allowed. If you have information you want to add to your post, you can edit it or post a follow up - Thread locked
    Edited by: Rob Burbank on Feb 19, 2010 12:17 PM

    One way is to periodically (say every week) create a new file to store the actions and then, when the space taken up by all the files is too large, delete the oldest one.
    You can also have your application periodically (say the first time you write to the file on any calendar day) check the size of the file and, when it gets too big, copy all of the actions in the file after a given time (presumably there is an associated timestamp with each action) to a new file. Then delete the old file.

  • Cookie - Bad Request - Size of a request header field exceeds server limit -

    We are on cq5.5. We see this error intermittently. What is the best way to fix this? Cookie size seems to be adding to the issue.
    Bad Request
    Your browser sent a request that this server could not understand.
    Size of a request header field exceeds server limit.
    Cookie: cq-mrss=path%3D%252Fcontent%252Fdam%26p.limit%3D-1%26mainasset%3Dtrue%26type%3Ddam%3AAsse t; __unam=acfbce4-13b8ffd6084-6070cfe6-4; __utma=16528299.1850197993.1355330446.1361568697.1362109625.3; __utmz=16528299.1355330446.1.1.utmcsr=(direct)|utmccn=(direct)|utmcmd=(none); REM_ME=1004; SessionPersistence-author-lx_qa_author2=CLIENTCONTEXT%3A%3DvisitorId%3Danonymous%2Cvisito rId_xss%3Danonymous%7CPROFILEDATA%3A%3DauthorizableId%3Danonymous%2CformattedName%3DAnonym ous%20Surfer%2Cpath%3D%2Fhome%2Fusers%2Fa%2Fanonymous%2Cavatar%3D%2Fetc%2Fdesigns%2Fdefaul t%2Fimages%2Fcollab%2Favatar.png%2Cage%3D%2Cage_xss%3D%7CTAGCLOUD%3A%3Dtopic%3Aworkflow%3D 14%2Cindustry%3Aprocess_management%3D2%2Ctopic%3Aprocess_mining%3D3%2Ctopic%3Aprocess_docu mentation%3D1%2Ctopic%3Aintelligent_capture%3D5%2Cindustry%3Acapture%3D5%2Ctopic%3Adocumen t_imaging%3D2%2Ctopic%3Adistributed_intelligent_capture%3D2%2Ctopic%3Adocument_output_mana gement%3D4%2Cindustry%3Acontent_management%3D14%2Cindustry%3Asoftware_solutions_hardware%3 D4%2Cindustry%3Adevice_management%3D2%2Ctopic%3Ahelp_desk_services%3D2%2Cindustry%3Aintera ct%3D15%2Ctopic%3Asecure_content_monitor%3D2%2Ctopic%3Aelectronic_forms%3D2%2Ctopic%3Ainte lligent_forms%3D2%2Ctopic%3Adocument_accounting%3D2%2Ctopic%3Aerp_output_management%3D2%2C topic%3Aprint_release%3D2%2Cindustry%3Aoutput_management%3D4%2Ctopic%3Aerp_printing%3D4%2C topic%3Aenterprise_search%3D4%2Ctopic%3Amicrosoft_sharepoint%3D6%2Ctopic%3Adocument_filter s%3D4%2Cindustry%3Asearch%3D4%2Ctopic%3Ahuman_services_case_management%3D2%2Cindustry%3Aca se_management%3D2%2Cindustry%3Aimprove_business_processes%3D6%2Ctopic%3Abusiness_process_m odeling%3D1%2Ctopic%3Alawson%3D1%2Ctopic%3Aapplication_integration%3D8%2Cindustry%3Asoluti on%3D4%2Ctopic%3Amicrosoft_dynamics_crm%3D2%2Cindustry%3Ahealthcare%3D13%2Cindustry%3Areta il%3D8%2Cindustry%3Abanking%3D3%2Cindustry%3Aincrease_efficiency%3D7%2Cindustry%3Agovernme nt%3D8%2Ctopic%3Amicrosoft_outlook%3D2%2Ctopic%3Aesri%3D2%2Ctopic%3Ajd_edwards%3D2%2Ctopic %3Asap%3D1%2Cindustry%3Adrive_business_growth%3D1%2Cindustry%3Abusiness_challenges%3D6%2Ci ndustry%3Aconnect_distributed_workforce%3D1%2Ctype%3Alanding_page%3D2%2Ctopic%3Aconsulting _services%3D2%2Ctopic%3Aretail_pharmacy%3D2%2Cindustry%3Aindustry_solutions%3D5%2Ctopic%3A health_information_management%3D3%2Ctopic%3Apatient_scheduling%3D3%2Ctopic%3Aclinical_depa rtment_solutions%3D3%2Ctopic%3Aclinical_hit_integration%3D3%2Ctopic%3Apatient_admissions_r egistration%3D3%2Ctopic%3Ahealthcare_forms_management%3D3%2Ctopic%3Apatient_access%3D3%2Ct opic%3Aenterprise_print_management_software%3D2%2Ctopic%3Aprint_queue_management%3D2%2Ctop ic%3Aadvanced_print_management%3D2%2Ctopic%3Aemployee_onboarding%3D3%2Ctopic%3Ahuman_resou rces%3D1%2Cindustry%3Ahuman_resources%3D3%2Ctopic%3Aemployee_recruitment%3D1%2Cindustry%3A manufacturing%3D2%2Ctopic%3Aplatform_integration%3D1%2Ctopic%3Awealth_management%3D2%2Cind ustry%3Afinancial_services%3D2%2Ctopic%3Aaccount_opening%3D2%2Ctopic%3Acompliance%3D1%2Cin dustry%3Acompliance%3D1%2Ctopic%3Abusiness_operations_solutions_for_banking%3D2%2Ctopic%3A retail_delivery%3D1%2Ctopic%3Aloan_processing%3D1%2Ctopic%3Aon_demand_negotiable_documents %3D1%2Ctopic%3Anew_account_openings%3D1%2Ctopic%3Aon_demand_forms_customer_communications% 3D1%2Cindustry%3Ainsurance%3D1%2Ctopic%3Amicr_printing%3D1%2Ctopic%3Abank_branch_capture%3 D1%2Ctopic%3Aagency_capture%3D1%7C; ys-cq-damadmin-tree=o%3Awidth%3Dn%253A240%5EselectedPath%3Ds%253A/content/dam; ys-cq-damadmin-grid-assets=o%3Acolumns%3Da%253Ao%25253Aid%25253Ds%2525253Anumberer%25255E width%25253Dn%2525253A23%25255Esortable%25253Db%2525253A1%255Eo%25253Aid%25253Ds%2525253At humbnail%25255Ewidth%25253Dn%2525253A45%25255Esortable%25253Db%2525253A1%255Eo%25253Aid%25 253Ds%2525253Atitle%25255Ewidth%25253Dn%2525253A78%25255Ehidden%25253Db%2525253A1%25255Eso rtable%25253Db%2525253A1%255Eo%25253Aid%25253Ds%2525253Aname%25255Ewidth%25253Dn%2525253A3 37%25255Esortable%25253Db%2525253A1%255Eo%25253Aid%25253Ds%2525253Apublished%25255Ewidth%2 5253Dn%2525253A37%25255Esortable%25253Db%2525253A1%255Eo%25253Aid%25253Ds%2525253Amodified %25255Ewidth%25253Dn%2525253A78%25255Esortable%25253Db%2525253A1%255Eo%25253Aid%25253Ds%25 25253Ascene7Status%25255Ewidth%25253Dn%2525253A78%25255Ehidden%25253Db%2525253A1%25255Esor table%25253Db%2525253A1%255Eo%25253Aid%25253Ds%2525253Astatus%25255Ewidth%25253Dn%2525253A 71%25255Esortable%25253Db%2525253A1%255Eo%25253Aid%25253Dn%2525253A8%25255Ewidth%25253Dn%2 525253A78%25255Esortable%25253Db%2525253A1%255Eo%25253Aid%25253Ds%2525253Aworkflow%25255Ew idth%25253Dn%2525253A78%25255Ehidden%25253Db%2525253A1%25255Esortable%25253Db%2525253A1%25 5Eo%25253Aid%25253Ds%2525253Awidth%25255Ewidth%25253Dn%2525253A37%25255Esortable%25253Db%2 525253A1%255Eo%25253Aid%25253Ds%2525253Aheight%25255Ewidth%25253Dn%2525253A37%25255Esortab le%25253Db%2525253A1%255Eo%25253Aid%25253Ds%2525253Asize%25255Ewidth%25253Dn%2525253A37%25 255Esortable%25253Db%2525253A1%255Eo%25253Aid%25253Ds%2525253Areferences%25255Ewidth%25253 Dn%2525253A199%25255Esortable%25253Db%2525253A1%5Esort%3Do%253Afield%253Ds%25253Alabel%255 Edirection%253Ds%25253AASC; amlbcookie=04; ObLK=0x82abacf3a5e3b1e2|0x1cf34305ac210c7e9b2b07e3725392e2; iPlanetDirectoryPro=AQIC5wM2LY4Sfcw0UQ2MST5NlqDAsUi2dscer0wO7VMy9pE.*AAJTSQACMDYAAlMxAAIw NA..*; renderid=rend01; login-token=c9c0d027-c5f9-4e5a-9a90-09d1cf21cfd2%3a0279e369-1689-433c-80ef-d8411040efe5_6 15c2fd1eba8fd42%3acrx.default; ys-cq-siteadmin-grid-pages=o%3Acolumns%3Da%253Ao%25253Aid%25253Ds%2525253Anumberer%25255E width%25253Dn%2525253A23%25255Esortable%25253Db%2525253A1%255Eo%25253Aid%25253Ds%2525253At humbnail%25255Ewidth%25253Dn%2525253A50%25255Ehidden%25253Db%2525253A1%25255Esortable%2525 3Db%2525253A1%255Eo%25253Aid%25253Ds%2525253Atitle%25255Ewidth%25253Dn%2525253A386%25255Es ortable%25253Db%2525253A1%255Eo%25253Aid%25253Ds%2525253Aname%25255Ewidth%25253Dn%2525253A 148%25255Esortable%25253Db%2525253A1%255Eo%25253Aid%25253Ds%2525253Apublished%25255Ewidth% 25253Dn%2525253A25%25255Esortable%25253Db%2525253A1%255Eo%25253Aid%25253Ds%2525253Amodifie d%25255Ewidth%25253Dn%2525253A86%25255Esortable%25253Db%2525253A1%255Eo%25253Aid%25253Ds%2 525253Ascene7Status%25255Ewidth%25253Dn%2525253A86%25255Ehidden%25253Db%2525253A1%25255Eso rtable%25253Db%2525253A1%255Eo%25253Aid%25253Ds%2525253Astatus%25255Ewidth%25253Dn%2525253 A76%25255Esortable%25253Db%2525253A1%255Eo%25253Aid%25253Ds%2525253Aimpressions%25255Ewidt h%25253Dn%2525253A86%25255Esortable%25253Db%2525253A1%255Eo%25253Aid%25253Ds%2525253Atempl ate%25255Ewidth%25253Dn%2525253A86%25255Esortable%25253Db%2525253A1%255Eo%25253Aid%25253Ds %2525253Aworkflow%25255Ewidth%25253Dn%2525253A86%25255Ehidden%25253Db%2525253A1%25255Esort able%25253Db%2525253A1%255Eo%25253Aid%25253Ds%2525253Alocked%25255Ewidth%25253Dn%2525253A8 6%25255Ehidden%25253Db%2525253A1%25255Esortable%25253Db%2525253A1%255Eo%25253Aid%25253Ds%2 525253AliveCopyStatus%25255Ewidth%25253Dn%2525253A86%25255Ehidden%25253Db%2525253A1%25255E sortable%25253Db%2525253A1%5Esort%3Do%253Afield%253Ds%25253Atitle%255Edirection%253Ds%2525 3AASC; ys-cq-siteadmin-tree=o%3Awidth%3Dn%253A306%5EselectedPath%3Ds%253A/content/homesite/en-US /insights/video_unum-group-accelerates-workflows-with-solutions-; ys-cq-cf-clipboard=o%3Acollapsed%3Db%253A1; ys-cq-cf-tabpanel=o%3AactiveTab%3Ds%253AcfTab-Images-QueryBox; JSESSIONID=ad311ac3-7c24-4e62-ae8a-0ebacd8e8188; SessionPersistence-author-lx_qa_author1=CLIENTCONTEXT%3A%3DvisitorId%3Danonymous%2Cvisito rId_xss%3Danonymous%7CPROFILEDATA%3A%3DauthorizableId%3Danonymous%2CformattedName%3DAnonym ous%20Surfer%2Cpath%3D%2Fhome%2Fusers%2Fa%2Fanonymous%2Cavatar%3D%2Fetc%2Fdesigns%2Fdefaul t%2Fimages%2Fcollab%2Favatar.png%2Cage%3D%2Cage_xss%3D%7CGEOLOCATION%3A%3D%7CTAGCLOUD%3A%3 Dindustry%3Aconnect_distributed_workforce%3D1%2Cindustry%3Abusiness_challenges%3D1%2Cindus try%3Acontent_management%3D1%2Cindustry%3Ahealthcare%3D1%2Ctopic%3Afinance%3D1%2Ctopic%3Ap rocurement_processing%3D1%2Cindustry%3Afinancial_services%3D2%2Cindustry%3Ainsurance%3D2%2 Cindustry%3Aindustry_solutions%3D2%2Ctopic%3Aagency_capture%3D2%7C; s_cc=true; s_sq=lxmtest%3D%2526pid%253Dinsights%25253Avideo_unum-group-accelerates-workflows-with-so luti

    Hi EbodaWill,
    File daycare for fp 2324 where in you can configure & allow you to increase the request header size and avoid the bad request error OR for a package that improves client side persistence & does not use cookies.
    Thanks,
    Sham

  • PL/SQL Limit When Dealing with a CLOB?

    Greetings,
    I am constructing HTML into a CLOB in a PL/SQL routine which I later display in an APEX application. The HTML can get large, because I am constructing a grid over an image, and the grid can have a lot of columns and rows which means there can be a lot of <area shape="rect" HTML lines. I did a search and found that another person had the same problem, because there is a 32K limit with HTML contents. That was very helpful.
    Thing is - I have another (maybe similar) issue. The procedure that constructs the HTML gets a numeric error when the number of cells in the grid reach a certain point. I checked and this happens when the CLOB in the procedure gets close to 32K. Sorry, it difficult to know exactly when it fails, but the most I have been able to put into the CLOB is 32,852 characters. Therefore my question - is there in internal limit in PL/SQL (or some other Oracle aspect) that is limited to 32K? The coluimn in the table that contains the HTML is a CLOB and the variable in the PL/SQL that the HTML is parsed into is a CLOB, so I thought I was good to go since the CLOB limit is 4GB. But, it looks like I may be missing something.
    We are running Oracle 11i and APEX 4.0.2.00.07. If other system info is needed let me know and I will get that for you.
    Also, if it helps. The code from the procedure is copied below. v_html is the variable that holds the HTML. The table column for the HTML is imagemap_html. Both v_html and imagemap_html are defined as CLOB's.
    Thanks, Tony
    = = = = = = =
    create or replace
    procedure create_grid (p_action IN VARCHAR2) as
        v_wcount integer := 0;   
        v_wmax integer := 20;
        v_width integer := 720;
        v_w1 integer := 0;
        v_w2 integer := 0;
        v_winc integer := 0;
        v_wstart integer := 0;
        v_wend integer := 0;   
        v_hcount integer := 0;
        v_hmax integer := 10;
        v_height integer := 520;
        v_h1 integer := 0;
        v_h2 integer := 0;
        v_hinc integer := 0;
        v_hstart integer := 0;
        v_hend integer := 0;   
        v_cell_row integer := 0;
        v_cell_col integer := 0;
        v_cell_title varchar2(10) := NULL;
        v_whitespace varchar2(10) := NULL;
        v_url_1 varchar2(100) := NULL;
        v_url_2 varchar2(100) := NULL;
        v_url_3 varchar2(100) := NULL;
        v_brand_id integer := 0;
        v_division_id integer := 0;
        v_plant_id integer := 0;
        v_model_id integer := 0;
        v_acc_group integer := 0;
        v_accessory integer := 0;
        v_acc_grp integer := 0;
        v_acc integer := 0;
        v_station_id integer := 0;
        v_substation_id integer := 0;     
        v_image_id integer := 0;
        v_id integer := 0;  
        v_html clob;
      begin
      v_brand_id := v('P4_BRAND_ID');
      v_division_id :=v('P4_DIVISION_ID');
      v_plant_id := v('P4_PLANT_ID');
      v_model_id := v('P4_MODEL_ID');
      v_acc_group := v('P4_ACC_GROUP');
      v_accessory := v('P4_ACCESSORY');
      v_station_id := v('P4_STATION_ID');
      v_substation_id := v('P4_SUBSTATION_ID');
      v_image_id := v('P4_IMAGES_ID');
      v_wmax := v('P4_COLUMNS');
      v_hmax := v('P4_ROWS');
      v_wstart := v('P4_XSTART');
      v_hstart := v('P4_YSTART');
      v_wend := v('P4_XEND');
      v_hend := v('P4_YEND'); 
      v_whitespace := v('P4_WHITESPACE');
    if p_action = 'INSERT' then
    -- insert the row now, so that the cell table rows can be inserted with the correct FK 
    insert into IM_TEMPLATE_DRAFT
    (plant_id, brand_id, division_id, model_id, acc_group, accessory, station_id,
    substation_id, image_id)
    values
    (v_plant_id,v_brand_id,v_division_id,v_model_id,v_acc_group,v_accessory,v_station_id,v_substation_id,v_image_id);
    commit;
    end if;
    -- get the id of the row that was just inserted
    select header_id into v_id from  IM_TEMPLATE_DRAFT where
    plant_id=v_plant_id and brand_id=v_brand_id and division_id=v_division_id and
    model_id=v_model_id and acc_group=v_acc_group and accessory=v_accessory and
    station_id=v_station_id and substation_id=v_substation_id and image_id=v_image_id;
    -- remove all the cell rows for the draft, they will be created anew
    delete from qcis_draft_cells where draft_id = v_id;
      BEGIN
      select pixel_width, pixel_height into v_width, v_height from images
      where images_id = v_image_id;
      EXCEPTION
        WHEN NO_DATA_FOUND THEN
        v_height := 720;
        v_width := 520;
      END;
    -- the first part of the href for the image is stored in the keyword table and put into v_url_1 for use later
      BEGIN
      select keyword_value into v_url_1 from qcis_keywords
      where keyword_type = 'Control' and keyword_code = 'URL_PATH';
      EXCEPTION
        WHEN NO_DATA_FOUND THEN
        v_url_1 := 'http://xxx.xxx.com:8000/apex40/f?p=';
      END; 
    -- construct the first three lines of the div tag 
      v_html := '<div style="text-align:center; width:'||v_width||'px; margin-left:auto; margin-right:auto;">';
      v_html := v_html || chr(10) || '<img id="ImageMap" src="download_image?p_id='||v_image_id||'" usemap="#ImageMap" border="0" width="'||v_width||'" height="'||v_height||'" alt="" />';
      v_html := v_html || chr(10) || '<map id="_ImageMap" name="ImageMap">';
    -- subtract the ending inset amounts from the image dimensions
      v_width := v_width - v_wend;
      v_height := v_height - v_hend;
    -- calculate the increment for each cell and subtract the starting inset amounts
      v_winc := floor((v_width - v_wstart) / v_wmax);
      v_hinc := floor((v_height - v_hstart) / v_hmax);
    -- there are two main loops, one for the columns, one for the rows
    -- one loop is inside the other, which helps to build the cells in logical order and helps with the naming of the cells 
      loop
    -- if this is the first row (count = 0) and they have inset values we need to adust the first x y values to something other than zero 
    if ((v_wstart != 0) and (v_wcount = 0)) then v_w1 := v_wstart; end if;
    if ((v_hstart != 0) and (v_hcount = 0)) then v_h1 := v_hstart; end if;
    if ((v_wstart != 0) and (v_wcount = 0)) then v_w2 := v_wstart; end if;
    if ((v_hstart != 0) and (v_hcount = 0)) then v_h2 := v_hstart; end if;
    v_wcount := v_wcount + 1;
    v_w2 := v_w2 + v_winc;
    -- checking to see if this is the last row and whether they want the grid to go to the end or have all cells the same size which may leave whitespace
             if (v_wcount = v_wmax) and (v_whitespace = 'Y') then v_w2 := v_width - 2; end if;
      v_cell_row := 0;
      v_cell_col := v_cell_col +1;
             loop
             v_hcount := v_hcount + 1;           
             v_h2 := v_h2 + v_hinc;
    -- checking to see if this is the last row and whether they want the grid to go to the end or have all cells the same size which may leave whitespace
                    if (v_hcount = v_hmax) and (v_whitespace = 'Y') then v_h2 := v_height - 2; end if;
             v_cell_row := v_cell_row + 1;
             -- put it all together and construct the line for the area shape tag
             v_html := v_html || chr(10) || '<area shape="rect" coords="'
             ||v_w1||','||v_h1||','||v_w2||','||v_h2||
             '" href="'||v_url_1|| '" alt="'||v_cell_col||'-'||v_cell_row||'" title="'||v_cell_col||'-'||v_cell_row||'"    />';
             v_cell_title := v_cell_col||'-'||v_cell_row;
                insert into DRAFT_CELLS (DRAFT_ID, CELL_TITLE) values(v_id, v_cell_title);          
             v_h1 := v_h1 + v_hinc;
                exit when v_hcount = v_hmax;
            end loop;
      v_hcount := 0;
      v_h1 := 0;
      v_h2 := 0;
      v_w1 := v_w1 + v_winc;
         exit when v_wcount = v_wmax;     
      end loop;
      v_html := v_html || chr(10) || '</div>';
    update IM_TEMPLATE_DRAFT set imagemap_html = v_html
    where header_id = v_id;  
    END create_grid;Edited by: cloaked on Nov 7, 2011 4:45 AM

    For "Application Express 4.2.1.00.08" i created such good solution.
    I downloaded freeware plugin "Enkitec Clob Load Plug-in Version: 1.0.0 - APEX Version: 4.2.0" from there:
    http://www.enkitec.com/products/plugins/clob-load/help
    Then i followed plugin installation steps and created a APEX page where i added an item of type "Rich Text Editor".
    I found the plugin crashes when my database CLOB field is empty, also crashed when i tried to save down empty value to database.
    I changed Plugin code a little, and now everything works as needed, i can save down larga data, and also empty data.
    1. In Apex open plugin "Enkitec CLOB Load".
    2. Navigate to "Source-->PL/SQL Code" where is text area with plugin source code.
    3. there you have such code:
    FUNCTION enkitec_clob_load_render (
       p_dynamic_action IN APEX_PLUGIN.T_DYNAMIC_ACTION,
       p_plugin         IN APEX_PLUGIN.T_PLUGIN
       RETURN APEX_PLUGIN.T_DYNAMIC_ACTION_RENDER_RESULT
    IS
       l_retval           APEX_PLUGIN.T_DYNAMIC_ACTION_RENDER_RESULT;
       l_show_modal       VARCHAR2(1) := p_plugin.attribute_01;
       l_dialog_title     VARCHAR2(4000) := NVL(p_plugin.attribute_02, 'Please wait...');
       l_loading_img_type VARCHAR2(30) := p_plugin.attribute_03;
       l_loading_img_c    VARCHAR2(4000) := p_plugin.attribute_04;
       l_action           VARCHAR2(10) := NVL(p_dynamic_action.attribute_01, 'RENDER');
       l_change_only      VARCHAR2(1) := NVL(p_dynamic_action.attribute_06, 'Y');
       l_make_blocking    VARCHAR2(1) := NVL(p_dynamic_action.attribute_07, 'Y');
       l_loading_img_src  VARCHAR2(32767);
       l_crlf             VARCHAR2(2) := CHR(13)||CHR(10);
       l_js_function      VARCHAR2(32767);
       l_onload_code      VARCHAR2(32767);
    BEGIN
       IF apex_application.g_debug
       THEN
          apex_plugin_util.debug_dynamic_action(
             p_plugin         => p_plugin,
             p_dynamic_action => p_dynamic_action
       END IF;
       IF l_loading_img_type = 'DEFAULT'
       THEN
          l_loading_img_src := p_plugin.file_prefix || 'enkitec-loading.gif';
       ELSE
          l_loading_img_src := REPLACE(l_loading_img_c, '#IMAGE_PREFIX#', apex_application.g_image_prefix);
          l_loading_img_src := REPLACE(l_loading_img_src, '#PLUGIN_PREFIX#', p_plugin.file_prefix);
       END IF;
       apex_css.add(
          p_css => '.clob-load-dialog .ui-dialog-titlebar-close {display: none;}',
          p_key => 'clob-load-hide-modal-close'
       apex_javascript.add_library(
          p_name      => 'enkitec-clob-load.min',
          p_directory => p_plugin.file_prefix,
          p_version   => NULL
       l_onload_code :=
          'apex.jQuery(document).clob_load({'|| l_crlf ||
          '   showModal: "' || l_show_modal ||'",'|| l_crlf ||
          '   dialogTitle: "' || l_dialog_title ||'",'|| l_crlf ||
          '   loadingImageSrc: "' || l_loading_img_src ||'",'|| l_crlf ||
          '   pluginFilePrefix: "' || p_plugin.file_prefix || '",' || l_crlf ||
          '   apexImagePrefix: "' || apex_application.g_image_prefix || ',"' || l_crlf ||
       apex_javascript.add_onload_code(
          p_code => l_onload_code
       IF l_action = 'RENDER'
       THEN
          l_js_function :=
             'function(){'|| l_crlf ||
             '   apex.jQuery(document).clob_load("renderClob", {' || l_crlf ||
             '      $elmt: this.affectedElements.eq(0),' || l_crlf ||
             '      ajaxIdentifier: "' || apex_plugin.get_ajax_identifier() || '"' || l_crlf ||
             '   });'|| l_crlf ||
       ELSE
          l_js_function :=
             'function(){'|| l_crlf ||
             '   apex.jQuery(document).clob_load("submitClob", {' || l_crlf ||
             '      $elmt: this.affectedElements.eq(0),' || l_crlf ||
             '      ajaxIdentifier: "' || apex_plugin.get_ajax_identifier() || '",' || l_crlf ||
             '      changeOnly: "' || l_change_only || '",' || l_crlf ||
             '      makeBlocking: "' || l_make_blocking || '"' || l_crlf ||
             '   });'|| l_crlf ||
       END IF;
       l_retval.javascript_function := l_js_function;
       RETURN l_retval;
    END enkitec_clob_load_render;
    FUNCTION enkitec_clob_load_ajax (
       p_dynamic_action IN APEX_PLUGIN.T_DYNAMIC_ACTION,
       p_plugin         IN APEX_PLUGIN.T_PLUGIN
        RETURN APEX_PLUGIN.T_DYNAMIC_ACTION_AJAX_RESULT
    IS
       l_retval                   APEX_PLUGIN.T_DYNAMIC_ACTION_AJAX_RESULT;
       l_ajax_function            VARCHAR2(32767) := apex_application.g_x01;
       l_source                   VARCHAR2(20) := NVL(p_dynamic_action.attribute_02, 'COLLECTION');
       l_render_collection_name   VARCHAR2(255) := p_dynamic_action.attribute_03;
       l_query                    VARCHAR2(32767) := p_dynamic_action.attribute_04;
       l_submit_collection_name   VARCHAR2(255) := p_dynamic_action.attribute_05;
       l_column_value_list        APEX_PLUGIN_UTIL.T_COLUMN_VALUE_LIST2;    
       l_clob_text                CLOB := EMPTY_CLOB();
       l_token                    VARCHAR2(32000);
       l_chunk_size               NUMBER := 4000;
    BEGIN
       IF l_ajax_function = 'RENDER_CLOB'
       THEN
          IF l_source = 'COLLECTION'
          THEN
             IF apex_collection.collection_exists(l_render_collection_name)
             THEN
                SELECT clob001
                INTO l_clob_text
                FROM apex_collections
                WHERE collection_name = l_render_collection_name
                   AND seq_id = 1;
             END IF;
          ELSE --must be SQL_QUERY
             BEGIN
                l_column_value_list := apex_plugin_util.get_data2(
                   p_sql_statement  => l_query,
                   p_min_columns    => 1,
                   p_max_columns    => 1,
                   p_component_name => p_dynamic_action.action,
                   p_first_row      => 1,
                   p_max_rows       => 1
             EXCEPTION
                WHEN NO_DATA_FOUND
                THEN
                   NULL;
             END;
             IF l_column_value_list.exists(1)
                AND l_column_value_list(1).value_list.exists(1)
             THEN
                l_clob_text := l_column_value_list(1).value_list(1).clob_value;
             END IF;
          END IF;
          FOR i IN 0 .. FLOOR(LENGTH(l_clob_text)/l_chunk_size)
          LOOP 
             sys.htp.prn(substr(l_clob_text, i * l_chunk_size + 1, l_chunk_size)); 
          END LOOP;
       ELSE --must be SUBMIT_CLOB
          dbms_lob.createtemporary(l_clob_text, false, dbms_lob.session);
          FOR i IN 1..apex_application.g_f01.count
          LOOP
             l_token := wwv_flow.g_f01(i);
             dbms_lob.writeappend(l_clob_text, length(l_token), l_token);
          END LOOP;
          apex_collection.create_or_truncate_collection(
             p_collection_name => l_submit_collection_name
          apex_collection.add_member(
             p_collection_name => l_submit_collection_name,
             p_clob001         => l_clob_text
       END IF;
       RETURN l_retval;
    END enkitec_clob_load_ajax;4. Change this code to this code:
    FUNCTION enkitec_clob_load_render (
       p_dynamic_action IN APEX_PLUGIN.T_DYNAMIC_ACTION,
       p_plugin         IN APEX_PLUGIN.T_PLUGIN
       RETURN APEX_PLUGIN.T_DYNAMIC_ACTION_RENDER_RESULT
    IS
       l_retval           APEX_PLUGIN.T_DYNAMIC_ACTION_RENDER_RESULT;
       l_show_modal       VARCHAR2(1) := p_plugin.attribute_01;
       l_dialog_title     VARCHAR2(4000) := NVL(p_plugin.attribute_02, 'Please wait...');
       l_loading_img_type VARCHAR2(30) := p_plugin.attribute_03;
       l_loading_img_c    VARCHAR2(4000) := p_plugin.attribute_04;
       l_action           VARCHAR2(10) := NVL(p_dynamic_action.attribute_01, 'RENDER');
       l_change_only      VARCHAR2(1) := NVL(p_dynamic_action.attribute_06, 'Y');
       l_make_blocking    VARCHAR2(1) := NVL(p_dynamic_action.attribute_07, 'Y');
       l_loading_img_src  VARCHAR2(32767);
       l_crlf             VARCHAR2(2) := CHR(13)||CHR(10);
       l_js_function      VARCHAR2(32767);
       l_onload_code      VARCHAR2(32767);
    BEGIN
       IF apex_application.g_debug
       THEN
          apex_plugin_util.debug_dynamic_action(
             p_plugin         => p_plugin,
             p_dynamic_action => p_dynamic_action
       END IF;
       IF l_loading_img_type = 'DEFAULT'
       THEN
          l_loading_img_src := p_plugin.file_prefix || 'enkitec-loading.gif';
       ELSE
          l_loading_img_src := REPLACE(l_loading_img_c, '#IMAGE_PREFIX#', apex_application.g_image_prefix);
          l_loading_img_src := REPLACE(l_loading_img_src, '#PLUGIN_PREFIX#', p_plugin.file_prefix);
       END IF;
       apex_css.add(
          p_css => '.clob-load-dialog .ui-dialog-titlebar-close {display: none;}',
          p_key => 'clob-load-hide-modal-close'
       apex_javascript.add_library(
          p_name      => 'enkitec-clob-load.min',
          p_directory => p_plugin.file_prefix,
          p_version   => NULL
       l_onload_code :=
          'apex.jQuery(document).clob_load({'|| l_crlf ||
          '   showModal: "' || l_show_modal ||'",'|| l_crlf ||
          '   dialogTitle: "' || l_dialog_title ||'",'|| l_crlf ||
          '   loadingImageSrc: "' || l_loading_img_src ||'",'|| l_crlf ||
          '   pluginFilePrefix: "' || p_plugin.file_prefix || '",' || l_crlf ||
          '   apexImagePrefix: "' || apex_application.g_image_prefix || ',"' || l_crlf ||
       apex_javascript.add_onload_code(
          p_code => l_onload_code
       IF l_action = 'RENDER'
       THEN
          l_js_function :=
             'function(){'|| l_crlf ||
             '   apex.jQuery(document).clob_load("renderClob", {' || l_crlf ||
             '      $elmt: this.affectedElements.eq(0),' || l_crlf ||
             '      ajaxIdentifier: "' || apex_plugin.get_ajax_identifier() || '"' || l_crlf ||
             '   });'|| l_crlf ||
       ELSE
          l_js_function :=
             'function(){'|| l_crlf ||
             '   apex.jQuery(document).clob_load("submitClob", {' || l_crlf ||
             '      $elmt: this.affectedElements.eq(0),' || l_crlf ||
             '      ajaxIdentifier: "' || apex_plugin.get_ajax_identifier() || '",' || l_crlf ||
             '      changeOnly: "' || l_change_only || '",' || l_crlf ||
             '      makeBlocking: "' || l_make_blocking || '"' || l_crlf ||
             '   });'|| l_crlf ||
       END IF;
       l_retval.javascript_function := l_js_function;
       RETURN l_retval;
    END enkitec_clob_load_render;
    FUNCTION enkitec_clob_load_ajax (
       p_dynamic_action IN APEX_PLUGIN.T_DYNAMIC_ACTION,
       p_plugin         IN APEX_PLUGIN.T_PLUGIN
        RETURN APEX_PLUGIN.T_DYNAMIC_ACTION_AJAX_RESULT
    IS
       l_retval                   APEX_PLUGIN.T_DYNAMIC_ACTION_AJAX_RESULT;
       l_ajax_function            VARCHAR2(32767) := apex_application.g_x01;
       l_source                   VARCHAR2(20) := NVL(p_dynamic_action.attribute_02, 'COLLECTION');
       l_render_collection_name   VARCHAR2(255) := p_dynamic_action.attribute_03;
       l_query                    VARCHAR2(32767) := p_dynamic_action.attribute_04;
       l_submit_collection_name   VARCHAR2(255) := p_dynamic_action.attribute_05;
       l_column_value_list        APEX_PLUGIN_UTIL.T_COLUMN_VALUE_LIST2;    
       l_clob_text                CLOB := EMPTY_CLOB();
       l_token                    VARCHAR2(32000);
       l_chunk_size               NUMBER := 4000;
    BEGIN
       IF l_ajax_function = 'RENDER_CLOB'
       THEN
          IF l_source = 'COLLECTION'
          THEN
             IF apex_collection.collection_exists(l_render_collection_name)
             THEN
                SELECT clob001
                INTO l_clob_text
                FROM apex_collections
                WHERE collection_name = l_render_collection_name
                   AND seq_id = 1;
             END IF;
          ELSE --must be SQL_QUERY
             BEGIN
                l_column_value_list := apex_plugin_util.get_data2(
                   p_sql_statement  => l_query,
                   p_min_columns    => 1,
                   p_max_columns    => 1,
                   p_component_name => p_dynamic_action.action,
                   p_first_row      => 1,
                   p_max_rows       => 1
             EXCEPTION
                WHEN NO_DATA_FOUND
                THEN
                   NULL;
             END;
             IF l_column_value_list.exists(1)
                AND l_column_value_list(1).value_list.exists(1)
             THEN
                l_clob_text := l_column_value_list(1).value_list(1).clob_value;
             END IF;
          END IF;
          FOR i IN 0 .. FLOOR(NVL(LENGTH(l_clob_text)/l_chunk_size,0))
          LOOP 
             sys.htp.prn(substr(l_clob_text, i * l_chunk_size + 1, l_chunk_size)); 
          END LOOP;
       ELSE --must be SUBMIT_CLOB
          dbms_lob.createtemporary(l_clob_text, false, dbms_lob.session);
          FOR i IN 1..apex_application.g_f01.count
          LOOP
             l_token := wwv_flow.g_f01(i);
             if NVL(length(l_token),0) > 0 Then
                dbms_lob.writeappend(l_clob_text, length(l_token), l_token);
             end if;
          END LOOP;
          apex_collection.create_or_truncate_collection(
             p_collection_name => l_submit_collection_name
          apex_collection.add_member(
             p_collection_name => l_submit_collection_name,
             p_clob001         => l_clob_text
       END IF;
       RETURN l_retval;
    END enkitec_clob_load_ajax;5. As you see only 2 places of plugin had to be fixed, when you compare previous 2 steps:
    FOR i IN 0 .. FLOOR(LENGTH(l_clob_text)/l_chunk_size)
          LOOP 
             sys.htp.prn(substr(l_clob_text, i * l_chunk_size + 1, l_chunk_size)); 
          END LOOP;-->
    FOR i IN 0 .. FLOOR(NVL(LENGTH(l_clob_text)/l_chunk_size,0))
          LOOP 
             sys.htp.prn(substr(l_clob_text, i * l_chunk_size + 1, l_chunk_size)); 
          END LOOP;And
    FOR i IN 1..apex_application.g_f01.count
          LOOP
             l_token := wwv_flow.g_f01(i);
             dbms_lob.writeappend(l_clob_text, length(l_token), l_token);
          END LOOP;-->
    FOR i IN 1..apex_application.g_f01.count
          LOOP
             l_token := wwv_flow.g_f01(i);
             if NVL(length(l_token),0) > 0 Then
                dbms_lob.writeappend(l_clob_text, length(l_token), l_token);
             end if;
          END LOOP;This way seems to be best way to handle APEX CLOBS today, using that plugin, and a little fix.

  • Allow the user to control the width of the edit forum post input box

    I would like to control the width of of the edit-forum post input box.  This could be:
    automatically adjust the width of the box so that the box doesn't run off the right edge of the window.
    have a user global preference to set the preferred width
    at least, allow the user to change the width via the change size icon.  The three horizontal bars at the lower left of the input box. You can adjust the vertical dimension, but not the horizontal. TenFourFox 4.0.1. This is probably being blocked for some obscure reason.
    Here is an example of an over extended right margin:
    Curiously enough, the "software" let's me adjust the width & height of the add reason to edit text, but not adjust the width of the more important edit text box.
    Robert

    Testing
    Standard Reply box can be height adjusted but not width.
    Same with Advanced Editor
    No Adjustment at all in HTL Editor
    Edit.
    The Edit uses the Advanced Editor
    Only Height Adjustment again.
    I do seem to remember someone posting about the width and saying they could drag it over the edge of the right hand edge (Into the grey surround)
    This may have been a post in the lounge.
    It didn't actually try it at the time but have played with it since and have not seen it.
    Maybe it is something they "Fixed" in both senses of the word.
    Second edit.
    I can't alter the box that currently reads "Message Edited by:- ..."
    I also can't get this box to accept New lines  (they appear in the box but don't post that way)
    Corrected Spelling
    9:51 PM      Wednesday; May 11, 2011
    Please, if posting Logs, do not post any Log info after the line "Binary Images for iChat"
     G4/1GhzDual MDD (Leopard 10.5.8)
     MacBookPro 2Gb( 10.6.7)
     Mac OS X (10.6.7),
    "Limit the Logs to the Bits above Binary Images."  No, Seriously
    Message was edited by: Ralph Johns (UK)
    Message was edited by: Ralph Johns (UK)
    and new line with a line space as well

  • Report Row Height and Column Width

    Hi,
    I have a cell in a report (a description column) that causes the row height to become very large (when there is a lot of text in the description). I can make the column wider on the report attributes page, but there doesn't seem to be any place to influence the maximum height of a row on a report, short of modifying the template.
    Adding style attributes (e.g. max-height:30px) to an element only affects the <span> that the element resides in, not the table cell or row.
    Displaying the column as a text area is a useful workaround. The downside is the border and scroll bars do waste a lot of screen real estate. Does there exist some other way of setting a limit on the height and/or width of a report, report column or report row?
    Oh, and another question- how do make line breaks in this forum? There's no support for <BR> or [br].

    Please reply to this thread, my customer is facing the same issue. He does not have issue with the excel and the pdf output but in the rtf output the table heght increases to accomadate the data.He want it to bevave in the same way as the pdf do.
    Regards,
    Ajay

  • To limit number of chracters in textarea.

    hello all,
    please find below a small program to demonstrate how to limit number of charcaters in a textarea.
    i searchedthe forum and i actually got the technique from the forum. but when i put together a sa program it does not work.
    could anyone point out what is the problem in the small piece of code below.
    i am working on jdk 1.2.1
    thanx to all.
    // Example illustrating Limiting number of characters in text area.
    import javax.swing.*;
    import java.awt.*;
    import java.awt.event.*;
    public class try1 extends JApplet {
    Container contentPane;
    JLabel label;
    JTA1 textarea;
    public void init() {
    // Get the handle on the applet's content pane.
         contentPane = this.getContentPane();
    // Create a text field and add a key listener to it.
         textarea = new JTA1(25);           // of 25 char width
    // Create a button object and register an action listener
         Button button = new Button("Clear");
         button.addActionListener(new ButtonListener());
    // Create a label with the titled border.
         label = new JLabel("Key Typed: NiL");
         label.setBorder(BorderFactory.createTitledBorder
    ("You pressed the Following Key"));
    // Add the text field and button to the applet's content pane.
         contentPane.setLayout(new BorderLayout());
         contentPane.add("North", textarea);
         contentPane.add(label);
         contentPane.add("South", button);
    // Get focus on text field.Note: You can do this only after you add the text field to the container
    class ButtonListener implements ActionListener {     // Create the button listener class.
         public void actionPerformed(ActionEvent e)      {
    // Reset the text components
         textarea.setText("");
    //Return the focus to the text field.
    class JTA1 extends JTextArea
         private int limit;
         public JTA1 ( int limit )
              this.limit = limit;
              addKeyListener( new LimitListener() );     
         class LimitListener extends KeyAdapter
              public void keyPressed( KeyEvent ke )
                   if( getText().trim().length() >= limit )
                   {     ke.consume(); //just consume KeyEvent

    Don't cross post. This question has been answered in your other post.

Maybe you are looking for

  • More Guru Winners for February 2015 in the SS DBE category and many others!

    It's been a busy week that also saw the TECHNET WIKI SUMMIT 2015 Then we had the results for February's TechNet Guru competition ALSO posted! http://blogs.technet.com/b/wikininjas/archive/2015/03/19/technet-guru-february-2015.aspx Below is a summary

  • Max no. of roles in a transport

    Just a quick question - what is the max number of roles recommened in one transport.

  • Composer Process Report XML Format

    Hi, We generated 'Process Report' -- XML format in Oracle BPM Composer. After generating saved content in a xml file. When tried to open this file, getting error message like not in proper xml format etc., Have we missed any thing in installing or co

  • Slow Wireless Problem

    After I updated OSX 10.6, my internet becomes extremely slow. Since it is too slow, I cannot open any web page. However, my other computer, which is using window, has good internet speed. Also, my ipod has no problem. When I go to near my router, my

  • Last update doesn't work

    Hi! I just update flash player(14.0.0.125) and now i can't watch videos or play games. I used firefox so I tried with Explorer and Chrome but it doesn't work either. I went to the adobe help page but nothing there help me.I have Windows 8 (64-bit). T