ADF - ViewObject (with Bind Variable) Bind to Table- JDeveloper 10.1.3 EA

Hi all,
1.- This is the situation:
In JDeveloper 10g 10.1.3 EA I have two JSP JSF Pages with bind automatically coponents (backing bean).
- In the first page I can select a value from a list. Then, when I press the "Accept" ADF Command Button, the selected value is stored in a property called "rutEntidad" of a Session Managed Bean and the Flow Control is passed to the second page.
- In the second page I have an ADF Table (called tablePolizas) bind to a ViewObject (I drop the ViewObject from the Data Control Palette to the Page - ADF Read-Only Table ). The ViewObject has a Bind Variable called RUT_ENTIDAD. When this page is loaded, value in the rutEntidad property of Session Managed Bean is passed to the ViewObject in order the ADF Table show filtered data . Also in this page there is a "back" ADF Command Button to the first page. The filter mechanism is performed in the getTablePolizas method in the backing bean of the second page, like this:
//**** The backing bean of the second page *****
package cl.bicevida.view.backing;
public class CrearUsuario {
private CoreTable tablePolizas;
public CoreTable getTablePolizas() {
DCBindingContainer dcbc;
DCControlBinding cb;
String rutEntidad;
FacesContext ctx =FacesContext.getCurrentInstance();
ValueBinding vb =
ctx.getApplication().createValueBinding("#{SessionManager.rutEntidad}");
rutEntidad = vb.getValue(ctx).toString();
dcbc = this.getBindingContainer();
cb = dcbc.findCtrlBinding("VoPolizasAsociadasEntidadExterna1");
ViewObject vo = cb.getViewObject();
vo.setNamedWhereClauseParam("RUT_ENTIDAD", rutEntidad);
vo.executeQuery();
return tablePolizas;
2.- And this is the problem:
The first time all works fine... then I press the "back" ADF Command Button to the first page (and NOT the back button of the browser). The second time, if the numbers of rows returned by the ViewObject is different than the first time, the application throws this message (but not crash):
validation - JBO-29000: Unexpected exception caught: oracle.jbo.JboException, msg=JBO-35007: Row currency has changed since the user interface was rendered. The expected row key was oracle.jbo.Key[1 ]
validation - JBO-35007: Row currency has changed since the user interface was rendered. The expected row key was oracle.jbo.Key[1 ]
Well, I had read the "Generic Approach for Back-Button-Friendly Web Rowset Paging" article of Steve Muench in http://www.oracle.com/technology/products/jdev/tips/muench/paging/index.html
but I think here have another problem.
3.- The questions:
Which is the cause of this problem?
How I can solve it?
What another way I can programmatic pass a parameter to a ViewObject connected to a table?
Thanks!!!

Another thing: the used strategy to obtain a binding container is explained by Steve Muench http://www.oracle.com/technology/products/jdev/tips/muench/1013eabinding/index.html:
Next, you can use JDeveloper's Overview tab of the faces-config.xml file editor to configure a managed property. Define the managed property name as bindingContainer to match the property in your bean, and set the class to the fully-qualified name of the DCBindingContainer class. You can use the (Browse...) button to quickly locate the class using the new JDeveloper 10.1.3 class browser. Just type in the first few letters of the DCBindingContainer name, and then select the class. Edit the new managed property and set its Value to the JSF EL expression: #{bindings}.
************************

Similar Messages

  • Passing value to bind variable of another table from one table

    hi,
    I have a multi select table. When one row is selected from this table (no button is clicked, only selection is done), an attribute from that selected row (say userid) should be passed to the bind variable of another table and the corresponding details of that particular userid should be displayed in the other table. When more than one row is selected, the other table should display no rows.
    My main problem is what code has to be written to pass value to bind variable and where it should be written.
    Please give me a detailed explaination as soon as possible.
    Thank you.

    Sorry, didnot add this. The table is multi select table.

  • LOV(af:selectOneChoice) with bind variable in af:table

    Hi All,
    I have a table where a column is defined as dropdown(af:selectOneChoice). The query for selectOneChoice has a bind variable which needs to be set as a value from the base view Object corresponding row.
    Suppose a table Employee
    EmpId EmpName EmpType Authorization
    101 John Temp No
    The above table is created as af:table and 'Authorization' is implemented as dropdown(af:selectOneChoice) . The selectOneChoice has a query(AuthorizationLovVVO) with bind variable . For each row of af:table(EmployeeVO) , af:selectOneChoice query(AuthorizationLovVVO) requires
    the corresponding row(EmployeeVO) 'EmpType' to be set as value of bind variable.
    Can you please suggest how can we achieve this functionality.
    Edited by: 907302 on Oct 17, 2012 7:22 AM
    Edited by: 907302 on Oct 17, 2012 7:22 AM

    I have checked the following post where it has been suggested to access the the current row value as groovy expression.
    groovy for bind variable
    Suppose my AM name is 'TestAM' , i have tried the below expressions for value of bind variable but it does not work :
    1) adf.object.TestAM.findViewObject('EmployeeVO1').currentRow.EmpType
    2) adf.object.TestAMDataControl.findViewObject('EmployeeVO1').currentRow.EmpType
    None of the above expressions work and i get the error while running the page as 'Variable NotesAM is not recognized.' / 'Variable NotesAMDataControl is not recognized.' .
    Can you please suggest if we can achieve the functionality using this approach . Also let me know if i am missing something in the above expression.

  • How to use a bind variable in a table-validated flexfield

    Hi,
    I want to prepare a table-validated descriptive flexfield, which uses as source a select statement.
    So, in the form "Validation table information" I use as table name the statement:
    (SELECT my_procedure('test_value') FROM DUAL)
    Up to here it works fine.
    But instead of 'test_value' I want to use the value of a field in the form or a value of another flex (using $FLEX$ bind variables).
    Please advice if it is possible to perform this in "table name" statement. I use it in "where/order by" clauses and it works fine.
    Thank you.

    Hi,
    I have posted in the place where you did advise,
    https://forums.oracle.com/thread/2560192
    but they reply there that this is an EBS question, with no much relation to dev tools in general.
    Please, can I continue in this place with this question?
    Thank you.

  • Can not Update/Execute Bind Variable in af:Table or items

    Hi Experts,
    it will be very helpfull if any one can help me regarding following issues.
    I am using JDeveloper/ADF11g . created af:Table in jsx page and want to be executed by passing/assigning Bind Variable as runtime backing bean by any event or during form loading event.
    I had write code as below to execute , it works error free but not execute in af:Table .
    Please HELP me.
      public void mtBindAss() {
        String amDef = "CPS.model.CPSAppModule";
        String config = "CPSAppModuleLocal";
        ApplicationModule am =
          Configuration.createRootApplicationModule(amDef, config);
        ViewObject vo = am.findViewObject("EmpBranchView1");
        // Set the two design time named bind variables
       //vUSERID is Bind variable
        vo.setNamedWhereClauseParam("vUSERID", null);
        vo.setNamedWhereClauseParam("vUSERID", "value");I have tried to execute by this way
        vo.executeQuery();// it returns executed amount of row counted value
        System.out.println("Executed Row"+vo.getRowCount());Also I have tried to execute by this way
        oracle.binding.BindingContainer bc;
        bc = BindingContext.getCurrent().getCurrentBindingsEntry();
        OperationBinding op = bc.getOperationBinding("Execute");
        op.execute();
      }VO query
    SELECT VwEmpbank1.ADDR1,
           VwEmpbank1.BANK_NO,
           VwEmpbank1.BRANCH_NAME,
           VwEmpbank1.ROWID,
           VwEmpbank1.RT_NO,
           VwEmpbank1.USER_ID
    FROM VW_EMPBANK VwEmpbank1
    WHERE USER_ID=:vUSERIDThanks.
    zakir
    =======
    Edited by: Zakir Hossain on May 14, 2009 11:21 AM

    Zakir,
    Some brief comments:
    1). Doing this via the binding layer is the "better" way if you can (instead of instatiating an AM like that). However, you need to create a binding for ExecuteWithParameters, not Execute. If you're not able to specify the actual parameter values in the pagedef, you can also get the parameter map from the operation binding and set the values that way.
    2). If you want the query to execute on page load, you can create an invokeAction binding in the page definition to invoke the ExecuteWithParameters action. Just set the proper refreshCondition.
    Hope this gets you going in the right direction.

  • How to use bind variable value for table name in select statement.

    Hi everyone,
    I am having tough time to use value of bind variable for table name in select statement. I tried &p37_table_name. ,
    :p37_table_name or v('p37_table_name) but none worked.
    Following is the sql for interactive report:
    select * from v('p37_table_name') where key_loc = :P37_KEY_LOC and
    to_char(inspection_dte,'mm/dd/yyyy') = :P37_INSP_DT AND :p37_column_name is not null ;
    I am setting value of p37_table_name in previous page which is atm_state_day_insp.
    Following is error msg:
    "Query cannot be parsed, please check the syntax of your query. (ORA-00933: SQL command not properly ended) "
    Any help would be higly appreciated.
    Raj

    Interestingly enough I always had the same impression that you had to use a function to do this but found out from someone else that all you need to do is change the radio button from Use Query-Specific Column Names and Validate Query to Use Generic Column Names (parse query at runtime only). Apex will substitute your bind variable for you at run-time (something you can't normally do in pl/sql without using dynamic sql)

  • Issue with IP variable binding in WAD

    Hi experts,
    I'm having issues while trying to bind variable1 to variable2 in WAD. Here's the scenario:
    I have configured through T-code rsbbs the QUERY A, which is passing two "generic" characteristic values to the receptor (QUERY B).
    These two characteristic values are sent to the variables that are executed by formula (sequence) AND also to the variables in QUERY B.
    The issue is when the user changes the variable selection (thru pop-up) for the formula (sequence), it does not update the variable from the Query B, thus, I can't see the correct selection for Query B after executing the sequence.
    I've read numerous postings and I tried to bind these two variables (variable from formula sequence to QueryB variable) as a next command after the sequence execution unsuccessfully. The variables are not updated, it always shows the values before the user change.
    PS: version 7.
    Please help!
    Thanks,
    Orcamento

    Hi Prathish,
    Thanks for your reply. However, the issue has not been solved.
    Let me try to explain in more detail...
    E.g.
    Step 1: Query A sends value thru RSBBS to Variable 1 (Query B), and Variable 2 (fox formula from IP) by right clicking on "GO TO" from selected cell>> OK.
    Step 2: WAD opens with Query B - with variable values sent from Query A >> OK.
    Step 3: User changes value of FOX Variable 2 (this value was first sent from step 1)... let's say that value passed from Query A was 10, and user changes to 20. Then, execute the function >> OK.
    Step 4: Since Variable 1 still contains value 10 sent by RSBBS, Query B does not show results just changed (value 20).
    I believe that I can bind these two variables through WAD, but I tried unsuccessfully.
    Do you know if there are any configuration that I can bind these two variables in WAD, which should work dynamically?
    Thank you so much for your help!
    Orcamento

  • Multiple ViewObjects with single variables

    Hi
    I am using jdev10g.
    Is it possible to search by single variable on 3 ViewObjects.
    I posted by issues as Problem with ViewObjects but I am not cleared.
    Please any one help me.
    Thanks

    Hi
    This is The Applicaton Moduleclass Where i have to add above code, And where vo method are generated. Please give some steps from scrach
    package sales;
    import oracle.jbo.server.ApplicationModuleImpl;
    import oracle.jbo.server.ViewLinkImpl;
    // ---    File generated by Oracle ADF Business Components Design Time.
    // ---    Custom code may be added to this class.
    // ---    Warning: Do not modify method signatures of generated methods.
    public class AppModuleImpl extends ApplicationModuleImpl {
        /**This is the default constructor (do not remove)
        public AppModuleImpl() {
        /**Sample main for debugging Business Components code using the tester.
        public static void main(String[] args) {
            launchTester("sales", /* package name */
          "AppModuleLocal" /* Configuration Name */);
        /**Container's getter for SalesForecastView1
        public SalesForecastViewImpl getSalesForecastView1() {
            return (SalesForecastViewImpl)findViewObject("SalesForecastView1");
        /**Container's getter for RevenueForecastView1
        public RevenueForecastViewImpl getRevenueForecastView1() {
            return (RevenueForecastViewImpl)findViewObject("RevenueForecastView1");
        /**Container's getter for ActualSales1
        public ActualSalesImpl getActualSales1() {
            return (ActualSalesImpl)findViewObject("ActualSales1");
        /**Container's getter for TargetSales1
        public TargetSalesImpl getTargetSales1() {
            return (TargetSalesImpl)findViewObject("TargetSales1");
        /**Container's getter for SalesComponents1
        public SalesComponentsImpl getSalesComponents1() {
            return (SalesComponentsImpl)findViewObject("SalesComponents1");
        /**Container's getter for Dept1
        public DeptImpl getDept1() {
            return (DeptImpl)findViewObject("Dept1");
        /**Container's getter for Emp1
        public EmpImpl getEmp1() {
            return (EmpImpl)findViewObject("Emp1");
    }Thanks
    NR

  • Can bind variable be used for the table in an explicit cursor

    I have an application that accesses a table on several different servers. I created a ref cursor variable for the cursor and a varchar2 variable to define my query. variable i_server is an parameter of my procedure. Is it possible to rewrite the v_query using bind variables for the table/server? I have include v_query below.
    v_query := 'SELECT rp.usr_id, rp.sun_sft_cat, rp.sun_start, rp.sun_hrs,' ||
    ' rp.mon_sft_cat, rp.mon_start, rp.mon_hrs,' ||
    ' rp.tue_sft_cat, rp.tue_start, rp.tue_hrs,' ||
    ' rp.wed_sft_cat, rp.wed_start, rp.wed_hrs,' ||
    ' rp.thu_sft_cat, rp.thu_start, rp.thu_hrs,' ||
    ' rp.fri_sft_cat, rp.fri_start, rp.fri_hrs,' ||
    ' rp.sat_sft_cat, rp.sat_start, rp.sat_hrs,' ||
    ' rp.sun_sft, rp.mon_sft, rp.tue_sft, rp.wed_sft,' ||
    ' rp.thu_sft, rp.fri_sft, rp.sat_sft, nvl(ei.wip_permanent_sched_seq, 0)' ||
    ' FROM ' || i_server || ' rp, wip_emp_information ei,' ||
    ' wip_emp_status wes, wip_emp_status_type west ' ||
    ' WHERE rp.usr_id = ei.employee_id' ||
    ' AND wes.employee_id = ei.employee_id' ||
    ' AND wes.status_type = west.status_type' ||
    ' AND west.description = ''WAREHOUSE EMPLOYEE''' ||
    ' AND wes.effective_date = (SELECT MAX(wes2.effective_date)' ||
    ' FROM wip_emp_status wes2' ||
    ' WHERE wes2.status_type = wes.status_type' ||
    ' AND wes2.employee_id = wes.employee_id' ||
    ' AND wes2.effective_date <= trunc(SYSDATE))' ||
    ' AND wes.status = ''Y'' AND rp.wk = 1'; -- wk = 1 is next week's schedule
    OPEN rp_sched_cursor FOR v_query;

    If your intention is to do this:
    v_query := 'SELECT rp.usr_id, rp.sun_sft_cat, rp.sun_start, rp.sun_hrs,' ||
    ' rp.mon_sft_cat, rp.mon_start, rp.mon_hrs,' ||
    ' rp.tue_sft_cat, rp.tue_start, rp.tue_hrs,' ||
    ' rp.wed_sft_cat, rp.wed_start, rp.wed_hrs,' ||
    ' rp.thu_sft_cat, rp.thu_start, rp.thu_hrs,' ||
    ' rp.fri_sft_cat, rp.fri_start, rp.fri_hrs,' ||
    ' rp.sat_sft_cat, rp.sat_start, rp.sat_hrs,' ||
    ' rp.sun_sft, rp.mon_sft, rp.tue_sft, rp.wed_sft,' ||
    ' rp.thu_sft, rp.fri_sft, rp.sat_sft, nvl(ei.wip_permanent_sched_seq, 0)' ||
    ' FROM ' || :b0 || ' rp, wip_emp_information ei,' ||      --- Note the bindvariable...
    ' wip_emp_status wes, wip_emp_status_type west ' ||
    ' WHERE rp.usr_id = ei.employee_id' ||
    ' AND wes.employee_id = ei.employee_id' ||
    ' AND wes.status_type = west.status_type' ||
    ' AND west.description = ''WAREHOUSE EMPLOYEE''' ||
    ' AND wes.effective_date = (SELECT MAX(wes2.effective_date)' ||
    ' FROM wip_emp_status wes2' ||
    ' WHERE wes2.status_type = wes.status_type' ||
    ' AND wes2.employee_id = wes.employee_id' ||
    ' AND wes2.effective_date <= trunc(SYSDATE))' ||
    ' AND wes.status = ''Y'' AND rp.wk = 1'; -- wk = 1 is next week's schedule
    OPEN rp_sched_cursor FOR v_query USING i_server;Then the answer is: no, you cannot do that.
    But my question then would be: why would you want to do that?
    I assume you don't have that many "different servers". One cursor per server won't hurt you.

  • How to set Bind variable on the action of command link

    I have two tables. One is the list of processes and other one is the details of processes with process name as primary key.
    I want to first display the first table which has the list of processes on one page. When I click on perticular process name this process will pass to the bind variable of another table and corresponding details will be shown on other page. can anyone help how I can do this. My code is as follows:
    package model;
    import model.common.BpelDetailsView;
    import oracle.jbo.server.ViewObjectImpl;
    public class BpelDetailsViewImpl extends ViewObjectImpl implements BpelDetailsView {
    * This is the default constructor (do not remove).
    public BpelDetailsViewImpl() {
    * Returns the variable value for bpelnameVar.
    * @return variable value for bpelnameVar
    public String getbpelnameVar() {
    return (String)ensureVariableManager().getVariableValue("bpelnameVar");
    * Sets <code>value</code> for variable bpelnameVar.
    * @param value value to bind as bpelnameVar
    public void setbpelnameVar(String value) {
    ensureVariableManager().setVariableValue("bpelnameVar", value);
    this.executeQuery();
    <af:commandLink id="ot3" text="#{row.BpelName}"
    action="#{DasboardBean.ot3_action}"/>
    public String ot3_action() {
    BpelDetailsViewImpl bdv=new BpelDetailsViewImpl();
    bdv.setbpelnameVar("#{row.BpelName}");
    return "success";
    but its not working at all.
    Its displaying the errors on click of command link.
    javax.servlet.ServletException: java.lang.NullPointerException
         at javax.faces.webapp.FacesServlet.service(FacesServlet.java:277)
         at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:227)
         at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:125)
         at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:292)
         at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:26)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
         at oracle.adf.model.servlet.ADFBindingFilter.doFilter(ADFBindingFilter.java:191)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
         at oracle.adfinternal.view.faces.webapp.rich.RegistrationFilter.doFilter(RegistrationFilter.java:85)
         at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl$FilterListChain.doFilter(TrinidadFilterImpl.java:420)
         at oracle.adfinternal.view.faces.activedata.AdsFilter.doFilter(AdsFilter.java:54)
         at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl$FilterListChain.doFilter(TrinidadFilterImpl.java:420)
         at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl._doFilterImpl(TrinidadFilterImpl.java:247)
         at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl.doFilter(TrinidadFilterImpl.java:157)
         at org.apache.myfaces.trinidad.webapp.TrinidadFilter.doFilter(TrinidadFilter.java:92)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
         at oracle.security.jps.wls.JpsWlsFilter$1.run(JpsWlsFilter.java:96)
         at java.security.AccessController.doPrivileged(Native Method)
         at oracle.security.jps.util.JpsSubject.doAsPrivileged(JpsSubject.java:313)
         at oracle.security.jps.wls.util.JpsWlsUtil.runJaasMode(JpsWlsUtil.java:146)
         at oracle.security.jps.wls.JpsWlsFilter.doFilter(JpsWlsFilter.java:140)
         at oracle.security.jps.ee.http.JpsFilter.doFilter(JpsFilter.java:70)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
         at oracle.dms.wls.DMSServletFilter.doFilter(DMSServletFilter.java:202)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
         at weblogic.servlet.internal.RequestEventsFilter.doFilter(RequestEventsFilter.java:27)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
         at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3588)
         at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
         at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:121)
         at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2200)
         at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2106)
         at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1428)
         at weblogic.work.ExecuteThread.execute(ExecuteThread.java:201)
         at weblogic.work.ExecuteThread.run(ExecuteThread.java:173)
    Caused by: javax.faces.el.EvaluationException: java.lang.NullPointerException
         at org.apache.myfaces.trinidad.component.MethodExpressionMethodBinding.invoke(MethodExpressionMethodBinding.java:51)
         at com.sun.faces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:102)
         at org.apache.myfaces.trinidad.component.UIXCommand.broadcast(UIXCommand.java:190)
         at org.apache.myfaces.trinidad.component.UIXCollection.broadcast(UIXCollection.java:147)
         at org.apache.myfaces.trinidad.component.UIXTable.broadcast(UIXTable.java:271)
         at oracle.adf.view.rich.component.UIXTable.broadcast(UIXTable.java:140)
         at oracle.adf.view.rich.component.rich.data.RichTable.broadcast(RichTable.java:364)
         at oracle.adf.view.rich.component.fragment.ContextSwitchingComponent$1.run(ContextSwitchingComponent.java:87)
         at oracle.adf.view.rich.component.fragment.ContextSwitchingComponent._processPhase(ContextSwitchingComponent.java:298)
         at oracle.adf.view.rich.component.fragment.ContextSwitchingComponent.broadcast(ContextSwitchingComponent.java:91)
         at oracle.adf.view.rich.component.fragment.UIXInclude.broadcast(UIXInclude.java:87)
         at oracle.adf.view.rich.component.fragment.ContextSwitchingComponent$1.run(ContextSwitchingComponent.java:87)
         at oracle.adf.view.rich.component.fragment.ContextSwitchingComponent._processPhase(ContextSwitchingComponent.java:298)
         at oracle.adf.view.rich.component.fragment.ContextSwitchingComponent.broadcast(ContextSwitchingComponent.java:91)
         at oracle.adf.view.rich.component.fragment.UIXInclude.broadcast(UIXInclude.java:81)
         at javax.faces.component.UIViewRoot.broadcastEvents(UIViewRoot.java:475)
         at javax.faces.component.UIViewRoot.processApplication(UIViewRoot.java:756)
         at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl._invokeApplication(LifecycleImpl.java:673)
         at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl._executePhase(LifecycleImpl.java:273)
         at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:165)
         at javax.faces.webapp.FacesServlet.service(FacesServlet.java:265)
         ... 34 more
    Caused by: java.lang.NullPointerException
         at oracle.jbo.server.ComponentObjectImpl.ensureVariableManager(ComponentObjectImpl.java:472)
         at model.BpelDetailsViewImpl.setbpelnameVar(BpelDetailsViewImpl.java:32)
         at portal.view.bean.DasboardBean.ot3_action(DasboardBean.java:24)
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:597)
         at com.sun.el.parser.AstValue.invoke(AstValue.java:157)
         at com.sun.el.MethodExpressionImpl.invoke(MethodExpressionImpl.java:283)
         at org.apache.myfaces.trinidad.component.MethodExpressionMethodBinding.invoke(MethodExpressionMethodBinding.java:46)
         ... 54 more

    Hi Shay..
    Thanx for your help...
    I stuck in one more problem. When I run directly the first list page it works fine. I craeted one more page home.jspx where I added a golink with <af:golink id="gl1" text ="List" destination="list.jspx". When I click on link it opens the list page. Now when I clicking on first column its redirecting to list.jspx not to details.jspx.
    What can be the solution for this.

  • How to make a bind variable out of a comparison like statement

    I have a statement similar to the following -
    select x from atable where acolumn like '1%';
    How do I turn that into a variable in an anonymous block like -
    declare
    l_var varchar2(1) := '1';
    begin
    select x from atable where acolumn like 'l_var%'
    end;
    I need to prevent the database from using a literal in the plan so I need to convert like '%1' into a variable.
    Any suggestions?

    Not quite sure what you mean by 'binding' or 'substitution'.
    If you mean bind variables, the yes oracle does automatically use bind variables:
    SQL> CREATE TABLE atable
      2  (
      3          x VARCHAR2(10)
      4  )
      5  /
    Table created.
    SQL>
    SQL> INSERT INTO atable VALUES ('1234');
    1 row created.
    SQL> COMMIT;
    Commit complete.
    SQL>
    SQL> set serveroutput on size unlimited
    SQL>
    SQL> declare
      2    l_var atable.x%TYPE := '1';
      3    l_str atable.x%TYPE;
      4  begin
      5    select x
      6      into l_str
      7      from atable
      8     where x like l_var || '%';
      9
    10    dbms_output.put_line ('l_str = "' || l_str || '"');
    11  end;
    12  /
    l_str = "1234"
    PL/SQL procedure successfully completed.
    SQL>
    SQL> SELECT SQL_TEXT FROM v$sql WHERE sql_text LIKE 'SELECT %ATABLE%' AND sql_text NOT LIKE '%V$SQL%';
    SQL_TEXT
    SELECT X FROM ATABLE WHERE X LIKE :B1 || '%'
    SQL>Where that is the sql statement that the sql engine actually ran on behalf of the pl/sql routine.
    GP>

  • Substitution vs bind variable

    Hi,
    Can you please give me the differences between substitution vs bind variables? I have done many searches and I am lost. Any examples would be great.
    Thanks.
    -U

    Perhaps what is needed is a simple example of both.
    h2. Substitution Variables
    The clue here is in the name... "substitution". It relates to values being substituted into the code before it is submitted to the database. These substitutions are carried out by the interface being used. In this example we're going to use SQL*Plus as our interface...
    So let's take a bit of code with substitution variables:
    SQL> ed
    Wrote file afiedt.buf
      1  create or replace function myfn return varchar2 is
      2    v_dname varchar2(20);
      3  begin
      4    select dname
      5    into   v_dname
      6    from   dept
      7    where  deptno = &p_deptno;
      8    return v_dname;
      9* end;Now when this code is submitted...
    SQL> /SQL*Plus, parses the code itself, and sees the "&" indicating a substitution variable.
    SQL*Plus, then prompts for a value for that variable, which we enter...
    Enter value for p_deptno: 20
    old   7:   where  deptno = &p_deptno;
    new   7:   where  deptno = 20;... and it reports back that it has substitution the &p_deptno variable for the value 20, actually shoing us the whole line of code with it's value.
    This code is then submitted to the database. So if we look at what the code is, now created on the database we see...
    SQL> select dbms_metadata.get_ddl('FUNCTION', 'MYFN', USER) from dual;
    DBMS_METADATA.GET_DDL('FUNCTION','MYFN',USER)
    CREATE OR REPLACE FUNCTION "SCOTT"."MYFN" return varchar2 is
      v_dname varchar2(20);
    begin
      select dname
      into   v_dname
      from   dept
      where  deptno = 20;
      return v_dname;
    end;The database itself knows nothing about any substitution variable... it just has some fixed code with the value we supplied, that SQL*Plus substituted when we compiled it.
    The only way we can change that value is by recompiling the code again, and substituting a new value for it.
    Also, with substitution variables we don't necessarily have to use them just for 'values' (though that it typically what they're used for)... we can use them to substitute any part of the code/text that we are supplying to be compiled.. e.g.
    SQL> ed
    Wrote file afiedt.buf
      1  create or replace function myfn(x in number, y in number) return number is
      2  begin
      3    return &what_do_you_want_to_return;
      4* end;
    SQL> /
    Enter value for what_do_you_want_to_return: y*power(x,2)
    old   3:   return &what_do_you_want_to_return;
    new   3:   return y*power(x,2);
    Function created.
    SQL> select dbms_metadata.get_ddl('FUNCTION', 'MYFN', USER) from dual;
    DBMS_METADATA.GET_DDL('FUNCTION','MYFN',USER)
    CREATE OR REPLACE FUNCTION "SCOTT"."MYFN" (x in number, y in number) return number is
    begin
      return y*power(x,2);
    end;It really does substitute the substitution variable, with whatever text you type.
    So, that's substitution variables. In summary they are variables that the user interface detects and prompts for text to substitute into the code before submitting it to the database.
    h2. Bind Variables
    Bind variables are a completely difference concept to substitution variables.
    Bind variables typically relate to SQL queries, and are a placeholder for values within the query. Unlike substitution variables, these are not prompted for when you come to compile the code.
    Now there are various ways of supplying bind variables, and I'll use a couple of examples, but there are more (such as binding when creating queries via the DBMS_SQL package etc.)
    In the following exaxmple:
    SQL> ed
    Wrote file afiedt.buf
      1  create or replace function myfn(p_deptno in number) return varchar2 is
      2    v_dname varchar2(20);
      3    v_sql   varchar2(32767);
      4  begin
      5    v_sql := 'select dname from dept where deptno = :1';
      6    execute immediate v_sql into v_dname using p_deptno;
      7    return v_dname;
      8* end;
    SQL> /
    Function created.The ":1" is the bind variable in the query.
    If you examine queries running in the database you will typically see bind variables represented as :1, :2, :3 and so on, though it could be anything preceded by a ":" such as :A, :B, :C, :X, :FRED, :SOMETHING etc.
    When the query is passed to the SQL engine (in this case by the EXECUTE IMMEDIATE statement), the query is parsed and optimised and the best execution plan determined. It doesn't need to know what that value is yet to determine the best plan. Then when the query is actually executed, the value that has been bound in (in this case with the USING part of the execute immediate statement) is used within the execution of the query to fetch the required data.
    The advantage of using bind variables is that, if the same query is executed multiple times with different values being bound in, then the same execution plan is used because the query itself hasn't actually changed (so no hard parsing and determining the best plan has to be performed, saving time and resources).
    Another example of using bind variable is this:
    SQL> ed
    Wrote file afiedt.buf
      1  create or replace function myfn(p_deptno in number) return varchar2 is
      2    v_dname varchar2(20);
      3  begin
      4    select dname
      5    into   v_dname
      6    from   dept
      7    where deptno = p_deptno;
      8    return v_dname;
      9* end;
    SQL> /
    Function created.Now, this isn't immediately obvious, but what we have here is the ability of the PL langauge to seamlessly integrate SQL within it (giving us PL/SQL). It looks as though we just have an SQL statement in our code, but in reality, the PL engine parses the query and supplies the query to the SQL engine with a bind variable placeholder for where the PL variable (parameter p_deptno in this case) is within it. So the SQL engine will get a query like...
    select dname
    from   dept
    where  deptno = :1and then the PL engine will handle the binding of the value (p_deptno) into that query when it executes it, as well as dealing with the returning value being put INTO the PL variable v_dname. Again the SQL supplied to the SQL engine can be optimised and re-used by code because it isn't hard coded with values.
    So, here, the binding of values is implicit because the PL engine is removing the need for us to have to code them explicitly.
    The other advantage of using bind variables is that you don't have to worry about the datatypes.
    Often we see people creating code such as this (going back to a similar dynamic SQL example)...
    SQL> ed
    Wrote file afiedt.buf
      1  create or replace function myfn(p_hiredate in date) return number is
      2    v_empno number;
      3    v_sql   varchar2(32767);
      4  begin
      5    v_sql := 'select empno from emp where hiredate = to_date('||to_char(p_hiredate,'DD/MM/YYYY')||',''DD/MM/YYYY'')';
      6    execute immediate v_sql into v_empno;
      7    return v_empno;
      8* end;
    SQL> /
    Function created.... where the developer is trying to concatenate in a date or varchar variable with the appropriate single quotes and formatting required to make the SQL make sense. Not only does that prevent the SQL explain plan from being re-used with different values, but it makes the code hard to maintain and get right in the first place (as well as leaving things open to SQL injection)
    But, with bind variable, that's not necessary... simply doing...
    SQL> ed
    Wrote file afiedt.buf
      1  create or replace function myfn(p_hiredate in date) return number is
      2    v_empno number;
      3    v_sql   varchar2(32767);
      4  begin
      5    v_sql := 'select empno from emp where hiredate = :1';
      6    execute immediate v_sql into v_empno using p_hiredate;
      7    return v_empno;
      8* end;
    SQL> /
    Function created.... is all that is needed.
    The SQL engine knows that it is expecting a DATE datatype for the value because of what it's being compared against, and the USING statement is supplying a value of DATE datatype. No messy need to play with date formats or quotes etc. it just simply works. (and the same with other datatypes).
    So, that's bind variables. In summary they are placeholders in queries that allow SQL queries to be soft parsed rather than hard parsed when the query is re-used, help prevent SQL injection, and allow for the values to be supplied easily and seamlessly by the issuing code.

  • View with Bind Variable and ADF table

    Hi all,
    Please note what i have noticed. I created a view with a bind parameter, overriden the prepareSession of my Application Module to set the bind parameter and execute the query. I then created a simple jsf page and included the view as an adf read-only table. When i run the page, the prepareSession is called, sets the bind parameter, however the selected record of the table is always the second record (Not the first record).
    This behaviour can be reproduced with the HR schema. Please follow the below instructions for reproducing the problem.
    1. Create a Fusion Web Application (ADF).
    2. Create business components from tables.
    3. Create a new connection with the HR schema.
    4. Import the Departments table as an entity and then click finish.
    5. Create a view based on the Departments entity.
    6. Modify the Query to include a where clause (where DDepartmentsEO.DEPARTMENT_NAME LIKE :BindParam)
    7. Provide an order by clause (DepartmentsEO.DEPARTMENT_ID DESC)
    8. Creata a bind variable named "BindParam" of type string.
    9. Create an Application Module and include the view object.
    10. Open the Application Module Class and override the prepareSession method
    11. include the following code after super.prepareSession(session):
    ViewObject myView = this.getDepartments1();
    myView.setNamedWhereClauseParam("BindParam", "%");
    myView.executeQuery();
    12. Create a jsf page
    13. Drag the view object on the page as an adf read-only table, selecting the Row Selection, Sorting and Filtering
    14. Run the page.
    You will see that instead of the first record being selected, the second record in the table is selected.
    Can anyone please help me?
    Thank you

    First of all i would like to thank you for replying to my thread.
    Secondly, i would like to inform you that the example that i have provided is just for REPRODUCTION purposes.
    The real scenario has to do with setting the where clause with the authenticated user so that the view will query for data only associated with the authenticated user.
    The only way to overcome this behaviour is to include a view action (namedWhereClause in the page definition)
    However, this is not how i want to implement this. This was working properly in 10g

  • ADF View Accessor Validation with Bind Variable

    Hi
    I need to solve the following requirement using a view accessors and bind variables;
    1. User can select a value for a attribute from LOV which is unfiltered.
    2. User can manually edit code into the same attribute as in 1 above, which needs to be validated.
    As the data set for the attribute is large, I need to be able to validate 2 using a query with a where clause.
    My approach has been;
    1. I have a view object for the source lookup table, ProductVO.
    2. I have created a view criteria on ProductVO that accepts a bind variable, pProductCode.
    3. On my OrderEO I have a attribute, productCode.
    4. I create a new view accesor on the OrderEO using the view criteria created in point 2.
    5. I have lft the bind variable parameter blank, as I need to be able to dynamically pass a product code at run time.
    6. On my OrderVO for the productCode attribute, I have create a LOV, based on the ProductVO. This will ensure that the user can view and search all products if needed.
    What I am not getting working;
    1. How can I pass the attribute value to the view accessor at runtime when the value is manually captured.
    2. Ensure that if a value is selected from the LOV, that the view accessor validation does not get invoked.
    What I have tried to solve point 1;
    1. I created a validator on the productCode attribute on the OrderEO as a list validator using the view accessor as my list. I am not sure how to get the bind variable populated. Leaving out the bind variable, I assume, would cause the value to be validated against all my products.
    2. I then tried using a method validator and passing in the productCode value and querying the view accessor.
    3. I have not yet tried using Key Exists, is this maybe the missing link/trick?
    All help will be considered a early christmas gift!!

    Hi
    I have found that when using validation type Key Exists and the VO is in the local application, then the bind variable is available in the Create Validation wizard. When I try and create a validator on a VO that is core to all my applications, then I put that VO into an ADF library, the bind variable parameter is not available for mapping to my entity object attribute, even though I can select the VO to create a view accessor from the ADF library.
    Possible bug?

  • ADF Groovy Expression with bind variable and ResourceBundle

    Now I have ViewObject which have WHERE clause with bind variable.
    This bind variable is for language. Within bind variable I can change Value Type to Expression and into Value: I put +(ResourceBundle.getBundle("model.ModelBundle")).getString("language")+.
    Now if I run Oracle Business Component Browser (on AppModule) this works. In my ModelBundle.properties there is language=1 name-value pair. And with different locale I have different language number.
    Now if I put that ViewObject on one JSF, this bind variable expression does not work any more. Error:
    *oracle.jbo.JboException: JBO-29000: Unexpected exception caught: java.util.MissingResourceException, msg=Can't find bundle for base name model.ModelBundle, locale my_locale*
    Any ideas?
    10x
    Zmeda

    The most wierd thing is that, if I make ViewObjectImpl and insert this method
    public String getLanguage() {
    return (ResourceBundle.getBundle("model.ModelBundle")).getString("language");
    and call it in Bind Variable Expression Value: viewObject.getLanguage()
    IT WORKS!
    But why with groovy expression it does not work?
    Zmeda

Maybe you are looking for

  • TV-Out in MEGAPC-180

    Hello, I am writing you from Zaragoza (Spain). I've bought a MEGA PC Series (Model 180) trhee weeks ago. I've installed WXP with SP1 and SP2 and all the utilities and drivers stored in your MEGAPC-CD. I have no problem with any driver: DDR-RAM, DVD,

  • Text sound and no text

    Since I got the 2.1 upgrade, I keep getting the text message noise and no text message. I am getting most text messages, but where are the other ones going, and why aren't they showing up!?

  • CIN Issue--G/L A/c

    Hi Guys I am working with CIN. I have completed sales process(order-delivery and Invoice) and after Invoice when we are creating Excise Invoice for finished goods(J1IIN). It is asking Account Determination. I need default G/L Account No for A/C Key u

  • How to disable "Selection Security" in a correct way?

    hi experts! how to disable "Selection Security" in a correct way? !http://img689.imageshack.us/img689/2748/28668107.png! thanks!

  • Keeps capitalizing letters I want in lower case

    when I'm typing something in lower case it sometimes changes to capitals. For example, for a URL i put in the letters .co.U.K. and it changes the U.K. (as it has done here) - the U.K. I have put in lower cases in all examples here and you can see the