Dynamic resizing of popups

Hi All,
I am using JDev 11.1.2.4.0 and  bounded taskflows.
In my fragment I have a popup with panel Window. I want to set the content width & height of this as per the browser
I followed the steps as per this http://www.ateam-oracle.com/dynamic-resizing-for-popup-dialogs/
My popup code is as below
                                   <af:popup id="pdfPopup" autoCancel="disabled" partialTriggers="cb1"
                                              popupCanceledListener="#{rLBean.closeDetachPopup}"
                                              contentDelivery="lazyUncached">
                                        <af:panelWindow id="pdfWindow" title="Label Design" modal="true"
                                                        stretchChildren="first">
                                            <af:panelStretchLayout id="psl7" startWidth="0px" endWidth="0px"
                                                                   topHeight="0px" bottomHeight="0px">
                                                <f:facet name="bottom"/>
                                                <f:facet name="center">
                                                    <af:inlineFrame id="if2"
                                                                    source="/pdfservlet?#{bindings.LId.inputValue}*#{bindings.LVn.inputValue}"/>
                                                </f:facet>
                                                <f:facet name="start"/>
                                                <f:facet name="end"/>
                                                <f:facet name="top"/>
                                            </af:panelStretchLayout>
                                        </af:panelWindow>
                                    </af:popup>
This popup is invoked as below
     <af:commandButton text="Maximize" id="cb1" partialSubmit="true"
                                                                      clientComponent="true"
                                                                      icon="/images/maximize_detach.png"
                                                                      shortDesc="Maximize" blocking="true">
                                                        <af:clientListener type="action"
                                                                           method="openPopup('pt1:pdfPopup','pt1:pdfWindow')"/>
                                                    </af:commandButton>
