How to share a bind variable across multiple view objects?

Hi, Can someone tell me if it's possible to share a bind variable among multiple view objects within an application module? My web page displays data from different VOs on different regions. But all data should be controlled by the same bind variable, which appears in all queries. How can I achieve this?
Please help.

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.

Similar Messages

  • 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.

  • Dynamically assign value to bind variable in a view object before pageload

    I found that it is extreamely hard to find an example to assign the bind variable in View object at runtime using a data attribute defined in Human task activity. Most of the available samples use a Literal value to do the assignment. In my case, I want to dynamically display the content by assigning the data attribute in Human task to the bind variable in view object before a pageload.
    I do not want to bind the view object to some command component to click a button or link in order to make it work (Unnecessary components in my page).
    The issue is how to access the data attribute in Human task in the java code of client interface in AppModule? or is there a way that I can access the data attribute in Groovy script expression of the bind variable? or if I can access the process data object defined in my BPM process to do the assignment at runtime?
    Really need help on the issue, and I cannot believe that it is so hard to accomplish.
    Thank you very much,

    chk this
    Passing default value to bind variable on page load.
    http://adfcodebits.blogspot.com/2010/03/bit-2-setting-bind-variable-value.html

  • Setting bind variable for a view object from the Managed Bean

    Hi,
    i am using JDeveloper 11g, i have to create LOV in the JSF. To show the LOV, it has to populate data using View object and its query parameter need to be sent from the Managed Bean.
    For the View object i want to set the bind variable parameter from the managed bean value. bename is stored in a managed bean (session scope)
    #{beantest.bename}
    But it gives the following exception.
    JBO-29000: Unexpected exception caught:
    org.codehaus.groovy.control.MultipleCompilationErrorsException,msg=startup failed, Script1.groovy: 1: expecting '!',found '{'@ line1, column 2.
    I have followed the link http://kr.forums.oracle.com/forums/thread.jspa?threadID=615474 like Frank wrote on 8.2.2008:
    But steps are not clear.
    How to input the VO bind parameter with Managed bean variable?
    Any Help
    Regards
    Raj
    Edited by: user9928180 on Dec 17, 2008 9:51 AM

    Hi,
    a bind variable in a VO needs to be exposed as an executeWithParams operation in the pageDef file. Just add a new action binding to the pageDef file (context menu) and select the executeWithParams operation on teh VO. Then in the argument field, reference the managed bean property for the value
    Frank

  • How to share an icloud account across multiple people who all want to keep there accounts.

    I am tring to share information from an app between multiple users, however the only way to transfer data is threw the icloud. Is there any way that all the people I want to share this information with can keep there current icloud accounts and just sign onto the icloud account with the information on it?

    Welcome to the Apple community.
    Unfortunately that is not possible.

  • How to share the same mask across multiple layers?

    Say one needs multiple layers, one above another, to share the same layer mask. Is there any smart way to tell all those layers they have to use the same mask? As opposed to copying the same mask into all layers. The latter approach has the disadvantage that, when you need to change the mask, you need to copy it again into all layers that must share it.
    Thank you.

    Put the Layers in a Set and apply the mask to that.

  • How to share one variable across multiple JVMs?

    Hi,
    How to share one string value across two applications, which are there in two different JVMs.
    Requirement is, If I update one value(static) in first server through jsp, it should update second server static value too apart from first server.
    I am using WebLogic 8.1, is there any MBean to access other application's static value?
    Please suggest!
    Thanks,
    Murthy P

    Welcome User in OTN,
    to make two projects can access its classes you should goto the project property ---> Dependencies then add the other project.
    in your case:
    try to goto you Model project property ----> Dependencies ---> Edit Dependencies .
    you will find your ViewController project. Expand it thin check to Build Output.
    you can make this for ViewContoller project also as:
    goto you ViewContoller project property ----> Dependencies ---> Edit Dependencies .
    you will find your Model project. Expand it thin check to Build Output.
    Sameh Nassar

  • 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 declare a bind variable with 'date' data type in command prompt?

    how to declare a bind variable with 'date' data type in command prompt?
    sql>variable q date;
    when i execute it show list of datatypes

    Hi,
    As Lokanath said, there are no DATE bind variables.
    You can use a VARCHAR2 bind variable, and convert it to a DATE in your SQL statment.
    If you're using SQL*Plus, consider a substitution variable. It won't be as efficient as a bind variable, but it will be as convenient.
    For example:
    DEFINE  first_entrry_date = "DATE '2010-06-20''
    SELECT   ...
    WHERE   entry_date >= &first_entry_date
    {code}                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

  • How can i create "bind variable"

    How can i create "bind variable" in my DB to support any procedure in my DB.
    Thank you very much.

    In SQL*PLUS we can defined bind variable
    SQL>var x varchar2(250); -- Is x bind variable or i'm misunderstand ?
    and ... in my procedure i can used ' &x ' to pass valued of 'x' from sql prompt to my procedure.
    but i'm not sure variable x is still remain in DB because i need to pass variable
    " v_stmt := 'and employee_id between ..... ' " from FORM to PROCEDURE in DB
    how can i do

  • How to properly set bind variables

    Dear All,
    I am currently confused about how to properly set my Bind Variables
    I have this view using HR standard schema
    Select *
    from Employees
    where EMPLOYEE_ID = :EMP_IDI somehow see three options on how to use this bind variable in an application module.
    Option 1:
    ViewObjectImpl view = this.getEmployeesView();
    VariableValueManager vm = view.ensureVariableManager();
    vm.setVariableValue("EMP_ID", value);
    view.executeQuery();Option 2:
    ViewObjectImpl view = this.getEmployeesView();
    view.setNamedWhereClauseParam("EMP_ID", value);
    view.executeQuery();Option 3:
    EmployeeViewImpl empView =this.getEmployeesView();
    RowSetIterator it = empView.createRowSetIterator(null);
    empView.setEmployeeId(value);
    empView.executeQuery();Question is which is which and what should I use?
    JDEV 11G PS3

    I use is this
    DCIteratorBinding iteratorStatus = Util.getIterator("NameIterator");
    operationBinding.execute();
    Util is reserved in a class.
    public static DCIteratorBinding getIterator(String iteratorName){
    return getDCBindings().findIteratorBinding(iteratorName);
    }

  • 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

  • Controlling Post Order of Multiple View Objects

    Hi ,
    Here is the scenario:
    I have a use case of "Creating an Abstract"
    Steps:
    step1 ) (Page 1) Author presents the details of the abstract (Details goes to 2 tables ABSTRACT & ABSTRACT_CONTENT tables). For the 2 tables i have 2 entities. I use a view here called CreateAbstractView from both the tables( here i control the post order of the entities ....code from jdeveloper 11g guide)
    Step 2)(Page 2) Author presents details of Additional Authors. I use the view (*AdditionalAuthorDetailsView*) (Details goes to 2 tables AUTHOR & ABSTRACT). Here in the abstract table i have a parent key(parent abstract id) So all the additional authors has a record in Abstract table with parent_abstract_id from step1. ABSTRACT table also has a foreign key (author_id) .Here also i control the post order of the 2 entity object using the code from jdeveloper 11g guide.
    I also have a link from CreateAbstractView to AdditionalAuthorDetailsView (abstract_id in Abstract table from CreateAbstractView to parent_abstract_id in Abstract table from AdditionalAuthorDetailsView )
    If i have a commit on both the pages , i don't see a problem.
    But i want to have a commit process at the end so that the user can review the information. So when i try to add a commit process at the end , i get a exception (Parent Key not found exception) which i came to understand that commit from AdditionalAuthorDetailsView is happening first which is trying to insert a record into ABSTRACT table and cannot find the parent_abstract_id.
    How do i control the post order for multiple view objects in such scenarios?

    Hi!
    Please take a look at the dev guide. It comes down to controlling the posting order on entity level.
    http://download-uk.oracle.com/docs/html/B25947_01/bcadveo007.htm#CEGJAFCF
    Sascha

  • Session state variables across multiple ApEx applications

    We have a suite of loosely integrate ApEx applications that all share a common authentication scheme. When you first log in we attempt to load a series of session state variables with temporary data to streamline various logging and authentication related activities for the life of the session.
    However, these session variables seem to disappear when you move from one application to another, so they are not truly tied to just the "session" which carries over across all applications, but the application from which the session state is set.
    What is the suggested way, keeping in mind that the data being held may have security related context, to preserve values during a session, but regardless of which ApEx application you are in.
    The method we are using to share the authentication is using a common "Cookie Name" from a common subscribed authentication scheme as suggested elsewhere on this site and seems to work very well outside of this specific issue.
    Thanks in advance,
    Barney

    Apologies for the delay getting back on this.
    My use of the word "disappear" was probably misleading. They were not visible from the second application. When setting "Session State" I was under the impression that it was setting it for the authenticated session, not for the specific application. (I am referring to the: apex_util.set/get_session_state).
    Your solution will work fine, as long as I know which application the user last authenticated against. However, it could be one of over 30 (and growing) different applications which would require me writing a program to go through every "p_flow" to try and find a valid value every time I need to reference the field.
    It would be really beneficial if you could store true Session variables which stay alive for the life of the authenticated session and is available to anything authenticated against that session id. This would streamline alot of cross-application program development.
    The "get/set_session_state" is a misleading as it is not a Session value, but an Application value. The Session exists across multiple applications, while this procedure does not.
    Thanks,
    Barney

  • One bind variable to multiple ViewObjects

    Hi,
    I am using JDeveloper 10.1.3 tool.
    I can bind the LOV value (e.g. Department LOV) that user selects
    and filter the SQL query based on the user LOV selection from ViewObjects(e.g. Employee VO) I created.
    The way I did this as follow: (used ADF BC template)
    1. Create read only department view Object for LOV (ie. deptVO)
    2. Create Employee entity
    3. Create updatable employee view object. (i.e. EmpVO)
    - Have select statment with bind variable.
    (e.g. select employee_id, name, email, department_id
    from employees
    where department_id = :departmentId
    - Create departmentId bind variable.
    4. create application module to have these two view objects created. so it can be drag and droped from Data Control Palatte.
    5. On JSF JSP page, expand EmpVO | Operations, drag and drop ExecuteWithParams to the page.(with parameter form)
    6. Then expand EmpVO | Operations | ExecuteWithParams,
    drag and drop departmentId attribute to the parameter form then
    choose Single Selections | ADF Select One Choice from the context menu to create LOV.
    7. then drag and drop the EmpVO as ADF read only Table to the JSP page.
    This works perfectly for one employee VO.
    However, if I add another view object (e.g. Job VO where there is column department_id )
    to the model, and want to bind same department LOV as the select statement predicate from the view object (e.g. JobVO), How can I achive this?
    For example, if the user selects the Marketing department from the LOV,
    two ADF read only tables (one for EmpVO and the other is for JobVO) should return only for Marketing department.
    How can I bind one LOV to the multiple differnt View objects?
    If this is not supported, is there any way I can do this?
    Thanks for your help.
    John

    I just want to say thanks for posting this answer - it helped me tremendously. Without this forum, I'd be much farther behind! Thank you all for your input to this forum!

Maybe you are looking for

  • Web Services/BPEL - Connection Refused Error

    I am getting the following error while invoking this web service (in JDev 10.1.2) from Oracle BPEL console... faultSubcode: faultString: java.net.ConnectException: Connection refused: .............. Did anyone face the same error...pleaseeee help!!!

  • Dump while executing query on web

    Hi, I try to execute my query on the web and it dumps. When I execute this query in BEx analyzer, it works fine. Other queries on the web also work fine. I already did a check via RSRT but no error. please help... Joke We are on ABAP SP 16, java SP14

  • IPhone 4S earpiece issues

    I recently moved from an iPhone 4 to and iPhone 4S.  This was a disaster, when after 2 weeks, the earpiece lost its sound.  I went online and found many rehabilitative posts, none of which worked and finally reset the phone and restored (a very long

  • Cl_gui_alv_grid cursor problems

    Hi , Hi i have a alv which contains 10 rows  and a delete icon  on tool bar if i select 10 th row and delete it then the coursor goes to 1st row if i select 5 th row and delete it then the cursor goes to 6th row .....which variable is controlling cur

  • Upgrading from Acrobat Standard v10 to v11

    Can you confirm whether it is still possible for me to buy the upgrade as a licence rather than a cloud version (rented)?