How to set the bind variable on page load and execute query ?

Hi All,
I am using Jdeveloper 11.1.1.5
I have a table called "Employee"
Columns :- id , name , location
Data :- 1, ,james , chicago
2 ,Raj ,capetown
Now i have another webservice(created as a webservice dataControl) which sends me the "id" on each time my page loads.Now the id which has been returned by webservice should be incorporated in my VO Query as in where clause to fetch the data for the respective "id" in that "Employee" table and should be rendered on form.
Eg :- Id "2" has been sent by the webservice then the record should be fetched from database should be "2","raj","capetown".
I know that there would be necessity of bind variable , but how do i set the bind variable on page load ?
How can i use the bind variable appropriately ??
Please suggest !!!!
Thanks.

Hi,
Check
http://www.orastudy.com/oradoc/selfstu/fusion/web.1111/b31974/web_services.htm#CJADCDBG
http://thepeninsulasedge.com/frank_nimphius/2011/02/18/adf-code-corner-sample-73-released-hands-on-creating-a-search-form-using-a-pojo-ws-and-the-web-service-data-control/
-Suresh

Similar Messages

  • Set VO bind variable on page loading programmatically

    Greetings everyone!
    I use JDeveloper version 11.1.2.3.0
    I am currently trying to get some filtered data from a VO, based on a WHERE clause with a bind variable. This process should be done on page load. I have to set this bind variable with the id of the logged user (the part of getting this id is already achieved and used somewhere else). My current approach is defining a managed bean with pageFlow scope. Inside this i have a method in which i retrieve the id and i set it as the parameter value. The code snippet:
          BindingContainer bindings = getBindings();
            OperationBinding operationBinding = bindings.getOperationBinding("getUserIdFromUsername"); //getUserIdFromUsername is a method defined in the AppModule and exposed in the client interface
           operationBinding.getParamsMap().put("username", getUserName());
          Object userID = operationBinding.execute();
            setUserId(Integer.parseInt(userID.toString()));
           System.out.println("THE USER ID IS: "+getUserId());
           BindingContainer bindings2 = getBindings();
           OperationBinding operationBinding2 = bindings.getOperationBinding("ExecuteWithParams");  // i've dragged and dropped the ExecuteWithParams operation into the page
           operationBinding2.getParamsMap().put("userId", getUserId());  // userId is the bind variable which i'm talking about
            Object result = operationBinding2.execute();
    Then, i call this method on BeforePhase in the page view. It works, i get the filtered data and the println shows me the correct ID. The problem is that each time i select a row in the table showing the data, the page seems to reload and it always get the selection back at the very first row.
    What am i doing wrong? May be this is not the right approach, as i've seen some other posts about this topic but they are not very clear to me.
    Please advice

    Approach1:
    Drag and Drop an Application  method as Default Method Call Activity, then draw a control flow case from the method to your page.
    In the application module method, implement appropriate logic.
    Approach2:
    Using a combination of client listener and server listener will also help.
    <af:clientListener method="onLoadAction" type="load"/>
    <af:serverListener type="MyCustomServerEvent"
    method="#{backingBeanScope.editBean.onLoadListener}"/>
    function onLoadAction(event){
               /*alert(':::: onSave ::');*/
               AdfCustomEvent.queue(actionEvent.getSource(),
                             "MyCustomServerEvent",
                             true);
           actionEvent.cancel() ;
           actionEvent.stopPropagation();

  • How to set a bind variable across the pages in a report

    I want to create a portal report where data will come from a table for a date range for a week.
    For e.g select event_date,last_name, event_name
    from RESOURCES
    where event_date between trunc(to_date(:curr_date,'DD-MON-RRRR'))
    and trunc(to_date(:curr_date,'DD-MON-RRRR')+ 7)
    The :curr_date is defined as a bind variable whose default value is sysdate.
    Now, when we run the report for the first time, it takes the :curr_date as
    sysdate and prints the report.
    I have two buttons in the report output like "previous week" and "next week".
    If someone presses previous week, the same report should run with curr_date
    as sysdate-7 and if someone presses next week, the report should run with
    curr_date as sysdate +7 and also the :curr_date sets to sysdate - 7 or sysdate + 7
    depending on the button pressed.
    Problem:
    How do I set the value of curr_date if someone presses any of
    previous week/next week.
    null

    Best to state your JDev version, and technology stack (eg. ADF BC) when posting.
    I can think of 2 approaches.
    1) Create a parent VO based on SELECT :bindVar FROM dual, then create links between your other VOs and the parent
    2) Create a AM client interface method that programatically sets the bind variable in each VO.
    Can you specify your use case? This one tends to come up when discussing effective from/to dated queries.
    CM.

  • How to set the path variable on Windows ME?

    I want to get a friend of mine to start using java the only problem is that we both dont know how to set the path variable in Windows ME. I cant seem to find any instructions on it for ME. So if someone could please tell me how or give me a llnk to directions for Windows ME. Thanks.

    Refer to the Installation Instructions for the package that you installed - I believe #5 if the instructions has the information. A link to the instructions is at the page you installed from.

  • How to use the bind variable in custom.pll

    Hi,
    How to use the bind variable in custom.pll.Its through error.
    any one gem me.
    very urgent.
    M.Soundrapandian.

    Hello,
    Please, ask this kind of questions in the e-business forum.
    Francois

  • How to set the header variables in weblogic

    Hi,
    We have a following set up in our environment.
    We have weblogic and on the top of it we have apex listener deployed which redirects Oracle Apex.
    My Issue:
    How can we set up the header variables in weblogic once the user is authenticated against weblogic server.
    We are struck here, not knowing how to set the header variables in weblogic server. Its fairly straight forward for Oracle Access Manager or others..
    Thanks
    Ramesh P.

    maybe you are looking for the routing options
    http://docs.oracle.com/cd/E13159_01/osb/docs10gr3/userguide/modelingmessageflow.html#wp1125348

  • How to identify the bind variable peeking problem?

    How to identify the bind variable peeking problem whether my db hitting or not and how to resolve it?
    currently we are doing the dbms_stat of application schema's with gather auto option and i hope this option we take the histogram stats also. Is there any option to improve it and its highly transactions oltp env of 11g.

    What is your exact 4 digits Oracle version ?
    Bind peeking issues are supposed to be solved with adaptative cursor sharing in 11.1 and 11.2:
    11.1 http://download.oracle.com/docs/cd/B28359_01/server.111/b28274/optimops.htm#sthref919.
    11.2 http://download.oracle.com/docs/cd/E11882_01/server.112/e16638/optimops.htm#PFGRF94588
    which says also:
    >
    Adaptive cursor sharing is enabled for the database by default and cannot be disabled. Note that adaptive cursor sharing does not apply to SQL statements containing more than 14 bind variables.
    >
    Edited by: P. Forstmann on 10 nov. 2011 13:50

  • How to set the Environment Variable

    I'm going through a tutorial on how to create an application and run from the command prompt. I have finished installing my jdk 6 Upadate 5 but i don't know how to set the Environment Variable for the javac compiler and the java interpreter to find my program.
    I have created an application called "ExampleProgram" and have saved it on drive C:. How do i set the Environment Variable so that the "javac" compiler and the "java" interpreter can find it

    gyesa_say wrote:
    I'm using Windows XP Service Pack 2.A very bad choice to go with Windows. Personally I prefer Linux.
    I Google and had several information on how set it, but i tried all of them and none seem to work.I typed "how to set environmental variable in winxp" in Google and the very first link provided all the information I needed (you need). These things will make much more sense if you go through it yourself rather than having someone else spoon-fed you the answer.

  • How to set a bind variable into a vo query from the current vo ?

    I would like to exclude from my list of values defined in a view object the already referenced items in the current view object content.
    Let's say i have dept and emp with a many to many relationships, I would like that the already existing dept for emp not listed (excluded) in the list of values for emp.
    Do i need to define a bind parameters and set it during search or is it possible to use an expression that will refer the current row attribute representing the dept ?
    I didn't find an example or explanation how to set bind parameters defined in a view object query from seach pages or list of values ui components. May be somebody know how to find the info.
    Thank you

    I think that bind variable accessors in the VO class is what you need. You can override the getter method of the bind variable "LocaleCode2" in order to return the first 2 chars from the bind variable "LocaleCode". Have a look at this blog post for details:
    http://jdeveloperandadf.blogspot.com/2011/03/custom-java-bind-variable-in-where.html
    Dimitar

  • How to set default bind variable value to task parameter value

    Hi,
    I 'm implementing a BPEL process with a human task, and I autogenerate the task form. I have a custom sql table that stores opinions, different processes should show different opinios, so my ADF table can only show records related to that process. A custom process number is sent to the task form as a task parameter. How do I use that value as the bind variable default and only value?
    Thanks,
    I.D.

    Hi Shay and thanks for your reply,
    What I want is what you have but without the login page. I tried to start my flow with an action and for some reason it didn't work.
    Is there anything else you can tell me?
    Thanks,
    I.D.
    P.S. I was able to get it to work using the aproach Frank Nimphius described in another post.
    Re: How do I prepopulate a bind variable from a session variable?
    Anyway just out of curiosity could you please tell me if I could have done it your way?
    Thanks a lot,
    I.D.
    Edited by: user8696770 on 5/Ago/2009 7:12

  • How to pass the bind variable value to the sql statement of the LOV

    Hi,
    I am using Forms 10g builder.
    I have a text item which will be populated by a LOV when i press a button, but i have a bind variable in the SQL statement of the LOV. That bind variable should be replaced by a value which is derived from a radio group in the same data block.
    For Ex: ( )radio1 ( )radio2
    before i click on the push button, I'll select one of the radio button above,so my question is how to assign this radio group value to the bind variable in the sql statement in the LOV?
    Pl any hint is appreciated!
    Thanks
    Reddy

    The variable can be taken into account in the SELECT order contained in the Record Group used by the LOV.
    e.g. Select ... From ... Where column = :block.radio_group ...Francois

  • How to set the binding type in abap web service

    before generating wsdl , anybody know how to change the binding type of wsdl for web service

    do u know any sap netweaver transaction coads for changing the binding .
    lpconfig tansaction  call parameter (logical port)  for client proxi is showing like
    binding type  = http://schemas.xmlsoap.org/soap/http
    but it is predefined  in some profile  can u tell me how to change this
    an in my wsdl i am getting
    <wsdl:port name="z_add_add_webSoapBinding" binding="tns:z_add_add_webSoapBinding">
    this i cant consume from java , in SAP i can consume this web service ,
    i want to make my wsdl like as shown bellow
    - <wsdl:port name="periodictableSoap" binding="tns:periodictableSoap">
      <soap:address location="http://www.webservicex.net/periodictable.asmx" />
      </wsdl:port>
    - <wsdl:port name="periodictableHttpGet" binding="tns:periodictableHttpGet">
      <http:address location="http://www.webservicex.net/periodictable.asmx" />
      </wsdl:port>
    - <wsdl:port name="periodictableHttpPost" binding="tns:periodictableHttpPost">
      <http:address location="http://www.webservicex.net/periodictable.asmx" />
    here you can sea httpget   and httppost  in my wsdl it is not there

  • How to set the DISPLAY variable to run admsi.pl?

    Dear Experts,
    I'm trying to patch Oracle apps R12 using admsi.pl.
    hostname: black
    APPS db: VIS
    But I keep getting the error:
    Please set the DISPLAY variable and re-run this script
    This is what I did:
    VIS database and listener are already running.
    login to the linux server as unix user: applmgr
    cd /oapps/applmgr/VIS/apps/apps_st/appl/
    . APPSVIS_black.env
    cd /oapps/applmgr/VIS/apps/apps_st/appl/ad/12.0.0/bin/
    admsi.pl
    Invoking Oracle Patch Application Assistant....
    Please set the DISPLAY variable and re-run this script
    huh ?
    set | grep -i "display"
    DISPLAY=:0.0
    set | wc
    435 486 25235
    I notice that there are 36 .env files!
    For applmgr alone!!
    find /oapps/applmgr/ -type f -name "*.env" | wc
    36 36 2626
    For oracle, there are another 7 .env files!
    find /oapps/oracle/ -type f -name "*.env" | wc
    7 7 513
    Did I get the environment (env) file correct?
    Or do I need to run a few more env first?
    If so, which ones?
    What would the order of operations be?
    sqldeveloper has given me problems with Display sometimes.
    But even sqldeveloper works fine.
    What is the secret to get admsi.pl to run in the normal manner?
    Thank a lot!

    Thanks a lot, that worked! So the perl script was wrong.
    In the meantime, I had done this, and it seemed to work:
    admsi.pl -debug
    Gathering Information..
    Enter the patch_top : /oappsinstall/update12.1.1/7303030
    Enter the APPS user password:
    Logfile for this session is located at admsi.log
    Generating installation instructions for patch 7303030..
    Updating database....
    install_7303030.html generated successfully
    install_7303030.txt generated successfully
    cat /oapps/applmgr/VIS/apps/apps_st/appl/ad/12.0.0/bin/admsi.log
    Executing begin :value := ad_manual_step_object.is_step_already_done('per_hrglobal','120.2.12010000.1'); end;
    Generating installation instructions for patch 7303030..
    Updating database....
    install_7303030.html generated successfully
    install_7303030.txt generated successfully
    Performing final cleanup..
    Do you think this worked ok?
    Thanks again!

  • How to have the BIND variables value using the TKPROF utility.

    WE have a JAVA application and Oracle 9i database.We need to figure out what all select/update/insert sql staements are firing if i am doing one complete processing in my JAVA front application.
    Initally I have planned for using TKPROF utility after makeing AUTO_TRCE=TRUE in the database.But the problem is that all select/insert/update sql statements are using the BIND variables in the JAVA code and same is coming/printing on the trace file also.
    can we print out the BIND variables values also,while making the TRACE ON?
    eg: trace is generaitng the all insert statements like below.
    insert into TEST(Column1,Column2) values(:1,:2);
    I want to know the value of :1 and :2 bind variables.
    If you have any cluse about it please let me know.
    Mitesh Shah

    Thanks Guys,
    I got the BIND variable values in the TRACE file.Previously i was searching on the OUtputfile.
    I am pasting the same trce file format.Can you please verify it.Is i am looking the correct file and corect location.
    PARSING IN CURSOR #2 len=1571 dep=0 uid=66 oct=3 lid=66 tim=18446744071740803342 hv=1462188955 ad='123434f0'
    SELECT PARENTIDKEY,CONTRACTKEY,COMPANYKEY,BACKENDKEY,DATAREP,BANKHOLDINGID,BANKID,CARRIERPARTYID,PRODUCTID,ID,PREMIUMINDEXRATE,ILLUSTRATEDMATURITYLOW,ILLUSTRATEDMATURITYHIGH,SPECIALHANDLING,CARRIERCOMMCODE,MONEYTRANSFERTYPE,FIRSTBILLSKIPMONTH,CONTESTABILITYENDDATE,DEDUCTIONDATE,MARKETVALADJUSTIND,FREEAVAILABLEAMT,ADVANCINGREJECTEDIND,RATEDIND,OTHERINSUREDIND,ENDORSEMENTIND,BENEFICIARYIND,CASECONTROLNUMBERASSUMING,OWNERLEGALNAME,STAMPDUTY,COMMISSIONANNUALIZEDIND,NONSTDCOMMTAKEN,LAPSETAXABLEGAIN,GOVTALLOTMENTSUSPENSEACCTAMT,LASTNOGOODCHECKREASON,LASTNOGOODCHECKDATE,LASTCOIDATE,LASTDEDUCTEDEXPENSECHARGES,LASTDEDUCTEDCOICHARGES,STATEMENTBASIS,LASTNOTICETYPE,LASTNOTICEDATE,PAYMENTDUEDATE,LASTBANKCHANGEDATE,EFTENDDATE,BANKBRANCHNAME,BANKNAME,PAYMENTDRAFTDAY,BANKACCTTYPE,CREDITCARDTYPE,CREDITCARDEXPDATE,ACCTHOLDERNAME,ROUTINGNUMBER,ACCOUNTNUMBER,PAYMENTMETHOD,ANNUALPAYMENTAMT,PAYMENTAMT,PAYMENTMODE,LASTCOIANNIVDATE,BILLINGSTOPDATE,BILLEDTODATE,FINALPAYMENTDATE,GRACEPERIODENDDATE,PAIDTODATE,STATUSCHANGEDATE,REINSTATEMENTDATE,TERMDATE,ISSUEDATE,EFFDATE,DOWNLOADDATE,DURATION,POLFEE,POLICYVALUE,COMMISSIONROLLOVERPCT,COMMISSIONOPTIONSELECTED,REPLACEMENTTYPE,CUSIPNUM,CONVERTTOPRIVATEIND,PORTABILITYIND,REINSURANCEIND,BILLNUMBER,JURISDICTION,ISSUETYPE,ISSUENATION,STATUSREASON,PRIORPOLICYSTATUS,POLICYSTATUS,SHORTNAME,ADMINISTERINGCARRIERCODE,PLANNAME,FILEDFORMNUMBER,FORMNO,CARRIERCODE,PRODUCTCODE,PRODUCTTYPE,LINEOFBUSINESS,CERTIFICATENO,POLNUMBER,CARRIERADMINSYSTEM FROM "POLICY" WHERE PARENTIDKEY = :1 AND CONTRACTKEY = :2 AND COMPANYKEY = :3 AND BACKENDKEY = :4
    END OF STMT
    PARSE #2:c=0,e=1298,p=0,cr=0,cu=0,mis=1,r=0,dep=0,og=0,tim=18446744071740803336
    BINDS #2:
    bind 0: dty=1 mxl=4000(4000) mal=00 scl=00 pre=00 oacflg=01 oacfl2=0 size=4000 offset=0
    bfp=082a5a9c bln=4000 avl=09 flg=05
    value="Holding_1"
    bind 1: dty=1 mxl=4000(4000) mal=00 scl=00 pre=00 oacflg=01 oacfl2=0 size=4000 offset=0
    bfp=082a4af0 bln=4000 avl=10 flg=05
    value="DUL001138U"
    bind 2: dty=1 mxl=4000(4000) mal=00 scl=00 pre=00 oacflg=01 oacfl2=0 size=4000 offset=0
    bfp=069bb890 bln=4000 avl=02 flg=05
    value="00"
    bind 3: dty=1 mxl=4000(4000) mal=00 scl=00 pre=00 oacflg=01 oacfl2=0 size=4000 offset=0
    bfp=069ba8e4 bln=4000 avl=04 flg=05
    value="CLIF"
    **********************************************************************************

  • How to use the Observer when a page loads

    Anybody know how to use the
    Spry.Utils.addClassName('DivName','selected') and then fire the
    Spry.Utils.addClassName with onLoad?
    I am loading a page with the selector utils in it into a div
    and then I think I must need an Observer to get the
    Spry.Utils.addClassName to work when this page loads in a div.
    Any help would be greatly appreciated.
    Thank you,
    Bisser.

    I added Spry.Utils.addClassName('DivName','selected') in the
    Script after the constructor and after the effects and it works
    fine. Thank you for your help to get me going.
    Well after the fact, this solution was a problem because it
    loads the selector each time I loaded the file.
    kinblas had the correct answer that I was looking for.... as
    it loads the selector as a 3rd argument.
    ie:
    Spry.Utils.updateContent('mainDIV','/menu.php', function() {
    Spry.Utils.addClassName('DivName','selected'); });
    Thanks to both of you for your continued support.
    Bisser.

