Show Hide transient attribute making row dirty

Hi All
I am using an advanced table where one of the columns(Description) is shown in detail region. To implement detail region, we need a transient attribute on the VO. I was able to get everything working. But I have the following problem.
When the user clicks Add Rows, new rows are created for user to enter information. If the user does not make any changes and clicks Apply, no transactions are committed(which is working as expected). But when the user clicks on "Show" for one of these rows and does not enter information on any of the fields for that row, the system is throwing error on some of the mandatory fields. This is because the framework is identifying them to be dirty(Since clicking show changes the value of transient attribute on VO).
I tried the following option to get around it, but it did not work.
* When Show/Hide is clicked, capture that event and get the row that was clicked. Perform row.setNewRowState(row.STATUS_INITIALIZED) on that row to let system know that the row is not dirty. The problem here is that when control comes to this part of the code(be it in Controller or AM), the row status is STATUS_INITIALIZED. It becomes dirty after the Show action is processed in ProcessFormRequest(I think so..)
To get around the issue, I had to remove the Mandatory flag on some of the fields, and implement the same manually. Also, just before committing all changes, I had to loop through all rows and see those that do not have any information entered but are still dirty. Perform row.setNewRowState(row.STATUS_INITIALIZED) on them before committing.
Can any of you tell me a better way other than how I implemented it? I want to keep the mandatory flag on the field set(VO is based on a EO) and nto remove it. The error for no value entered should not be triggered by Show/Hide being clicked. I hope I was clear enough.
Thanks
Kumar
Edited by: kvsankar on Feb 5, 2013 11:20 AM

I did that. But I wanted the Server side validations to fire if the row was touched by the user before Submit as this is a middle page in set of pages implemented via train. I think I found the solution.
I overrode the set method for DetailAttribute item on the VO and added the logic to set the row to STATUS_INITIALIZED if no other attribute was entered and it worked like a charm.
Thanks
Kumar

