How to refresh View bind variables or is this a bug in Entity Validation?

Maybe I am missing something. Here is the scenario:
1. I got a create/edit form with a field (*tfA*) that is a af:selectInputText that launches a search form pop up.
2. The form (which is tied to an Entity ADF object) has validations -both attribute specific and global (for lack of better term..) set up in the Entity Object Editor wizard.
3. I noticed that when a global validation fails, when i launch the search form from tfA, it ignores whatever search criteria I enter (ie it retrieves all rows)
Otherwise, the pop up search form works perfectly. I am wondering if I need to reset the bindVariable values somewhere or if it has something to do with a refreshCondition. What confuses me though is that it works just fine if the global (ADF Entity) validations don't fail.
The pop up search form uses the default ExecuteWithParams action listener that calls a view with bindvariables. My JDev version is 10.1.3.4
Any help is appreciated. Thank you.

The issue turns out to be that the Global Entity Validation continues to fire even after you click on the find button on your selectInputText component. The Entity validation is interrupting the call to the View Object in my pop up search window because somehow clicking search on the pop up is submitting the originating form.
I am still not sure if this is a bug that needs to be addressed or I was doing something odd but the solution is the following:
in your *<af:selectInputText />,* add the following: *actionListener="#{bindings.Rollback.execute}"*
This will prevent the validation from firing because it thinks that you are trying to submit the form when all you're doing is actually launching a search pop up.
Hope that helps.
Edited by: rrey on Aug 3, 2009 3:58 PM

