The value of variable binding VO on page load by program

Hello everyone!

I use JDeveloper version 11.1.2.3.0

I am currently trying to get the filtered data to a VO, based on a WHERE clause with a variable binding. This process must be done on the loading of the page. I have set this variable for liaison with the id of the logged in user (the part to get this id is already reached and used somewhere else). My current approach is to define a bean managed with scope pageFlow. Inside of this, I have a method in which I get the id and I put it as parameter. The code snippet:

      BindingContainer bindings = getBindings();
        OperationBinding operationBinding = bindings.getOperationBinding("getUserIdFromUsername"); //getUserIdFromUsername is a method defined in the AppModule and exposed in the client interface
       operationBinding.getParamsMap().put("username", getUserName());
      Object userID = operationBinding.execute();
        setUserId(Integer.parseInt(userID.toString()));
       System.out.println("THE USER ID IS: "+getUserId());
       BindingContainer bindings2 = getBindings();
       OperationBinding operationBinding2 = bindings.getOperationBinding("ExecuteWithParams");  // i've dragged and dropped the ExecuteWithParams operation into the page
       operationBinding2.getParamsMap().put("userId", getUserId());  // userId is the bind variable which i'm talking about
        Object result = operationBinding2.execute();


Then I call this method on BeforePhase in the view of the page. It works, I get the filtered data and the println shows me the correct ID. The problem is that whenever I select a row in the table showing the data, the page seems to reload and it always reload the selection at the forefront.

What I am doing wrong? Maybe this isn't the right approach, that I saw a few other posts on this topic, but they are not very clear to me.

Please advice

OK, that's what I did. I created the method to set the value of the variable to bind to the query of the VO in the AppModule instead of inside the bean (this method also runs the query) and client presentation to the interface. After I have created the method call in the section of links the pagedef (where he gets the value of the id of the bean in the original post), and followed Cvele_new_account suggestion, calling the method as follows:

RefreshCondition = "#{! requestContext.postback and empty bindings.exceptionList}" / >

Thank you for the help guys!

Tags: Java

