Partial read-only view object. How to make it work?

Hello,
is there a way to have a "partial" read-only view object, where some attributes are based on an EO and some others are extracted directly from a table with no corresponding EO?
On this view-object it should be possible to perform row insertions from an af:table, in a way that, after validation (i.e. a row selection change), the values on the attributes not based on the EO do not get lost, even if they do not have any attributes based on an EO.
On the other hand, if I use fake EO attributes ($none$) for those read-only attributes, their values will not gest lost after validation of the new interted rows, but in this case, when the table is first rendered on the page, the table shows empty values on those items, probably because the EO attributes are empty when the query is performed.
Note that It seems I cannot use Transient attributes where their value is calculated with a SQL statement, since it would mean I would have to perform an heavy SQL statement for every transient attribute.
Is there any other solution, I hope the problem is clear.

That solution does not cover the case where an attributed of one entity used as reference is calculated from a SQL expression with parameters involving the remaining attributes of the same entity.
For example consider a reference-only entity based on a table with one field T(COD). This entity has one more attribute other than COD itself, CALCULATED_VALUE.
How can I bind the attribute CALCULATED_VALUE to a SQL expression which is a function of COD: MyDBPackage.GetValue(COD, :environment), where :environment is bind variable?
The frameowork always give me JBO-exception , asking to specify IN or OUT for the variable.