Similar Messages

  • How to compute a bind variable from another?

    I am trying to create a View Criteria that has the following View Object Where Clause:
    (UPPER(LOCALE) = UPPER(:LocaleCode) ) OR (UPPER(LOCALE) = UPPER(SUBSTR(:LocaleCode,1,2)))
    In other words, I have a bind variable called LocaleCode, and I want to return all rows that either match the LocaleCode exactly (first part of the Where Clause), or match the first 2 characters of the LocaleCode value (second part of Where Clause).
    I can't seem to figure out any way to do this straight-up using the UI for a View Criteria - there doesn't seem to be a "substring" operator when adding an item to the clause.
    So, my thought was to create a second bind variable (e.g. "LocaleCode2") that was computed from the first bind variable (LocaleCode). This new bind variable would contain the first 2 characters from LocaleCode. I could then have the Where Clause be:
    (UPPER(LOCALE) = UPPER(:LocaleCode) ) OR (UPPER(LOCALE) = UPPER(:LocaleCode2))
    My problem is that when I define the LocaleCode2 bind variable, I see the option to set it to an Expression, but I can't seem to figure out how to build an expression that refers to another bind variable.
    So, my questions are:
    1. How can I have a bind variable expression refer to another bind variable (e.g. "LocaleCode2 = substring(:LocaleCode,1,2)" or something)?
    2. Is there a better way to do this altogether? (What I'm trying to do is set up a view criteria for a lookup table that will return rows that match a passed-in locale exactly (language and country), or just on the 'language' part (first 2 characters).)
    Thanks!

    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 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 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 can i view the variables of the session memory

    Hi experts
       How can i view the variables of the session memory.Such as I want display the variables of memory which id is 'BULRN' in ABAP debug.
    In program i can use import from memory id visit the momery of session,but i don't know the name of variables which store in momery of my session.

    Its not possible to view in the debug mode..
    SAP memory is a memory area to which all main sessions within a SAPgui have access. You can use SAP memory either to pass data from one program to another within a session, or to pass data from one session to another. Application programs that use SAP memory must do so using SPA/GPA parameters (also known as SET/GET parameters). These parameters can be set either for a particular user or for a particular program using the SET PARAMETER statement. Other ABAP programs can then retrieve the set parameters using the GET PARAMETER statement. The most frequent use of SPA/GPA parameters is to fill input fields on screens
    SAP global memory retains field value through out session.
    set parameter id 'MAT' field v_matnr.
    get parameter id 'MAT' field v_matnr.
    They are stored in table TPARA.
    ABAP memory is a memory area that all ABAP programs within the same internal session can access using the EXPORT and IMPORT statements. Data within this area remains intact during a whole sequence of program calls. To pass data
    to a program which you are calling, the data needs to be placed in ABAP memory before the call is made. The internal session of the called program then replaces that of the calling program. The program called can then read from the ABAP memory. If control is then returned to the program which made the initial call, the same process operates in reverse.
    ABAP memory is temporary and values are retained in same LUW.
    export itab to memory id 'TEST'.
    import itab from memory Id 'TEST'.
    Here itab should be declared of same type and length.

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

  • HT4061 How do you unlock your AppStore Lock, seriously this is bugging me because the App Store costumer service is down , APPLE HELP ME!!!

    How do you unlock your AppStore Lock, seriously this is bugging me because the App Store costumer service is down , APPLE HELP ME!!!

    You posted in the iPad forum instead of the iPhone forum. To get answers to your question, next time post in the proper forum. See https://discussions.apple.com/index.jspa  I'll request that Apple relocate your post.
     Cheers, Tom

  • How to pass parameter [bind variable or substitution variable] to a view?

    How can I pass a parameter [bind variable or substitution variable] to a view in Oracle?
    Some will tell me that this is not necessary, that I can only pass the parameter when I query the view, but I found some case where this cause performance issue. In long view where I use subquery factoring [WITH], it's necessary to pass the parameter many time through different subqueries and not only to the resulting view.
    In other database (SQL Server, Access), we can pass parameters through query. I can't find how to do that in Oracle. Can some one tell me what is the approach suggest by Oracle on that subject?
    Thank you in advance,
    MB
    What I can do:
    CREATE VIEW "HR"."EMP_NAME" ("FIRST_NAME", "LAST_NAME")
    AS
    SELECT FIRST_NAME, LAST_NAME FROM EMPLOYEES;
    What I want to do:
    CREATE VIEW "HR"."EMP_NAME" ("FIRST_NAME", "LAST_NAME")(prmEMP_ID)
    AS
    SELECT FIRST_NAME, LAST_NAME FROM EMPLOYEES WHERE EMPLOYEE_ID IN (:prmEMP_ID);

    Blais wrote:
    How can I pass a parameter [bind variable or substitution variable] to a view in Oracle?
    Some will tell me that this is not necessary, that I can only pass the parameter when I query the view, but I found some case where this cause performance issue. In long view where I use subquery factoring [WITH], it's necessary to pass the parameter many time through different subqueries and not only to the resulting view.Yes, there can be performance issues. Views are a form of dynamic SQL and it is hard to predict how they will perform later.
    You can't pass parameters to a view. They are not functions. The mechanism to put the values in is what you mentioned, passing the parameter when you query the view.
    In other database (SQL Server, Access), we can pass parameters through query. I can't find how to do that in Oracle. Can some one tell me what is the approach suggest by Oracle on that subject? This functionality is not supported.
    What I can do:
    CREATE VIEW "HR"."EMP_NAME" ("FIRST_NAME", "LAST_NAME")
    AS
    SELECT FIRST_NAME, LAST_NAME FROM EMPLOYEES;
    What I want to do:
    CREATE VIEW "HR"."EMP_NAME" ("FIRST_NAME", "LAST_NAME")(prmEMP_ID)
    AS
    SELECT FIRST_NAME, LAST_NAME FROM EMPLOYEES WHERE EMPLOYEE_ID IN (:prmEMP_ID);Include the bind value when you use the view in a SELECT. The value will be applied to the view at run-time, somthing like
    CREATE  VIEW "HR"."EMP_NAME_VW" ("FIRST_NAME", "LAST_NAME","EMPLOYEE_ID")(prmEMP_ID)
    AS  SELECT FIRST_NAME, LAST_NAME FROM EMPLOYEES;
    select *
      from emp_name_vw
      WHERE EMPLOYEE_ID IN (:prmEMP_ID);To use EMPLOYEE_ID I added it to your list of columns in the view so it can be referenced in the WHERE clause. If you don't want to see that value don't select it from the view.

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

  • URGEN: How to programmatically assign bind variables in View Object

    Hi,
    I have a method action in my pagedef
    <methodAction id="SetBindAttributeValueToQuotationsView"
                      InstanceName="QuotationsEBAppModuleDataControl.dataProvider"
                      DataControl="QuotationsEBAppModuleDataControl"
                      MethodName="SetBindAttributeValueToQuotationsView"
                      RequiresUpdateModel="true"
                      Action="999" IsViewObjectMethod="false">
          <NamedData NDName="quotTransNo"
                     NDValue="${bindings.SetBindAttributeValueToQuotationsView_quotTransNo}"
                     NDType="java.lang.Integer" NDOption="2"/>
        </methodAction>Im going to assign values to the bind variables and use the method action in my pagedef.
    Thanks.

    hi
    u check ur view name & page def binds value,
    both of them should be same
    thanks

  • 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

  • Stuck with showDetails, View Bind Variable and I18N

    Hi all,
    I have a very weird situation.
    I am creating a view object with a bind variable.
    I then create a JSF page, and drag a table based on the view to the screen.
    I now drag the "ExecuteWithParam" action to the screen, and create it as a parameterized form.
    This works fine - english or hebrew (in my case).
    I know surround the parameter form with a showDetails component.
    I enter values to the parameter, and click on the hide link. I click on the show link - all I get is a list of ? marks for hebrew characters, but the correct characters for english characters.
    Everything works fine if the showDetails component contains regular input texts, or input texts that show/edit values from the view objects (but not bind variables).
    If I put the bind variable on the screen (outside the showDetails), in addition to putting the form inside the showDetails component, then the following occurs:
    1. Changes in the param form are ignored if I click on the show/hide link.
    2. Hebrew works when I edit the input text that is outside the showDetails. This updates the value in the show details, and it displays hebrew correctly.
    Very odd. Any tips?

    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

  • Inconsistent datatypes: expected - got CHAR, Detail view bind variables

    Hi.
    Here is my problem:
    I have master detail views connected with a view link. Both of views have bind variables that hold some session info:
    It's a menu on database and I am trying to hide some values based on user permissions.
    When running application module, everything works fine. The problem occurs when I try to show menu as a tree table, or any other table, on a page.
    The root view executes fine, but then I get an
    "java.sql.SQLSyntaxErrorException: ORA-00932: inconsistent datatypes: expected - got CHAR"
    error in executeQueryForCollection method of detail view. (this method is overridden)
    Bind Variables are:
    - :menuRoot -> which holds value of Root node. (In detail view it's just a dummy variable. It is explaned later on why i used it.)
    - :listOfUserPermmission -> array of user permissions.
    My query looks like this:
    1.Master View:
    SELECT MetVMenu.CHILD_ID,
           MetVMenu.CHILD_IME_MODULA,
           MetVMenu.PARENT_ID,
           MetVMenu.PARENT_IME_MODULA,
           MetVMenu.ZST,
           MetVMenu.NIVO,
           MetVMenu.CHILD_NAZIV_V_MENIJU,
           MetVMenu.CHILD_TIP_MODULA,
           MetVMenu.CHILD_OPIS_MODULA
    FROM MET_V_MENU MetVMenu
    WHERE MetVMenu.PARENT_IME_MODULA like :menuRoot
    and MetVMenu.CHILD_IME_MODULA in (SELECT * FROM TABLE(CAST(:listOfUserPermission AS STRARRAY)))CHILD_IME_MODULA and PARENT_IME_MODULA are also names of permissions.
    2.View Link that connects master.CHILD_ID and detail PARENT_ID
    3.Detail view, that then links to itself... to get the tree menu.
    SELECT MetVMenu.CHILD_ID,
           MetVMenu.CHILD_IME_MODULA,
           MetVMenu.PARENT_ID,
           MetVMenu.PARENT_IME_MODULA,
           MetVMenu.ZST,
           MetVMenu.NIVO,
           MetVMenu.CHILD_NAZIV_V_MENIJU,
           MetVMenu.CHILD_TIP_MODULA,
           MetVMenu.CHILD_OPIS_MODULA
    FROM MET_V_MENU MetVMenu
    WHERE :menuRoot like 'a'
    and
    MetVMenu.CHILD_IME_MODULA in (SELECT * FROM TABLE(CAST(:listOfUserPermission AS STRARRAY)))4. ViewLink that connects CHILD_ID and PARENT_ID of this "detail" view.
    Both views executeQuery methods are overridden to set Bind variables before execution.
    I get an arrayList of strings (permissions) from session and then convert it to Array.
         ArrayList permmissionsArray = (ArrayList)MyUserSession.getSessionValue("permissions");
         Array permissions = new Array(permissionsArray.toArray());
            HashMap context = new HashMap();
            context.put(DomainContext.ELEMENT_SQL_NAME, "STRARRAY");
            context.put(DomainContext.ELEMENT_TYPE, String.class);
            if(permissions != null){
                permissions.setContext(null, null, context);
                setlistOfUserPermission(permissions);
         //Here I set menuRoot variable.
         I also noticed that there are problems with how I define bind variables (the order matters).
    So when i didn't use menuRoot variable in detail view I got the
    “inconsistent datatypes: expected - got CHAR"
    error in application module.

    I went through those links, and I am sure the user has enough rights on STRARRAY object.
    I noticed that when running application module things work fine if I firstly execute RootView - Master view.
    and then double click on VL which shows detail view in table.
    The error occurs if I click on ViewLink first. I am not sure if I am even "allowed" to do that.
    I set the parameters with "setNamedWhereClauseParam" and print them out before i call super.executeQueryForCollection() and this the output i get:
    ExecuteQueryForCollectionRoot
    Permission: [AdfIn2Ogrodje.ROOT, AdfIn2Ogrodje.ADMINISTRACIJA, HOME]
    [87] MetVMenuRoot1 ViewRowSetImpl.setNamedWhereClauseParam(listOfUserPermission, oracle.jbo.domain.Array@e1af74d9)
    [88] MetVMenuRoot1 ViewRowSetImpl.setNamedWhereClauseParam(menuRoot, AdfIn2Ogrodje.ROOT)
    //Print before execution.
    EXECUTE_MENUROOT menuRoot: AdfIn2Ogrodje.ROOT
    EXECUTE_MENUROOT permission: oracle.jbo.domain.Array@e1af74d9
        Permission: AdfIn2Ogrodje.ROOT
        Permission: AdfIn2Ogrodje.ADMINISTRACIJA
        Permission: HOME
    [89] MetVMenuRoot1>#q computed SQLStmtBufLen: 537, actual=447, storing=477
    [90] SELECT MetVMenu.CHILD_ID,         MetVMenu.CHILD_IME_MODULA,         MetVMenu.PARENT_ID,         MetVMenu.PARENT_IME_MODULA,         MetVMenu.ZST,         MetVMenu.NIVO,         MetVMenu.CHILD_NAZIV_V_MENIJU,         MetVMenu.CHILD_TIP_MODULA,         MetVMenu.CHILD_OPIS_MODULA FROM MET_V_MENU MetVMenu WHERE MetVMenu.PARENT_IME_MODULA like :menuRoot and MetVMenu.CHILD_IME_MODULA in (SELECT * FROM TABLE(CAST(:listOfUserPermission AS STRARRAY)))
    [91] ViewObject: [adfin2.menu.model.views.MetVMenuRoot]MetMenuAppModule.MetVMenuRoot1 Created new QUERY statement
    [92] Bind params for ViewObject: [adfin2.menu.model.views.MetVMenuRoot]MetMenuAppModule.MetVMenuRoot1
    [93] Binding null of type 12 for "menuRoot"
    [94] Binding null of type 12 for "listOfUserPermission"
    protected void executeQueryForCollection(Object object, Object[] object2, int i) {
            System.out.println("ExecuteQueryForCollectionRoot");
            setParametersForSessionTest(); // method where i set the parameters.
            printExecute(); // printing
            super.executeQueryForCollection(object, object2, i);
        }After a few clicks on OK button the query executes normally.
    What I am guessing is, that executeQueryForCollection just takes whatever is in object2 and that's null at the beginning.
    I tried to use this method, which sets the bind variables in object2. And it gives me "Invalid column type" error.
    http://packtlib.packtpub.com/library/9781849684767/ch04lvl1sec07

Maybe you are looking for

  • Playlist items are greyed out

    I have synced my ipod to itunes. When i play it thru my auto audio system the playlist are greyed out and don't play. Any helpp is appreciated, Frank

  • How to fetch particular segment of records?

    Hi all, My last question is how to limit the rows returned. This time my question is how to fetch particular segment of records from DB table? In detail, if one table has 95 records, which method can be used to fetch #71-80 record only, not fetch #1-

  • Rman want really old logsequence for recover

    Hello, Red Hat x86 - 5 Oracle 10.2.0.2 I have restored a database to a new host from tape, not a duplicate, but a controlfile restore, and then restore. run ALLOCATE CHANNEL ch0 TYPE 'SBT_TAPE' PARMS 'ENV=(NB_ORA_SERV=xxxxx, NB_ORA_CLIENT=xxx, NB_ORA

  • P.O texts in printout

    Dear All, I have created a new P.O document type for capital purchases "ZCAP" by copying from NB doc type. While coding the print progem for my new document type, my abaper says that for the new doc type there are no table entries in T166K, which is

  • How to disable downloading process?

    Hi experts! I have a requirement for disable all kind of downlading process for a query, alv, list ... can anybody guide me if there is any authorization object for not let do this and for lock copy and paste? thanks in advance, best regards, Rebeca