Similar Messages

  • Getting Stale Data error in show/hide of Advance table

    Hi,
    Am using hide/show in advance table.If open the hide/show in 1st row then it shows correct data ,if i click the next row's show hide then its shows the same result as ist row, and i try to use show/hide link more thann three times then it throws stale data error given below.
    The requested page contains stale data. This error could have been caused through the use of the browser's navigation buttons (the browser Back button, for example).
    Cause:
    The record with primary key values {1400} could not be found in view object MisForecastHeadOfiiceAM.InnerTableVO_OuterInnerVL_InnerTableVO.
    To proceed, please select the Home link at the top of the application page to return to the main menu. Then, access this page again using the application's navigation controls (menu, links, and so on) instead of using the browser's navigation controls like Back and Forward.
    This problem doen't exsist when i deplo it to the server.
    But recently i marked if open a show/hide link of a row and add then add another row to the table and save.Then the same problem reflects in the instance also.
    What may be the possible cause.
    Thanks

    if i click the next row's show hide then its shows the same result as ist row, and i try to use show/hide link more thann three times then it throws stale data error given below.
    >>> Seems like your VO linking is not proper. Does your VO have primary keys defined? Do you have any custom code on these VO?
    --Shiv                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

  • How to make a layer from the ADF pivot table invisible , show-hide column-row-data

    Hello all ,
    I need to create a pivottable with ADF 12c for reporting purposes.
    I have a table or view with 10 items of type VARCHAR2 , C1,C2,C3,C4,C5,C6,C7,C8,C9,C10  and   10 items of type NUMBER N1,N2,N3,N4,N5,N6,N7,N8,N9,N10
    The items of type VARCHAR2 are for Column and Row areas and the items NUMBER are for Data Areas
    I want to create a jsf page with one empty pivottable and in code Show or Hide the items in the Column area , Row area , Data area
    Con you send me a small sample ?
    I test with this code that i find in oracle OTN but not work.
    <dvt:pivotTable id="pt2" value="#{bindings.WebPivotDataView1.pivotTableModel}" var="cellData"
    varStatus="cellStatus" splitMode="enabled"
    binding="#{backingBeanScope.CmfPivotBean.pivotTable}"
    >
    <dvt:headerCell>
    <af:switcher facetName="#{cellData.layerName}" defaultFacet="Default" id="s1">
    <f:facet name="DataLayer">
    <af:outputText value="#{cellData.label}" id="ot1"/>
    </f:facet>
    <f:facet name="C01">
    <af:outputText value="#{cellData.dataValue}" id="ot2"/>
    </f:facet>
    <f:facet name="Default">
    <af:outputText value="#{cellData.dataValue}" id="ot3"/>
    </f:facet>
    </af:switcher>
    </dvt:headerCell>
    <dvt:dataCell>
    <af:switcher facetName="#{cellStatus.members.DataLayer.value}" defaultFacet="Default" id="s2">
    <f:facet name="N01">
    <af:outputText value="#{cellData.dataValue}" id="ot4">
    <af:convertNumber groupingUsed="false"
    pattern="#{bindings.WebPivotDataView1.hints.N01.format}"/>
    </af:outputText>
    </f:facet>
    <f:facet name="Default">
    <af:outputText value="#{cellData.dataValue}" id="ot5"/>
    </f:facet>
    </af:switcher>
    </dvt:dataCell>
    </dvt:pivotTable>
    DCBindingContainer bindingContainer = (DCBindingContainer)ADFContext.getCurrent().getRequestScope().get("bindings");
    CubicBinding cubicBinding = (CubicBinding)bindingContainer.findCtrlBinding("WebPivotDataView1");
    CubicEditor cubicEditor = cubicBinding.getCubicEditor();
    cubicEditor.removeLayer(DataDirector.ROW_EDGE, 0); //remove 1st row edge
    cubicEditor.removeLayer(DataDirector.COLUMN_EDGE, 0); // remove 1st column edge
    cubicEditor.removeDataItem(0);
    CubicDefinition def;
    def = cubicBinding.getProjection();
    LayerDefinition layerDefinition = new LayerDefinition("C3");
    cubicEditor.addLayer(DataDirector.ROW_EDGE, 0, layerDefinition);    
    LayerDefinition layerDefinition2 = new LayerDefinition("C4");
    cubicEditor.addLayer(DataDirector.COLUMN_EDGE, 0, layerDefinition2);
    DataItemDefinition def3 = new DataItemDefinition("N1");
    cubicEditor.addDataItem(def3);
    AdfFacesContext.getCurrentInstance().addPartialTarget(pivotTable);
    Can you help me if is possible to create a pivottable binding to a one ViewObject and in code show/hide or compose the layout of the pivottable ??
    I search in google and OTN oracle and not find any code.
    Only find the code of the samples that is very complex for me , the code of the samples create the PivotTableModel from one Array , and i want to binding from one ADB BC ViewObject.
    Thanks in advance

    The solution I presented for your use case an DOAG 2013 was to create a pivot table binding out of user defined attributes from the table. For the defined attributes a VO is dynamically created as well as the pivot binding. The pivot binding is then exchanged at runtime together with the activation of the dynamic VO needed to only get the data needed for the particularly pivot table.
    Your solution using the CubicEditor is hard to implement due to the missing documentation. This was the reason I did not follow this approach, However it's not impossible (done it on a very small scale).
    None of the solution are what I call simple. They are complicated, complex and in part not supported solution (exchanging the pivot table binding at runtime need to use internal classes, which is not supported).
    I can't give you a working sample as it's too complex. I can make the slides available, however they are in German.
    Timo

  • How to control "hide/show" in a table on row level

    I was trying to implement controlling/rendering of "hide/show" in a table on row level, but no luck. Is is possible to render the "hide/show" in a table based on the row attribute? If the row attribute is "true", then render the "hide/show" at that row; If the row attribute is "false", then not render the "hide/show" for that row. Is this feasible? Thanks.

    I think this should be possible, what u need to do is as follows:
    1) Add a decode statement to your VO query to get 0/1 based on your condition like
    decode('',true,0,1) render_flag
    2) In VO attrinute mappings caste this attribute as boolean instead of number.
    3) Attach this attribute to render flag of hide/show via SPEL.
    --Mukul                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

  • How to hide and show button based on if row is selected in tabular form

    Hi,
    Im pretty new to apex. I am using version 4.1. I have a tabular form and what i want to do is only have the delete button show if i select a row from the [row selector] column. Can this be done using a dynamic action? I have tried it that way unsuccessfully. Please help or let me know if you need any more information.
    Thanks

    Do you mean if the check box is selected in the row?
    Assign a static ID to the delete button, e.g. MY_DEL_BTN. Look for "Static ID" under the Attributes section of the button.
    If so, make an advanced Dynamic Action based on Click and a jQuery selector. Usually, this element is name "f01" but, you need to make sure. Assuming it is "f01" then your jquery selector would be:
    input[name="f01"]set the event scope to live.
    Your dynamic action will fire JavaScript. (BE SURE TO UNSELECT FIRE ON PAGE LOAD). To make sure you have the right jQuery selector, at first just put a pop up message in the JavaScript.
    alert('You Clicked the Row Selector!');Run the page. Click the row selector. If you get the pop up you have specified the jQuery selector correctly. Yay!
    Then, assuming the above is correct. You can now determine if any have been selected.
    Now, set it back to SELECT TO FIRE ON PAGE LOAD (You want the delete to be hidden when you first open the page).
    Change your JavaScript to this:
    var checkedCnt = $("input:checked").length;
    if( checkedCnt > 0 )
       $('#MY_DEL_BTN').show();
    else
       $('#MY_DEL_BTN').hide();
    };-Joe

  • Dirty check for transient attributes in view object

    Hi,
    I am using JDeveloper 11.1.1.4 and ADF BC in my project.
    In one of my view objects,I have a transient attribute added for some business logic.
    I am doing dirty check in my project as below.
    boolean dirty = false;
    boolean amDirty = false;
    // check application module
    ApplicationModule am =
    getBindingContainer().getDataControl().getApplicationModule();
    amDirty = am.getTransaction().isDirty();
    //Check if datacontrol is dirty
    BindingContext bctx =
    oracle.adf.controller.binding.BindingUtils.getBindingContext();
    dirty =
    bctx.findDataControlFrame(bctx.getCurrentDataControlFrame()).isTransactionDirty();
    return amDirty || dirty;
    My requirement is that,I dont want the dirty check to be applied on the transient attribute in the view object.
    Is there any way to achieve this.Please advice...
    Regards,
    Praveen

    Hi Frank,
    Thanks for the suggestion.
    I followed the link.But if a transient attribute is modified,then also ((ApplicationModule)getDataProvider()).getTransaction().isDirty() is returning true and the transaction is made dirty.
    I am setting a transient attribute like this getNwOperVOIter().getCurrentRow().setAttribute("AcctNoTrans")....when I am editing a row.
    Can I get explicit handle at viewobjectimpl for this transient attribute??
    Regards,
    Praveen

  • Show/hide detail row

    Carl:
    See http://htmldb.oracle.com/pls/otn/f?p=24317:6
    I modified your nifty example at http://htmldb.oracle.com/pls/otn/f?p=11933:1
    to use images instead of the show/hide detail labels.
    I had to make some minor mods to the code, but it works fine...for the most part.
    I used the option to show only 1 detail row at a time.
    If I click the show/hide images rapidly (actually I am not sure it is the rapidly part, haven't been able to reproduce it consistently), I end up with a situation where more than 1 detail row is visible at the same time.
    Can you please take a look and see if I am doing anything wrong?
    Thanks

    Mostly in IE, here is an example
    http://i3.tinypic.com/vo3bbn.jpg
    I am not sure of the exact sequence of clicks I did to land up at the screenshot, but I think rapidly clicking that show/hide image does it.
    Taking a look at the code
    function showdetail(t,i)The "t" that I am passing in to the function would be the IMG element in my case.
    I modified the Toggle function as
    function ToggleLabel(pThis)
            var l_show_img="/i/themes/theme_10/showhide_show.gif";
            var l_hide_img="/i/themes/theme_10/showhide_hidden.gif";
            var l_show_re=new RegExp(l_show_img+"$");
            pThis.src = (pThis.src.match(l_show_re)) ? l_hide_img : l_show_img;
    }where I flip the src attribute of the image.
    I am not sure what is wrong. If something were wrong, why would it work at all? Why would clicking stuff fast cause it to break?
    Thanks for any help.
    And I am not using AJAX at all, just your plain DHTML example at 11933:1
    Ah, I got it. Doing the following reproduces the bad state in both IE and FF consistently
    1. Launch the page in a new session
    2. Click the show/hide image on the first row to show the text
    3. Click it again to hide it
    4. Now click the image on the 2nd row.
    This shows the 2nd row's description...but it also shows the first rows description!
    Any idea why?
    Thanks

  • Sort view object rows with transient attributes

    Hi ,
    Is it possible to sort the results of a view object based on the populated transient attributes ?
    Best regards
    K

    K,
    Have you had a look at section 27.5 of the ADF Developer's Guide for Forms/4GL Developers ("Performing In-Memory Sorting and Filtering of Row Sets") - I've not tried it with transient attributes, but it does describe how to do in-memory sorting, as opposed to the normal way of sorting which is to send an ORDER BY to the database.
    Hope this helps,
    John

  • How do I prevent dirty transaction as a result of DetailFlag in show hide

    I have an OATable with show/hide flag, however I noticed that it dirties the transaction when it is being clicked.
    The reason why I know this is when I sort a table field AFTER I expand a show/hide, it sends a warning
    Warning - The table cannot be sorted because it has pending changes which would be lost.
    How do I prevent this from happening?
    Thanks!

    One way to get over this is to use populateAttribute() in setters instead of setAttribute(attribute, value).
    Also there are couple of threads in this regard. Going through them would give you more clues.
    Thanks
    Sumit

  • Making links that show/hide layers?

    Hi all,
    I created an InDesign cs4 file which is pretty much a guide for users of my liveCicle form. I have a bunch of layers in the file.
    I'm trying to make links associated with images that are in its own layers. So when i export the file to pdf and hit certain link, layer associated with that link shows up. I tryed to do this in acrobat 9 pro. I created links, but the problem is that links in non visible layers work behind the scene when i hover over.
    Is there a way to set layer visability in inDesign CS4?
    Thanks in advance

    No you can´t toggle layer visibility with buttons made in indesign. You have to finish it in Acrobat....
    Only way to make something appear or disappear in ID is to use show/hide buttons action...
    You can convert those images you want to show&hide to buttons. Then you can create another buttons to show or hide them.
    If you export as PDF, default state of a button can be hidden...

  • Making a VO with programmatic attributes and rows

    Dear Guru's!!!
    May I have your opinion on the following requirement...
    One database table with the following attributes:
    ID_COLUMN, NM_COLUMN, TYPE
    If I execute this statement:
    SELECT ID_COLUMN
    , NM_COLUMN
    FROM MASTER_TABLE
    WHERE TYPE = 'EMPLOYEES';
    I get the result:
    EMPLOYEE_ID
    EMPLOYEE_NAME
    SALARY
    The requirement is that I have to build now a RichTable use the attributes returned by this query (EMPLOYEE_ID, EMPLOYEE_NAME and SALARY).
    I suppose that I have to create a ViewObject wich attributes and rows are populated at runtime (unknow columns at design time).
    Anyone have any idea about how to do that??? Maybe a best practice or something like that...
    I was reading this Oracle Tutorial http://docs.oracle.com/cd/E21043_01/web.1111/b31974/bcadvvo.htm#sm0341
    but there is only two lines (39.1.8 Creating Dynamic Attributes to Store UI State) of how to create dynamic attributes.
    Using JDeveloper 11.1.2 and Windows 7 x64.
    Thanks in advance!
    Renan.

    You may go through this blog
    http://jobinesh.blogspot.com/2010/06/model-driven-approach-for-building.html
    which explains your use case.
    Thanks,
    TK

  • Show/ hide child row in the same report

    Hi,
    The whole day i'm looking for the trick/ example to get the following done.
    i want to have one report on a region, what is showing as default only parents, like:
    company name | total_employees
    A | 200
    B | 250
    When clicking on a a record or + sign (or something like this) the child records of each parents must also show on the report.
    So something like the following:
    company name | department | total_employees
    A | dep: T | 150
    A | dep: P | 50
    B | dep: K | 250
    The functionality must be something like this. The most importent thing is that the data will be in the same report. So i don't want to go to a other page.
    Hope someone can help....... tnx in advanced.

    Hi,
    Have a look at: [http://apex.oracle.com/pls/otn/f?p=11933:13]
    And/or look at: Show Hide Details AJAX
    Andy

  • Show/Hide a column in a Table region

    I have search page which queries the data and displays the records in a table region. We need to have an option to show or hide a non-database column at the end of the each row in the table. If the checkbox is selected, the last column should appear and if checkbox is deselected it should get disappeared.
    I have used a transient attribute in the VO and using that transient attribute trying to show the text field when the checkbox is selected. For ex, if the search returns 6 rows - if you select the checkbox of the first row , the last column "CTS" gets displayed without any issues but if you select the other rows (without checking the first row), the CTS column is not displayed.
    The column is getting displayed only IF you select the checkbox of the first row and try it other rows. If you try to select the checkbox of other rows without selecting the 1st row, it doesnt show the CTS column.
    AM has the PPR event
    =============
    public void CheckOnClick(String v_chkBox,String SalesContact,Boolean executeQuery)
    System.out.println("Enters Checkbox event()");
    USSContactMainVOImpl pVO= getUSSContactMainVO1();
    Row poRow[]=pVO.getFilteredRows("Chkbox","Y"); // get all the selected rows
    for(int i=0;i<poRow.length;i++ )
    Row rowi=poRow;
    System.out.println("Value:" + rowi.getAttribute("Chkbox") );
    rowi.setAttribute("CTSEngineer_TR",Boolean.TRUE); // transient attr
    //end of CheckOnClick()

    I just referred to the Dev Guide and understand that we can use the identifier of the PPR event source row (Page 262) but still the issue persists.
    String rowReference = pageContext.getParameter(OAWebBeanConstants.EVENT_SOURCE_ROW_REFERENCE);
    I have a rawtext as the first column( its just a dummy column since the PPR event is not getting fired if the checkbox is the 1st control/column) and the 2nd column is the check box which has a PPR event. The PPR event fires whenever the check box is selected or deselected but surprising the text field gets editable only if the 1st row is clicked.
    Changed code is as always - not sure why the table shows/hides the text column only if the 1st column is selected. Will appreciate any help.
    PFR:
    ===
    if ("OnSelect".equals(pageContext.getParameter(OAWebBeanConstants.EVENT_PARAM)))
    OAApplicationModule am = pageContext.getApplicationModule(webBean);
    System.out.println("The AM name is "+am);
    Boolean executeQuery = BooleanUtils.getBoolean(false);
    String str1 = pageContext.getParameter("Check_Box");
    String v_SalesContact = pageContext.getParameter("SalesContact_qry");
    //1401
    String rowReference = pageContext.getParameter(OAWebBeanConstants.EVENT_SOURCE_ROW_REFERENCE);
    Serializable[] parameters = {str1,v_SalesContact,rowReference,executeQuery };//1401
    Class[] paramTypes = { String.class,String.class,String.class,Boolean.class };//1401
    am.invokeMethod("CheckOnClick",parameters,paramTypes);
    AM(PPR Event)
    ==========
    public void CheckOnClick(String v_chkBox,String SalesContact,String rowReference,Boolean executeQuery)
    OARow rowx = (OARow)findRowByRef(rowReference);
    if (rowx !=null){
    System.out.println("row ref");
    System.out.println("reo fref"+ rowx.getAttribute("CTSEngineer_TR") );
    rowx.setAttribute("CTSEngineer_TR",Boolean.TRUE);
    Edited by: MyOAF on Jan 14, 2010 6:25 AM
    Edited by: MyOAF on Jan 14, 2010 6:26 AM

  • Is it okay to use VO made up of transient attributes only ??

    Dear Experts,
    I created a VO based on nothing... and later added transient attributes in it.
    It comes very handy to be used as temporary/staging tables instead of using PLSQL tables or DB tables.
    It is very easy and convenient, most importantly, I am happy that it is working fine and I based my whole application on these kind of VOs.
    I am using them for
    1) Store user selected rows in popup and display those on the main page.
    2) To store the data from main page and use those tables on summary popup.
    3) used attributes stored in them for different conditions or decision making in the page.
    I am just worried about
    1) Do I need to passivate all transient attributes?
    2) Do I need to change anything in AM pooling?
    3) What is the memory scope of this? (As of now I have only one jspx page and no taskflows)
    4) What happens when user refresh the page?
    5) What happens when the page times outs?
    6) Since everything is stored in memory when is the system allocates/deallocates memory for such kind of VOs?
    I have almost developed the application and now I am praying that it should not show any unexpected behaviours in the future ...as I have tried unconventional methods and I am not sure about these memory games. Has anyone tried this before? any experiences?
    Thanks
    Rahul

    Hi Nitish,
    Do you mean that I can use programmatic VOs  as my temporarry storage  and it will not have any memory issues?
    That is really great then.. !!!
    Thanks
    Rahul

  • Treetable with transient attributes

    Hi,
    I use JDeveloper 11.1.1.2.0 to develope an ADF application.
    I need to create and show two level treetable using viewobjects theese have only transient fields.
    I have two viewobjects and a viewlink described below:
    1. VO : AccountsVO
    2. VO : ProductsVO
    Viewlink : ProductsOfAccountVL
    An account can has a lot of products. Both of viewobjects have only transient attributes.
    I have to use transient attributes because of the architecture of the application.
    I create and insert the rows to the viewobjects in managed bean.
    I need to create a treetable like below :
    AccountName1 AccountDesc1
    ---ProductNo1 ProductName1 ProductDesc1
    ---ProductNo2 ProductName2 ProductDesc2
    AccountName2 AccountDesc2
    ---ProductNo3 ProductName3 ProductDesc3
    When I drag and drop the parent VO as an ADF Tree Table then run the application, I could see only first level records.
    I mean only Accounts are shown.
    The viewlink doesn't work. Is this a bug or is it normally work like this.
    Finally I intend to create and add child node programmatically, but I don't know is it possible or not and how could it be done.
    What do you advice or what is the correct way.
    Mehmet
    Thanks.
    Edited by: mdoldur on 03.Haz.2010 12:33

    Hi Frank,
    I don't have any entity object, so I get the informations from a few different modules and
    insert them to the programmatic viewobjects which have transient attributes.
    In fact I could create 2 temporary tables on the database but I am not allowed to change the database schema.
    By the way I have updated my JDeveloper from 11.1.1.2 to 11.1.1.3 I will try the same operation and inform you.
    Thanks.
    Mehmet.