Javascript method is as below
function openPopup(popupId, panelWindowId) {
    return function (event) {
        try {
            var agent = AdfAgent.AGENT;
            var windowWidth = agent.getWindowWidth();
            var windowHeight = agent.getWindowHeight();
            //alert('maximize.............');
            var region = AdfPage.PAGE.findComponentByAbsoluteId('r1');
            //alert(region +' ------------ '+popupId+' --------------- '+panelWindowId);
            var popup = region.findComponent(popupId);
            //alert(popup);
            var panelWindow = popup.findComponent(panelWindowId);
            alert(panelWindow);
            panelWindow.setContentWidth(Math.max(100, windowWidth - 100));
            panelWindow.setContentHeight(Math.max(100, windowHeight - 100));
            if (popup != null)
                popup.show();
            else
                popup.hide();
        catch (err) {
            alert(err);
When alert is there, I am getting the ID of panel window and everything works fine.
But if I comment the alerts, its returning null. I dont know whats going wrong.
Kindly Help

Issue is, with the above code, I am not able to get the panel window ID.
As you'll can see in the javascript code, I have commented the alerts. Magically, if i uncomment one of the alerts, its able to find the ID.
Yes..!! I have tried this code by setting the clientComponent=true for the pop-up as well as panelWindow. But it didn't help.....
Kind Regards

Similar Messages

  • How to dynamically resize taskflow popup set as inlineDocument.

    I've been trying to figure out how to dynamically set the WindowHeight and WindowWidth of a taskflow deployed as a inlineDocument popup. Sadly, neither the forums nor google came to the rescue so I had to actually figure this one out on my own. But at least now is my opportunity to work up some forum karma! :)
    Sample workspace containing the solution is here: http://www.williverstravels.com/JDev/Forums/Threads/2337969/MaxPopupSize.zip
    General Strategy for Solution:
    - Pull the browser height and width using Javascript
            function browserSize(evt)
              var button = evt.getSource();
              var agent = AdfAgent.AGENT;
              var windowWidth = agent.getWindowWidth();
              var windowHeight = agent.getWindowHeight();
              AdfCustomEvent.queue(button, "customEvent",
                width: windowWidth,
                height: windowHeight
              true);
              evt.cancel();
            }- Using a clientListener and serverListener, pull this information into a managed bean and set height / width in button's setWindowWidth(), setWindowHeight() attribute.
      public void onButtonClick(ClientEvent clientEvent)
        Double dw = (Double)clientEvent.getParameters().get("width")-100;
        Double dh = (Double)clientEvent.getParameters().get("height")-100;
        this.popupButton.setWindowWidth(dw.intValue());
        this.popupButton.setWindowHeight(dh.intValue());
        ActionEvent aE = new ActionEvent(this.getPopupButton());
        aE.queue();  
      }- Due to JSF Lifecycle complications, the managed bean will need to call a different button than the one which holds the client and server listener. It will be the second button (popupButton in the code above) which then calls the popup.
    Props to Frank for the client / server listener tutorial: http://www.oracle.com/technetwork/developer-tools/adf/learnmore/56-handle-doubleclick-in-table-170924.pdf
    Props to Martin Deh for the javascript insights: http://martindeh.blogspot.com/2011/03/dynamic-resizing-for-popup-dialogs.html
    Hope this helps someone down the road.
    Will

    Thanks LovettWB ...
    Your question helped me a lot...  I am able to pass these two parameters width/height to my bean and am able to set it to pop-up :)                                                                                                                                                                                                                                                                                                                                   

  • How do I stop iPhone Safari from dynamically resizing the visual viewport?

    Sorry I post this here, but I couldn't access the developer forums (no error given, it just keeps returning me to this page https://developer.apple.com/devforums/) I'm not even sure wether that's been moved here and it's just the redirection non working.
    I need to Stop iPhone Safari from dynamically resizing the visual viewport, or in other words, to stop it from trying to "fit" the layout into the viewport.
    Why?
    Because any recalculation javascript does on absolutely positioned elements makes the whole site super IRRESPONSIVE.
    I don't know wether the issue is the element going out the already-set layout viewport (which triggers the page resizing to fit the visual viewport) or just the calculations being made constantly, but I can stop the calculations from happening when not "touching" the screen, but I need a way to stop the page resizing.
    I tried setting the viewport width to 1040px, as my layout width, and it fixed the header's width being narrower than the body (or shifted left?), but the whole page is still resized with every motion-frame (one every 3 seconds, due to overloading the redrawing engine)
    Is there a way to prevent that?

    No, that link doesn't solve it. It just says the same is found everywhere online.
    There's probably no way to do it, as per their way they "accidentally" omitted the oposite case: the page being wider than 980. They only mention what to do if the site is narrower. Something I learned is big companies (with reputation management) could let you run in circles for years no answer rather than telling you something is not possible.
    I'm the developer (can't access the dev forums, don't know why) and I DID setup the viewport, scale and other properties but none of them stopped from re-fitting the new re-sized layout in the viewport. They just ensure the "initial" view.
    I think the feature I'm looking for must be achieved with some JavaScript function targeting Safari-proprietary variable/property… if even possible.
    I just had to make things never reaching the edge until somebody contributes something useful

  • How to dynamically resize JPanel at runtime??

    Hello Sir:
    I met a problem, I need to resize a small JPanel called panel within a main Control JPanel (with null Layout) if I click the mouse then I can Drag and Resize this small JPanel Border to the size I need at runtime, I know I can use panel.setSize() or panel.setPreferredSize() methods at design time,
    But I have no idea how to do it even I search this famous fourm,
    How to dynamically resize JPanel at runtime??
    Can any guru throw some light or good example??
    Thanks

    Why are you using a null layout? Wouldn't having a layout manager help you in this situation?

  • Dynamic resizing in JDialog using setSize not working properly on solaris

    can anyone help..
    Dynamic resizing in JDialog using setSize is not working properly on solaris, its work fine on windows.
    i have set Jdialog size to setSize(768,364),
    when i dynamically resizing it to setSize(768,575); it doesn't get change but when i move dialog using mouse it gets refreshed.
    this problem is only happening on solaris not on windows.

    Hi,
    It's only an approach but try a call of validate() or repaint() after re-setting the size of your dialog.
    Cheers, Mathias

  • Can you dynamically resize a graphic

    In AW 7, can you dynamically resize a graphic (jpg, or
    whatever) that's already on the screen, with some sort of code.
    Need help. Trying to build a piece, but having issues w/ space.
    Thanks for any help.

    Juice21 wrote:
    > In AW 7, can you dynamically resize a graphic (jpg, or
    whatever) that's already
    > on the screen, with some sort of code. Need help. Trying
    to build a piece,
    > but having issues w/ space. Thanks for any help.
    >
    Not as such. You can:
    - have multiple copies of the same image and flip between
    them (there's
    a Show Me on it)
    - use Flash
    - use alPicView
    <url:
    http://www.apixel.com/page0203.htm#alpicview
    >
    Andrew Poulos

  • How to dynamically resize virtualbox console (Arch within Arch setup)

    My host is Arch, and my guest is Arch.  The guest running console without X.  I got 1024x728 resolution by adding vga=772 in guest's menu.1st file.  Is there a way to dynamically resize the guest's console dimensions by dragging virtualbox's window corner, as you can with a windows guest OS?

    Dynamic resizing only works from within X, it doesn't work when in console mode, as it requires the Guest Additions installed.  It might of course work in the future if Virtualbox includes a framebuffer driver with guest additions, but somehow I very much doubt they will

  • Dynamic resize of FAT32 partition with disk utility?

    Hi there.
    I have a 1TB external FAT32 drive with 300GB of data on it.
    I want to convert it to HFS+, but I know there's no easy way to do that.
    What I want to know is can I resize my FAT32 partition to 500MB and keep all the data?
    Then I'll move it to the new HFS+ 500MB partition, delete the original partition and resize the HFS+ partition.
    Or do I have no hope of that?
    Thanks
    Greg

    Greg,
    You're probably out of luck on this one. If the drive was partitioned and formatted by a PC (every drive has a partition map, whether there are multiple partitions or only one), it almost certainly has an "MBR" partition map. This would preclude a dynamic resizing by Disk Utility. It will need to be partitioned using either GUID (Intel) or APM (PPC).
    Scott

  • Dynamically resizing DefaultMutableTreeNode

    Does anyone know how to resize a DefaultMutableTreeNode after it's been created and initially sized? I have a tree that can be resized, but if I dynamically resize it so that some nodes are wider than the tree, I'd like the last few visible characters within the nodes to be replaced by three dots "..." instead of just clipping the text. The JTable does this when you resize a column.
    Thanks,
    Steve Sinai

    I change the two lines below:
    1. This: textField.text = val        to this:  textField.htmlText = val;
    2.  This: return textField.text;     to this:  return textField.htmlText;
    Here we go:
    import flash.events.Event;
    import flash.text.StyleSheet;
    import mx.controls.TextArea;
    public class DynamicTextArea extends TextArea
       public function DynamicTextArea(){
          super();
          super.horizontalScrollPolicy = "off";
          super.verticalScrollPolicy = "off";
          this.addEventListener(Event.CHANGE, adjustHeightHandler);
        private function adjustHeightHandler(event:Event):void{
          //trace("textField.getLineMetrics(0).height: " + textField.getLineMetrics(0).height);
          if(height <= textField.textHeight + textField.getLineMetrics(0).height){
            height = textField.textHeight;     
            validateNow();
        override public function set htmlText(val:String):void{
          textField.htmlText = val;
          validateNow();
          height = textField.textHeight;
          validateNow();
        override public function set height(value:Number):void{
          if(textField == null){
            if(height <= value){
              super.height = value;
          }else{       
            var currentHeight:uint = textField.textHeight + textField.getLineMetrics(0).height;
            if (currentHeight<= super.maxHeight){
              if(textField.textHeight != textField.getLineMetrics(0).height){
                super.height = currentHeight;
            }else{
                super.height = super.maxHeight;         
        override public function get htmlText():String{
            return textField.htmlText;
        override public function set maxHeight(value:Number):void{
          super.maxHeight = value;

  • Dynamically resizing VBoxes

    I have code that changes the cursor indicating user can drag
    to resize VBoxes vertically, horizontally, or diagonally, but I'm
    not sure how to proceed to dynamically resize the VBoxes.
    If the user has the vertical resizing cursor displayed (by
    clicking the top border of the lower VBox) and drags, the VBox
    above the border and below the border should both resize.
    Any ideas for how to proceed with this?
    Code is attached, and all you need are three images 16x16
    px.

    "Greg Lafrance" <[email protected]> wrote in
    message
    news:gnha8u$onj$[email protected]..
    >I have code that changes the cursor indicating user can
    drag to resize
    >VBoxes
    > vertically, horizontally, or diagonally, but I'm not
    sure how to proceed
    > to
    > dynamically resize the VBoxes.
    >
    > If the user has the vertical resizing cursor displayed
    (by clicking the
    > top
    > border of the lower VBox) and drags, the VBox above the
    border and below
    > the
    > border should both resize.
    >
    > Any ideas for how to proceed with this?
    Use VDividedBox instead?

  • Dynamically resizing slideshow with ken burns needed

    Hi,
    does anyone here know a free or commercial slideshow component for AS3 (must work with flex 3) which does the following:
    cross-fading,
    ken burns zooming and panning with per image definition (eg. with xml file)
    scale-to-fill resizing of images
    dynamically resizable frame size (so it can be used as a browser background)
    It should work like on the following site
    http://www.timhupe.com/
    My client wants this, but programming it from scratch will take rather long, so if anyone can help out here, that would be great.
    thanks
    jq

    Chris:
    The export method you used creates a 640 x 480 QT file. If you use the Share->Send to iDVD menu option that will create a 720 x 540 QT file, save it in the Movies folder and automatically put it in iDVD. That should produce a higher image quality final product. If you have an iDVD project already started open it before starting the Share procedure so it will be the selected destination. In any case the larger QT movie will be saved to your Movies folder so you can include it manually is desired.
    Do you Twango?
    TIP: For insurance against the iPhoto database corruption that many users have experienced I recommend making a backup copy of the Library6.iPhoto database file and keep it current. If problems crop up where iPhoto suddenly can't see any photos or thinks there are no photos in the library, replacing the working Library6.iPhoto file with the backup will often get the library back. By keeping it current I mean backup after each import and/or any serious editing or work on books, slideshows, calendars, cards, etc. That insures that if a problem pops up and you do need to replace the database file, you'll retain all those efforts. It doesn't take long to make the backup and it's good insurance.
    G5 Dual Core 2GHz, 2G RAM, 250G HD; G4 Dual 1Ghz, 1.5G RAM, 80G HD,   Mac OS X (10.4.7)   22 LCD Display, 200G & 160G FW HDs, Canon S400, i850 & LIDE 50, Epson R200

  • Moving object to back after dynamic resize

    I am running Crystal Reports 2008 on a Business Objects 3.1 environment.
    I have a textbox in a report that grows (width) depending on the number of records shown. The report is a cross tab, and I change the width change is to display a u201CSilveru201D box behind certain fields (to break up the report).
    I recieved help from Vinay to get the fields to expand correctly (Thank you), but now it appears the dynamic resizing is the final step taken befroe publiushing the report. I need the silver text field to go to the back of the report, allowing information in the cross tab itself to appear on top.
    Is there a  cr command (code) that sends the field to the back of the report?
    Thanks

    Please re-post if this is still an issue or purchase a case and have a dedicated support
    engineer work with you directly:
    http://store.businessobjects.com/store/bobjamer/DisplayProductByTypePage&parentCategoryID=&categoryID=11522300?resid=-Z5tUwoHAiwAAA8@NLgAAAAS&rests=1254701640551

  • Implementing Dynamic Styles for Popups based on Query

    I have a page with multiple report regions which are individually displayed depending upon values assigned to variables via a search page. On the resulting report region, I display the results of my SQL query as text, text fields, select lists, textarea, and popups. These fields are editable and will be submitted to update the data displayed and stored in the database. To maintain database referential integrity, obviously some fields will be reuired and some will have default values. I want to visually emphasize these two characteristics to the user by changing the field background color and font color depending upon whether the element is required or whether a default value is being displayed.
    I have tried to accomplish as much as possible via inline styling and can accomplish everything except the popups. If I hard-code the style values for the popup IDs, I can affect the styles. The problem is that the number of rows which need to be addressed is dependent upon the number of rows in my table. Popup IDs are indexed by the row number (e.g. f01_0001 is the ID for the popup field for row 1; f01_0002 is the ID for the popup field for row 2, etc). Changing the template would affect all popups and I only want to address specific ones. I have tried to implement a JavaScript function (FORMAT_DEFAULT_AND_REQUIRED_COLUMNS(formItem1,formItem2,formItem3)) on the page HTML Header section which is called by onload="jvascript:FORMAT_DEFAULT_AND_REQUIRED_COLUMNS('P30_DATA_TYPE','P30_VIEW_OR_EDIT','P30_SOURCE');" from the "On Load - Page HTML Body Attribute."
    Basically, I want this function to execute each time the page is loaded to dynamically assign style values to the popups (and potentially other columns as well). Depending upon the values of the three formItems, the function would know which column tags would need to be affected. From within the JavaScript function, I would call:
    document.getElementById(f01tag).style.setExpression("background-color", "blue", "JavaScript");
    This would occur within a loop from 1 to the number of rows to be displayed on the report region and the f01tag would be incremented by the loop counter.
    Any ideas, assistance, or direction would be greatly appreciated. Thank you.

    Ed
    Taken a look at it using the developer access you provided. Think you were nearly there!
    The style sheet wasn't being picked up because of the link href in the page template. Think you must have cut and pasted the existing link for the theme CSS and left in the themes/theme_10/ component? That would apply for style sheets stored there in the file system. For your ApEx CSS from the database you just need #WORKSPACE_IMAGES#pdam.css.
    To get the styles defined in the CSS appearing for all of the items - including the popups - I added class="default|required|default_required" attributes using the p_attributes parameter in the APEX_ITEM package methods referenced in your report source query. (Probably possible to do this in the Tabular Form Element section of the report definition too, but if you've got dynamic requirements as to which classes are needed where, the former approach is more likely to be useful - you can control which classes using DECODE, CASE, scalar subqueries etc.)
    Seems to be working in Windows IE 5.5/6/7 and Opera 9; Mac Firefox 2 and Safari 3 beta. Safari 2 doesn't support styling of the select lists, as I mentioned in my previous post.
    Few points on your CSS:
    1. Setting font size in pixels causes accessibility issues, both due to Win IE lacking support for user resizing of pixel sized text, and because of general variation in display resolutions. Use a different method for real world use.
    2. Always specify a generic font family as a fallback in case your preferred fonts are not available: font-family: "Times New Roman", Times, serif;
    3. text-shadow is not yet a widely supported CSS 3 property. Although it is working in Safari 3 - even (to my surprise!) in a form control - it looks kind of unreadable, and I doubt that even when widely available it will be universally supported for forms controls. Anyway, note that text-shadow properties are not specified enclosed in quotes.
    Hope this lets you progress.

  • Dynamic Region in Popup - clientListener problem?

    Hello,
    I'm working in Jdeveloper 11.1.1.2, following the popup/region pattern found at: http://www.oracle.com/technology/products/adf/patterns/11/popupregionpattern.pdf to have a dynamic region in a popup. I already have a working implementation on one of my pages, but the exact same implementation on another page is giving me issues. Whenever I add an af:clientListener component to my popup, the table in the same panelCollection stops rendering its rows. The column headers display, but there's no text of any type in the rows. If I delete the af:clientListener, my page works perfectly.
    Here's my popup code thus far:
    <af:popup id="awdPU" contentDelivery="lazyUncached"
    launcherVar="source" eventContext="launcher">
    <af:setPropertyListener from="#{source.attributes.saId}"
    to="#{pageFlowScope.currentSaId}"
    type="popupFetch"/>
    <af:setPropertyListener from="#{source.attributes.saId}"
    to="#{pageFlowScope.currentSchlrId}"
    type="popupFetch"/>
    <af:setPropertyListener from="#{source.attributes.appId}"
    to="#{pageFlowScope.currentAppId}"
    type="popupFetch"/>
    <af:setPropertyListener from="#{source.attributes.aidYear}"
    to="#{pageFlowScope.currentAidYearId}"
    type="popupFetch"/>
    <af:setPropertyListener from="#{source.attributes.theAction}"
    to="#{pageFlowScope.currentAction}"
    type="popupFetch"/>
    <af:setPropertyListener from="#{viewScope.popupDynamicRegionBean.popupTaskFlowId}"
    to="#{viewScope.popupDynamicRegionBean.dynamicTaskFlowId}"
    type="popupFetch"/>
    <af:setPropertyListener from="#{source.attributes.orgId}"
    to="#{pageFlowScope.currentOrgId}"
    type="popupFetch"/>
    <af:panelWindow id="pw1" title="Awarding">
    <af:region value="#{bindings.dynamicRegion1.regionModel}"
    id="dynam1"
    regionNavigationListener="#{viewScope.popupDynamicRegionBean.regionNavigated}"/>
    </af:panelWindow>
    <af:serverListener type="serverPopupClosed"
    method="#{viewScope.popupDynamicRegionBean.swapEmptyTaskFlow}"/>
    <af:clientListener method="popupClosedListener"
    type="popupClosed"/>
    </af:popup>
    and here is my working, completed dynamic region + popup code:
    <af:popup id="awdPU" contentDelivery="lazyUncached" launcherVar="source"
    eventContext="launcher">
    <af:panelWindow id="window" title="Awarding" modal="true" closeIconVisible="false">
    <af:region value="#{bindings.dynamicRegion1.regionModel}" id="dynam1"
    regionNavigationListener="#{viewScope.popupDynamicRegionBean.regionNavigated}"
    inlineStyle="background-color:transparent;"/>
    </af:panelWindow>
    <af:setPropertyListener from="#{viewScope.popupDynamicRegionBean.popupTaskFlowId}"
    to="#{viewScope.popupDynamicRegionBean.dynamicTaskFlowId}"
    type="popupFetch"/>
    <af:setPropertyListener from="#{source.attributes.saId}" to="#{pageFlowScope.currentSaId}"
    type="popupFetch"/>
    <af:setPropertyListener from="#{source.attributes.appId}" to="#{pageFlowScope.currentAppId}"
    type="popupFetch"/>
    <af:setPropertyListener from="#{source.attributes.aidYear}"
    to="#{pageFlowScope.currentAidYear}" type="popupFetch"/>
    <af:setPropertyListener from="#{source.attributes.theAction}"
    to="#{pageFlowScope.currentAction}" type="popupFetch"/>
    <af:clientListener method="popupClosedListener" type="popupClosed"/>
    <af:serverListener type="serverPopupClosed"
    method="#{viewScope.popupDynamicRegionBean.swapEmptyTaskFlow}"/>
    <af:clientAttribute name="action" value="makeAward"/>
    <af:clientListener method="adjustPopupSize" type="popupOpening"/>
    </af:popup>
    Does anyone know of any reason a client listener would have this kind of impact on my page? I've tried other types/methods and it just seems like if an af:clientListener is there, it won't work.
    Thanks!

    Hi,
    I came across this type of problem. what the javascript method u r calling it may contain some errors or if the clientListner not able to find the method which u r calling in the jspx file that will behave like that only.
    keep one alert begining of the script method(popupClosedListener) and check it whether it is calling or not. Better related serverListner should be after the ClientListner.
    Reg,
    Brahma...

  • HTML Formatted Links in Dynamic TextField Trigger Popup Blocker

    I recently updated the flash on my site to load all text
    content as HTML from an XML file and display it in a couple of
    dynamic text fields. Everything works as expected except that links
    in the HTML text with a "_blank" target trigger popup blocking in
    IE and Firefox. Any thoughts on why this is happening and what I
    can do to fix it?
    J

    as3 textfields have a TextEvent.LINK you can use.

Maybe you are looking for

  • Link to upload dataset

    Hi, I have been using Azure ML for a few weeks now, and remember hitting the "New" button and then "Dataset" to upload a new dataset. However, I can't seem to find that functionality anymore? Now, when I hit "New", I only get to chose from the Experi

  • Oracle VM Server for SPARC 2.2 Released

    We are pleased to announce the availability of Oracle VM Server for SPARC 2.2 release. See the announcement at Oracle's Virtualization Blog - https://blogs.oracle.com/virtualization/entry/announcing_oracle_vm_server_for1 . Please review the Oracle VM

  • Adobe Illustrator CC 2014 unexpectedly shuts down

    Adobe Illustrator CC 2014 unexpectedly shuts down: every day in last week but never before. Does anybody know how to solve it? I work in Windows system and installed the last update for Illustrator 2 weeks ago.

  • VIP is not responding When pinging from ace

    hey i have a very strange type of error. everything was working fine untill it just stopped. i have two vips both were mounted and working fine and then one of the vip just stopped working you can ping and get reply from my pc but not from ace. they

  • Is it possible to set what is determined as whitespace by a JTextArea

    I have the code: JTextArea doc = new JTextArea(text); doc.setLineWrap(true); doc.setWrapStyleWord(true);now doc.setWrapStyleWord wraps the text if the word is too long to fit on the current line, it uses whitespace as word seperators. now i want to s