Bugreport: View looses current row if user parameters are passivated!

Hi
I think I've discovered a bug in JDeveloper:
I realized that a ViewObject is loosing its current row under the following circumstances:
- a user parameter is passivated in method "prepareForPassivation" AND
- the ViewObject is passivated, removed, recreated and reactivated (pooling)
See the following example:
  protected void prepareForPassivation(Document out,
                                       Element parent)
    super.prepareForPassivation(out, parent);
    Element userdata = out.createElement("SamUserData");
    parent.appendChild(userdata);
    // create tag named "myData"
    Element elem = out.createElement("mSecurityLevel");
    userdata.appendChild(elem);
    elem.setAttribute("Value", "4);
  } This code makes the current row to be lost if passivation occures. For testing you should set the following parameters:jbo.ampool.resetnontransactionalstate = false
jbo.ampool.dynamicjdbccredentials = false
jbo.dofailover = false
jbo.maxpoolcookieage = -1
jbo.ampool.timetolive = 30000
jbo.ampool.initpoolsize=0
jbo.ampool.maxpoolsize=5000
jbo.recyclethreshold=0
jbo.ampool.monitorsleepinterval=500
jbo.ampool.maxavailablesize=0
jbo.ampool.minavailablesize=0
jbo.ampool.maxinactiveage=1000 This parameters will cause heavy pooling even if you access by two browser sessions only.
If anyone from oracle can have a look at this I'd be happy. Unfortunately I do not know how to workaround this problem, so any hints are appreciated.
Thanks
Frank Brandstetter

And here comes a workaround:
First: All user data will be passivated below a common node ("SamUserData") in "prepareForActivation". See code sample above.
Second: "prepareForActivation" will be overridden to look like this:  protected void prepareForActivation(Element parent) 
    // apply a bugfix to prevent current row to be lost if userdata is passivated
    fixVoActivationBug(parent);
    super.prepareForActivation(parent);
    // find common node "SamUserData"
    Element userdata = (Element) findChildByTagname(parent, "SamUserData");
    // read user value
    Element elem = (Element) findChildByTagname(userdata, "mSecurityLevel");
    mSecurityLevel = elem.getAttribute("Value");
  } And here comes the bugfix code:  public static void fixVoActivationBug(Element parent)
    // find user data
    Element userdata = (Element) parent.getFirstChild();
    if (userdata==null || !userdata.getNodeName().equals("SamUserData"))
      return;  // no userdata found, nothing to do
    // move userdata element to end of parent tag (this is the bugfix)
    parent.removeChild(userdata);
    parent.appendChild(userdata);
  }I'm quite sure that this is a serious bug in the BC4J passivation and activation logic!
Thanks
Frank Brandstetter