Similar Messages

  • Finding Application Module name in read-only view object classes

    Hi all,
    I have a fairly basic question about finding application module name when we are coding in ViewObject java classes.
    I want to know how can I obtain <<application module>> NAME that our current view object is contained in it at run-time. I think there should be a way to find current application module NAME, when we are in ViewObject classes including View Object, View Row or view object definition classes (I've overridden all mentioned classes).
    I should notify that since our view object is read-only I may not count on view object's entity classes, coz as you know a read-only view object don't have any entity in it!
    So, if you have any idea about finding current application module name in view object java classes please let me know.
    Appreciate for your replies,
    Nasser

    Thanks guy, it was helpful:)
    Now i can access application module name through viewObject classes.
    But another question is raised...sorry if i m boring:( I promise its the final question ;)
    Is there a way to get application module name in an extended version of JboException class?
    Thanks again for your reply:)
    Nasser

  • Read-Only view object won't give me it's row

    Hi,
    I have a read only view object which when executed has one row in it, but the next method returns null.
    this is my code in the AM:
        public Row getPerson() {
            Row row = null;
            ViewObject vo = getPersonsView1();
            vo.setNamedWhereClauseParam("p_login_id", getUserPrincipalName());
            vo.executeQuery();
            System.out.println("rows:" + vo.getEstimatedRowCount());
            if (vo.hasNext())
               row = vo.next();
            return row;  
        }and the console log:
    06/09/15 10:37:57 [513] select person_id,
    login_id,
    orig_system_id,
    person_type,
    title,
    preferred_name,
    preferred_name ||' '||surname full_name,
    first_name,
    other_names,
    surname,
    phone_work,
    email_address
    from sys_persons
    where person_type = 'Staff'
    and login_id = :p_login_id
    06/09/15 10:37:57 [514] Bind params for ViewObject: PersonsView1
    06/09/15 10:37:57 [515] Binding null of type 12 for "p_login_id"
    06/09/15 10:37:57 [516] *** DCDataControl.sync() called from :DCBindingContainer.refresh
    06/09/15 10:37:57 [517] *** DCDataControl.sync() called from :DCBindingContainer.refresh
    06/09/15 10:37:57 [518] **** refreshControl() for BindingContainer :rft_ConsolePageDef
    06/09/15 10:37:57 [519] *** DCDataControl.sync() called from :DCBindingContainer.refresh
    06/09/15 10:37:57 [520] *** DCDataControl.sync() called from :DCBindingContainer.refresh
    06/09/15 10:38:00 [521] Column count: 12
    06/09/15 10:38:00 [522] ViewObject: PersonsView1 Reusing defined prepared Statement
    06/09/15 10:38:00 [523] Bind params for ViewObject: PersonsView1
    06/09/15 10:38:00 [524] Binding param "p_login_id": banstey
    06/09/15 10:38:00 rows:1
    Source breakpoint occurred at line 38 of SystemServiceImpl.java.Note above System.out.println("rows:" + vo.getEstimatedRowCount()); returns:
    06/09/15 10:38:00 rows:1
    but when i debug with a break point in the above method if (vo.hasNext()) returns false.
    I have tried doing row = vo.next(); without the if statement, but row still evaluates to null.
    The VO returns one record in the BC4J tester and I have this exact method and VO defined in another project and it works there. Tearing my hair out with this one...
    Brenden

    try RowSetIterator instead,
    RowSetIterator it = vo.createRowSetIterator("myIt");
    if(it.hasNext())
    MyVORowImpl row = (MyVORowImpl)it.next()
    //don't forget close the RowSetIterator
    I guess you use the VO.next(), but the current row of the VO is the one you get from db, and his next is null...

  • ADF View Criteria on a Read Only View Object

    Hi,
    I have created a read only view object using a query. The query consists of analytical functions to fetch the AVG values dynamically.
    So far my approach worked fine.
    I want the Average values in my query to be calculated dynamically based on the certain view criteria.
    But after applying view criteria, my query is formulated as shown below:
    SELECT * FROM (SELECT   RECEIVED_YEAR,
               WEEK_NO,
               NO_RECEIVED,
               NO_STARTED,
               ROUND (TO_NUMBER (REPLACE (AVG_HRS_TO_START, ':', '.')),2) AVG_HRS_TO_START,
               ROUND (AVG (TO_NUMBER (REPLACE (AVG_HRS_TO_START, ':', '.'))) OVER (ORDER BY RECEIVED_YEAR),2)              OVERALL_AVG_HRS,
               GOAL_HRS,
               ROUND (AVG (NO_STARTED) OVER (ORDER BY RECEIVED_YEAR), 2) AVG_NO_STARTED,
               ROUND (AVG (NO_RECEIVED) OVER (ORDER BY RECEIVED_YEAR), 2) AVG_NO_RECEIVED
               FROM ORDERS_RCPT_TO_START_VW
    ORDER BY RECEIVED_YEAR, WEEK_NO) QRSLT  WHERE ( ( ( ( (RECEIVED_YEAR = :RecdYear ) AND (WEEK_NO <= :weekNo ) ) ) ) )
    As per this query, it is calculating the Average values first and then applying filter criteria rather than applying the filter criteria and calculating average values.
    Please help me on this.

    Entity objects are used to update/delete/insert data to the database.
    If all your base DB object offers is read then just create a read only view object.

  • ECC 6.0 Upgrade - Lot of  Custom Objects - How to make it work ???

    Hi ,
    My client is on HR 4.6c and ESS in standalone ITS and upgrading to ECC 6.0 and EP7.  They have lot of custom objects ( Reports, ABAP Queries, Function Modules etc., ) and lot of customization done in ESS ( Std tcodes copied and developed ESS services in ITS). What is the approach to be followed to upgrade these custom objects/transactions into ECC 6.0? Once up gradation done, Is there any changes to be done either in EP 7 side or  R/3 side ( ECC 6 ) in order to call those z tcodes in EP7 ( ESS )?
    Client is happy with the current functionality in ESS ( ITS ) , wanted to use the same functionality in new system. Any clue on  how to make use of those Z transactions useful in ECC 6? Can we call these transactions in ESS in EP7? Your response will be highly appreciated. Example: For open enrollment, instead of std PZ14 , they have copied and developed their own transaction to use in ESS ( 4.6c ). The same one should also work in EP7 and ECC 6.
    Rgds
    Peddi

    Prakash,
    Thank you for your reply.  But we have custom transactions( Screen based , module pool ) used in 4.6C, ESS ( ITS),  What are the changes we may have to make potentially to work those programs from EP7 ESS.
    What are the changes you suggest to make in R/3 ECC6 ( after upgrade )and also EP7 side ( Like crating custom I Views would be a best bet ? )
    Peddi

  • Adding/deleting rows from a treeTable with a read-only view object

    Hello --
    I'm getting a JBO-25016 error when I go to delete a row from a treeTable. I want to create the hierarchy from a stored procedure, have the user add and remove nodes without calling back to the database. I will iterate through the tree and see what has changed and made the necessary updates on the database manually.
    What is the correct method for adding/removing rows form the UI component?
    Thanks!
    Tom

    Thank you, Amit! That did the trick.
    Edited by: Tom on Apr 28, 2011 11:51 AM

  • Updatable view and Read only view

    Jdev version 11.1.1.6
    1. Can we use an updatable view instead of readonly view for LOVs?
    2. In my use case, I am having a panel-tabbed component. I create Region in the first tab & create Countries in the second tab. If I use a LOV for Regions based on the read-only view, then the data created & COMMITTED in the first tab is not getting reflected in the LOV in the second tab. But, if I use an updatable view for the Region field's LOV, then the LOV works fine. But, want to know if it is fine to use an updatable view for LOVs.

    Quotation from the developer guide
    >
    Best Practice: When you need to create a read-only view object for
    data lookup, you should use the entity-based view object and deselect
    the Updatable option in the Entity Objects page of the view object
    overview editor.
    >
    >
    View objects can either be related to underlying entity objects or not. When a view
    object is related to one or more underlying entity objects the default behavior supports
    creating new rows and modifying or removing queried rows. However, the update
    feature can be disabled by deselecting Updatable in the overview editor for the
    entity-based view object
    >
    So the answer for your first question is Yes

  • External Hard Drive is read only?? how do i change this?

    ive just gotten a new external hard drive which i use a giant usb pretty much,
    only problem is when i drag files into it to copy it tells me that "untitled" cant be modified.. also when i check its info im told that it is read only... how do figure out how to change this...
    i need help please

    Hi jami01
    You need to reformat your new external drive in Disk Utility. Currently it will be formatted as NTFS which is a windows format and the Mac can read that but not write to it, hence your problems.
    If you wish to use it solely with your Mac and not share it with a PC, then then choose the HFS+ format
    Open Disk Utility,
    -Select the external disk in the left panel. make sure you have selected the correct disk.
    -Click the Erase tab
    -Give the disk a name
    -Select the Volume Format type to be HFS+
    -Click Erase
    If you wish to share it with a PC then Choose MS-DOS(FAT32) format
    regards roam

  • Read only view which has an ORDER BY clause

    Aim to create a read only view which has an ORDER BY clause
    Sample script
    CREATE TABLE tab1 (
    col1 VARCHAR2(3),
    col2 NUMBER
    INSERT INTO tab1(col1, col2) VALUES ('ccc', 30);
    INSERT INTO tab1(col1, col2) VALUES ('bbb', 20);
    INSERT INTO tab1(col1, col2) VALUES ('ddd', 40);
    INSERT INTO tab1(col1, col2) VALUES ('aaa', 10);
    COMMIT;
    -- To creat View
    CREATE OR REPLACE VIEW v_tab1
    AS
    SELECT
    col1,
    col2
    FROM
    tab1
    ORDER BY
    col1
    WITH READ ONLY;
    I get the following error
    WITH READ ONLY
    ERROR at line 10:
    ORA-00933: SQL command not properly ended
    When I comment out the ORDER BY clause, the view is created
    Pls let me know how I can create a read only view with ORDER BY clause

    Hi,
    take a look at the documentation for CREATE VIEW, there is a restriction:
    "You cannot specify the ORDER BY clause in the subquery if you also specify the subquery_restriction_clause."
    Wolfgang

  • TM Contention and Read Only Views - Toad

    I have a case where a select against a view that has the read only option caused TM contention. I realize that the TM can be fixed by indexing the unindexed foreign key which I plan to do. The user only has select privilege so the locking must have come from select for update, but when I checked the query it was a select against a read only view from Toad. Has anyone seen the case where Toad does a select for update behind the scenes which causes locking issues. I am thinking this must be the case otherwise I do not know how a select against a readonly view could hold a lock.

    user12191713 wrote:
    I have a case where a select against a view that has the read only option caused TM contention. I realize that the TM can be fixed by indexing the unindexed foreign key which I plan to do. The user only has select privilege so the locking must have come from select for update, but when I checked the query it was a select against a read only view from Toad. Has anyone seen the case where Toad does a select for update behind the scenes which causes locking issues. I am thinking this must be the case otherwise I do not know how a select against a readonly view could hold a lock.using sqlplus post the same SQL & results
    Handle:     user12191713
    Status Level:     Newbie
    Registered:     Aug 4, 2011
    Total Posts:     40
    Total Questions:     25 (19 unresolved)
    I extend to you my condolences; since you rarely get your questions answered here.

  • Read a view Object parameter value

    can anyone tell me how to read a View Object parameter value from inside a DODML()?
    Thanks

    Please help us to understand the use case better. Can you please details the scenario? Are you looking for the bind variable value used for querying ?

  • Search bar shows only icon. How to make it return to normal?

    Search bar shows only icon. How to make it return to normal?
    Normally, the search bar looks like the picture in this link.
    http://www.simplehelp.net/images/googlesearchicon/img03.jpg
    However, I only have the icon in front and no space to type the search information. How can this be solved?
    Is it because of any of my add-ons?

    Try:
    * http://kb.mozillazine.org/Corrupt_localstore.rdf
    Start Firefox in [[Safe Mode]] to check if one of the add-ons is causing the problem (switch to the DEFAULT theme: Tools > Add-ons > Themes).
    * Don't make any changes on the Safe mode start window.
    See:
    * [[Troubleshooting extensions and themes]]

  • Get var from InputText based on a "read only view"

    Hi.
    I have build some read only views from DB.
    All my views are linked.And the Data of each View is shown with " selectOneChoice" or "inputText".
    So far so good.
    But now my 1.problem.
    How can I get the value of the inputText ( coordinates" lat , long ") in a var to use it with a google maps function like
    map.addOverlay(createMarker(new GLatLng(lat,long)))
    2. problem
    how can i change the readout value of the inputText from[i] 51,2456 to 51.2456 for example
    Hope for your help!
    Chris

    Hi,
    Yes, I'am talking about ViewObjects in ADF Business Components.
    Version view:
    ADF Business Components     10.1.3.41.57
    BPEL Designer     10.1.3.3.0 (Build 070615.0525)
    CVS Version     Internal to Oracle JDeveloper (client-only)
    Java(TM) Platform     1.5.0_06
    Oracle IDE     10.1.3.41.57
    Struts Modeler Version     10.1.3.41.57
    UML Modelers Version     10.1.3.41.57
    Versioning Support     10.1.3.41.57
    For UserInterface I'am using "Web Tier--->JSF--->JSF JSP
    I've got 5 read only views: Region, Country, City, Location and Koord ( including all coordinates of Location)
    Now I want to show a marker in googleMaps with these coordinates but it doesn't work.
    function load() {
    if (GBrowserIsCompatible()) {
    var map = new GMap2(document.getElementById("map"));
    map.addControl(new GSmallMapControl());
    map.addControl(new GMapTypeControl());
    map.setCenter(new GLatLng(51,6),1);
    var Lat;
    var Longi;
    here starts my problem
    map.addOverlay(createMarker(new GLatLng(Lat,Longi))) } }
    </script>
    <afh:body onload="load()" onunload="GUnload()">
    <af:messages/>
    <af:form id="frm">
    </input>
    <af:selectOneChoice id="navList1" autoSubmit="true"
    value="#{bindings.LolaRegionV1.inputValue}"
    label="#{bindings.LolaRegionV1.label}">
    <f:selectItems value="#{bindings.LolaRegionV1.items}"/>
    </af:selectOneChoice>
    <af:inputText value="#{bindings.LolaKoordV1Lat1.inputValue}"
    label="#{bindings.LolaKoordV1Lat1.label}"
    required="#{bindings.LolaKoordV1Lat1.mandatory}"
    columns="#{bindings.LolaKoordV1Lat1.displayWidth}"
    partialTriggers="navList4" id="input1">
    <af:validator binding="#{bindings.LolaKoordV1Lat1.validator}"/>
    <f:convertNumber groupingUsed="false"
    pattern="#{bindings.LolaKoordV1Lat1.format}"/>
    </af:inputText>
    <af:inputText value="#{bindings.LolaKoordV1Longi.inputValue}"
    label="#{bindings.LolaKoordV1Longi.label}"
    required="#{bindings.LolaKoordV1Longi.mandatory}"
    columns="#{bindings.LolaKoordV1Longi.displayWidth}"
    partialTriggers="navList4" id="input2">
    <af:validator binding="#{bindings.LolaKoordV1Longi.validator}"/>
    <f:convertNumber groupingUsed="false"
    pattern="#{bindings.LolaKoordV1Longi.format}"/>
    </af:inputText>
    </af:form>
    I cant'*t give out the value of Lat , Longi to show the Marker.But a simple example like
    var x;
    var y;
    x = "51";
    y = "6";
    map.addOverlay(createMarker(new GLatLng(x,y)))
    is running.
    Thank you for help!
    Christian
    Message was edited by:
    user585675
    Message was edited by:
    user585675

  • I have connect a seagate HDD formated on NTFS to my macbook pro with Mac OS 10.7 but my HDD is read only any idea how can i change it to read & write ?

    i have connect a seagate HDD formated on NTFS to my macbook pro with Mac OS 10.7 but my HDD is read only
    any idea how can i change it to read & write ?

    i tried the trial version of tuxera and it gives me the possibility to read & write , Thanx fschweig.
    @ Samberl : what is the benifts of keeping my drives on mac format and this SW mediafour i install on my PC to let it write the mac formated HDD ?
    is it free ?
    all the best
    Adiab

  • I have an external hardrive for MAC, I needed to save something from my work computer so I can pass it on to my MAC, it requiered me to re-format my external HD and now when I connected to my MAC I only have "read only rights". How do I fix it?

    I have an external hardrive for MAC, I needed to save something from my work computer so I can pass it on to my MAC, it requiered me to re-format my external HD and now when I connected to my MAC I only have "read only rights". How do I fix it? I run my Itnues from this external and now my library is gone. Luckily I have it saved somewhere else, which is not a problem, but I won't be able to write to this HD for right now. I can't see an option to give those permission back.

    cptjuanjvarona wrote:
    I have an external hardrive for MAC, I needed to save something from my work computer so I can pass it on to my MAC, it requiered me to re-format my external HD and now when I connected to my MAC I only have "read only rights". How do I fix it?...
    Unless what you have to transfer is enormous, skip the external HD altogether and use a USB flash drive; you can get them with capacities to 128GB. Format the flash drive as FAT32 or ExFAT as LowLuster suggests so it can be read and written to on both PC's and your Mac.

Maybe you are looking for