Execute search programatically during initial page load.

hi,
when the page is initially rendered, i have requirement to have the page automatically retrieve rows that belong to the user (ie execute a search programatically)
to achieve that i did the following -
1. created search page using autocustomizationcriteria
2. mapped all search fields to corresponding VO fields ( i intend to not override the default where clause since all my search can directly be mapped to a VO attribute)
3.populated the userlogin value into the corresponding search field as follows -
String lg = pageContext.getUserName();
OAMessageLovInputBean lovBean = (OAMessageLovInputBean)webBean.findChildRecursive("searchLogin"); //the searchfield is a messageLOVInput
lovBean.setValue(pageContext, lg);
the behavior i was expecting is for the page to automatically generate the where clause since i populated the search field that is mapped to the VO attribute and execute the query (i did not invoke executequery() per dev guide) BUT instead it is executing a BLIND query with no where clause.
would appreciate any insight into what i am doing wrong....
thank you.

hi, i had initially done the setting of the whereclause and executing programatically. however, when you do that, subsequently, the 'Go' button also needs to be handled programatically (including all search criteria whereclause generation) and then you loose all the features of the queryBean especially the different search options (eg like , starts with etc) on the Advanced Panel unless you code for all those features yourself...... NOTE - the need to handle the 'Go' button yourself happens even though after executeQuery() for just the initial page load, i reset the whereclause and whereclauseparams to NULL....
i also do not have a formvalue associated with the searchlogin field.
any other inputs please ?
thank you.
Edited by: user8249972 on Jan 28, 2013 10:22 AM

