Lifecycle issue with table binding + read-only attributes: ADF BUG

Hello all,
I have found what I believe to be an easily reproducible bug in ADF that reproduces in 10.1.3.x, but not in 11g (at least not in drop 6). The best way to describe the bug would be to walk through a simple set of steps to reproduce the bug:
1). Create a new application (ADF BC + ADF Faces).
2). In the model project, create a new Entity Object from the Employee table in the default HR schema. Allow JDev to create an updatable view object and an AM as well.
3). Put a validation rule on the first name attribute of the EO (can be anything, really - I made mine so that the first name cannot be "foo").
4). Test everything using the BC tester if you like.
5). In the UI project, create a new JSPX page.
6). Drag the updatable VO on to your page as an updatable af:table.
7). Put an af:commandButton on the page. Bind its Action or ActionListener to a method in a new backing bean. Put some simple code (I used System.out.println) in the backing bean method.
8). Run the jspx page.
9). Put some invalid data in (e.g. "foo" in the first name field) and click the af:commandButton. Verify that you get an error message and that the Action/ActionListener method DOES NOT fire. So far, so good.
10). Now, to demonstrate the problem. First, look at the page definition for the jspx file. Identify the first attribute that is mentioned (in my case, it was the employee id).
11). Go to the updatable view object and make the attribute from #10 read-only or updatable when new only.
12. Now, repeat step 9 - you should see the error message AND also see that the Action/ActionListener method was executed. You will also see in the messages window that ADF attempted to set the value of the read-only attribute, and thus got a ReadOnlyAttrException.
This issue only happens if the first attribute mentioned in the table binding is read-only. A workaround would simply be to re-order the attributes in the table binding of the pagedef so that the first attribute isn't read-only.
Don't ask how I figured this out ;)
Best,
John