Similar Questions

  • How to set the value of vo bind variable during execution

    Hello world

    I use vo for lov and filter by setting where variable binding clause at run time, but it gives an error.

    Jdev 11.1.1.6.0

    missinginoutparam.png

    Variable binding VO

    bindvaribale.png

    and the code I use in AM on command button is

            ViewObject vo = getOperationsVO1();
            VariableValueManager vm = vo.ensureVariableManager();
            vm.setVariableValue("p_org_id", orgID);
            vo.executeQuery();
    

    one please what problem?

    Kind regards

    Peyrot

    See also

    ADF with Ejb, ADF BC: parameter IN or OUT to missing index: 1 in Adf

  • NPE when you set the value of list binding

    Hello

    JDev 11.1.2.4

    I have a list named Country1 linked to an executable variable country of type String binding. I'm trying to programmatically set the value but I get a NPE.

    public static BindingContainer {} getBindingContainer()

    return (BindingContainer) JSFUtils.resolveExpression("#{bindings}");

    }

    JUCtrlListBinding Country1 = ((JUCtrlListBinding) ADFUtils.getBindingContainer () .get ("country1"));

    _logger.info ('Information' + country1.values () .size ()); Returns the value 100

    country1.setInputValue("*");

    I get the following NPE while * is a correct value in the list:

    java.lang.NullPointerException

    at oracle.adfinternal.view.faces.model.binding.FacesCtrlListBinding.findIndexFromObject(FacesCtrlListBinding.java:390)

    at oracle.adfinternal.view.faces.model.binding.FacesCtrlListBinding.setInputValue(FacesCtrlListBinding.java:455)

    Thank you

    I got it to work but it makes no sense:

    Ok:

    BindingContext lBindingContext = BindingContext.getCurrent ();

    BindingContainer lBindingContainer = lBindingContext.getCurrentBindingsEntry ();

    JUCtrlListBinding Country1 = ((JUCtrlListBinding) lBindingContainer.get ("country1"));

    Country1.getInputValue ();

    country1.setInputValue("*");

    KO with NPE

    BindingContext lBindingContext = BindingContext.getCurrent ();

    BindingContainer lBindingContainer = lBindingContext.getCurrentBindingsEntry ();

    JUCtrlListBinding Country1 = ((JUCtrlListBinding) lBindingContainer.get ("country1"));

    Country1.getInputValue ();

    country1.setInputValue("*");

    It seems that I have to read the value before it is changed.

  • Calculate the values of a SharePoint workflow status Page column lines

    On the workflow status page, how can I have a column with a value in the column lines?  My workflow page lists commands that are in the workflow.  I wish there was a column where the value of each PO, displays a running total of the PO rises before him.

    Hello

    It is not a community forum for issues of SharePoint. Please post to the appropriate

    Forum on MSDN SharePoint.

    http://social.msdn.Microsoft.com/forums/SharePoint/en-us/home

    Don

  • Dynamic alignment of the value of element column and report page

    Hi friends,

    I have an interactive report that contains the columns as

    < li > empno
    < li > name

    In the light of the foregoing, I 'empno' with an alignment of the left column and a 'name' with an alignment of the left column.

    It is possible to substitute the alignment of the data that we put into the report according to the value of the application as element

    If my application point is about US, so I need the alignment of the column 'empno' and 'Name' to the left, and if the value of point of my app's AR, I need the alignment of the column 'empno' and 'Name' to be right. What is possible to achieve dynamic alignment for the report data to two columns 'empno' and 'Name', according to the value of application page element.

    And also, in the case of the page element, I have a page element with a name of P1_NAME in which he has an alignment of the Horizontal/Vertical element on the left.

    I need to this alignment of the element of the page element behave dynamically according to the order of the day of the application page, as if the order of the day of the application page called WE then the alignment of the element of the page item must be left and if the order of the day of the application page called AR and then the alignment of the element of the page element has to be right.

    Is it possible to make some friends of my scenario two above. Kindly help me with this.

    Thanks in advance.

    Brgds,
    Mini

    Hey Mini,

    To change the alignment on the fly, you need a change in your IR and javascript.

    First change the columns that you want to change the alignment for. Add the following code in The HTML Expression in the column formatting part. (Detail of the column)

    #HERE _THE_COLUMN_NAME#
    

    Then you can change the easy alignment for these areas with the following code

    $(".align_style").css("text-align","left")
    

    This can be in a DA, or just on the loading of the page.

    Kind regards
    Kees Vlek
    -----
    Company: http://www.orcado.nl
    Blog: http://www.orcado.nl/blog/blogger/listings/69-kvlek
    Twitter: http://www.twitter.com/skier66
    If the answer to question please change replied and mark the appropriate post as correct / helpful.

    Published by: kvlek on 7-mei-2013 14:47

  • Synchronize the values of variables of substitution between Essbase and planning

    Hello
    In EMP 11.1.2.1 version (but we noticed the problem also in previous versions of EPM) when we set the value of a variable substitution in Essbase, the value is not immediately updated in planning: for a while, we see the old value. The value in the planning remains unchanged even to disconnect or exit planning and reconnect.
    On the contrary if we restart the planning service, the value is immediately updated
    Since we would like to use the Essbase substitution variables to manage some selections in forms of Entru data planning, is it possible to force a synchronization, or increase the frequency of synchronization between Essbase and planning?

    Concerning

    Francesco Quaranta

    Take a look at the definition of ownership of planning SUBST_VAR_CACHE_LIFETIME

    http://docs.Oracle.com/CD/E17236_01/EPM.1112/hp_admin/properts.html

    See you soon

    John
    http://John-Goodwin.blogspot.com/

  • Display the values of variables

    I'm working on a Captivate 5 project in which the values of the variables are assigned and then reassigned. Is it possible to display the value of a variable in a text box or other window to ensure that the value changes? Thank you.

    Darin

    Hello David,.

    It's the way I am especially debugging advanced actions by inserting the variables used in a text of the legend Rick indicates. A long time ago that I wrote two articles on the basic use of variables, perhaps reading could specify:

    Use the power of variables without advanced actions

    Unleash the power of variables with advanced actions

    CAUTION: sometimes the update does not appear immediately. In another thread, I explained how you can refresh the contents of the enhanced TextArea widget that contains a variable that is filled with another widget on the same blade.

    Lilybiri

  • the value of variables in the text box.

    I write a code that has a function of function there is a table of the different variables of table, values come from Server I'd like
    Enter this value of var in the text box.

    It's like in the code file is like this

    public void mainMenu (rcvParametersArray:Array): void {}

    var IndianMenu:int = rcvParametersArray [0];
    var chainesMenu:int = rcvParametersArray [1];
    }

    Assuming a component textArea on the stage, something like the following should work (composed an array to pass to the):

    var theMenus:Array = [1,2];
    mainMenu (theMenus);
    function mainMenu(rcvParametersArray:Array):void {}
    var IndianMenu:int = rcvParametersArray [0];
    var chainesMenu:int = rcvParametersArray [1];
    arrayDisplay.text = IndianMenu + ', ' + chainesMenu;
    }

    However, it seems that he might extend to several items, I was wondering if maybe you don't want to have an array of arrays so that the menu name is incorporated with its index or regardless of the other properties are associated with. Maybe not, but I thought that I would say something like the following in case it is useful

    var theMenus:Array = new Array ({name: 'Indian', index: 1}, {name: 'Channels', index: 42});
    mainMenu (theMenus);
    function mainMenu(rcvParametersArray:Array):void {}
    for (var i: int = 0; i< rcvparametersarray.length;="">
    arrayDisplay.text += rcvParametersArray [i] .name + "" + rcvParametersArray [i] .index + "\n";
    }
    }

    Finally, if the values in the table of your original paintings are numbers or integers (ints), you can convert them to strings before displaying using the toString() function, unless they are be concatenated with an existing string.

  • need to change the value of variables without deploying

    I need to code of values to variables and need to change the value of the variable without redeploying code.

    BPEL properties
    It is possible to have properties set in the BPEL process. Properties are set on a global scale and outside the BPEL process. The properties are accessible via an internal function.

    In the bpel.xml file, add the following lines just before the end of:


    [email protected]

    Properties are available in the BPEL process (.) BPEL file) via the function ora: getPreference():

    Ora:getPreference('propertyEmailAdress')

    You can change this value in console deployment descriptors

  • View the value of variables

    The following procedure, I wrote, and when I run my out parameters is not any value. I want to fill in the parameters out of my selection. How to display values?

    PROCEDURE Retrieve_Item_And_MeasureUOM
    (
    -parameters passed in
    p_wr_item_oid in NUMBERS
    p_wr_measure_oid in NUMBERS
    p_measure_uom OUT VARCHAR2,
    p_report_item_measure_uom OUT VARCHAR2
    )

    As
    -local variables
    v_sql1 varchar2 (500): = ";
    v_report_name varchar2 (200): = "reportname";
    v_wr_item_oid NUMBER;
    v_measure_oid NUMBER;
    v_report_item_measure_uom VARCHAR2 (5);
    v_measure_uom VARCHAR2 (5);

    BEGIN

    v_sql1: =.
    "SELECT."
    FM.wr_item_oid, fm.wr_measure_oid, fm.default_display_uom as Report_Item_Measure_UOM,
    m.Default_UOM_App_Code as Measure_UOM
    IN
    v_wr_item_oid, v_measure_oid, v_report_item_measure_uom, v_measure_uom
    Of
    wr_form_measure fm
    JOIN IN-HOUSE
    m wr_measure ON m.wr_measure_oid = fm.wr_measure_oid
    WHERE
    FM.wr_item_oid =' | p_wr_item_oid | "and fm.wr_measure_oid = ' |" p_wr_measure_oid | ' AND
    FM.wr_form_oid =' | Retrieve_FormOID_From_Name (v_report_name);


    EXCEPTION

    WHEN NO_DATA_FOUND THEN
    RAISE_APPLICATION_ERROR (-20999, "no data found. Possible error in the form OID.') ;

    END Retrieve_Item_And_MeasureUOM;


    When I run the query, the out parameters show this:

    p_measure_uom =
    p_report_item_measure_uom =

    Hello

    Maybe I missed something, you set a query with "v_sql1" but I don't see where it run you?

    I mean usually in PL/SQL that you define a CURSOR with a query. Then on a LOOP, you GET it
    each row returned by the query results.

    If you have a unique value to EXTRACTION you can write directly in your query as follows:

    SELECT col1, ... INTO v_1,...
    FROM ... ;
    

    Then, in this example, v_1 takes the value of col1.

    Hope this helps.
    Best regards
    Jean Valentine

  • How to store the values of variable level OBIEE presentation in DB

    Hi all!

    We have a command prompt of dashboard which is set up to store values in variables of presentation (period start and period end dates). Is there a way to store values selected from a database? for further processing?
    that is, I need to pass the variable level (report parameters) presentation to complex calculations to a PL/SQL function.
    Also my requirement might be solved if I can get access to the selected values of logical column in the tab 'Business Model and mapping' definition in the BI administrator.
    that is, I'll be able to define the logical column using VALUEOF (NQ_SESSION. < nom_var >)

    Kind regards
    Mr.Maverick

    Hello.

    1 do SQL PL/function (in the database) which has an input parameters, which number depends on number of guests and in it you'll insert these parameters into a table.

    2. your report in column expression answers call this function that will do insert, the code would be like:
    EVALUATE ("YOUR_FUNCTION (1%, 2%, 3%, 4%) (' as varchar (20), @{p_1}, @{p_2}, @{p_3}, @{p_4})

    3. Note that the function returns something and be careful on data types inside EVALUATE it.

    4. notes that, in the case where some messages are not selected (all or nothing) you recognize this case as:

    -case when LENGTH('@{pv_var}') > 0 then ' @{pv_var}' end else' all '.

    or like this:

    -case when LENGTH('@{pv_var}') is null then 'all choice"other" @{pv_var}' end; "

    Kind regards
    Goran
    http://108obiee.blogspot.com

  • the value of variable equal to the value of a recordset from database

    It is for Coldfusion version 8.

    I have two tables which I am inserting data in. After I insert a record in the first table, I need to use the id (auto incremented, not something I already have) to the new folder as part of the data I enter in the second table.

    I'm having a hard time nailing down the syntax to get me there. I searched the documentation, any thoughts on what I should have sought under would be welcome as well.

    Any help would be appreciated, thanks.

    -----------------------------------

    <!-this table contains a column id that autoincrements->

    < cfquery datasource = "labdsn" name = "newLabDataRecord" > INSERT INTO LabData (savedLab, lastSavedBy) VALUES ('data data data", '555') < / cfquery >

    <! - find the value of this new identifier - >

    < cfquery datasource = "labdsn" name = "maxLabIDRecord" > select max (id) OF LabData < / cfquery >

    <!-this generates the error. Not surprised, but don't know what it should be->

    < cfset maximum = < cfoutput query = "rsMaxLabIDRecord" > #rsMaxLabIDRecord.id # < / cfoutput > >

    < cfquery datasource = "labdsn" name = "newUserRecord" > INSERT INTO UsersVsLab (userID, whichLab, IDB) VALUES ('2', 1, < cfqueryparam value = "#maxID #" >) < / cfquery >

    <!-it's another syntax I tried->

    <!-cfquery datasource = "labdsn" name = "newUserRecord" > INSERT INTO UsersVsLab (userID, whichLab, IDB)

    VALUES

    ('2', 1, < cfqueryparam value = < cfoutput query = "rsMaxLabIDRecord" > #rsMaxLabIDRecord.id # < / cfoutput > >) < / cfquery->

    You can solve your specific error by adding an alias to the application where you get max id.  However, there are often better ways to achieve this.  The details depend on the type of db that you use.

    If you need to use max (id) select, add a where clause clause in order to make sure you get the right pair.

  • Passing variable pageflowScope JavaScript on page load event


    Hello

    I'm attempting to pass pageflowScope value of the variable in the javaScript on the page Load method.

    < af:resource type = "javascript" >

    getTitle (evt) {} function

    var titleString = document.title;

    Alert ("Welcome1");

    Var manual = evt.getSource () .getProperty ('rowKey');

    Alert (Manual);

    }

    < / af:resource >

    < af:form id = "f1" >

    < af:clientAttribute = name value = "#{pageFlowScope.readOnlyParam}" / "rowKey" >

    < af:clientListener method = "getTitle ()" type = "load" / > "

    < / af:form >

    First alert got printed but I don't get the value of the variable pageFlowScope in Javascript...

    Any help will be appriciable.

    Kind regards

    Krishan

    ,.


    Hello

    Add after the code inside

    tag

    function onPageLoad (evt) {}

    Alert (evt. GetSource(). GetProperty ('vattr'));

    }

    and it does not work for me

  • How the value of variable Page of Backing Bean

    Hi all

    New on ADF trying to access page variable value to a BackingBean (scope wonders).

    I tried this approach but does not work, I do not know how to solve.

    My ADF page is filled by a VO.

    It is the ADF page code:

    < af:panelLabelAndMessage label = "Name" id = "plam8" >

    < af:outputText value = "#{bindings." Name.inputValue}"id ="ot7">

    < / af:outputText >

    < / af:panelLabelAndMessage >

    < af:panelLabelAndMessage label = 'Start Date' id = 'plam8' >

    < af:outputText value = "#{detailBean.startDate.inputValue}" id = "ot8" / > "

    < / af:panelLabelAndMessage >

    This is the piece of my BackingBean where I need to read my element value and the format in right way and then push it down on the page of the ADF:

    private String startDate;

    public String getStartDate() {}

    StartDateXD = (Date) resolveExpression("#{pageFlowScope.startDate}");

    If (startDateXD ! = null) {}

    In the date format = new Date (startDateXD. getTime());

    SimpleDateFormat newFormat = new SimpleDateFormat("dd/MM/yyyy");

    startDate = newFormat.format (formatted);

    }

    Return dataSds;

    }

    Is someone coulfd help me?

    Thanks for your help.

    Fairlie

    Yes, you can use af:convertNumber to convert currency. Check Ashish Awasthi (Jdev/ADF) Blog: change of af: convertNumber Format according to the regional settings - Oracle ADF for a sample.

    Timo

  • Passing the value with coma inside to another page

    Hi all, need your help.

    I have trouble to clarify how to pass value with coma to another page.

    For example, I have a P2_NAME field: with the current value: Test, name

    When I'm passing this on page 3 I get only from Test. I do not understand why, but I do not know how to deceive the APEX?

    var url = ' f? p = & APP_ID.:3: & SESSION.: NO::P2_NAME: "+ $v ('P3_NAME');

    Window.Open (url, "name", "height = 600, width = 800, toolbar = no, directories = no, status = no, menubar = no, scrollbars = no, resizable = no, modal = yes");

    Thank you very much

    Andrei

    Hello

    This might help

    2.5 understanding URL syntax

    List of values of the element used to define the session state in a URL.

    Item values cannot include settlers, but may contain commas with backslashes.

    To change a comma in a value element, place the characters with the backslashes. For example:

    \123,45\

    Kind regards
    Jari

Maybe you are looking for

  • Member of group block

    Hi, is it possible to block a member of a group to another Member cannot see his messages in this group

  • Best way to reset all controls on the front panel except one?

    Hello world I have an interesting problem, whereby I need to run successive tests using a test station which has several indicators on the front panel. At the end of each test, I need to reset all to default values, with the exception of a control (T

  • Unrecognized USB device if I use more than four devices. WTF.

    Hey,. I currently use a 32-bit version of Windows Vista.  I have six slots USB which is given to me.  I use four of them at all times to my keyboard, mouse, WiFi adapter and the headset.Whenever I'm trying to plug a fifth device I get the error: USB

  • Full drive C on Vista

    I have a recurring problem that my C drive is completely filled, even if I deleted almost all the separate E and an external HD player data files. The user of the main memory is the "Appdata" folder in 'users', which represents almost 1/2 the C playe

  • Dysfunction of ringtone blackBerry Smartphones BB 8700

    I put my BB 8700 to quiet four days ago.  I put it to the normal ring, but it does not ring.  When I set it to vibrate, it does not vibrate.  What can I do? version of OS 4.5.0.124 platform 2.7.0.92