Maybe you are looking for

  • Burning movies (.avi) to dvd

    well what i need to do is burn a .avi movie onto a dvd so that i can watch it on my dvd player in my livingroom. i asume i need a conversion program to convert the .avi to some format of which i dunno. then what do i need to burn the movie onto a vie

  • Send/receive issue after adding too many additional mailboxes

    Hello Everyone, I am trying to solve a problem with Outlook 2010, together with Exchange 2007 (SBS 2008 server). I am not sure if I should post this in the Exchange forum, or the Outlook 2010 section. The inbox (or actually all folders) are not updat

  • Have the installers for Flash x64 bit and Flash x32 Bit been combined?

    Up until just recently there were always 2 different installers for Flash. The 32 bit version and the 64 bit version. Has Adobe now combined the two separate installers in to one? Or do I still need to find separate x64 and x32 bit installers? I seem

  • Owner: unknown

    Hi, I have delete my admin user account last week, and now i have create a new user with admin Permissions. But the the Problem is that the owner of my Applications (filemaker, Office 2004 Folder) is "unknown". Should i change all Applications owner

  • Glossary checkbox selected but Glossary tab not displayed

    i've created a html help file (RH 2002) and added "glossary terms". To display the glossary tab, i even selected "Glossary" check box in the Tripane Tabs and windows (HTML Help window properties). I even added the dll file (HHActiveX.dll) in to my he