ADF: call to webservice on page load?

I have an application with a search form that uses a Web ADF service call.
The commandbutton control initializes the webservicecall and the records are retrieved in a read-only table.
The loading of the page the webservice is also called and all data are taken from the table.
How can I stop this?

I searched the forum for similar questions but none of the answers helpful to me whas.
I use Jdev 10.1.3.3.0

Hello

the most simple way, you can set #{adfFacesContext.postback} in the condition of discount for the method that calls the Web service for this way, it is not call on (postback) publication calls no. Another option is to reference a session flag

Frank

Tags: Java

Similar Questions

  • Call Java on the page loading

    Hello

    I'm trying to find a way to call the java bean method on the loading of the page.

    Scenario:

    Page a button with listener action like #{javabean.doSome}

    I need to call javabean.doSome on the loading of the page without pressing the button.

    I can't find the way to do it.

    Help, please

    Thank you

    Leon

    Hello

    Another way to do it is to use the MAF Javascript API to call the Java method. To do this, you can add a component verbatim in your amx page and add the necessary code to call the method.

    The javascript function that allows to make the call is "adf.mf.api.invokeMethod". You can find JSDoc here: http://docs.oracle.com/middleware/maf212/mobile/js-ref/adf.mf.api.html#invokeMethod

    Is there an envent in the page that points out that it has been fully charged. This is "showpagecomplete". You can add a listener to endure.

  • All the lines in the table of the ADF appear selected when the page loads

    I have a web application which for some adf displayed tables, displays all the lines highlighted that if they were selected. Not all tables in the request to do so, but those who have this feature do it every time.

    I see no difference between the declaration for tables that do not appear as well and those who aren't.

    I use 11.1.2.1 on Windows 7.

    Can someone point me in the right direction? The rowSelection property is set to unique and set apart from that I have no idea where to begin the search.

    Hello

    Just a wild guess here,

    You have the properl PKs defined in these tables?

    Kind regards
    Dimitris.

  • What is the best way to call a method in the bean on the adf page loading?

    Hello

    which is the best way to call a method in managing the beans on the adf page loading.

    My version of jdev 11.1.1.5.0

    Thank you

    I don't know if it's the right answer for your question try this...

    In taskflow for properties of method call, you must return a value when you use #{pageFlowScope.returnvalue} (returnvalue is a variable), so you can use your return value in the taskflow... Please let me if this is correct...

  • 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

  • The creation of dynamic UI 11 ADF component Page loading

    Hello

    , Our requirement is to create a user interface components dynamically during execution on jsff (page fragments) during fragment loads. Before the page loads, in the workflow, a default method activity runs and a query is executed. According to the results of the query, the type and the number of user interface components are identified in other words, when the query runs, if the returned field is type of varchar then a rich of entry text field must be created and added to the fragment of page and at this time when I try to access component through its id value user interface programmatically created I get null pointer exception. When google, I ve seen in 2006, exactly the same requirement of business like ours is discussed in OTN (https://community.oracle.com/thread/410428?start=0 & tstart = 0) with Steve Muench, but not the debate is over since then. I've seen different approaches such as RegionController, injection of javascript using eventhandling etc. I know that in BPM 11 g human task form user interface components are created dynamically during execution based on the BPM design-time value. So, any help is appricated.,


    Thanx


    Umit Sadeguzel

    Did you get a chance to examine the dynamic components of the adf? You can start from here: https://blogs.oracle.com/shay/entry/dynamic_adf_forms_with_the

    Arun-

  • Initial request on the Page loading

    Hi all

    I use Jdev 11.1.2.3.  I have a page with a simple table based on a view.  I want that he executed not the query when the page loads.  Now that I've seen many comments on this question and blog of Shay spot on that too, but what I see is the following.  When I have the table on a tab of the Panel with nothing else dressed the steps previously suggested, if the value of itterator #{! adfFacesContext.initialRender} and or affecting the value #{bindings. {LocalDate.inputValue not null}, seem to work splendedly.  But when I put a collection of panels around the table the methods above do not seem to work.  What I lack or y at - it another way I can get cela no query when the page is loaded?

    Thanks in advance for any advice.

    Steve

    #{! adfFacesContext.initialRender} is not very good approach to accomplish your use case, because sometimes is not clear what exactly is 'initial render' (for example, when you have defined a workflow set as region...)

    Instead, you must call YourViewObject.executeEmptyRowSet () before you navigate to the page.

    To learn how to execute the method before loading the page, see this blog: https://blogs.oracle.com/adf/entry/an_epic_question_how_to

    Dario

  • Page load ok under 22 worm fails on worm 28

    On the web page http://1luckydogrescue.org in the upper left corner is a link called "our dogs for Adoption.
    With the help of worm 22 when the user clicks on the link the page load very well. There is a built-in window that shows dogs for adoption. 28 worm using the embedded page does not appear.
    It is a Windows XP system. Also, I tried to view the page on Mac OSX, and get the same problem.

    Thank you very much for the help.
    dmoore

  • The connection to complaints.donotcall.gov while the page is loading. "All other pages load fine. Loads of everything perfectly on I / E 8

    When you connect to the 'do not call site' to complain I get the following message "the connection to the complaints.donotcall.gov was interrupted while the page is loading." All other pages load fine. Loads of everything perfectly on I / E 8.
    I started Firefox in safe mode and got the same results.
    Disabled the firewall and virus programs, no help. I have 2 new computers about 2 years, both have the same problem with version 12.0

    You can use this button to go to the Firefox profile folder:

    • Help > troubleshooting information > profile directory: opens showing the file
  • 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

  • onPageLoad activity was not called in jsff child page

    Hi all

    I've implemented the onPageLoad feature in my grain of support by the RegionController extension, but the method is not called in jsff child page.

    I'm having jsff parent and child jsff. In my parent jsff, I invoke the jsff as pop-up child. I want to do something different on the loading of the page parent and child.

    for example... I have traced superclass jsff pagedefinition backingbean A controller and controller pagedefinition class child jsff on back bean B

    When the parent page opens action onload in the controller's class. runs but when I open the child page onload in the controller B class action does not run.

    But if I delete the parent page definition controller class mapping, then the action of onload child page in the class controller B is executed.

    Kindly help me to solve this problem.

    Thank you and best regards,

    Synthia

    And your version of jdev?

    You can try to lazy initialization of a property of beans as shown on this blog https://tompeez.wordpress.com/2014/10/18/lazy-initalizing-beans/

    If youbdefine a view range of the bean in the child workflows that bean is initialized when the child is in charge.

    Timo

  • Get the values of default table row when the page loads

    Hello

    I am running JDev 11.1.1.7. We have a page that contains two tables in a relationship of the master / detail of nickname. We can do a real master ADF / detail with view items related because the query for the 2nd table is complex and works best when queries with binding settings. The View object for the 2nd table has a request with 2 link params as it can get in the first table. Thus, when a line is selected in the first table we want to execute ExecuteWithParams on the object from view of the table 2. We do it in the Bean managed for the page in a method that is the selection to the first table listener. It works fine except when the page initially loads, the first line is selected by default. When the default value is selected the selection listener is not triggered.

    I've seen the suggestion of not having a line selected by default when the page loads by removing the value selectedRowKeys on the table. However, we do not want that the 1st row of the table secondary master to be selected by default and we as the table of detail to show the correct corresponding lines.

    Steve

    Steve,

    Not really sure when you say that the 2nd table is complex and may not use the master detail. If the settings link in the parent table, you can set the ViewLink accordingly and it should work, right?

    In any case, if you're after the execution of methods on the loading of the page, you will find the links below.

    If it's a working group, you can add a methodCall as activity by default and UTF, you can use phase listener (if listener server does not).

    https://blogs.Oracle.com/aramamoo/entry/an_epic_question_how_to

    Advice from the Oracle Johny: ADF: how to run the ViewObject with a ViewCriteria on the PageLoad in Application Web ADF

    It will be useful.

    See you soon

    AJ

  • Slow Page load after deployment


    Using JDeveloper 11.1.1.6

    I have an application that uses many of the page, dynamic areas and fragments of page flows.

    After I deployed the application, each page takes a minute to load.  Once I take the time to open each page once, they open quickly thereafter.

    I guess the first load of the page is cached and the other page load uses the cache.

    Is it possible to get the initial page loading to be faster?

    Thank you

    Ray

    On first access, the pages are compiled.

    Then turn on precompile as part of your deployment: ADF & Weblogic how to: activate the jspx pages precompilation in weblogic.

  • Validation of required field only when the page loads (HR test case!) included

    Hi experts,


    Here you have a simple test for Jdev 12.1.3 HR case: https://dl.dropboxusercontent.com/u/18609389/TestHR.zip

    The main.jspx is just a button which CreateInsert a record dept displayed in another page:

    Screen Shot 10-16-14 at 07.04 PM.PNG

    My problem is the following page (test.jspx) has this code to run when the page loads:

    <af:serverListener type="onloadEvent" method="#{backingBeanScope.backinBean.onPageLoad}"/>
                <af:clientListener method="onLoadClient" type="load"/>
                <af:resource type="javascript">
                  function onLoadClient(event) {
                      AdfCustomEvent.queue(event.getSource(), "onloadEvent", 
                      {
                      },
    false);
                      return true;
                  }
                </af:resource>
    

    The code is simply this (now):

        public void onPageLoad(ClientEvent clientEvent) {
            logger.severe("HR TEST.....");
        }
    

    And that's the problem, required validation is performed.

    Screen Shot 10-16-14 at 07.06 PM.PNG

    Can you tell me why?

    Thank you

    Jose.

    Don't know what is my mistake, but the code is of the actionListener button is not called. :-(

    Well, you combined two different ways to do this (from my first answer).

    If you are still reading this, you will notice "or" before the second suggestion

    Thus,.

    1. keep your clientListener under af:document tag

    2. based on javascript, you find key (use: alert ("button");)  to see if you have referenced correctly your button in findComponentById())

    And then:

    approach 1:

    Use AdfActionEvent.queue (button, true);  queue event on your action button and implement your logic in function attached to the properties of your 'actionListener' or 'action' button (if you don't need listener server in this case)

    approach 2:

    Use AdfCustomEvent.queue (button, "onloadEvent", {}, false);  the queue onloadEvent on your button (in this case you need listener server attached to your button)

    Dario

  • Setting default value for selectOneChoice when the Page loads

    BPM JDev 11.1.1.5.0

    I have a selectOneChoice component bound to a BPM data control. You need to set a specific value as the default value when the page is loaded for the first time.

    I did the scope of the bean managed as pageFlowScope.
    Then created a variable of string in the bean called 'postal code' and its setter I wrote like:

    You can follow this approach as well. But when you call the countryCode setter? You must set the value of the variable string.

    Then, I used your code in the jspx page.

    You need to edit my code in the jspx you use a managed bean. The code will change as below.

    
       
           
       
     
    

    I was suggesting to use a variable of pageFlowScope as defined in my previous code snippet. And on pageload, set this variable. To find out how to write/execute java code before page loads refer to this post:
    http://www.baigzeeshan.com/2011/05/How-to-run-Java-code-on-every-page-load.html
    In the afterPhase of the post method, you can set the variable pageFlowScope as shown below.

    AdfFacesContext.getCurrentInstance().getPageFlowScope().put("countryCode", "IndiaIN");
    

Maybe you are looking for