Similar Messages

  • UIX 2.20 iterator looses current row when filter is set using ViewCriteria

    Hi all,
    we use JDeveloper 10.1.2.1.0 (1913) with ADF UIX 2.20
    We have tables with search. For search we use ViewCriteria
    as a filter, data is shown in <table> element and it works fine
    But SOMETIMES when standart "sort goto" event is called for a table
    its content may become empty.
    Same problem occurs when user selects (standart "select" event of table) row and goes
    to edit- or delete-form, ${bindings.MyViewObjectIterator.currentRow} may return null.
    I should mention that this doesn't happen untill filter is set.
    Could anyone please explain why this happens and how to avoid this?
    Thanks in advance
    Renat

    do we have to use setWhereClause instead of ViewCriteria?

  • CUA and user parameters

    I thought CUA updated all user characteristics, but I just noticed that User Parameters are not updating on my system.  Is this configurable?  Is it supposed to work this way?  Does anyone know of documentation that explains this.  Thank you.

    Hi Leo,
    Generally User Parameters are set to PROPOSAL (recommended by SAP) which means the users should be able to mainatin their parameters in different systems individually.
    PFB the document stating the same in SAP HELP.
    http://help.sap.com/saphelp_nw04s/helpdata/en/6a/b1b13bb3acd607e10000000a11402f/content.htm
    Award points for helpful answers.
    Rgds,
    Sri

  • User Parameters Table

    Hi All,
    I want to know the tables where the User Parameters are stored. By User parameter, i mean the The User Profile - Parameter ID & Value.
    Any pointers would be helpful.
    Thanks in advance,
    Best regards,
    Prashant

    hi
    good
    USR01 User master record (runtime data)
    USR02 Logon data
    USR03 User address data
    USR05 User Master Parameter ID
    USR12 User master authorization values
    thanks
    mrutyun

  • What are user parameters? and how can i add user parameter

    Hi Experts,
    what are user parameters? and how can i add user parameter and how can i add a user parameter
    HR_DISP_INFTY_NUM with value X?

    user parameters are used give reference grps and counntry grouping use SU3 tcode as amite said

  • Specifying Non-String User Parameters in The Block Comment Dialog Tag

    I am trying to add user parameters for a block. I followed the instruction provided in section 4.3.7 (comments) of sysytembuild user's guide.
    The steps were as follows:
    1- I added a new parameter named (a_r) to a gain block (from the User Parameters section of Comment tag dialog field).
    2- I selected this parameter and assigned a value of 5
    Now, using the SBA command I retrieve this parameter:
    ------------------------------- Xmath outputs
    [n=UserParameterName, p=UserParameterContent] = queryblock(1)
    n
    n (a string) = a_r
    p
    p (a list with 1 elements) =
    1:
    5
    p(1)
    ans (a string) = 5
    ---------------------------- end of Xmath outputs
    Accordin
    g to the documentation, using suffix (_r) will specify a real parameter (_i for integer and _s for string). However, the list object
    obtained from "UserParameterContent" includes a string element and not a number. This can be verified by:
    --------------------------------------- Xmath outputs
    p(1) *2
    Cannot evaluate * of a string.
    modifyblock 1 ,{UserParameterContent = list(5)}
    Expecting a list of strings
    --------------------------------- end of Xmath outputs
    It looks like that independent of the naming convention, the user parameters are stored in a list with string elements in contrast to what
    mentioned in "Editing User Parameters Dialog" of the Help topics:
    "To create a new userparameter, enter a name in the User Defined field, and then click the Add button. Note that the name must have
    one of the following suffixes: _s (string), _b (boolean), _r (real), or _i (integer). "
    The questions are as follows:
    1- Is there a way to store n
    on-string type user parameters?
    2- If there is a way for that, then, is it only for scalar numeric values or vectors and matrices can also be stored in user parameters?
    Thanks,

    The Comments Tab is generally used to define User Parameters that will be used with DocumentIt. The suffix (_s, _b,_r, etc) is to designate the datatype for DocumentIt.
    All user parameters will be passed as string data to Xmath. As you noted the value 5 is passed as a string. To convert this to a scalar use the makematrix command. After you assign a value of 5 to the a_r user parameter use the SBA command queryblock as follows:
    n=UserParameterName, p=UserParameterContent] = queryblock(1)
    then enter
    m=makematrix(p(1))
    this will return a scalar.
    To get a vector in Xmath from the User Parameters you must assign the values differently on the Comment tab. Define a user parameter and assign its values by entering a carriage return after each element.
    For example assign the following value to user paramter a_r:
    5
    6
    7
    8
    Using the queryblock command you should now get:
    p(1) is a column vector of strings
    again use the makematrix command to convert this to a vector of scalars.
    m1=makematrix(p(1))
    Matrices will require a different user parameter for each column of the matrix. For example to add a column to the previous vector, you will need to go to the user parameters and add a new parameter (call it b_r) assign its values with the carriage return after each element for example:
    0
    1
    2
    3
    Again use the queryblock command. Now p will have 2 elements (one for each parameter). To create a matrix enter:
    m2=makematrix([p(1),p(2)])
    NOTE: The order the user parameters were entered in the Comment Tab will not necessarily correspond to the element they return as when using the queryblock. For example from the previous procedure, do not assume the second user parameter entered (b_r) is going to be returne
    d as p(2).

  • My Tasks View in my custom task list fails to display the tasks assigned to me (that is the currently logged in user)

    Hi
    I am new to sharepoint 2010.
    I created a custom task list, where I  have many tasks assigned to users (I had tasks assigned to me as well). I created a view as "My tasks "and having a filter as Assigned To is equal to [Me]. When I do that my view fails to show the
    tasks assigned to me. This happens same with the Sharepoints 'My Tasks' view as well. I tested by creating some test tasks under my name and when I selected 'My Tasks' view no tasks are getting displayed.
    Please help.
    Thanks,
    Gokulkumar.

    Hi,
    According to your post, my understanding is that you wanted to display the tasks assigned the current logged in user.
    In my environment, if I used the System Account, My Task view didn’t display any tasks.
    However , if I used other users except the System Account, My Task view could display current user tasks correctly.
    I recommend to use other accounts except System Account to log in site. Then everything will work well.
    Thank you for your understanding.
    Best Regards,
    Linda Li
    Linda Li
    TechNet Community Support

  • Page change the current row when concurrent users press save in the same ti

    I have a problem that appear only when a lot of users are running at the same time
    that I have an editable form that have save button some times when I press save the current row that I edit is changed or return null row.
    for example imagine that I edit employee that has Id = 50 when a lot of users running on the application at the same time when I press save the record changed to another employee that has id = 49 or returns empty form
    in my code for save I call application module method that have code similar to this
            myViewRowImpl viewimpl =
                (myViewRowImpl )getMyView().getCurrentRow();
            getDBTransaction().commit();I build my ADF fusion web application using ver 11.1.1.3

    Hi,
    sounds like a passivation problem.You can also try and change the AM pool size.
    Read up here:
    http://docs.oracle.com/cd/E21764_01/web.1111/b31974/bcservices.htm#sthref873
    http://docs.oracle.com/cd/E21764_01/web.1111/b31974/bcampool.htm#sm0299
    Frank

  • Restrict the users to view the column, row details

    Experts
    For example restrict the sales users to view the purchase price, and restrict the purchase users to view the selling price.
    Any inputs highly appreciated

    Hi,
    Restrict the users to view the column can be done through form settings.
    I don't think it is possible to restrict the users to view the particular row details. If user can open the form, no option to hide any rows through authorization.
    Thanks,
    Gordon

  • Need help with a calculated column - is there any way to reference a value in the current row?

    Hey guys,
    I'm a bit of a DAX newbie, and I'm running into a block. I'm creating a Power View report about IT tickets. We are going to be creating a cube to automate the data soon, I'm currently working with a flat Excel Data Table of data to demonstrate the Power
    View reporting capabilities to the team. I need the default display to show the top 4-5 items basked on the Ticket Count. The three applicable columns I'm using are the TicketID, the ContactReason, and the AssetCategory - all three are
    text. One slide will show the top five Contact Reasons by Ticket Count, and the other will show the top five Categories by Ticket Count. The users will see this default view, but will be able to change it to see differently ranked items or can clear the
    ranking slicer altogether.
    What I've accomplished so far is to create the Calculated Field [Ticket Count] = COUNTA(Table1[TicketID])
    And 2 other calculated fields:
    [Contact Rank] = RANKX(ALL(Table1[ContactReason]),[Ticket Count],,,DENSE)
    [Asset Rank] = RANKX(ALL(Table1[AssetCategory]),[Ticket Count],,,DENSE)
    If I were creating a Pivot Table, this would be great. These fields calculate everything the right way. The problem is, I need to have a Rank slicer on each slide and the calculation by itself contains no data - with no data, there's nothing to slice. I
    realized I need to actually have columns of data so I can create a slicer. I need each row of the table to show the same [Contact Rank] for every instance of a particular ContactReason (and the same for the [Asset Rank] and AssetCategory).
    The RANKX formulas pasted into the Calculated Column section only show a value of 1 - with no Pivot table summarizing the fields, it's counting each row's ticket once, giving every line the tied Rank of #1.
    I've solved the problem in Excel by creating 2 Pivot Tables on a separate sheet that have the data field and the calculated field for ContactRason and AssetCategory. Then on my Excel Data Table, I've added two columns that do a VLOOKUP and pull over a the
    Calculated Rank from each Pivot Table that match the ContactReason and AssetCategory fields. This works on the flat Excel Data Table now, but will not be a solutions when we start pulling the data from the cube (and there is no flat table).
    What I think I need is an Expression for the RANKX formula that can give me, for each row, the count of all of the times a ContactReason shows up in an entire column. There's only about 100,000 lines of data and each ContactReason or AssetCategory
    may show up several thousand times. But if I can get the expression to return that count, then the RANKX formula should work in the Column. If it wasn't a DAX formula, I'd use a COUNTIF and say 'Count the entire ContactReason column anytime it's equal to the
    ContactReason on THIS row', but in DAX I don't know how to reference a single value in a row. I've tried the CALCULATE() formula, but it seems like the filter needs a specific value, and doesn't work on a dynamic "cell" value.
    Any help would be greatly appreciated! (I hope it all makes sense!)

    If I've understood you correctly then the ALLEXCEPT function may be what you're after and it could be applied in a similar way to the following...
    =
    RANKX(
    ALL(Table1),
    CALCULATE(
    COUNTROWS(table1),
    ALLEXCEPT(Table1, Table1[ContactReason])
    DENSE
    If this has missed the mark, would it be possible to clarify the requirement further?
    Regards,
    Michael Amadi
    Please use the 'Mark as answer' link to mark a post that answers your question. If you find a reply helpful, please remember to vote it as helpful :)
    Website: http://www.nimblelearn.com
    Blog: http://www.nimblelearn.com/blog
    Twitter: @nimblelearn

  • How to get Current Row information

    Hi,
    Actually i have an lov item and when user enters some value in the lov and just tabs out the process request method on the lov region is fired. Now the lov item is in a advance table and table has lets say 5 rows.
    Now the user enters some invalid value in lov item of say 3 row and tabs out of the lov. As a result the lov popup gets enabled and process request at the lov region is called.
    Now my requirement is in the process request of lov region i want to get hold of the current row of view object.
    I have attached a controller at the lov region and i have put system.out.println at process request method.
    The control is going there, now when i grab the VO and do getCurrentRow() it doesn't return anything.
    Actually i know that we can capture the tab out event using pageContext.islovevent but it gets fired only for valid values in lov input. for invalid values process request is called at the lov region.
    Kindly put some light on it.
    Thanks,
    Gaurav Sharma

    Actually, when the user tabs out of the lov then if there's a valid value in lov then lovValidate event is fired and lov is not popped up. But for invalid values lovvalidate event is not getting fired but control goes to the process request of lov region.
    My requirement is that i have two lovs in an advance table region . one for Country and one for State.
    Now i want that as the user enters some value in State lov and tabs out then as the lov gets popped up then it should pick up the value in Country LOV and based on that Country it should display the results for the current row as there may be multiple rows on advance table.
    Now there are two things, when user clicks on lov torch on state then lov prepare event is fired and then i am able to grab the the country for the current row using row reference.
    But when user enters some invalid value in state lov and tabs out then no event is fired, rather than this process request is called at the lov region . Now how can i capture the value in Country lov of current row.
    Thanks,
    Gaurav
    Edited by: [email protected] on May 21, 2009 4:59 AM

  • Change the current row in an iterator and reflect the change on page

    Hi there,
    I have a jspx with a creation form created as usual draging and droping the data control. In same page, I inserted a commandButton which ActionListener executes a method in a managed bean called validate(). Through such a method what Im trying to do is to fill the form with data from specified entry of the database if certain condition is true. I know it is kinda twisted but unfortunately is the requirement for the page.
    So basically in "validate" method, if the condition I mentioned is reached, I do the following:
    // execute a Rollback (included in Page Definition) in order to cancel the previous auto-invoked "Create".
    FacesContext context = FacesContext.getCurrentInstance();
    Application app = context.getApplication();
    BindingContainer bindings =(BindingContainer)app.getVariableResolver().resolveVariable(context,"bindings");
    OperationBinding opBinding = bindings.getOperationBinding("Rollback");
    opBinding .execute();
    //get the iterator and asociated VO from the binding container
    ValueBinding vb = app.createValueBinding("#{bindings.AccountsVOIterator}");
    DCIteratorBinding dciter = (DCIteratorBinding) vb.getValue(FacesContext.getCurrentInstance());
    ViewObject view = dciter.getViewObject();
    //and set the current row with the specified entry I have mentioned above.
    Object keyValues[] = new Object[2];
    keyValues[0] = "1"; keyValues[1] = "98543";
    Row[] row = view.findByKey(new Key(keyValues),1);
    AccountsVpnVORowImpl client = (AccountsVpnVORowImpl)row[0];
    view.setCurrentRow(client);
    view.executeQuery();
    dciter.setCurrentRowWithKey(client.getKey().toStringFormat(true));
    dciter.executeQuery();
    opBinding = bindings.getOperationBinding("Execute");
    opBinding.execute();
    All this works perfectly when I debbug it but I cannot see the changes in the page(even refreshing browser). I need that when such a condition is met, the creation form turns into a modify-specific entry form, filling all fields with the specific data in order user can modify it, and all in the same page.
    Any clue?
    Thanks so much in advance for your time.

    Hi,
    I could see the problem with call to executeQuery and execute methods at the end of your method which re-sets the current row.
    Once you set the current row you should not call execute or executequery methods. Try removing those calls and also make sure that you have added partialTriggers property on the table is set to commandbutton id and partialSubmit property is set to true on commandButton to refresh the table partially on click of a button
    Sireesha

  • How to get Current row of ViewObject in the DoDML methode

    Hi all
    I have two ViewObject EmplyesView and DeptView
    How to get Current row of ViewObject DeptView in the DoDML methode of EmplyesView

    OK, we can play this game on and on...
    I'll ask for a use case (http://en.wikipedia.org/wiki/Use_case) and you don't give any info we don't already know. After an other 10 posts we probably know what you real problem is and can give you the advice which you could have gotten in the fist place.
    So please take some time and describe the problem as if you would ask your mother for help. Tell us how the data model is build and how the VO are related. Is there any input from an user involved? Which information from the other view do you need? How do you get to the doDML method? Is there a button in the ui involved?
    Timo

  • How to handle the current row with radio button selection???

    Hi Everyone,
    I have one ADF page with one table and one "Find" button.
    I have created one new attribute with VARCHAR2(1) in the VO and dragged that attribute as first column in the table. And changed that first column to Radio Button to select only one row at a time.
    Upon clicking on the "Find" button i need to get the values of current selected row.
    How can i get the values of selected row?
    What code should i write to get the values of selected row in Method Binding of "Find" button?
    Any suggestions will be really useful.
    Thanks.

    Hello Kumar,
    I have some comments on your case.
    >
    I have created one new attribute with VARCHAR2(1) in the VO
    >
    1- You should create this attribute in the Entity object and then add it to the view object.
    2- Do you need that only one radio button is set at a time for all rows ? If yes then you need to handle the case when the user set more than one row and clear the value of the attribute for all other rows.
    >
    How can i get all the values of current row in backing bean method(method binding of Find method)?
    can u plz provide me the code for that?
    >
    If you mean by the current row is that the row with its value of the selected attribute is set (the radio button is set for that row), then you can write a method in the viewObjectImpl class and expose it to client interface and call it from your bean.
    here is an example based in Department table in HR schema.
    //This method is written in DepartmentsViewImpl   
    public Row getSelectedRadioRow(){
                //create a second row set to not impact the row set used in ADF
                RowSet duplicateRowSet = this.createRowSet("duplicateRowSet");
                //get the current row of the table to set it back after re-executing the VO
                DepartmentsViewRowImpl currentRow = (DepartmentsViewRowImpl)this.getCurrentRow();
                Row[] filteredRows = duplicateRowSet.getFilteredRows("IsSelected", "1");
                DepartmentsViewRowImpl row=null;
                if(filteredRows.length>0){
                    row = (DepartmentsViewRowImpl)filteredRows[0];
                    System.out.println("Department Name " + row.getDepartmentName());              
                this.setCurrentRow(currentRow);
                duplicateRowSet.closeRowSet();
                return row;           
            }

  • Restrict the view for report MCSG on user ID level or Sales office level

    Hi,
    I need solution to restrict the view of MCSG report on user ID level or sales office level. he can able to view his own sales office data in report. Currently user able to view the all sales office data he is not restricted for same.
    Can u Pl provide solution.
    Regards
    Tarunkumar

    hi
    check with your basis team they can restrict the usage of the t-code on the basis of activity (create, change, display), parameters like sales office, division, distribution channel etc.
    saurabh

Maybe you are looking for