Maybe you are looking for

  • How do I get my old text messages from my iPhone to my new Galaxy?

    Recently, I just upgraded from an iPhone 4 to a Samsung Galaxy 4.  I upgraded my account from Sprint and got my new phone at Best Buy.  I'm trying to get into my iTunes because I know I recently synched my iPhone on my iTunes a little over a week ago

  • Some qt only programs are crashing opening the "Open File" dialog

    Hello Archers, I'm having some trouble to find out what's crausing the crashes, so i can properly fill a bug report upstream. Here is the issue: * After an upgrade from glibc 2.13-5 to glibc 2.14-4, some qt-only apps are crashing when i open the "Ope

  • How come my Ipod Touch will only charge when plugged into a computer and not a docking station or wall socket?

    My IPhone works with both the charging USB cable as well as the wall socket and docking station.  Additionally, my IPod used to charge using both the wall socket plug in and the docking station.  My IPod will stay play music when plugged into the doc

  • Possible to downgrade to Pages 5.2?

    I upgraded to Yosemite, and then Pages 5.5.  Now I discover that if I save a document, no one in my company who is still on Mavericks can open it.  Since most of our company cannot upgrade to Yosemite yet (due to major bricking issues that happen wit

  • SRM 7.0 Org structure report

    Dear All, We have recently implemented SRM 7.0. We wanted to extract below information from Org Structure. I have tried to extract information by expanding Org structure and Printing it but information is incomplete and not matching with below inform