View Object Encoding problem

I'm using Jdeveloper version 11.1.2.1. I have a encoding problem when creating View Object based on a query. This is my query:
select id, DECODE(id,'11','Индивидуално,'13','Semejno','14','Grupno') naziv
from ins_type
where class_id = '14' and id in ('11', '13', '14')
It is a simple LOV query with cyrilic letters. When I save the ViewObject and re-open it im getting question marks(???????) instead of the cyrilic letters. This only happens in the view object. I dont have other encoding issues when working with cyrilic letters only when im trying to build a View Object based on a query that has cyrilic letters. If i read those values from the database everything is fine
Thanks,

Change the encoding of your application to UTF-8 which appears to be sufficient for cyrilic chars. Here is a quick guide on how to do this http://docs.oracle.com/cd/E17984_01/doc.898/e14693/appa_configuring_jdev.htm
You may also need to update any pages that have encoding explicitly set

Similar Messages

  • Issue :  Child view object refresh problem,

    Hi ,
    Child view object refresh problem,
    Detail expaination of problem with DEPT and Emp table:
    I have two pages first.jspx and secound.jspx
    In the First page we are showing one department and All Employee blongs to that department. Employees are shown in table format.
    and i have duplicate button in table--> this will create a duplication record of selected employee by calling application module
    and the control moves to sencound page to show the newly created Employee details.
    From secound form am returning back with some action button to previous page to the same dept , The newly created records are not showing in the table [but the database has newly crated].
    How do i refresh the child view object ?
    Regards,
    Bogi.

    Hi Frank,
    We are creating new record from the AM with help of ADFBC.
    Would like know how to refresh UI Datacollection and AM view objects.. ? i have added vo.executeQuery in AM . But the changes not reflecting in UI,
    Thanks for the reply... am ready to give any other info required,,,

  • Changed SQL in view object causing problems

    Hi,
    I'm using Jdev 10.1.3.2, oracle 10g, and ADFBC.
    I created a view object by joining three tables and selecting attributes from them in the select clause. Later, I didn't want some of them, so I commented them out in the sql statement. Now when I query the data using either the application module tester, or run a page with the table on it, the data is not returning in the correct columns. For instance my row attribute #{row.UPC} is showing a number from an entirely different column. I looked at the xml, and rowImpl java files and could not find anything that looked wrong, except that the columns I commented out were not showing up with the values indicating that they were transient as outlined in section 6.10.2 of the ADF developers guide for forms/4gl developers, ie column type = $none$ and no table name attribute. I don't know if they should show up that way or not since they do come from a table, but aren't being used at the moment.
    I've checked the froums, just f'n googled it, and checked the dev guide but didn't find anything, so I was hoping someone on here had the same problem. If there is anything else I could post to help, please let me know, though none of it is custom code, and my sql is extremely simple.
    Thank you,
    Eric Liskow

    Well, I didn't find a solution, but I deleted the transient values, redid the view object, and started a new page and it worked. I'd still like to know if anyone knows what happened though. If I have to do that in a production site soon it wouldn't be much fun!

  • DOC BUG: 9.0.3.1 View Object Wizard and a Question

    First the question: What is the Passivate property for in the View Object Wizard's Attribute Settings page?
    Related Doc Bugs 9.0.3.1
    Topic: Define New View Attribute Dialog
    (click Help button in New Attribute dialog when creating a view object attribute)
    Problems: The description for the "Attribute" property is "foo"; Descrimator, Updateable, and Queriable have single letter descriptions. Key Attribute and Passivate are not listed.
    Topic: View Object Wizard - Attribute Settings Page
    (click Help button in Attribute Settings page in View Object Wizard)
    Problems: Query Column Type and Passivate are not listed. Attribute Settings column lists properties in a strange order (not a bug).
    Peter Koletzke

    Peter,
    I've logged doc bug 2814172: BC4J GLOSSARY SHOULD HAVE ENTRIES FOR PASSIVATE AND ACTIVATE.
    For more information, you could read the "About Application Module Pooling" topic in the online documentation. Passivation is what happens when the application module's state is saved to the database - and activation happens when an application module instance retrieves passivated state from the database.
    Thanks
    Blaise

  • Problem while Binding multiple Parameters to View Object[Solved]

    Hello,
    I am facing problem while binding multiple parameters with different data types in View Object query. For example suppose I have following query in my view object.
    SELECT Header.ADDED_BY
    Header.BATCH_ID,
    FROM BATCH_HEADER Header
    WHERE :1='deptAdmin' and Header.BATCH_ID
    in
    select batch_id from batch_header_dept_mapping where dept_id in(SELECT * FROM TABLE(CAST(:0 AS TABLE_OF_VARCHAR)))
    I am able to pass the Bind variables of Array type for : 0 , using Steve's ArrayOfStringDomain example. (ArrayOfStringDomain) .
    But after passing value to second bind parameter ie.. :1 .
    I am getting the error as follows.
    ## Detail 0 ##
    java.sql.SQLSyntaxErrorException: ORA-00932: inconsistent datatypes: expected - got CHAR.
    I tried to set
    setWhereClauseParam(1,11); // 11 is Number
    setWhereClauseParam(0,arr); // arr is arr = new Array(descriptor,conn,deptid); for in parameter.
    But of no use , Please let me know if any thing missing form me or have any another solutions. Also please provide me any example if have.
    Thank you,
    Sandeep
    Edited by: user11187811 on Oct 23, 2009 7:27 AM
    Edited by: user11187811 on Oct 26, 2009 12:52 AM
    Edited by: user11187811 on Oct 26, 2009 6:51 AM

    hi.
    but when using non-Oracle named parameter binding styles as you've done (ie. , :1), regardless of what number you give each bind variable, they are sequenced 0, 1, 2 etc. As such your bind variable :1 is the 0th parameter, and your bind variable  is the 1st parameter.Your statment is correct.
    :1 i used was actually on 0th position and :0 was on 1 position. Like you said in sequence 0,1,2 etc. Now i get the answer and i corrected My mistake by assigning right values to right binding variable. and problem just solve.
    Thanks Chris.

  • Problem with 2 View Objects based on One Entity -Probably a Bug in ADF BC

    Hi
    I am using JDeveloper 10.1.3(SU5) and adf faces and ADF BC and to explain my problem I use HR schema.
    First, I created 2 view objects based on countries table named as TestView1 and TestView2. I set TestView1 query where clause to region_id=1 and TestView2 query where clause to region_id!=1 in the view object editor and then I created 2 separated form on these 2 view objects by dragging and dropping from data control palette.
    Now when I insert a record in the form based on TestView1 with region_id set to 1 and commit the record and go to the next form I can see the record in the second form which is completely wrong since it is against the where clause statement of the second form.
    I am really confused and the situation is very wired and it seems to me something like bug in adf bc.Am I right.Is there any work around or solution for solving this problem.
    Any help would be highly appreciated.
    Best Regards,
    Navid

    Dear Frank,
    Thank you very much for your quick response.
    Reading your helpful comments now I have some questions:
    1- I have commited the record in the database so shouldn't the query of view objects be re-queried?
    2- We try to use ClearVOCaches (entity_name,false) in afterCommit of the base entity object but unfortunately it does not work correctly. after that,We got root app module and used findViewObject method to find all the view of that entity (we have found them by using name not automaticlly) and called executeQuery of all views. From my point of view it has 2 big disadvantages. First suppose that this entity is an important entity and 4 or 5 viow objects are based on it. Now, For inserting one record we should re-execute 4 or 5 view which I think makes some performance issues. Besides, If during the development one programmer add a new view object based on this entity and don't add the executeQuery in the afterCommit for this view, again we have the same problem. Isn't there at least a way that automatically refresh all related view objects however the performance issue still exists.
    3- You mentioned that this issue is handled in the developer guide. Could you kindly give me a refrence which developer guide you mean and which section I should read to overcome this problem.(I have ADF Developer's Guide for Forms/4GL Developer's Guide , however I search for clearVOCaches and surprisingly nothing was found!!!)
    4- Could you please give me some hints that from your point of view what is the best method to solve this problem with minimum performance effect.
    Any comment would be of some great help.
    Thanks in advance,
    Navid

  • Problems with the testing of querys in view objects

    I am working whih view object and i like to do one query with parameters for it(all with the wizard).
    The help of wizard no help me, because i write the clause where similar to the clause of the help.
    the error is:
    ORA-00904
    Exception:java.jql.SQLException
    Thank you for the attention.

    Hi Lynn
    Excuse me, i don't well explain my problem.
    I do the query of view object with the wizard of JDeveloper 3.2. i push the 'expert mode' and 'use ? style parameters' selection, and i build the query:
    SELECT EntVariable.COD,
    EntVariable.NOMBRE,
    EntVariable.DESCRIPCION,
    EntVariable.RANGO_INFERIOR,
    EntVariable.RANGO_SUPERIOR,
    FROM VARIABLE EntVariable
    WHERE :1 = EntVariable.NOMBRE
    When i push the button of 'Test' the query appear the error:
    java.sql.SQLException: ORA-00904: nombre de columna no valido
    void oracle.jdbc.dbaccess.DBError.throwSqlException(java.lang.String, java.lang.String, int)
    void oracle.jdbc.ttc7.TTIoer.processError()
    void oracle.jdbc.ttc7.Oall7.receive()
    void oracle.jdbc.ttc7.TTC7Protocol.doOall7(byte, byte, int, byte[], oracle.jdbc.dbaccess.DBType[], oracle.jdbc.dbaccess.DBData[], int, oracle.jdbc.dbaccess.DBType[], oracle.jdbc.dbaccess.DBData[], int)
    oracle.jdbc.dbaccess.DBColumn[] oracle.jdbc.ttc7.TTC7Protocol.parseExecuteDescribe(oracle.jdbc.dbaccess.DBStatement, byte[], oracle.jdbc.dbaccess.DBDataSet)
    void oracle.jdbc.driver.OracleStatement.doExecuteQuery()
    void oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout()
    int oracle.jdbc.driver.OraclePreparedStatement.executeUpdate()
    java.sql.ResultSet oracle.jdbc.driver.OraclePreparedStatement.executeQuery()
    java.lang.Exception oracle.jbo.dt.ui.view.VOClausePanel.testSQL()
    java.lang.Exception oracle.jbo.dt.ui.view.VOClausePanel.testAction()
    void oracle.jbo.dt.ui.view.VOClausePanel.actionPerformed(java.awt.event.ActionEvent)
    void javax.swing.AbstractButton.fireActionPerformed(java.awt.event.ActionEvent)
    void javax.swing.AbstractButton$ForwardActionEvents.actionPerformed(java.awt.event.ActionEvent)
    void javax.swing.DefaultButtonModel.fireActionPerformed(java.awt.event.ActionEvent)
    void javax.swing.DefaultButtonModel.setPressed(boolean)
    void javax.swing.plaf.basic.BasicButtonListener.mouseReleased(java.awt.event.MouseEvent)
    void java.awt.Component.processMouseEvent(java.awt.event.MouseEvent)
    void java.awt.Component.processEvent(java.awt.AWTEvent)
    void java.awt.Container.processEvent(java.awt.AWTEvent)
    void java.awt.Component.dispatchEventImpl(java.awt.AWTEvent)
    void java.awt.Container.dispatchEventImpl(java.awt.AWTEvent)
    void java.awt.Component.dispatchEvent(java.awt.AWTEvent)
    void java.awt.LightweightDispatcher.retargetMouseEvent(java.awt.Component, int, java.awt.event.MouseEvent)
    boolean java.awt.LightweightDispatcher.processMouseEvent(java.awt.event.MouseEvent)
    boolean java.awt.LightweightDispatcher.dispatchEvent(java.awt.AWTEvent)
    void java.awt.Container.dispatchEventImpl(java.awt.AWTEvent)
    void java.awt.Window.dispatchEventImpl(java.awt.AWTEvent)
    void java.awt.Component.dispatchEvent(java.awt.AWTEvent)
    void java.awt.EventQueue.dispatchEvent(java.awt.AWTEvent)
    boolean java.awt.EventDispatchThread.pumpOneEvent()
    void java.awt.EventDispatchThread.pumpEvents(java.awt.Conditional)
    void java.awt.EventDispatchThread.run()
    so i haven't code because the code not generate it,
    I know that i must to ask to the Oracle service tecnical because the view object i think that is well build it, but now i can't.
    sorry my english.
    If you think a good idea, it is will fantastic, because i need it this 'where' on this view object.
    Thank you for all.

  • Problem extending standard ViewReceiptsSearchVO view object with logic on get method

    Hi All,
    EBS 12.1.3
    Database 11.2.0.3
    I am trying to extend the 3 VOs related to ViewReceiptsSearch.  I extended a seeded ViewReceiptsSearchVO view object.  I haven't made any changes yet, no columns added, nothing altered.  When I run this substitution, the "Received" column is null.  This column in the view used for the view object only selects NULL and uses the getter method for the attribute to populate the value.  The generated extension getter calls getAttributeInternal and skips the logic in the standard getter and the substituted view object is displaying the null in the screen.  The below discussion explains the problem very well except that the original posted had the issue in 11.5.10.2.  I am having this issue with 12.1.3.
    Problem extending standard view object with logic on get method
    The 3 VOs that I am having the problem are:
    ViewReceiptsSearchVO
    ViewReceiptsSearchReqVO
    ViewReceiptsSearchSupplierVO
    What do I need to do to get the "Received" column populated?  Please let me know any additional information you want to troubleshoot the issue.
    Thanks.

    Hi,
    Can you Please Share Extended ViewReceiptsSearchVO.xml and .jpx File?
    Thanks,
    Dilip

  • Problem during Add row in View Object : View Row of Key Not found

    Hello,
    I'm facing this problem during insert of new row in the view object. I'm having 2 entities that belong to the same DB table (I need this because one is required with the composition assoc and the other one without it).
    I have three tables, COMPANY, USERS and PRIVILEGES.
    Company (1) to USERS (N)
    USERS (1) to PRIVILGES (N)
    While adding users for a specific company , i get this error msg.
    P.S: I'm not getting this error, if i add company, then user. Only if i directly add users i'm getting this error.
    04/11/27 19:31:46 [12511] DCUtil.RETURNING oracle.jbo.uicli.binding.JUFormBinding
    04/11/27 19:31:46 [12512] **** refreshControl() for BindingContainer :new_cuserUIModel
    04/11/27 19:31:46 [12513] *** DCDataControl.sync() called from :DCBindingContainer.refresh
    04/11/27 19:31:46 [12514] Decompressed BC state:BCST:Reousers1View1Iterator=0001000000042D323535,UsertypeView1Iterator=0001000000124141414B6639414142414141537653414141,StatesView1Iterator=0001000000124141414B5A77414142414141536643414141,
    04/11/27 19:31:46 [12515] **** refreshControl() for BindingContainer :new_cuserUIModel
    04/11/27 19:31:46 [12516] *** DCDataControl.sync() called from :DCBindingContainer.refresh
    04/11/27 19:31:46 [12517] Column count: 21
    04/11/27 19:31:46 [12518] ViewObject: Reousers1View_254_findByKey_ close prepared statements...
    04/11/27 19:31:46 [12519] ViewObject: Reousers1View_254_findByKey_ Created new QUERY statement
    04/11/27 19:31:46 [12520] SELECT Reousers1.USERID, Reousers1.CID, Reousers1.UTYPE, Reousers1.DESIGNATION, Reousers1.NAME, Reousers1.ADDRESS, Reousers1.CITY, Reousers1.STATE, Reousers1.ZIP, Reousers1.EMAIL, Reousers1.TEL, Reousers1.FAX, Reousers1.WEBSITE, Reousers1.ENTRY FROM REOUSERS Reousers1 WHERE (Reousers1.USERID = :1)
    04/11/27 19:31:46 [12521] Bind params for ViewObject: Reousers1View_254_findByKey_
    04/11/27 19:31:46 [12522] Binding param 1: -255
    04/11/27 19:31:46 [12523] OracleSQLBuilder Executing Select on: REOUSERS (false)
    04/11/27 19:31:46 [12524] Built select: 'SELECT USERID, CID, UTYPE, DESIGNATION, NAME, ADDRESS, CITY, STATE, ZIP, EMAIL, TEL, FAX, WEBSITE, ENTRY FROM REOUSERS Reousers1'
    04/11/27 19:31:46 [12525] Executing FAULT-IN...SELECT USERID, CID, UTYPE, DESIGNATION, NAME, ADDRESS, CITY, STATE, ZIP, EMAIL, TEL, FAX, WEBSITE, ENTRY FROM REOUSERS Reousers1 WHERE USERID=:1
    oracle.jbo.RowNotFoundException: JBO-25020: View row of key oracle.jbo.Key[-255 ] not found in Reousers1View1.

    Hi Timo,
    once again thanks for ur reply.
    as my vo are based on procedure, i know that i can't update the table using them.
    i only wanted to insert the rows in the vo and show it to user (only for selection purpose).
    Now my problem is sorted as i have changed the code like this-
    Row new_row=vo1.createRow();
    new_row.setAttribute(index,vo2.getAttribute(index)) ;
    vo1.insertRow(new_row);
    Earlier i was only inserting a new row, without creating any row.
    Thanks a lot.

  • Problem occured when create a tree table for master-detail view objects using SQL queries?

    I am programming a tree table for master-detail view objects using SQL queries and these 2 view objects are not simple singel tables queries, and 2 complex SQL are prepared for master and view objects. see below:
    1. Master View object (key attribute is SourceBlock and some varaible bindings are used for this view object.)
    SELECT  cntr_list.SOURCE_BLOCK,                   
            sum(                   
             case when cntr_list.cntr_size_q = '20'                   
                  then cntr_list.cntr_qty                   
                  else 0 end ) as cntr20 ,                   
            sum(                   
             case when cntr_list.cntr_size_q = '40'                   
                  then cntr_list.cntr_qty                   
                  else 0 end ) as cntr40 ,                   
             sum(                   
             case when cntr_list.cntr_size_q = '45'                   
                  then cntr_list.cntr_qty                   
                  else 0 end ) as cntr45                    
    FROM (       
        SELECT yb1.BLOCK_M as SOURCE_BLOCK,       
               scn.CNTR_SIZE_Q,        
               count(scn.CNTR_SIZE_Q) AS cntr_qty        
        FROM  SHIFT_CMR scm, SHIFT_CNTR scn, YARD_BLOCK yb1, YARD_BLOCK yb2       
        WHERE       
        scm.cmr_n = scn.cmr_n             
        AND (scm.plan_start_dt BETWEEN to_date(:DateFrom,'YYYY/MM/DD HH24:MI:SS') AND to_date(:DateTo,'YYYY/MM/DD HH24:MI:SS')                 
        OR scm.plan_end_dt BETWEEN to_date(:DateFrom,'YYYY/MM/DD HH24:MI:SS') AND to_date(:DateTo,'YYYY/MM/DD HH24:MI:SS'))                 
        AND scm.shift_mode_c = :ShiftModeCode                           
        AND scm.end_terminal_c = :TerminalCode      
        AND scm.start_terminal_c = yb1.terminal_c                  
        AND scm.start_block_n = yb1.block_n                  
        AND substr(scn.start_location_c,(instr(scn.start_location_c,',',1,5)+1),instr(scn.start_location_c,',',1,6)-(instr(scn.start_location_c,',',1,5)+1)) BETWEEN yb1.slot_from_n AND yb1.slot_to_n                  
        AND scm.end_terminal_c = yb2.terminal_c                  
        AND scm.end_block_n = yb2.block_n                  
        AND substr(scn.end_location_c,(instr(scn.end_location_c,',',1,5)+1),instr(scn.end_location_c,',',1,6)-(instr(scn.end_location_c,',',1,5)+1)) BETWEEN yb2.slot_from_n AND yb2.slot_to_n           
        AND scn.status_c not in (1, 11)             
        AND scn.shift_type_c = 'V'             
        AND scn.source_c = 'S'       
        GROUP BY yb1.BLOCK_M, scn.CNTR_SIZE_Q       
    ) cntr_list       
    GROUP BY cntr_list.SOURCE_BLOCK
    2. Detail View object (key attributes are SourceBlock and EndBlock and same varaible bindings are used for this view object.)
    SELECT  cntr_list.SOURCE_BLOCK, cntr_list.END_BLOCK,                
            sum(                     
             case when cntr_list.cntr_size_q = '20'                     
                  then cntr_list.cntr_qty                     
                  else 0 end ) as cntr20 ,                     
            sum(                     
             case when cntr_list.cntr_size_q = '40'                     
                  then cntr_list.cntr_qty                     
                  else 0 end ) as cntr40 ,                     
             sum(                     
             case when cntr_list.cntr_size_q = '45'                     
                  then cntr_list.cntr_qty                     
                  else 0 end ) as cntr45                      
    FROM (         
        SELECT yb1.BLOCK_M as SOURCE_BLOCK,     
               yb2.BLOCK_M as END_BLOCK,  
               scn.CNTR_SIZE_Q,          
               count(scn.CNTR_SIZE_Q) AS cntr_qty          
        FROM  SHIFT_CMR scm, SHIFT_CNTR scn, YARD_BLOCK yb1, YARD_BLOCK yb2         
        WHERE         
        scm.cmr_n = scn.cmr_n               
        AND (scm.plan_start_dt BETWEEN to_date(:DateFrom,'YYYY/MM/DD HH24:MI:SS') AND to_date(:DateTo,'YYYY/MM/DD HH24:MI:SS')                   
        OR scm.plan_end_dt BETWEEN to_date(:DateFrom,'YYYY/MM/DD HH24:MI:SS') AND to_date(:DateTo,'YYYY/MM/DD HH24:MI:SS'))                   
        AND scm.shift_mode_c = :ShiftModeCode                             
        AND scm.end_terminal_c = :TerminalCode        
        AND scm.start_terminal_c = yb1.terminal_c                    
        AND scm.start_block_n = yb1.block_n                    
        AND substr(scn.start_location_c,(instr(scn.start_location_c,',',1,5)+1),instr(scn.start_location_c,',',1,6)-(instr(scn.start_location_c,',',1,5)+1)) BETWEEN yb1.slot_from_n AND yb1.slot_to_n                    
        AND scm.end_terminal_c = yb2.terminal_c                    
        AND scm.end_block_n = yb2.block_n                    
        AND substr(scn.end_location_c,(instr(scn.end_location_c,',',1,5)+1),instr(scn.end_location_c,',',1,6)-(instr(scn.end_location_c,',',1,5)+1)) BETWEEN yb2.slot_from_n AND yb2.slot_to_n             
        AND scn.status_c not in (1, 11)               
        AND scn.shift_type_c = 'V'               
        AND scn.source_c = 'S'         
        GROUP BY yb1.BLOCK_M, yb2.BLOCK_M, scn.CNTR_SIZE_Q         
    ) cntr_list         
    GROUP BY cntr_list.SOURCE_BLOCK, cntr_list.END_BLOCK
    3. I create a view link to create master-detail relationship for these 2 view objects.
    masterview.SourceBlock (1)->detailview.SourceBlock (*).
    4. I create a tree table using these 2 view objects with master-detail relationship.
    When I set default value for variable bindings of these 2 view objects and the matching records exist, tree table can work well. I can expand the master row to display detail row in UI.
    But I need to pass in dymamic parameter value for variable bindings of these 2 view objects, tree table cannnot work again. when I expand the master row and no detail row are displayed in UI.
    I am sure that I pass in correct parameter value for master/detail view objects and matching records exist.
    Managed Bean:
            DCIteratorBinding dc = (DCIteratorBinding)evaluteEL("#{bindings.MasterView1Iterator}");
            ViewObject vo = dc.getViewObject();
            System.out.println("Before MasterView1Iterator vo.getEstimatedRowCount()="+ vo.getEstimatedRowCount());
            System.out.println("Before MasterView1Iterator ShiftModeCode="+ vo.ensureVariableManager().getVariableValue("ShiftModeCode"));
            vo.ensureVariableManager().setVariableValue("DateFrom", dateFrom);
            vo.ensureVariableManager().setVariableValue("DateTo", dateTo);
            vo.ensureVariableManager().setVariableValue("ShiftModeCode", shiftModeC);
            vo.ensureVariableManager().setVariableValue("TerminalCode", terminalCode);
            vo.executeQuery();
            System.out.println("MasterView1Iterator vo.getEstimatedRowCount()="+ vo.getEstimatedRowCount());
            DCIteratorBinding dc1 = (DCIteratorBinding)evaluteEL("#{bindings.DetailView1Iterator}");
            ViewObject vo1 = dc1.getViewObject();
            System.out.println("Before DetailView1Iterator vo1.getEstimatedRowCount()="+ vo1.getEstimatedRowCount());
            System.out.println("Before DetailView1Iterator ShiftModeCode="+ vo1.ensureVariableManager().getVariableValue("ShiftModeCode"));
            vo1.ensureVariableManager().setVariableValue("DateFrom", dateFrom);
            vo1.ensureVariableManager().setVariableValue("DateTo", dateTo);
            vo1.ensureVariableManager().setVariableValue("ShiftModeCode", shiftModeC);
            vo1.ensureVariableManager().setVariableValue("TerminalCode", terminalCode);
            vo1.executeQuery();
            System.out.println("after DetailView1Iterator vo1.getEstimatedRowCount()="+ vo1.getEstimatedRowCount());
    5.  What's wrong in my implementation?  I don't have no problem to implement such a tree table if using simple master-detail tables view object, but now I have to use such 2 view objects using complex SQL for my requirement and variable bindings are necessary for detail view object although I also think a bit strange by myself.

    Hi Frank,
    Thank you and it can work.
    public void setLowHighSalaryRangeForDetailEmployeesAccessorViewObject(Number lowSalary,
                                                                              Number highSalary) {
            Row r = getCurrentRow();
            if (r != null) {
                RowSet rs = (RowSet)r.getAttribute("EmpView");
                if (rs != null) {
                    ViewObject accessorVO = rs.getViewObject();
                    accessorVO.setNamedWhereClauseParam("LowSalary", lowSalary);
                    accessorVO.setNamedWhereClauseParam("HighSalary", highSalary);
                executeQuery();
    but I have a quesiton in this way. in code snippet, it is first getting current row of current master VO to determine if update variables value of detail VO. in my case, current row is possibly null after executeQuery() of master VO and  I have to change current row manually like below.
    any idea?
                DCIteratorBinding dc = (DCIteratorBinding)ADFUtil.evaluateEL("#{bindings.SSForecastSourceBlockView1Iterator}");
                ViewObject vo = dc.getViewObject();           
                vo.ensureVariableManager().setVariableValue("DateFrom", dateFrom);
                vo.ensureVariableManager().setVariableValue("DateTo", dateTo);
                vo.ensureVariableManager().setVariableValue("ShiftModeCode", shiftModeC);
                vo.ensureVariableManager().setVariableValue("TerminalCode", terminalCode);
                vo.executeQuery();
                vo.setCurrentRowAtRangeIndex(0);
                ((SSForecastSourceBlockViewImpl)vo).synchornizeAccessorVOVariableValues();

  • Problem in using View Object for validation

    Hi,
    I have defined a simple swing form to practice. It has one Entity Object and two View objects. One of these view objects is an updatable VO based on the EO and the other one has a simple "select count(*)" from a table. I defined a method validation on one of the EO attributes to see how can i use the VO for validation. On the other hand i defined the Application Module to use both of my views. As far as i undrestood, when i define a VO for AM, the AM will instantiate it the first time it starts running. Here is the code inside the method validation for FirstName attribute:
    /**Validation method for FirstName
    public boolean validateFirstName(String data) {
    ViewObject vo = getDBTransaction().getRootApplicationModule().findViewObject("CountEmployeeInstance");
    if (vo == null) {
    System.out.println("vo is null");
    else {
    vo.executeQuery();
    if (vo.hasNext()){
    System.out.println("count = " + ((CountEmployeeRowImpl) vo.next()).getCount());
    else {
    System.out.println("vo has no next");
    return true;
    The problem is that vo.executeQuery() does not return any record. In fact the vo.hasNext() returns false and i get the message "vo has no next" on the console. Please pay attention that the VO's sql statement is SELECT COUNT(*) and it always returns a record. I found that if i use vo.closeRowSet() before vo.executeQuery() everything works fine.
    Please tell me that what is my problem and why is it working like this?
    Best Regards,
    Alireza Vali

    Chris,
    1- Every thing is fine with the ADF model layer in this practice. I have tested it by using Test option on AM and it works. It works exactly the same as how it works throug swing UI that i use for it.
    2- The VO is beeing found and as you see in the code, i have tested it by "if (vo == null)" just after the statement which finds it and vo is not null which means it has been instantiated by AM as it was supposed to.
    3- The VO's SQL statement is "SELECT COUNT(*) FROM EMPLOYEE" with no where clause. I have 14 records in this table.
    Every thing is OK with swing form. It runs and shows the records and all the binded operations like "next record", "previous record" and so on work perfectly on the records.
    4- The code i used is a combination of two examples. Example 9-7 and 9-8 in pages 9-12 and 9-13 of mentioned document.
    Now my findings:
    I changed the code to the following:
        /**Validation method for FirstName
        public boolean validateFirstName(String  data) {
            ViewObject vo = getDBTransaction().getRootApplicationModule().findViewObject("MaxEmployeeIdInstance");
            if (vo == null) {
                System.out.println("vo is null");
            else {
                //vo.closeRowSet();
                vo.executeQuery();
                System.out.println("Row Count = " + vo.getRowCount());
                System.out.println("Default Slot = " + vo.getCurrentRowSlot());
                vo.next();
                System.out.println("Slot after next() = " + vo.getCurrentRowSlot());
                vo.reset();
                System.out.println("Slot after reset() = " + vo.getCurrentRowSlot());
                vo.first();
                System.out.println("Slot after first() = " + vo.getCurrentRowSlot());
                vo.last();
                System.out.println("Slot after last() = " + vo.getCurrentRowSlot());
                System.out.println("----------------------");
                vo.executeQuery();
                System.out.println("Deafault index = " + vo.getCurrentRowIndex());
                vo.next();
                System.out.println("Index after next() = " + vo.getCurrentRowIndex());
                vo.reset();
                System.out.println("Index after reset() = " + vo.getCurrentRowIndex());
                vo.first();
                System.out.println("Index after first() = " + vo.getCurrentRowIndex());
                vo.last();
                System.out.println("Index after last() = " + vo.getCurrentRowIndex());
                System.out.println("Slot Before First = " + vo.SLOT_BEFORE_FIRST);
                System.out.println("Slot Beyound Last = " + vo.SLOT_BEYOND_LAST);
            return true;
        }Here are the results :
    Row Count = 1
    Default Slot = 0
    Slot after next() = 3
    Slot after reset() = 0
    Slot after first() = 0
    Slot after last() = 0
    Deafault index = 0
    Index after next() = -1
    Index after reset() = 0
    Index after first() = 0
    Index after last() = 0
    Slot Before First = 2
    Slot Beyound Last = 3
    As you see, after the execution of the statement "vo.executeQuery()" the The RowIterrator pointer is not pointing to the slot before the first record but it is pointing to the first record itself. And that is why the statement "if (vo.hasNext()" returns false because we just have one record and RowIterrator Index is standing on that record and there is no next record present. The very important thing is that even reset() method does not set the index to the slot before the first record and it sends it to the first record.
    After that, i took the statemet "vo.closeRowSet()" out of the comment and here are the results:
    Row Count = 1
    Default Slot = 2
    Slot after next() = 0
    Slot after reset() = 2
    Slot after first() = 0
    Slot after last() = 0
    Deafault index = -1
    Index after next() = 0
    Index after reset() = -1
    Index after first() = 0
    Index after last() = 0
    Slot Before First = 2
    Slot Beyond Last = 3
    These are the exact things that we expected from the first. After query execution, the pointer is set to the slot before first record and the reset() method does its defined job which is sending the pointer to the slot before the the first record.
    My Assumptions:
    The Rowset which is created by AM is somehow different from the RowSet which you create in your program. I am absolutely sure that this functionality is not a bug but a design decission. I look at my simple program and see that when it runs, the data is queried and shown on the screen which is all done by AM by instantiating my VO and executing the query on it. AM reasonably must put the RowSet pointer on the first record and not the slot before first record. And i am sure that if i use reset() method on the shown RowSet, the pointer goes to the first record and the data on the screen does not get cleared. Whe we use vo.closeRowSet() and execute the query again, the AM made RowSet is closed and a new one is created and the new RowSet is your's not AM's so it functions as you expect.
    Best Regards,
    Alireza Vali

  • Problem with in-memory filtering: JBO-25016: View object is read only

    Hello,
    I have problem with implementation of Steve's Muench example #71 - Dropdown Lists in Table with Different Choices per Row.
    Source for the list is a read only view object.
    Invoking viewObject.findByViewCriteria throwing:
    javax.faces.el.EvaluationException: oracle.jbo.ReadOnlyViewObjectException: JBO-25016: View object ... is read only.
    What's wrong?
    Rado
    Error stack:
    Caused by: oracle.jbo.ReadOnlyViewObjectException: JBO-25016: View object ... is read only.
         at oracle.jbo.server.ViewDefImpl.newInstance(ViewDefImpl.java:991)
         at oracle.jbo.server.ViewObjectImpl.createInstance(ViewObjectImpl.java:2784)
         at oracle.jbo.server.QueryCollection.createRowWithEntities(QueryCollection.java:1271)
         at oracle.jbo.server.ViewRowSetImpl.createRowWithEntities(ViewRowSetImpl.java:1869)
         at oracle.jbo.server.ViewRowSetImpl.makeRowCopy(ViewRowSetImpl.java:1546)
         at oracle.jbo.server.ViewRowSetImpl.insertRowAtInternal(ViewRowSetImpl.java:1667)
         at oracle.jbo.server.ViewRowSetImpl.findByViewCriteria(ViewRowSetImpl.java:4126)
         at oracle.jbo.server.ViewObjectImpl.findByViewCriteria(ViewObjectImpl.java:7033)
    My code:
    public RowIterator selectDetails(String code) {
    ViewObject vo = getVO();
    if (!vo.isExecuted()) {
    vo.setQueryMode(ViewObject.QUERY_MODE_SCAN_DATABASE_TABLES);
    vo.executeQuery();
    vo.last();
    vo.setQueryMode(ViewObject.QUERY_MODE_SCAN_VIEW_ROWS);
    ViewCriteria vc = vo.createViewCriteria();
    ViewCriteriaRow vcr = vc.createViewCriteriaRow();
    vcr.setAttribute("Code", "='"+code+"'");
    vc.add(vcr);
    vc.setCriteriaMode(ViewCriteria.CRITERIA_MODE_CACHE);
    return vo.findByViewCriteria(vc,-1,ViewObject.QUERY_MODE_SCAN_VIEW_ROWS);
    }

    check attribute settings of your VO...
    the attribute for wich you set view criteria must be set to queryable and updatable - always

  • Problem with view object for global variables

    Hi,
    I'm using jdeveloper 11.1.2.3.0
    We are using view object with transient attributes for global variables.
    we defined the view as explained here:
    http://docs.oracle.com/cd/E14571_01/web.1111/b31974/bcstatemgmt.htm#ADFFD19610
    also we defined one of the attributes as primary key.
    When we start to test our application with disable connection pooling we got some problems.
    sometimes the row in the global view object is deleted.
    (for example after using executeEmptyRowSet on other view object).
    it looks strange, we couldn't fוnd why does it happen.
    Any idea?

    As Timo said, it is very hard to help without source.
    Are you sure that you do the next step:
    After the call to super.prepareSession(), add code to create a new row in the transient view object and insert it into the view object.

  • Problem exposing Accessor Methods on View object (ViewRowImpl.java)

    JDeveloper 9.03
    I have a view link, ViewLinkSourceDest, that links two view objects Source and Destination. Each view object has its respective ViewRowImpl.java file created.
    I have selected "Generate Accessor in View Object" in View link Properties of the View Link Wizard for both source and destination view objects.
    The correct Accessor methods are available in both the source and destination ViewRowImpl files.
    When I access the Source accessor method from the DestinationViewRowImpl object I receive the following error:
              ORA-00904: invalid column name
              It is also is displaying the Source view object's SQL statement with the (:1 = Destination.ID) where clause.
    The error is occurring when trying to retrieve the view object using this type of method call:
              Row r = this.getSourceView();
    After further investigation I have found an example set of view objects in which the error does not occur. The difference was in the ViewLink.xml file.
    The ViewLink.xml file that accesses the Accessor with the error begins like this:
              <ViewLink     
                   Name="ViewLink"
                   Where=":1 = Destination._ID" >
    The ViewLink.xml file that accesses the Accessor with no error begins like this:
              <ViewLink     
                   Name="ViewLink"
                   EntityAssociation ="SourceDestAssociation" >
    suggesting that the use of an association would resolve this problem.
    I was not able to create a View link based on an association that would generate a ViewLink.xml file that ressemble the successful file above. I could however manually add the correct entry to the xml file that caused the error and sucessfully access the Accessor method in the source object. This is not the final answer because the IDE will regenerate the ViewLink.xml file to its original state even if created with the appropriate Association.
    Is this a bug?
    Is the way the ViewLink.xml file created different in JDev 9.03 than in 9.02
    Is there something I am missing that is causing the ViewLink.xml file to generate incorrectly?
    Any suggestions would be helpful.
    Rob

    Steps to recreate:
    1 Create SomeSuperEntityImpl.java extended by SourceEntityImpl.java and DestinationEntityImpl.java entity objects.
    2 Create SourceView and DestinationView objects
    3 Create SourceDestinationAssociation linking the entity object Source PK to Destination FK
    4 Create SourceDestinationView linking Source and Destination view using the SourceDestinationAssociation
    View the SourceDestinationView.xml file and you will see that the viewlink has Where=":1 = source.src_id"
    This is the scenario that causes the initial problem with the Accessor Methods.
    If the SomeSuperEntityImpl.java is removed as the super class and the same procedure is followed you will get the desired 'EntityAssociation = "package.SourceDestinationAssociation"' in the SourceDestinationView.xml file .
    Hope this is a little clearer.
    Rob

  • Problem with a View Object

    Hi,
    I am using ADF BC technology.
    I've got a curious for me problem...
    I get from a creation form a code that the user enter, a method in the app. module checks
    using the view object if the code exists or not...
    The code always Exist! Debugging I found out that the code that is found is the code that the user tries to enter...
    Am I missing something?
        public String add() {
            BindingContainer bindings = getBindings();
             if (bindings != null) {
                OperationBinding operationBinding = bindings.getOperationBinding("checkKbExam");
                 operationBinding.getParamsMap().put("code",inputText2.getValue());
                 Boolean  result = (Boolean) operationBinding.execute();
                System.out.println("balame gia code: "+ inputText2.getValue());
                System.out.println("pirame apo appmodule: "+result );
                if(result==false){
                    FacesContext context = FacesContext.getCurrentInstance();
                    operationBinding =
                            (OperationBinding)bindings.getOperationBinding("getMsg");
                    operationBinding.getParamsMap().put("msgId", "5");
                    String msg = (String)operationBinding.execute();
                    FacesMessage message1 =
                        new FacesMessage(msg);
                    context.addMessage(null, message1);
                    return"null";
                 OperationBinding operationBinding1 =bindings.getOperationBinding("Commit");
                 operationBinding1.execute();
        public boolean checkKbExam(String code) {
           checkKbExamImpl check  = getcheckKbExam1();
           check.setTheGivenCode(code);     
           check.executeQuery();
           Row[] row = check.getAllRowsInRange();
           getcheckKbExam1().setCurrentRow(row[0]);
           System.out.println(row[0].getAttribute("RefCodeSystem"));
           try{
               System.out.println(row[1].getAttribute("RefCodeSystem"));
            catch(Exception e){
            System.out.println("error "+ e);
           if (row.length>0) {
              System.out.print("mikos einai  " + row.length);
              return false;
             return true;
        }

    No solution yet guys ...and it's really annoying!
    When i put a "code" that does not exists in the table...the array length is 1.
    When it exists it's again 1 !!!!
    so what does it leave me?
    pls somebody help

Maybe you are looking for