Oracle ADF 11 g: invoke managed bean method when the page resizing.

Given the following code:
 <af:clientListener method="getElementWidth"
                                   type="propertyChange"/> 
                <af:serverListener type="customEvent"
                                   method="#{columnSizeBean.handleRequest}"/>
Is there a client listener that can be triggered when resizing browser window?
Something like:
 <af:clientListener method="getElementWidth"
                                   type="[[[[something like a window resize]]]]]]"/> 
                <af:serverListener type="customEvent"
                                   method="#{columnSizeBean.handleRequest}"/>
NOTE:
getElementWidth is a javascript method in my current code, while columnSizeBean is a sessionScope bean who did some calculations on the width of a table column.

Published by: Andrei C. on May 18, 2010 05:49

Hello

No, it isn't. However, in this case you can use vanilla JavaScript and register to the browser DOM to receive the event notification. If you notice rceive you access the server listener you put on the af:document component. It should work

Frank

Tags: Java

Similar Questions

  • How to limit the appeal of Web service method when the page loads?

    Hello

    I have an a choice selection list that is populated using a web service method. There are several different lists on the page. When a page loads, all of these methods of service web (methods are inside the POJO class) are executed.

    I would like to limit the call to the web service methods. The call occurs even if the component is not rendered. Basically, all methods in the page links are executed during the loading of the page. Is there a way to limit this behavior?

    More time is consumed during the loading of the page. Can someone help me on this?

    JDeveloper Version: 11.1.1.7.1

    Thank you
    Malenfant.

    You can play with the value of the condition of discount for links - see for example:

    https://blogs.Oracle.com/Shay/entry/delay_method_execution_when_us

  • How to call support bean method when the user moves out of field of af: inputListOfValues

    Hello

    I use jdev 11.1.2.4.

    I want to call a method of bean of support depending on the value selected in the af:inputListOfValues field.

    The requirement is similar as Frank Nimphius-Oracle has shown here https://blogs.oracle.com/jdevotnharvest/entry/how_to_notify_the_server but with component input list of values.

    The areas I want to call the method is

    <af:inputListOfValues id="appealNameId"
                          popupTitle="Search and Select: #{bindings.AppealName.hints.label}"
                          value="#{bindings.AppealName.inputValue}"
                          label="#{bindings.AppealName.hints.label}"
                          model="#{bindings.AppealName.listOfValuesModel}"
                          required="#{bindings.AppealName.hints.mandatory}"
                          columns="#{bindings.AppealName.hints.displayWidth}"
                          shortDesc="#{bindings.AppealName.hints.tooltip}"
                          binding="#{backingBeanScope.backing_Donation.appealNameId}"
                          autoSubmit="true" clientComponent="false">
                          <f:validator binding="#{bindings.AppealName.validator}"/>
                          <af:autoSuggestBehavior suggestedItems="#{backingBeanScope.backing_Donation.onSuggestAppeal}"/>
                          <af:clientListener method="onBlurTxtField" type="blur"/>
    </af:inputListOfValues>
    <af:serverListener type="onBlurNotifyServer"
                       method="#{backingBeanScope.backing_Donation.onBlurNotify}"/>
                          
    

    as you can see, af:serverListener is outside the af: inputListOfValues which is probably the reason why this isn't executing this method?

    public void onBlurNotify(ClientEvent clientEvent) {
       // get a hold of the input text component
       RichSelectOneChoice inputTxt =  (RichSelectOneChoice) clientEvent.getComponent(); 
       //do some work on it here (e.g. manipulating its readOnly state)
       //…
       //Get access to the payload
        
       Map  parameters = clientEvent.getParameters();
       System.out.println("SubmittedValue = "+parameters.get("submittedValue"));
       System.out.println("LocalValue =  "+parameters.get("localValue"));
       }
    

    I tried to put the serverListener tag inside the < af:inputListOfValues > but get error below

    "Listener server is not a valid child of list of values of the entry.


    any ideas please?

    Thank you

    As first, make sure you use a correct type for af:serverListener (Traore we are you queue in the javaScript onBlurTxtField function)

    If still not working, go directly to the source code page, and put af:serverListener 'manually', as a child for af:inputListOfValues.

    Because it is possible that these messages are false alarms...

  • Call a method bean after loading the page in the file jsff

    Hi all

    I'm working on JDeveloper 11.1.1.7.0.

    I need to call a managed bean method after jsff is responsible. My requirement is that I must add dynamically RichImage on my page. So I put a PanelGroupLayout as a container on the page. I add the RichImages to this PanelGroupLayout with

    parentUIComponent.getChildren () .add (childUIComponent);

    I tried using regionController but it gives me as regionController Null pointer has no access to user interface components on the page.

    then I tried with javascript, but it is not shooting my bean method managed. I put the code below in my home.jspx

    < af:document id = "d1" >

    < af:serverListener type = "onloadEvent" method="#{viewScope.ConnPocBean.initMethod}"/ >

    < af:resource type = "javascript" >

    function onLoadClient (event) {}

    AdfCustomEvent.queue (event.getSource (), "onloadEvent", {}, false);

    Returns true;

    }

    < / af:resource >

    and below is the code in my testPage.jsff file

    < af:clientListener method = "onLoadClient" type = "load" / >

    But here, when loading my testPage.jsff... initMethod() is not going to get fired.

    Please let me know what is the problem here.

    Thank you

    Fox

    If you want to try other ways to add a child element to PanelGroupLayout, use:

    parentUIComponent.getChildren () .add (childUIComponent);

    AdfFacesContext.getCurrentInstance () .addPartialTarget (parentUIComponent);

    in the Get accessor of the binding of an element method, which is placed after PanelGroupLayout in your jsff. So when the next component is loaded the child will be added to the PanelGroupLayout

  • PanelTabbed of the ADF. How to choose the default tab when the page loads

    Hi all
    I have a panelTabbed with three showDetailItem component, and I want the first showDetailItem to the tab by default whenever the page loads.
    Currently, the default tab, that's all that the tab that was last visited.

    I tried to disclosed attribute set to true on the first tab and false for the other, but it does not work.

    Thanks in advance.

    Published by: 947142 on July 18, 2012 11:03

    Have a method in the managed bean that is called when the page is loaded and set the tab disclosed.

    Here is a sample based on your use cases:

    PanelTabbed.jspx:



    xmlns:af = "http://xmlns.oracle.com/adf/faces/rich" >












    PanelTabbedBean.java:

    import java.util.List;

    javax.faces.component.UIComponent import;
    Import javax.faces.event.PhaseEvent;

    Import oracle.adf.view.rich.component.rich.layout.RichPanelTabbed;
    Import oracle.adf.view.rich.component.rich.layout.RichShowDetailItem;
    Import oracle.adf.view.rich.context.AdfFacesContext;

    public class PanelTabbedBean {}
    Private RichPanelTabbed myPanelTab;

    public PanelTabbedBean() {}
    }

    {} public void setMyPanelTab (RichPanelTabbed myPanelTab)
    this.myPanelTab = myPanelTab;
    }

    public RichPanelTabbed getMyPanelTab() {}
    Return myPanelTab;
    }

    {} public void onPageLoad (PhaseEvent phaseEvent)
    If (phaseEvent.getPhaseId () .equals (phaseEvent.getPhaseId (). RENDER_RESPONSE)) {}
    If (!.) {AdfFacesContext.getCurrentInstance () .isPostback ())}
    If (this.myPanelTab! = null) {}
    List childUIComponent = this.myPanelTab.getChildren ();
    If (childUIComponent! = null & childUIComponent.size () > 0) {}
    for (int i = 0; i)< childuicomponent.size();="" i++)="">
    If (childUIComponent.get (i) instanceof RichShowDetailItem) {}
    If (i == 0) {}
    ((RichShowDetailItem) childUIComponent.get (i)) .setDisclosed (true);
    } else {}
    ((RichShowDetailItem) childUIComponent.get (i)) .setDisclosed (false);
    }
    }
    }
    }
    }
    }
    }
    }
    }

    Thank you
    Nini

  • [ADF, JDev12.1.3] Call ExecuteWithParams operations programmatically when the page is loaded. How...?

    Hallo,

    in a working group, I have a 'readonly' page that uses in many istances VO (for fields, tables,...).

    When the page is loaded, I need to call its ExecuteWithParams operation for each VO.

    I would drag / drop (cascading) the operation of each VO ExecuteWithParams in the workflow, but the problem is that I need to run logic to call.

    For example, I have some cases in which I have to exec VO, and then pass the value of a field in the returned to the VO ExecuteWithParams, another record.

    I guess I can't manage this 'declarative' in the taskflow but I use code in a managed bean.

    So far, I've added for each VO ExecuteWithParams action page links.

    I know I can use a code like this to call the ExecuteWithParams for each VO...

    OperationBinding operationBinding = BindingsUtils.getBindings().getOperationBinding("ExecuteWithParamsToCall");
    operationBinding.getParamsMap().putAll(paramsMap);
    Object result = operationBinding.execute();
    if (!operationBinding.getErrors().isEmpty()) {
      return false;
      }
    

    ... but the problem is... where and when I call?

    I wrote in the managed bean extended view a public function initPage() tha called the ExecuteWithParams.

    How to use this function?

    I can use it during the lazy fo page load?

    Can I use it as a method call to place in the working group before the page? I have to admit that I already tried that way, but it did not work...

    In addition, after calling a VO ExecuteWithParams, as I said before, I may have the need to treat the VO after his execution to gather values for some fields (I'll pass these values to the other VO ExecuteWithParams).

    Can I access the iterator from the bean by using the iterator binding?

    Thank you very much

    Federico

    Instead, I have to create it in the the methodCall1 pageDef?

    Yes

    And if methodCall1 calls - as in my case - the function of a bean that uses the ExecuteWithParams many istances VO... I create all the necessary links in the methodCall1 pageDef?

    Yes

    And Yes... Links ExecuteWithParams that I created in the page untitled1 aren't necessary?

    Once again Yes (except if you do not have to invoke to untitled1 page)

    If you have 2 minutes trying to download the app, so you'll have is that I was

    I have more than 2 minutes (I hope), but I did not immediately jdev

    Dario

  • ADF how can I run a parameter query when the page is displayed

    Hello
    I use web ADF 11 g
    I need to run a parameter query when the page is displayed
    Thank you

    protected DCIteratorBinding getItrtBindings (String binding) {}
    DCIteratorBinding outIterBinding is getBindingsForDCB () .findIteratorBinding (binding);.
    Return outIterBinding;
    }

    public DCBindingContainer getBindingsForDCB() {}
    If (this.bindings == null) {}
    FacesContext fc = FacesContext.getCurrentInstance ();
    This.Bindings = (DCBindingContainer) fc.getApplication (.evaluateExpressionGet(fc,"#{bindings}",DCBindingContainer.class));
    }
    return (DCBindingContainer) this.bindings;
    }

    BindingContainer links protected;

    public BindingContainer {} getBindings()

    Return this.bindings;
    }

    public void setBindings (links BindingContainer) {}
    This.Bindings = links;
    }

  • ADF security - logout Prgrammatically back bean method

    Hello

    I use the ADF security.
    How programmatically (java) disconnection of a method to support bean? What should be the code?

    With the current logout go link (as mentioned in the help of Jdev) comes the following error and also the disconnection is not really conducted:
    403 - forbidden error
    RFC 2068 Hypertext Transfer Protocol--HTTP / 1.1:
    10.4.4 403 Forbidden
    The server understood the request, but refuses to fill. Authorization will not help and the request SHOULD NOT be repeated. If the request method was not HEAD and the server wishes to make public why the request has not been met, it SHOULD describe the reason for the refusal in the entity. This status code is commonly used when the server does not want to reveal exactly the reason why the request was refused, or when no other response is applicable.

    The disconnection should not be just a redirect. He put the authenticated fllag false so that even I go back to the previous page with the back button in the browser
    I only see the login page. Of Jdev if I close the browser, the session automatically closes but WebLogic deployed the application even if I close the browser after current disconnected, the session continues.



    Kind regards
    Sam

    Published by: Sat November 15, 2011 21:52

    Published by: Sat November 15, 2011 21:52

    Published by: Sat November 15, 2011 22:28

    Hello
    check

    http://download.Oracle.com/docs/CD/B32110_01/Web.1013/B28967/adding_security.htm#BGBFGIFA

  • Managed Bean method called several times in AF:ITERATOR

    Dear all,
    I can do not to understand this concept in the ADF. Being a beginner, I would like to know
    the reasoning behind this.

    I use af:foreach components and then I link it to my below managed bean.
    <af:panelTabbed id="pt1">
         <af:forEach var="item" items="#{testBean.departmentsData}">
           <af:showDetailItem text="#{item}" id="sdi1"/>
         </af:forEach>
    </af:panelTabbed>
    public class TestBean {
        public List getDepartmentsData() {
            System.out.println("I was clicked!!!!");
            List lstData = new ArrayList();
            lstData.add("IT");
            lstData.add("Finance");
            lstData.add("Accounting");
            return lstData;
        }
    }
    On the first charge, it prints 7 times "I clicked".

    When I clicked on one of the tab, I get 7 again which means my method was called 7 times.
    Any reason behind this. ? Thank you.

    I have used JDEV PS3 is told by the way.

    Rather than build the list in your getter, build a list somewhere (in the constructor, perhaps). Your getter can then return just this list.

    John

  • Its value cannot be changed when AF:inpuDate is set to a managed bean method

    Dear gurus,

    I have a date field. MinValue I want to set the default value of the value at the date of the day but also be editable by the user.
    I put its value to a managed bean, odes, which returns the current date in java.util.Date type.
    The value is displayed correctly, but the field is not editable.

    The field that IS NOT bound to any attribute of the entity.

    I searched the internet and this forum, but I have found no solution to this simple question.

    Any help appreciated

    Dimitris,

    You have the value of the element associated with a bean called 'currentDate' attribute, but there is no Set accessor for the property. Where you expect the value to check if the user has changed the value? You would need a method "setCurrentDate()" in your bean for the editable field.

    The get/set accessor you showed us (get/setStartDate) are for the instance of the component, not its value

    John

  • Default method of workflow activity is not called when the Page refreshes

    Basically, try to call a script function java front page of fragments of the charges.

    INSTALLATION PROGRAM:

    Jdev 12 c

    TF defined with a default activity that invokes a page fragment.

    The activity of default method calls a method to support bean which inturn calls the method init java script before the fragment on the page doesn't load.

    This TF is in a container jsf page.

    During the loading of the page containing the first activity of the method is called and js function triggers and then fragments of charges which is the desired behavior.

    PROBLEM:

    When I refresh the page by pressing F5 or by running the page again on the same window of the browser activity method default IS NOT gets called which inturn will not trigger the js call.

    But when I run the same page again in a different window it works and then subsequent updates or page load activity IS NOT of default method is called.

    If it is not provided? The default activity is called when the workflow is updated.

    Check outhttp://www.oracle.com/technetwork/developer-tools/adf/learnmore/108-triggerpopupinregion-1994836.pdf which should work also in your car.

    Timo

  • ADF select several shuttles become read only when the value is

    Hello

    I want to ask about the select oracle ADF that many shuttle.

    Recently, I want to create a shuttle a lot with the pre value is set in the right box, select. When I try to set the value of the shuttle to select several properties. The shuttle many select transformed into an object as input like the image below text

    a.png

    but when I'm not set to select several shuttles it became normal like that

    b.png

    the method that I put in the value property is like that

    public list < BidClassification > getListBidClassificationTaken() {}

    finalClassification = new ArrayList();

    The OperationBinding class method = ADFUtil.getMethodBinding ("retrSupSupplierClassificationFindAllBySupplierId");

    method.getParamsMap () .put ("supplierId", getSelectedSupplier () .getId ());

    List < BidClassification > finalClassification = method.execute () (list < BidClassification >).

    Return finalClassification;

    }

    the method that I use to set the position data is like this

    public list < SelectItem > getListBidClassification() {}

    retval = new ArrayList();

    The OperationBinding class method = ADFUtil.getMethodBinding ("retrBidClassificationFindAll");

    listBidClassification = (list < BidClassification >) method.execute ();

    for (BidClassification bc: listBidClassification) {}

    SelectItem item = new SelectItem();

    item.setLabel (bc.getId ());

    item.setValue (bc);

    retval. Add (Item);

    }

    Return retval;

    }

    I have already replace the method equal in the BidClassification class so there will be no more no problem

    Header 1

    < af:selectManyShuttle label = 'Grading' id = 'sms1"binding =" #{backingBeanScope.backing_vendorEdit.sms1} ' "

    leadingHeader = 'Ranking Master' trailingHeader = 'Grading of provider' >

    < f: selectItems value = "#{backingBeanScope.backing_vendorEdit.listBidClassification}" id = "si1" "

    Binding="#{backingBeanScope.backing_vendorEdit.SI1}"/ >

    < / af:selectManyShuttle >

    This the jsff xml where I put the shuttle several select no defined value

    < af:selectManyShuttle label = 'Grading' id = 'sms1"binding =" #{backingBeanScope.backing_vendorEdit.sms1} ' "

    leadingHeader = 'Ranking Master' trailingHeader = 'ranking of provider.

    value = "#{backingBeanScope.backing_vendorEdit.listBidClassificationTaken}" >

    < f: selectItems value = "#{backingBeanScope.backing_vendorEdit.listBidClassification}" id = "si1" "

    Binding="#{backingBeanScope.backing_vendorEdit.SI1}"/ >

    < / af:selectManyShuttle >

    Select this the jsff xml where I put the shuttle well with the value

    someone has an idea of what's going on with this code? ___. thx a lot btw

    @

    Yeay! I already fix it!

    BTW who behave the same as me.

    You must make a note on the setter and the Get accessor of the variable list you use

    * in my case, I don't implement the setter method and the list setter method

    THX.

  • Stop the execution of the method while the page is loading

    Hello

    I'm new to the development of web service client. I created a client using the full declarative approach, namely the average webservice dataControl. The web service, I created required 2 parameters to pass and returns a list. So I dragged and dropped the two parameters such as form fields and list in table form in the same page, as well as the execute method button.

    But the problem is when I loaded the page, get the webservice call/called and passes the parameters as null. And so I get a msg of validation. Can someone let me know what needs to be done when to avoid the execution of the method (webservice call) while the page is loading.

    Kind regards

    Marie Antoinette

    Did you check that?

    https://blogs.Oracle.com/Shay/entry/delay_method_execution_when_us

  • Date.MinValue causes other methods on the page to be executed

    Hi smart guys,.

    I have a page with a form that has some text fields and a date component. MinValue ADF ADF. I have a below submit button which, when clicked, executes the setSomething method.
    I realized that when I click the date component. MinValue to choose the date, the setSomething method is executed... It is too early and causing undesirable behaviors.
    Is there a way to set the setSomething method ONLY works when the clicking the button send (or at least block of running when handling with the date component. MinValue)?

    Thank you very much.

    using JDeveloper 11.1.1.3

    You can try something like this (I have not tried yet).
    1. define a scope pageFlowScope/View setting when you press the command button.
    2. in the actionListener/action method, find the defined parameter. If it satisfies the condition (the value is set), the execute method, otherwise ignore.
    3 reset the parameter when the action listener method is complete.

    It will be useful.

  • I tried to install a jet Office NEVER USED 5700 HP on my Dell Inspiron 1525. Finally managed to do print the Pages of Test 3, now it will not print anything. What I am doing wrong? ___Pat-

    I have hp HAVE TENT TO REPLACE MY HP 3500 WITH A NEVER SERVED 5700 DESKJET.  FINALLY MANAGED TO DO PRINT THE PRINTER TEST PAGES 3, NOW IT DOES NOT PRINT AT ALL.  I AM TRYING TO INSTALL THIS PRINTER ON THE DESKTOP DELL INSPIRON 1525.  A DELL TAKE CONTROL OF MY COMPUTER THE OTHER DAY HE HAS DELETED MY OLD HP UNTIL I COULD FIND THE CORRECT CD FOR HER.  ENDED UP WITH NO PRINTER AT ALL.  THIS ONE IS MORE RECENT ALL CARTRIDGES WERE STILL IN ENVELOPES AS THE PRINTER.  CAN SOMEONE HELP ME?  NOT ONLY AM I UNHAPPY WITH VISTA, BUT THIS DELL (1 YEAR OLD) IT CAME WITH.  WINDOWS 7 IS NOT FEASIBLE NOW.

    HELP PLEASE!

    Than 5700 is a serial number of the printer, NOT the printer model number.

    http://h20180.www2.HP.com/apps/lookup?h_lang=en&h_cc=us&cc=us&h_page=hpcom&lang=en&h_client=S-A-R163-1&h_pagetype=s-002&h_query=HP+5700+DeskJet&submit.x=10&submit.y=4

    Choose your printer, the OS and drivers model number, if any, at the link above.

    http://h20180.www2.HP.com/apps/lookup?h_lang=en&h_cc=us&cc=us&h_page=hpcom&lang=en&h_client=S-A-R163-1&h_pagetype=s-001&h_query=HP+5700+DeskJet&submit.x=4&submit.y=5

    Choose your model and the installation instructions.

    For any problem, contact HP:

    http://welcome.HP.com/country/us/en/contact_us.html

    See you soon.

    Mick Murphy - Microsoft partner

Maybe you are looking for