Hi Frank,
Yes, I simply scripted it out this way to contrast the behaviour if the first attribute was read-only vs not read-only. I found the issue on a page in our app that was simply drag-and-drop the VO from the data control on the page.
It's quite annoying, because our particular use case that hit this error is a "save" button on the page. If the commit operation doesn't return any errors (and it doesn't in this use case!), we add a JSF message saying "save successful" - then the attribute errors are further added later in the page lifecycle, so we get 3 messages: "Save successful" and "Fix this error" and "Tried to set read-only attribute" - quite confusing to the end-user when the only message they should see is "fix this error."
At any rate, the fix is to simply re-order the attributes in the page definition - that doesn't affect the UI at all, other than to fix this issue.
John

Similar Messages

  • Updating read only attributes of class/method

    Hi,
    I have this standard class CL_QNAO_OBJECT, with MS_DATA as read only attribute.I have written my own class in an enhancement within this class and now trying to edit this MS_DATA within my own class. but I get an error sayng "write access to the READ only attribute is not allowed", is there any way I can change it?
    The attribute MT_STACK is changing attribute/parameter to my class, which in turn has this ms_data structure.
    Note - I did search sdn before I put it here, I got couple of threads which I dont find suitable for me.
    Thanks in advance,

    Since MT_STACK is also type ref to CL_QNAO_OBJECT, my earlier guidance still hold true.
    Step 1 - When you enhance the class, you would see empty table lines in the class editor. Create a new method in that.
    Public Instance Method name Z_SET_MS_DATA
    Importing parameter IS_DATA TYPE QNAOD_AOBJECT
    Method implementation:
      ME->MS_DATA = IS_DATA
    Step 2 - In you enhancement in the class, call the method to set the data
      Data: ls_Data type QNAOD_AOBJECT
      Ls_data-field1 = ‘xyz’.
      core_object->mt_stack->z_set_ms_data( ls_Data ).
    Regards,
    Naimesh Patel

  • How to remove "Read Only" attribute on folders

    Hi
    I am logged in with my User account which has full control over my folders.<o:p></o:p>
    I have a folder that I tried to add modifications to, however i could not do so because the folder was classified as read only. I have full permissions to this folder. Previously the app that
    uses this folder could write to it quite happily, but today it fails. <o:p></o:p>
    The 'attributes' for the folder shows a solid square in the read-only box. If I 'un-box' the read-only and apply > ok, when I look at the attributes again the box is still checked.<o:p></o:p>
    So my question is, if it's not (which it shouldn't be) some sort of protected Windows folder, and I have full permissions on the folder (supposedly), why does Windows not respect my wishes,
    get out of the way, and let me set it to what I want it to be?<o:p></o:p>
    I have tried the following methods to fix this issue, but none of them work:<o:p></o:p>
    -Adjusting permissions and control, and changing security options<o:p></o:p>
    -Using a third party application such as "clear read only" to remove the check on the box<o:p></o:p>
    -Using the "attrib" function on the CMD prompt<o:p></o:p>
    -Boot Scan for virus/malware that is affecting folder attributes<o:p></o:p>
    -Running applications and CMD as administrator<o:p></o:p>
    I have heard that if using a NTFS harddrive, then all folders will be automatically “Read Only” and that it is impossible to change that attribute. I find this hard to believe, as all folders
    should have some way of being modified, regardless of what HDD I’m using. I obviously cannot change to FAT32, so how else can I get my folders to get rid of this ridiculous error!
    <o:p>I have also noticed that this problem is very common amongst Windows users. If this problem has been around for a while, how is it possible that no solution has presented itself.
    Regardless, we need a solution to it, because i can't do the things i need to while the Read Only attribute remains a constant on my folders. I thought it may be a virus, but my avast anti-virus did not pick up any infected areas when the scan was done. I
    have searched the internet, and no "fix" has solved this issue. The only fix i have not found is a reg edit that could completely remove this read only attribute from all folders. Though i feel this is not neccesary, as i only need the attribute
    to be removed from certain folders. Please kindly assist me with this issue, hopefully it will help many others too...</o:p>
    Many thanks.

    Have you taken ownership of the folder? Please first take ownership of the folder, then change the security options
    Take Ownership of a File or Folder
    http://technet.microsoft.com/en-us/library/cc753659.aspx
    If you have already did this, then run a scan with this tool,
    Malicious Software Removal Tool
    http://www.microsoft.com/en-in/download/malicious-software-removal-tool-details.aspx
    or copy this folder to another location, test again.
    Regards
    Yolanda
    TechNet Community Support

  • How to set a line of table as read only during runtime?

    How to set a line (or a cell) of table as read only during runtime?

    hi wei
          when you create a table keep the readonly property of table as false
    you create the columns of table as inputfield.you bind the readonly property of
    the inputfield to two context variables
    say one for all the columnfields you to want always have as readonly and let this contextattribute of type boolean and let this be attr1
    and another for all the columnfields you donot want to be readonly and let this contextattribute of type boolean and let this be attr2
    initially set the context attributes attr1 and attr2 as true so the entire table is readonly.
    based on the condition you want to check change the attr2 to be false.
    if(your condition)
    wdcontext.currentcontextelement.setattr2(false);
    hope this helps.
    regards
    saravana

  • A serious issue with excel file read in ODI

    hi gurus,
    Issue with excel file read is that we can read only one file by setting the path from ODBC Data Source Administrator-->System DNS -->Select Work book
    what i want to read the dynamic path(Every time I cant go back and set the Work book to select the excel file..
    So i came up with a solution to write a Vbscript that convert the excel to csv my problem got solved for dynamic paths the script is as follow:
    Set objArgs = WScript.Arguments
    For I = 0 to objArgs.Count - 1
    FullName = objArgs(I)
    FileName = Left(objArgs(I), InstrRev(objArgs(I), ".") )
    Set objExcel = CreateObject("Excel.application")
    set objExcelBook = objExcel.Workbooks.Open(FullName)
    objExcel.application.visible=false
    objExcel.application.displayalerts=false
    objExcelBook.SaveAs FileName & "csv",23
    objExcel.Application.Quit
    objExcel.Quit
    Set objExcel = Nothing
    set objExcelBook = Nothing
    Next
    Now this script convert the xls file to csv with comma seprated values
    e.g in excel sheet if data is ABC XYZ PQR
    csv will come with ABC,XYZ,PQR
    here the delimiter is , i want the delimiter as pipe | who's ascii code is 124
    but if i change 23 with 124 its not working i getting the error cannot save as...
    can anyone tell me that what should be the correct code for pipe
    so that the output is ABC|XYZ|PQR
    AS WE CAN USE THE SCRIPTS IN TOOLS
    Edited by: 789141 on Sep 14, 2010 11:33 PM

    I dont have the answer for your question but i have different approach in handling multiple Excel File.
    Step 1. Copy a sample source Excel File and Call it Final.xls .
    Step 2. Map this Final.xls to DSN and in Topology call this Final.xls
    Step 3. Do the Reversing and Map and test the Interface . Once its done.
    Step 4. Create a Package and using a http://odiexperts.com/?p=1426 get the list of all the Excel File
    Step 5 . Using this http://odiexperts.com/?p=273 create a Loop to Read the Excel File name
    Step 6 . Copy using OdiFileCopy to Final.xls and run your interface .
    Step 7. Increment the Loop and copy your next File for Final and run the interface
    Step 8 . Finally you will be able to read all the Excel File .
    Step 9 . Delete the source file [ Optional ]
    Hope this helps.

  • Updating Media Content - stuck at Reset Read Only Attributes.

    I'm currently using - MDT 2010 on Windows 7 on a Virutal Machine. I deploy my images using a USB stick. (Advanced Configuration / Media). The process of creating a selection profile, Creating Media, and updating my media works perfectly.
    I wanted to move to MDT 2012 SP1 on Server 2008 R2 platform. So I installed AIK, MDT 2012 SP1, etc on a Server 2008 R2 Virtual Machine. I setup the MDT same way as my current working model and it was looking good. Next I created my Selection Profile
    and Media. Then when I ran "Update Media" it seems to work until it gets stuck at the last process "Reset Read Only Attributes"
    Looking for any advice on why it might keep getting stuck here. The only way I can exit the process it to "Stop Execution"
    Reminder - on my Win 7 / MDT 2010 box, it works fine and this process completes.
    Thanks for any feedback.

    What is happening here is that MDT Litetouch console is calling OSCDIMG.exe, and that program has stopped.
    Sadly, MDT does not capture the OSCDIMG.exe output for analysis, so we are stuck here.
    I have personally encountered problems with OSCDIMG.exe running on my Windows 8 box, where images created with source files from the C: pass, however when the source files are placed on a "Storage Spaces" volume, the program hangs. No response from MSFT.
    If you need help diagnosing the problem, you can run OSCDIMG from a console window, just to see what the output is
    OSCDIMG.exe -u2 -udfver102 -m -o -h -w4 "<MediaSrc>" %temp%\Dest.iso
    Longer:
    OSCDIMG.exe -u2 -udfver102 -m -o -h -w4 -yo"<Path_to_Bootorder.txt>" -bootdata:2#p0,e,b"<Path_TO_ETFSBoot.com>" #pEF,e,b"<Path_TO_EFIsys.bin>" "<MediaSrc>" %temp%\Dest.iso
    -k
    Keith Garner - Principal Consultant [owner] -
    http://DeploymentLive.com

  • Public Read-Only Attributes

    I'm trying to pick up ABAP on my own by reading through various resources I've collected and writing my own programs.  Unfortunately I don't have an experienced ABAP guru to ask questions of.  I'm hoping someone can help me with the following:
    Based on my other programming experience I know that it is very common for object attributes to be defined as private and then accessor/mutator (getter/setter) methods to be defined to provide access to the attribute.
    In my study I noted that ABAP allows attributes to be made public but declared to be read-only.  This would seem to permit a structure where accessor/getter methods are not needed (the attribute can be read externally) and one would only have to define a mutator/setter method.
    My question:  what is typically done in 'real-world' programs?  Is there any reason why using read-only would be more or less preferred?
    Thanks for any help that can be provided.

    Hello Tony
    Below I have listed a few examples from standard ABAP classes. I cannot say whether you find more public read-only attributes than GETTER methods - you will find examples for both of them.
    I could imagine that before it was possible to use the functional method call in ABAP that public read-only attributes were an alternative to the "verbose" method cal (see below)l.
    " RE-FX: Contract
    CL_RECN_CONTRACT-IF_RECN_CONTRACT~MS_DETAIL   " public read-only attribute
    " MM: Material
    CL_IBASE_R3_MATERIAL->GET_MARA  " GETTER method
    "FI/CO: Company Code
    CL_REEXC_COMPANY_CODE=>GET_DETAIL  " GETTER method
    " HR: Employee
    CL_PT_EMPLOYEE->IF_PT_EMPLOYEE~PERNR   " public read-only attribute
    " Assumption: CL_IBASE_R3_MATERIAL would have
    " a public read-only attribute MS_DETAIL (of TYPE mara)
    " Normal method call (verbose):
    CALL METHOD go_material->GET_MARA
      RECEIVING
        R_MARA = ls_mara.
    " Functional method call:
      ls_mara = go_material->get_mara( ).
    " Accessing public attribute
      ls_mara = go_material->ms_detail.
    Regards
       Uwe

  • Tables in read only mode

    Hi friends.
    In my job we insert data in some tables, in the end of the month we do some operations with this data and for the next month we use other tables.
    How do I change my tables for read only mode, because is so dangerous that for error erase the old tables?

    Hi,
    You can revoke all privs like insert, update, delete... from all other users for these tables. Then only the owner can do some damage.
    If the database user is used by many different people and you rather don't trust them, copy the 'old' tables to another schema and don't spread the password.
    And most important: Have backups in place!

  • How to make a column in Table popin read only

    Hi Everyone
    Could anyone let me know how to make a column in table popin read only.
    Regards

    if you ar eusing an ALV table
    try this
      DATA: lr_salv_wd_table TYPE REF TO iwci_salv_wd_table,
            r_table TYPE REF TO CL_SALV_WD_CONFIG_TABLE.
    * get reference to ALV component interface
      lr_salv_wd_table = wd_this->wd_cpifc_alvmain( ).
    * get ConfigurationModel from ALV Component
      wd_this->r_table = lr_salv_wd_table->get_model( ).
    * init ColumnSettings
      DATA: lr_column_settings TYPE REF TO if_salv_wd_column_settings,
            lr_col_header TYPE REF TO cl_salv_wd_column_header.
      lr_column_settings ?= wd_this->r_table.
    * get table of column settings - each line one column
      DATA: lt_columns TYPE salv_wd_t_column_ref.
      lt_columns = lr_column_settings->get_columns( ).
    * loop over table - in each loop another column can be modified
      DATA: ls_column TYPE salv_wd_s_column_ref.
    * define visible columns (fields) by naming them,
    * exclude others by setting visibility to none
      DATA: ls_tooltip TYPE string.
      LOOP AT lt_columns INTO ls_column.
        " get header of column
        lr_col_header = ls_column-r_column->get_header( ).
        " do settings here
    ENDLOOP.
    Or see this document for more tips.
    <a href="https://www.sdn.sap.comhttp://www.sdn.sap.comhttp://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/40794172-b95a-2910-fb98-b86d8a0918b4">https://www.sdn.sap.comhttp://www.sdn.sap.comhttp://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/40794172-b95a-2910-fb98-b86d8a0918b4</a>
    regards,
    Joris

  • Read only attributes turned on by Windows 10

    Two days after installing Windows 10, all of my data files are suddenly read only. I cannot save any files. I went to setting, turned the read only attribute box off, and the system seemed to be turning them all of. At least it ran through the entire data directory file by file. When I went to open a file in my word processor, it came up as read only, and of course I could no longer save the file junder anyu name. A check of the attribute box in settings showed that read only had been turned on. This makes the entire system useless and puts me out of business. Fortunately I still have my old XP netbook so I can continue working, albeit at a much slower pace.

    By default, OU1 is mapped to directory attribute "ou". It's not modifiable via calendar. You could use the other OUs attribute (OU2-OU4) for this purpose.
    -rtan

  • How to use same view as editable and read only in ADF

    Hi,
    how to use same view as editable and read only in ADF ?? How can we achieve this in TF's ???
    -mrudul

    Hi,
    Steven Davelaar wrote a presentation about this "Building Highly Reusable Taskflows"
    Starting slide 14 is where your use case comes into play
    Frank

  • Creating row in a recursive view having read-only attribute

    Hi All,
    I am using Oracle JDeveloper 11g Release 2.
    I have a view AppMenusVO with the participation of following entities:
    1. AppMenusEO *(Updateable)* with columns like MenuId, MenuName, MenuIcon, MenuParentId, MenuTaskflowId
    2. AppTaskflowsEO *(Reference)* with columns as TaskflowId, TaskflowName, and TaskflowURL
    3. AppMenusEO as ParentMenus *(Reference)* with columns as ParentMenuId, ParentMenuName
    Next I created a One..Many view link where source and destination entity is the AppMenusVO based on relation (MenuId=MenuParentId). The name of the view accessor is MenuChildren.
    This view is used to create af:treeTable component on the adf page. In order to create new row I am following the blog entry at http://jobinesh.blogspot.com/2010/05/crud-operations-on-tree-table.html.
    I created a business method in the application module with the following specification:
        public void createMenuChildren(RowIterator ri, Key selectedNodeKey) {
            if (ri != null && selectedNodeKey != null) {
                Row[] found = ri.findByKey(selectedNodeKey, 1);
                if (found != null && found.length == 1) {
                    System.out.println("Node found for : " + selectedNodeKey + " Parent Id : " +
                                       found[0].getAttribute("MenuParentId"));
                    Row foundRow = found[0];
                    RowSet childRows = (RowSet)foundRow.getAttribute("MenuChildren");
                    while (childRows.hasNext()) {
                        Row r = childRows.next();
                        System.out.println(r.getAttribute("MenuName"));
                    Row childrow = childRows.createRow();
                    childrow.setAttribute("MenuParentId", foundRow.getAttribute("MenuParentId"));
                    childRows.insertRow(childrow);
                } else {
                    System.out.println("Node not Found for " + selectedNodeKey);
        }When I invoke this method from the adf page it is giving the exception An attemp is made to validate an already invalid region site.
    The Jdeveloper console is also throwing the exception oracle.jbo.ReadOnlyAttrException: JBO-27008: Attribute ParentMenuName in view object AppMenusVO_MenuChildren_ParentMenusVL_AppMenusVO cannot be set.
    I searched Google and OTN but unable to resolve the error.
    The solution I have tried are:
    The default activity on the BTF is marked and is pointing to a valid view.
    Set the activation property of region to immediate ... etc.
    BUT the issue persists.
    Any help to create row programmatically in recursive view where some of the attributes are read-only?
    Thanks in advance
    Best Regards
    Bilal

    Hi Frank,
    Thanks for the response.
    The updateable property of ParentMenuName attribute is Never and is being disabled so I am unable to change its value. Moreover, never in my code I am changing value of this field. What I am doing is trying to create a new row and then insert it into rowset. I don't know how to proceed further.
    One more thing is that I have an LOV on another column MenuParentId which returns value in this field as well. It might be the reason? ...
    Any help will be highly appreciated.
    Thanks
    Regards
    Bilal

  • Issue with table ROOSPRMSF entries for data source 0FI_AP_4

    Hi Experts,
    I am facing with an issue where we found incosistencies with table ROOSPRMSF in R/3 system.
    In BW , we have done initializations based on fiscal period selections (none of the selections overlap) for data source 0FI_AP_4.
    We have done in total 7 initializations. So in BW system in table RSSDLINITSEL we have 7 initialization requests.
    But in R/3 system we have 49 records for data source 0FI_AP_4 in ROOSPRMSF table out of which 42 are invalid records.
    I suspect that these 42 invalid records are created due to the execution of program RSSM_OLTP_INIT_DELTA_UPDATE when the tables ROOSPRMSF are actually holding the 7 initialization request entries.   Due to this each and every initialization request is linked to rest of the other intialization requests and ended with 49 records in table ROOSPRMSF table.
    Now our data loads are running fine but daily a short dump is raised . In the daily loads, BW init records in RSSDLINITSEL are compared with ROOSPRMSF entries and all the other 42 records which are invalid are written into system log and a short dump is raised.
    In order to fix these inconsistencies i checked for OSS note 852443. (Point 3 in OSS note)
    But it is specified to delete the delta queue for data source 0FI_AP_4 in RSA7 and instructed to execute the program RSSM_OLTP_INIT_DELTA_UPDATE so that the ROOSPRMSF table will be reconstructed with valid records available in RSSDLINITSEL. 
    From OSS note 852443 point 3
    "3. If the RSSDLINIT table in the BW system already contains entries, check the requests listed there in the RNR column in the monitor (transaction RSRQ). Compare these entries with the entries in the ROOSPRMSF and ROOSPRMSC tables with the INITRNR field. If, in the ROOSPRMSF and ROOSPRMSC tables for your DataSource source system combination, there are more entries with different INITRNR numbers, use transaction RSA7 in an OLTP source system to delete all entries and then use the RSSM_OLTP_INIT_DELTA_UPDATE report mentioned in the next section. For a DataMart source system, delete the entries that you cannot find in the RSSDLINIT table using the procedure described above."
    My question is if we delete the delta queue in RSA7 then all the tables in R/3 (ROOSPRMSF, ROOSPRMSC, Time stamp table) and BW (RSSDLINITSEL, initialization requests will be deleted) will be cleared. Then how will the program RSSM_OLTP_INIT_DELTA_UPDATE  copy entries into ROOSPRMSF table in R/3 ?
    Could any one please clarify this ?
    Thanks
    Regards,
    Jeswanth

    Hi Amarnath,
    Did you unhide the new field in RSA6 and regenerated the DataSource?
    Often SAP will populate newly added fields (belonging to the same (set) of table(s) used for extraction) automatically (e.g. SAP uses 'move-corresponding' in it's extractor-code, or, in this case, reading all fields from the DD, FM BWFIU_TRANSFORM_FIELDLIST).
    If the DataSource looks fine to you and the field is still not populated in RSA3 you can't go without a user-exit.
    Grtx,
    Marco

  • Issue with table in Dashboard

    Hi People,
    I am facing an issue with a table which is acting up in the Infoview.
    In my Dashboard I have a table, when i run the dashboard using the Xcelsius the table is ok,
    but when i export it and run through the infoview, the table gets bigger than should be.
    Does anyone know how to solve this issue ? Is it something that i have missed to configure
    in the Xcelsius or something like that ?
    Best Regards,
    Jordan
    Edited by: Jordan Silva on Sep 15, 2010 2:54 PM

    I have done Quiet a dashboard's but never faced this issue before...I problem i used to get is During image component ,if dont not resize that it will be bigger than the orginal
    I.g Click on image component and If First Check box is not checked image will be bigger.
    Never faced this with tables...

  • Permit user to administrate Model AND have read-only attributes

    This issue concerns SQL Server Master Data Services 2012
    I have a scenario where the same user is handling data and doing version management. Now I want to make one attribute in one specific entity read-only as I want to make sure the attribute is never changed.
    The problem is, as soon as I set the read-only privilege on the attribute, the user
    loses all administrative rights on the entire model. This, of course, includes version management.
    I've tried working around the issue by making sure the user has explicit update permissions on both the model and the entity (and all attributes except the one I need read-only). But the result is the same. 
    Does anyone know a workaround?

    Hi,
    I think if you explicitly grant the update permissions, it should work. According to the MSDN doc. Could you please check if the user belongs to other hierarchy?
    When a member belongs to multiple hierarchies
    Two or more hierarchies can contain the same member.
    •If one hierarchy node is assigned Update permission and another is assigned Read-only, then the members in the node are Read-only.
    •If one hierarchy node is assigned Update or Read-only permission and another node is assigned Deny, then the members in the node are not displayed.
    Hierarchy Member Permissions (Master Data Services)
    https://technet.microsoft.com/en-us/library/ee633750(v=sql.110).aspx
    Model Object Permissions (Master Data Services)
    https://technet.microsoft.com/en-us/library/ee633764(v=sql.110).aspx
    Regards,
    Doris Ji

Maybe you are looking for