Similar Messages

  • How to execute a view object on page load

    Hi
    I have got two pages, one is login page and the other is search page.
    When ever the user who has logged in, navigates to the search page,
    following events should occur.
    1) a view object should get executed. This view object should check whether there is a default search for the user who has logged in( the check is made based on a boolean variable). This particular view object has got a bind variable.
    a) logged in user.
    Based on who ever has logged in, the bind variable should be set as the logged in user and all the attributes concerning the default search for the logged in user must be populated in select input text components in the search page. ( there are certain select input text components in the search page).
    If there is no default search for the logged in user, then the search page should open up, but without any values populated in the select input text component.
    Please let me know if i am not clear with my question.
    My ultimate aim is to execute a view object on page load for which the bind variable is set as the logged in user.

    actually, your requirement isn't exactly to execute a view object on "a" page load, as in ageneric page load, that would be little more intensive , with you requiring an invokeAction in your page bindings etc.
    Yours, i presume is a simple case wherein if you link your login command button at the initial screen to a method in your managed bean, should do the trick. Within the managed bean method code ,
    get the username ( which you can probably store on the request at time of login) ,
    get hold of your view object,
    set the bind variable ,
    execute the query on the VO ,
    return an appropriate string outcome , which is handled by your faces context navigation rules.
    Fairly straightforward procedure, unless there's something extra you want to do apart from just that.
    K

  • Issue with invoking javascript during jspx page load

    Hi All,
    I am using Jdeveloper 11gR2.
    I have embedded a small javascript snippet in the adf page to invoke a managed bean method during page load.
    <af:serverListener type="onloadEvent" method="#{AMBean.click}"/>
                <af:clientListener method="onLoadClient" type="load"/>
                <af:resource type="javascript">function onLoadClient(event) {AdfCustomEvent.queue(event.getSource(),"onloadEvent",{},false); return true;}</af:resource>
    In the associated managed bean method, I want to change the setContentStyle of all the input text field found during run time -
            System.out.println("There control is inside the listeners");
            FacesContext facesContext = FacesContext.getCurrentInstance();
            System.out.println("facesContext"+facesContext);
            UIViewRoot root = facesContext.getViewRoot();
            System.out.println("root - " +root);
            RichPanelFormLayout formClass = (RichPanelFormLayout)root.findComponent("db");
            System.out.println("formClass - " + formClass);
            List<UIComponent> uiComponentList = formClass.getChildren();
                  for (UIComponent uiComponent : uiComponentList) {
                      if (uiComponent instanceof RichInputText) {
                          //((RichInputText)uiComponent).setDisabled(false);
                          //((RichInputText)uiComponent).setColumns(100);
                         ((RichInputText)uiComponent).setContentStyle("width:200px");
                          System.out.println("uiComponent - " +uiComponent);
    Currently the javascript function "queues" the setContentStyle action for an action event, i.e. during the initial page load, the properties of text fields are not changed, however as soon as i click any button on the page, the text field width is reset to what I have defined in setContentStyle property.
    Is there a way to execute setContentStyle action as soon as the page loads initially?
    Best Regards,
    Ankit Gupta

    Hi Arun,
    Many thanks for the revert.
    The exact Jdeveloper version is 11.1.2.4.39.64.36.1.
    I have a scenario where in the the user will be navigated to a page to display an input form, but the underlying VO will change during runtime which means depending on the value selected by the user, he will be shown an ADF form accordingly.
    Also during runtime, the number of input text fields will change according to the number of attributes in underlying VO.
    Kindly advise based on the use case explained above.
    Best Regards,
    Ankit Gupta

  • Place default checkbox value "in SESSION" on initial page load

    Oracle 11.2
    Apex 4.1
    Desire outcome: Chart renders on inital page load using default value of checkbox in query.
    I have a checkbox with a default (checked) value. It shows checked when the page renders for the first time but the value is not in the SESSION state. I use this value in a query for a chart. I do not want to use a Submit button so I have a dynamic action submitting the value for the checkbox and the chart refreshes as desired when I check and uncheck the box.
    I tried "Fire on Page Load" in the DA Execution Options, as well, but that caused a loop where the page renders and immmediately renders, and immediately renders, etc.
    Is there a declarative solution that submits the current, in this case default, values when the page is loaded? I only need and want the default values used the first time the page is accessed. This is the initial page of the application but I need the same behavior on all pages for the separate checkbox selections found there.
    May God Bless,
    Howard

    Howard (DBA in Training) wrote:
    If I remove the Default Value and add a Before Header page computation for the item with static assignment to
    a:bI get the 2 A/B checkboxes, both checked, and the value is set in session state.If you log in here, you can see it up close and personal!
    http://apex.oracle.com/pls/apex/f?p=21997:3 Login: Dever / Ima9Dever
    The Default Value colon-delimited string must contain the checkbox values, not the labels. In a static LOV the checkbox options are specified as <tt>label;value</tt> pairs. Thus in your checkbox LOV the labels are A/B, whilst the values are a/b. The values are case-sensitive.
    The Default Value should therefore be:
    a:bwhereas you've specified:
    A:BWith the checkbox item LOV Display Extra Values property set to Yes, APEX displays these extra values that are not included in the LOV definition as additional checkboxes. You can see this if you inspect the rendered checkbox elements in the HTML source:
    <input type="checkbox" id="P3_CHECKBOX_0" name="p_v01" value="a">
    <input type="checkbox" id="P3_CHECKBOX_1" name="p_v01" value="b">
    <input type="checkbox" id="P3_CHECKBOX_2" name="p_v01" value="A" checked="checked">
    <input type="checkbox" id="P3_CHECKBOX_3" name="p_v01" value="B" checked="checked">You get the a/b values defined in the LOV, plus the extra A/B values the LOV knows nothing about.
    ==== ) How do you keep it from setting/resetting these values each time the
    page is rendered?  The need is to do it only the very first time?  ( ====Put a Value of Item / Column in Expression 1 Is NULL condition on the Computation. Problem then is that the computation will be run if the user can [legitimately] deselect all of the checkboxes, either leaving you back where you started, or requiring the use of a further item to flag whether it is the really "the very first time" (which I find intellectually deeply unsatisfactory). This may be a sign that the control should really be a radio group that always has one option set, rather than a check box.

  • Safari's initial page load delay... where to turn off or change?

    Hi,
    A while back I read that Safari puts a few seconds delay when loading a new webpage, .. and 4.03 still has it. I just can't find where it was that I read how to take it off.. Does any one know?
    Basically I want Safari to start drawing the page as soon as it gets to it, kind of like opera does.
    Just in case Why don't I just use opera? I prefer Safari, but I don't always need the initial page that is loading but a link on it... and I find myself waiting.. and on fast connection, just to load a page I shouldn't have to be waiting until the browser feels the page load is complete.
    Thanks
    Oscar

    HI,
    There's no delay feature that you are referring to in Safari. If you can find the article you read, could you please post it here?
    Have you tried emptying the cache?
    From the Safari Menu Bar, click Safari/Empty Cache
    Also, try using Open DNS
    Carolyn
    Message was edited by: Carolyn Samit

  • CSS on some pages is not displaying properly on initial page load.

    I'm running into an issue where a page loads and the styles do not render correctly. After the page loads, I can temporarily fix this by choosing: View->Page Style->No Style, then doing it again with: View->Page Style->Basic Page Style. Though when navigating away from the page and then coming back to it, I will have to do it over again.
    I'm experiencing this issue on v. 36.0.3 for Windows and v. 36.0 for Ubuntu

    Start Firefox in <u>[[Safe Mode|Safe Mode]]</u> to check if one of the extensions (Firefox/Tools > Add-ons > Extensions) or if hardware acceleration is causing the problem.
    *Switch to the DEFAULT theme: Firefox/Tools > Add-ons > Appearance
    *Do NOT click the Reset button on the Safe Mode start window
    *https://support.mozilla.org/kb/Safe+Mode
    *https://support.mozilla.org/kb/Troubleshooting+extensions+and+themes
    You can check the Net log and the Network log in the Web Console (Firefox/Tools > Web Developer) to see how long it takes for content to arrive.
    *https://developer.mozilla.org/Tools/Network_Monitor
    You can also try to reset (power on/off) the router and maybe check with your ISP if it happens on more than one OS.

  • Slow initia page load

    Hi there,
    I am experiencing another issue where loading the initial
    roboHelp home page can take up to 1-2 minutes. Once this page is
    loaded all subsequentrequests are fine. If I close the browser and
    wait an hour or so, I get the same slow response again. This
    happens even when I request the page on the server itself. I
    noticed on the server (win2000) dllhost.exe goes nuts taking up of
    50% CPU for 1-2 mins. Anyone got any ideas?
    Thanks for your time,
    Cam.

    It might be worth looking at any anti-virus software to see
    if that is the cause of the problem. I've seen instances with
    ordinary webhelp output where the initial load of the help took
    ages. Once the start page was assigned as "trusted" in the
    anti-virus software all was OK.

  • Safari "Pauses" During Web Page Load

    This is a tough one. I'm having a problem where Safari will partially load a page, any page, then pause for up to 30 seconds, and either load the rest of the page or show "?" in a bunch of places and load the page incorrectly. I can't find anything wrong with my internet connection, router, or anything. ISP insists it's a software issue. This issue does not manifest in Camino or Firefox. Installed Safari 4 Beta and it did not fix the issue. Uninstalled Safari 4 and it did not fix the issue. Any ideas?

    I have some more information.
    I did a trace on my network to see if there are any problems. I traced to http://www.msnbc.com. Everything seems normal until hop 15 or 16. That is where I get the following:
    15 ten3-4.cpk-76c-1b.ntwk.msn.net (207.46.34.118) 116.777 ms 150.908 ms 200.162 ms
    16 10.22.0.6 (10.22.0.6) 109.696 ms 109.311 ms 109.635 ms
    17 * * *
    18 * * *
    19 * * *
    20 * * *
    21 * * *
    22 * * *
    23 * * *
    24 * * *
    25 * * *
    26 * * *
    27 * * *
    28 * * *
    29 * * 10.22.0.6 (10.22.0.6) 110.254 ms !X
    30 * * *
    31 * * *
    32 10.22.0.6 (10.22.0.6) 110.023 ms !X * *
    33 * 10.22.0.6 (10.22.0.6) 110.237 ms !X *
    34 * * *
    35 * * *
    36 * * *
    37 * * *
    38 * * *
    39 * * *
    40 * * *
    41 * * *
    42 * * *
    43 * * *
    44 * * *
    45 * * *
    46 * 10.22.0.2 (10.22.0.2) 110.650 ms !X *
    47 * * 10.22.0.2 (10.22.0.2) 113.808 ms !X
    48 * * *
    49 * * *
    50 * * *
    51 * * 10.22.0.2 (10.22.0.2) 110.234 ms !X
    52 * * *
    53 * * *
    54 * * *
    55 * * *
    56 * * *
    57 * * *
    58 * 10.22.0.6 (10.22.0.6) 109.707 ms !X *
    59 * * *
    60 * * 10.22.0.6 (10.22.0.6) 109.721 ms !X
    61 * * *
    62 * * *
    63 10.22.0.2 (10.22.0.2) 110.117 ms !X *
    Can anyone decipher this for me?

  • Problem setting variables after initial page load

    So, I'm pretty new to ColdFusion and hoping this is an easy fix.  I have a .cfm page that opens from several different points in a website.  Depen
    ding on which point it opens from, the variables room and activebutton are assigned different values via an onclick event.  Based on these values, the room variable sets a background image for a div and the activebutton sets the textcolor for a different div via a stylesheet in the head of the document.  Now, this part works fine with the following code in the stylesheet in the documents head:
    #fp_r1_c2 {
    background-image:url('images/<cfoutput>#room#</cfoutput>');
    width:599px;
    height:577px;
    float:left;
    #<cfoutput>#activebutton#</cfoutput>
    color:#FFF;
    Heres where things get hairy.  After I have those initial variables set there are 6 divs (the ones that activebutton changes the color attribute of) that the user can click on.  When any div is clicked its color should set to #FFF and whatever div was previously selected should change back to the default color for the page.  In addition, the background-image attribute of the other div that was set by the room variable must change to a new image that corresponds to each button.
    I've tried several methods, most of which I probably messed up anyhow.  But I'm completely stumped how to accomplish this.  Researching online has shown me that I can't include the new values in any kind of onclick command...so how exactly should I go about accomplishing what I need done?
    Tthanks in advance for any assistance!

    You need to understand the underlying premise that ColdFusion is a "server-side" language. Once the page is generated and sent to the client as HTML, everything is in the hands of the client until the next request back to the server. So, if you want to do much in between server calls, a client-side tool such as JavaScript is the answer.

  • When i try to open a site, i get several new pages open with 4 tabs apiece, 2 index of files pages and 2 server not found pages. i have had as many as 10 of these pop up one after the other. initial page loads but i have to close all the other pages.

    i have an HP with mozilla 4 browser

    Hi,
    Thanks for the reply. I have tried this on another machine running the same version of Blackboard. It works fine.
    Only difference is that the machine that has the JVM crash is running on Fujitsu PrimePower and the OS is Solaris 9 (but twigged for PrimePower).
    The one where it runs and starts up successfully is running on SunFire (OS is Solaris 10).
    I am wondering if there is a problem with the JVM loading required libraries because of the OS being different versions.
    Any leads on this is welcomed. Thank you.
    Regards,
    Hon Peng
    ===================
    On Fujitsu Primepower
    SunOS 5.9 Generic_118558-33 sun4us sparc FJSV,GPUS
    the Dependencies for libjvm.so are as follows:
    ===================
    bash-2.05$ ldd -r libjvm.so
    libsocket.so.1 => /usr/lib/libsocket.so.1
    libsched.so.1 => /usr/lib/libsched.so.1
    libdl.so.1 => /usr/lib/libdl.so.1
    libCrun.so.1 => /usr/lib/libCrun.so.1
    libm.so.1 => /usr/lib/libm.so.1
    libthread.so.1 => /usr/lib/libthread.so.1
    libc.so.1 => /usr/lib/libc.so.1
    libnsl.so.1 => /usr/lib/libnsl.so.1
    libmp.so.2 => /usr/lib/libmp.so.2
    /usr/platform/FJSV,GPUS/lib/libc_psr.so.1
    =====================================
    On SunFire, Sun machine
    SunOS 5.10 Generic_118833-36 sun4u sparc SUNW,Sun-Fire-280R
    the dependencies are different for the libjvm.so:
    =====================================
    bash-2.05$ ldd -r libjvm.so
    libsocket.so.1 => /lib/libsocket.so.1
    libsched.so.1 => /usr/lib/libsched.so.1
    libdl.so.1 => /lib/libdl.so.1
    libCrun.so.1 => /usr/lib/libCrun.so.1
    libm.so.1 => /lib/libm.so.1
    libthread.so.1 => /lib/libthread.so.1
    libc.so.1 => /lib/libc.so.1
    libnsl.so.1 => /lib/libnsl.so.1
    libmp.so.2 => /lib/libmp.so.2
    libmd5.so.1 => /lib/libmd5.so.1
    libscf.so.1 => /lib/libscf.so.1
    libdoor.so.1 => /lib/libdoor.so.1
    libuutil.so.1 => /lib/libuutil.so.1
    /platform/SUNW,Sun-Fire-280R/lib/libc_psr.so.1
    libm.so.2 => /lib/libm.so.2
    /platform/SUNW,Sun-Fire-280R/lib/libmd5_psr.so.1

  • ADF method call to fetch data from DB before the initiator page loads

    Hello everyone
    I'm developing an application using Oracle BPM 11.1.1.6.0 and JDeveloper 11.1.1.6.0
    I want to fetch some data from the database before the initiator task, so that when the user clicks on the process name, his/her history will be shown to them before proceeding.
    It was possible to have a service task before the initiator task in JDeveloper 11.1.1.5.0, but I have moved to 11.1.1.6.0 and it clearly mentions this to be an illegal way.
    I came across this thread which suggested to do this using an ADF method call, but I don't know how since I'm new to ADF.
    Re: Using Service Task Activity before Initiator Task issue
    Can anyone show me the way?
    Thanks in advance

    Thanks Sudipto
    I checked that article however I think I might be able to do what I want using ADF BC.
    See, what I'm trying to do is to get a record from a database and show it to the user on the initiator UI.
    I have been able to work with ADF BC and View Objects to get all the rows and show them to the user in a table.
    However, when I try to run the same query in the parameterized form to just return a single row, I hit a wall.
    In short, My problem is like this:
    I have an Application Module which has an entity object and a view object.
    My database is SQL Server 2008.
    when I try to create a new read only view object to return a single row I face the problem.
    The query I have in the query section of my View Object is like this:
    select *
    from dbo.Employee
    where EmployeeCode= 99which works fine.
    However when I define a bind variable, input_code for example, and change the query to the following it won't validate.
    select *
    from dbo.Employee
    where EmployeeCode= :input_codeIt just keeps saying incorrect syntax near ":" I don't know if this has to do with my DB not being Oracle or I'm doing something wrong.
    Can you help me with this problem please?
    thanks again
    bye

  • Safari crashing during youtube page load

    I recently upgraded to Safari 4.0.5. I am using OS X 10.4.11. Safari now crashes as youtube.com is loading. I had no trouble with youtube before the upgrade. What can I do?

    I have some more information.
    I did a trace on my network to see if there are any problems. I traced to http://www.msnbc.com. Everything seems normal until hop 15 or 16. That is where I get the following:
    15 ten3-4.cpk-76c-1b.ntwk.msn.net (207.46.34.118) 116.777 ms 150.908 ms 200.162 ms
    16 10.22.0.6 (10.22.0.6) 109.696 ms 109.311 ms 109.635 ms
    17 * * *
    18 * * *
    19 * * *
    20 * * *
    21 * * *
    22 * * *
    23 * * *
    24 * * *
    25 * * *
    26 * * *
    27 * * *
    28 * * *
    29 * * 10.22.0.6 (10.22.0.6) 110.254 ms !X
    30 * * *
    31 * * *
    32 10.22.0.6 (10.22.0.6) 110.023 ms !X * *
    33 * 10.22.0.6 (10.22.0.6) 110.237 ms !X *
    34 * * *
    35 * * *
    36 * * *
    37 * * *
    38 * * *
    39 * * *
    40 * * *
    41 * * *
    42 * * *
    43 * * *
    44 * * *
    45 * * *
    46 * 10.22.0.2 (10.22.0.2) 110.650 ms !X *
    47 * * 10.22.0.2 (10.22.0.2) 113.808 ms !X
    48 * * *
    49 * * *
    50 * * *
    51 * * 10.22.0.2 (10.22.0.2) 110.234 ms !X
    52 * * *
    53 * * *
    54 * * *
    55 * * *
    56 * * *
    57 * * *
    58 * 10.22.0.6 (10.22.0.6) 109.707 ms !X *
    59 * * *
    60 * * 10.22.0.6 (10.22.0.6) 109.721 ms !X
    61 * * *
    62 * * *
    63 10.22.0.2 (10.22.0.2) 110.117 ms !X *
    Can anyone decipher this for me?

  • Problem with initial page load

    Hi,
    I have created an interactive guide to Yellowstone:
    http://www.expeditionguides.com/yellowstone/yellowstoneXG.html
    However, when I visit the site for the first time the main menu's background image doesn't show up. Instead, the page is black for 10-15 seconds (when I view it in a Firefox browser on my Galaxy smartphone, it never changes from black).  On my desktop Firefox browser, the main menu's background image eventually shows up and from that point on there is no problem.
    I am guessing that the problem stems from the fact that the page features a video and an extensive virtual tour, both of which are pretty large in size. My objective was to fade the main menu image when either the video or virtual tour buttons are selected, revealing the applicable content below.  Does anyone have a suggestion on how to tweak this to make the main menu image and buttons show up faster?
    Thanks,
    Paul

    I would try using OpenDNS servers. System Preferences>Network>Advanced>DNS. In the left side column click on the + sign and add the following:
    208.67.222.222
    208.67.220.220
    Click OK. Then click Apply.
    Info on OpenDNS is here:
    http://www.opendns.com/

  • Execute code on UI component during page load

    Hi All,
    I am usng Jdeveloper 11gR2.
    I want to invoke below code snippet to change the properties of input text fields and set them to enable on page load -
            FacesContext facesContext = FacesContext.getCurrentInstance();
            UIViewRoot root = facesContext.getViewRoot();
            RichPanelFormLayout formClass = (RichPanelFormLayout)root.findComponent("id");
            List<UIComponent> uiComponentList = formClass.getChildren();
                  for (UIComponent uiComponent : uiComponentList) {
                      if (uiComponent instanceof RichInputText) {
                          //((RichInputText)uiComponent).setDisabled(true);
                          ((RichInputText)uiComponent).setColumns(100);
                          Boolean flag = ((RichInputText)uiComponent).isChanged();
                          System.out.println("flag - " + flag);
    At present the code snippets works well on command component action but I want to execute the same during initial page load without the use of any command component.
    Please advise on how to achieve this.
    Best Regards,
    Ankit Gupta

    Check out https://blogs.oracle.com/adf/entry/an_epic_question_how_to
    Solution 2 (invoke actions) are deprecated in 12c so I wouldn't recommend using it.
    Timo

  • Method called three times on page loading

    I have a page with panelTabbed and several showDetailItems. On the first showDetailItem I have ADF Query component with the results table.
    I want the second showDetailItem to be enabled or disabled depending on whether there is a selected row in the results table or not.
    I have second showDetailItem's Disabled property set to an EL expression referring to a method in a backing bean.
    This method is called three times during initial page loading. I suspected that it was caused by some partialTriggers, but without any partialTriggers
    ADF behave the same way.
    Moreover, first two times there is a selected row in an iterator. Only the third time there's no selected row (empty initial state of the results table).
    And if this method returns false (not disabled) first two times and true (disabled) third time only, the second showDetailItem is enabled after page is loaded.
    What is responsible for these redundant calls of the method?

    Studio Edition Version 11.1.2.0.0
    Build JDEVADF_11.1.2.0.0_GENERIC_110531.1615.6017

Maybe you are looking for

  • Mail wont download emails

    The account checks out fine, even in the connection doctor but when I try to get new mail it starts to download then trickles down to 0kbps and sits there and after a while Mail just gives up and acts like it finished downloading when it really hasn'

  • Opening a pdf from LabVIEW

    How do I launch Acrobat Reader with a pdf file from Labview? I've tried DDE with Acroview, Control and OpenDoc but I get an error. thanks, Andrew.

  • Calling a business service based on operation-soap action in Proxy service

    Hi, I have a requirement in which I have to call a business service based on operation-soap action defined in Proxy service wsdl. Like in below mentioned wsdl GetPartCostDelta and GetCurrencyList operations are there.But which ever operation I select

  • Can't paste into sub-folders

    I am experiencing a strange problem. I have two computers, both with OS X 10.6.4 where the Finder behave's differently. The computer that works as expected is a non-unibody Macbook Pro (early 2008) that has been upgraded to Snow Leopard. The computer

  • Autonumber in JDBC

    Hi, I am using a Microsoft Access database for my application. How do you use the autonumber type in the insert statement. I couldn't figure it out. If it's not possible. What is the smartest way to get a id for your row? Thanks in advance! /J Lindro