How to deploy a VO Bind variable to get the value of user session...

Hello everyone...
A JSF Page has a table based on VO with two parameters. One of these parameters, I'll go through the ExecuteWithParams operation.
but the other setting, I need to pass a value of user session.
Is this possible? How would I do that? I m using jdev10.1.3
Thank you...

When you create a link to executeWithParams in your pageDef, binding action should have NamedData elements for each of the parameters. These would be allocated a variableIterator to the top values in the executables section. The parameter that gets its value from the user input should be left alone. For the parameter that gets its value from the session of the user, change the EL expression that defines its NDValue attribute so that it references the session information that you want to use. This may be a sessionScope variable that you defined earlier in the session, according to Frank, a property of a bean managed in session scope, or other variables.

Tags: Java

Similar Questions

  • How to get the value of a variable to bind a client method of the AM?

    Hello

    I have a VO based on a variable binding. This binding variable is associated with an element on the page. When the user fills the element that the binding variable is written, the query is executed. This method works.
    What I want now is the following. With a second button, the user runs an exported AOS action method. In this method, I want to get the value of the binding variable that has been put forward.
    How would I do that?

    You can get the variables bind currently set on the object view as follows:
    catServiceDurationsVO has the reference to the VO
    VariableValueManager vm = null;
    VM = catServiceDurationsVO.ensureVariableManager ();
    System.out.println (VM.getVariableValue ("BindVariable"));

    Thank you
    Nini

  • bind variable String at the bean has attached a component

    I need to bind the Variable String exist in my bean 'loginType '.

    public class {Start

    private String loginType.

    {} public void setLoginType (String loginType)
    this.loginType = loginType;
    }

    public String getLoginType() {}
    loginType return;
    }
    }

    This bean has no component in the jsbx page but when I click on my buttons taking this variable is worth

    <? XML version = "1.0" encoding = "UTF - 8"? >
    < xmlns:jsp = "http://java.sun.com/JSP/Page" version = "2.1" jsp:root xmlns:f = "http://java.sun.com/jsf/core".
    xmlns:af = "http://xmlns.oracle.com/adf/faces/rich" >
    < jsp:directive.page contentType = text/html"; Charset = UTF - 8 "/ >
    < f: view >
    < af:document title = "start.jspx" id = "d1" binding ="#{backing_start.d1}" > "
    < af:form id = binding = "#{backing_start.f1"f1"}" >
    < af:commandButton text = "don't jump" id = "cb1" binding = "#{backing_start.cb1} '"
    action = "#{backing_start.cb1_action}" / >
    < text af:commandButton = 'skip' id = "cb2" binding = "#{backing_start.cb2} '"
    action = "#{backing_start.cb2_action}" / >
    < af:inputText label = "Label 1" id = "it1" value = "#{sessionScope.loginType}" / >
    < / af:form >
    < / af:document >
    < / f: view >
    <!--oracle-jdev-comment:auto-binding-backing-bean-name:backing_start-->
    < / jsp:root >


    is there a problem with that

    I need more later to get the value of this variable from java code

    FacesContext facesContext = FacesContext.getCurrentInstance ();
    ELContext elContext = facesContext.getELContext ();
    ExpressionFactory expressionFactory = facesContext.getApplication () .getExpressionFactory ();
    ValueExpression exp = expressionFactory.createValueExpression (elContext, "#{sessionScope}", Object.class)
    Map < String, Object > sessionMap = exp.getValue (elContext) (map < String, Object >);
    Object loginType = sessionMap.get ("loginType");


    It always returns null

    Hello..
    Before accessing variables needed data for sessionScope as Vinod said:
    Control following

    Use sessionScope as the value of the Variable binding

  • How to get the value of the embedded content Session Variables

    Hello world.

    I have the following requirement: I want to incorporate a web page of external non-Oracle-BI in my dashboard of Oracle BI. I need the Session Variables (for example NQ_SESSION. USER) to control my external web page. My question is how can I get the value of the Oracle's BI dashboard Session Variables.


    Thank you.

    Allen

    Have you used the narrative mode? The narrative point of view to add html customized to your report, using the values in the table view. @2 refers to the second column in your report, @3 to the third, etc.
    By using an iframe, you can open an external Web page and with @2, you can pass the value of the variable user to the external Web page.

    Kind regards
    Stijn

  • How to get the value of OdiVariable in Java variable

    Hello

    is it possible to get the value of OdiVariable in variable Java please?

    Let me explain it please. I have variable ODI - I say #VAR1 (last alphanumeric default value: 0)
    In the ODI package (technology: Oracle) I want to branch code based on the value:

    < % if ('0'.equeal (#VAR1)) {% >}
    -Branch when #VAR1 is 0
    < %} else {% >}
    -Branch when #VAR1 is not equal to 0
    < %} % >

    This code does not work. I guess #VAR1 to 0 string substitution is done after java - meaning, java generates the code:
    -Branch when #VAR1 is not equal to 0
    and now the substitution is made.

    Any ideas?

    Thank you
    Antonin

    Hi Antonin,

    I would like to contribute a little,

    I never tried with Java I have at home and rely on Jython.

    Suppose that you have a 2 step process, in the first step of the procedure, you have found a few values using alternative methods,

    __________________________________________________________________________

    Step 1:

    Command on the Source:

    Technologies: Oracle

    Logical schema:

    Select <%=odiRef.getSession("SESS_NO")%> in the SESS_NO of the double

    Command on the target:

    Technology: Jython

    mySessNo = #SESS_NO

    __________________________________________________________________________

    Step 2:

    Command on the target

    Technology: Jython

    If mySessNo == 0:
    -Branch when mySessNo is 0
    Another thing:
    -Branch when mySessNo is not equal to 0

    __________________________________________________________________________

    Meaning of Makses?

    P.S: Substitute - with tab.

    Thank you
    G

  • ([JDev12c, ADF] 1) how to get the value of a field of the line currently selected in question 2) af:table: flowScope

    Hallo,

    How can I get the value of a field in the row that is currently selected in an af:table?

    I need to pass this value to a setCurrentRowWithKeyValue who took the record to display in another (by a button) called page:

    Limited workflow

    Page1 - goToPage2-> setCurrentRowWithKeyValue-> PAGE2

    I defined a managed bean flowScope for the workflow in which I created the variable 'CodeToSetPage2Row '.

    I will store the value of the field for the selected line in this variable so that I can move on to the setCurrentRowWithKeyValue.

    Could be this method OK? Ore is there any good practice to achieve this goal?

    The managed bean flowScope used to go to the stubborn task may take some values from the outside?

    The workflow defined will be executed in a dynamic region.

    Thank you

    Federico

    Federico, you cannot use a flow variable scope for this page. The region has no access to the bean. You must use a workflow for this parameter.

    To get an attribute of the currently selected line you make slide data vo of control on the page attribute. This will create a link attribute for this attribute. Once this link exists, switch to source mode and remove the component that you do not want.

    The framework passes the value of the current row in this affair of the attribute (table should be in single selection mode).

    Click on the button, you switch the binding of the attribute for the setting of task flow using a setPropertyListener.

    In the workflow, you call the setCurrentRowWithKeyValue with the parameter of workflow as the default activity.

    Timo

  • How to get the value on a model that is defined in the java code in email

    Hello

    I created a custom code and send email as well to custom component. I can send emails using the method:

    InternetFunctions.sendMailTo (EmailID, EmailTemplate, subject, cxt);

    But my problem is that I have to get a value in the model of "EmailTemplate" which are defined from java code. but I don't know how to get the value.

    I will highlight in the java code by using this code: binder.putLocal ("ErrorApproveRejectMsg", massegeBody);

    I'm trying to enhance the model using the code below, but not able to get.

    1 < $exec getValue ("#active", "ErrorApproveRejectMsg") $ >

    2 < $exec getValue ("#active", ErrorApproveRejectMsg) $ >

    3 < getValue ("ErrorApproveRejectMsg") $exec $ >

    4 < $exec getValue (ErrorApproveRejectMsg) $ >

    5 < getValue ("#local", ErrorApproveRejectMsg) $exec $ >

    6 < getValue ("#local", "ErrorApproveRejectMsg") $exec $ >

    7 < $ErrorApproveRejectMsg$ >

    8 < $exec ErrorApproveRejectMsg$ >

    Assuming that cxt will be your Service or execution context object

    You can do something like this

    DB. PutLocal ("ErrorApproveRejectMsg", "Error");

    cxt.setCachedObject ("DataBinder", db);

    PageMerger h = new PageMerger (db, cxt);

    cxt.setCachedObject ("PageMerger", h);

    InternetFunctions.sendMailTo (usersEmail, emailTemplate, emailSubject, cxt);

    where db is current databinder object, and you can put any variable custom in the workbook by using the putLocal method.

    Thank you

    Vikram

  • Cannot get the value of the session variable (using row wise initialization).

    Hi all

    I have a scenario where I'm trying to get the value of the variable session of two columns.

    Table of database consists of the name of USER, Country_Region, columns Country_SubRegion.

    For example: ChadraKanth, Americas, America West is the data.

    I wrote a Sql query in the block of session initialization:

    Select "CR", Country_Region, Country_SubRegion

    of row_wise_init

    where USERID = ": the USER"

    When I test the RPD code gives the result like this:

    CR WesternAmerica of Americas.

    In my report I have two columns, a region and an another subregion.

    When I try to filter with the session variable "CR" for the column region his error giving: session variable is not initialized with

    This is the default.

    Question:

    1. session variable is contains several values in the column?

    2. how to filter the report on columns of region and sub region?

    Please suggest me.

    Kind regards

    Chandra Khalil.

    Hello

    A session variable cannot store more than one column, 1 variable = 1 value (column 1), horizontal initialization allows to store several lines, multiple values in the same variable.

    If to a user, you have several lines with multiple values, you need horizontal initialization, but it cannot store in the variable the value of the region and subregion.

  • How to get the values of the table of the ADF to bean class?

    Hi all

    My 11.1.1.6 Jdev

    Here I do not use BC ADF in my project.  I'll put values in the ADF table with bean.

    In the table, I put a checkbox. When I selected (Checkbox) a few rows in table and submit. In the submit method, I want to get all the values of line checkbox selected in my bean class.

    How can I get the values. ???

    Here my table UI code

    < af:table var = "row" rowBandingInterval = "0" id = "t1" value = "#{pageFlowScope.BinderSolutionsBean.uiBinderProperties} '"

    styleClass = "AFStretchWidth" emptyText = "no record found".

    Binding = "#{pageFlowScope.BinderSolutionsBean.binderTree}" >

    < af:column sortable = "false" headerText = "Script ID" id = 'c4' >

    < af:panelGroupLayout id = "pgl4" >

    < af:selectBooleanCheckbox id = 'sbc1' > < / af:selectBooleanCheckbox >

    < af:spacer width = "5" / >

    < af:outputText value = "#{row.scenarioId}" id = "ot5" / > "

    < / af:panelGroupLayout >

    < / af:column >

    < af:column sortable = "false" headerText = "Quote ID" id = "c1" >

    < af:outputText value = "#{row.quoteId}" id = "ot4" / > "

    < / af:column >

    < af:column sortable = "false" headerText = "NASP ID" id = "c2" >

    < af:outputText value = "#{row.naspId}" id = "ot2" / > "

    < / af:column >

    < af:column sortable = "false" headerText = "GCH ID" id = 'c3' >

    < af:outputText value = "#{row.gchId}" id = "ot3" / > "

    < / af:column >

    < af:column id = "c6" headerText = "Term" >

    < af:outputText value = "#{row.term}" id = "ot9" / > "

    < / af:column >

    < af:column sortable = "false" headerText = "Status" id = "c5" >

    < af:outputText value = "#{row.status}" id = "ot6" / > "

    < / af:column >

    < / af:table >

    follow some above recommendation such as the creation of additional attribute. You will also need the key in your collection, while making the data for your chart.

    You must write a custom selectionListener. On valueChangeEvent of box, get the key of a line and add the line at the bean.

    Maybe it's little help for you

    https://tompeez.WordPress.com/2012/01/22/jdev-custom-SelectionListener-for-viewobjects-in-rangepaging-mode/

    How to get the selected row in a table no-bind ADF

  • Get the value of the Variable text

    Hi all

    How to get the value of the Variable text. I want to check the value of variable text title in each page.

    Thank you and best regards,

    Robert S

    myText.textVariableInstances.everyItem (.resultText) would do it.

    The representation of a TextVariable on the page is a TextVariableInstance. They are objects of 'text' (parent may be: cell phone, change, note, Note, history, TextFrame, XmlStory). The "resultText" property is the string that the variable instance currently shows. See Adobe InDesign CS5 (7,0) object model JS: TextVariableInstance

  • A small Question about getting the value of an element via a variable.

    Hello

    My database is 11 GR 2, form server 10g.

    I have a canvas named canvas14, there is a multi-onglet inside (tab1, tab2).

    In the "Key-Exit" trigger, I would get the name of the current tab and do something then exit_form.

    To get the name of the tab, I used a function as follows.

    FUNCTION getTabName RETURN varchar2 IS

    tp_nm VARCHAR2 (30);

    tp_ID TAB_PAGE;

    tp_lb VARCHAR2 (30);

    BEGIN

    tp_nm: = GET_CANVAS_PROPERTY ('CANVAS14', topmost_tab_page);

    tp_ID: = FIND_TAB_PAGE (tp_nm);

    tp_lb: = GET_TAB_PAGE_PROPERTY (tp_id, label);

    Return tp_lb;

    END;

    Key-release trigger, my share of the code follows.

    v_Name: = getTabName;

    v_item: = ':'. v_Name |'. the ';

    If v_item is not null then

    clear_form;

    on the other

    exit_form;

    end if;

    v_item is: tab1.des now. I want to get the value of: tab1.des.

    How to get the value of v_item, not the variable itself?

    Thanks in advance.

    Phil

    Use NAME_IN with the itemname without the colon as

    value: = NAME_IN ('tab1.des');

  • Getting the value of the variable defined in the component cfg file in the Service Manager.

    Hello
    I have a component custome and I need to set a variable in the cfg of the component file and I need to access this variable in my personal (using java) service manager.
    Can someone tell me how to get the value of the variable in the Manager.

    The link should load now.

    The Basic code is:
    String value = SharedObjects.getEnvironmentValue ("variableName");

    Jonathan
    http://jonathanhult.com

  • How to get the value of a * Global * Application point of JS

    If we declare an element of the request, which is NOT a level of the page in question, how we get the value of this element in an Action dynamic JavaScript on a page?

    For example, we declare a "global" variable as an Application named DEFAULT_AJAX_SEPERATOR and set its value with a calculation of the claim "on the new Instance" a moment later, on a page of the application, we would like to get the value of DEFAULT_AJAX_SEPERATOR via JavaScript.

    Page* level syntax element...
    $v( 'DEFAULT_AJAX_SEPERATOR' );
    .. How does not work. I don't understand why it's like $v can only access the elements on the page. However, the APEX is clearly able to get these global values since, for example, they are available in PL/SQL blocks. Also, I know that it is on the session object, because I can see it when viewing the session.

    So... What is sauce secret for obtaining this value?

    Thank you

    -Joe

    Hello
    Use something like this in your javascript code.

    var appItemVal = "& DEFAULT_AJAX_SEPERATOR.";

    Thank you
    Naidu789.

    If you think, I responded to your question, please mark as answer.

  • How to get the value of viewrow by chain

    With the help of Jdev11.1.1.5.0 - adfbc - ireport3.0.0

    Here I will describe: what I've done.

    use jsff (dynamic region) while hitting the af:tree nodes it opens. Fine OK

    I had somevo manually wroten Query. and the query is fine no problem with it
     here i give sample not a original query
    select * from sometable where acctid = :pacctid
    I do drag and drop the pacctid correspondent run params vo as selectoncechoice


    public static vo
    Value of data - to pay account, advance

    Announcement name - ap, given


    in this jsff
    *page representation*
    
    account type :   account payable (ap) - select one choice type
                            advance           (ad) - select one choice type
    
    like this some select once choice and some inputs.
    
    Run report - command button
     .jsff code 
    <af:selectOneChoice value="#{bindings.ACCT_TYPE.inputValue}"
                              label="Account Type"
                              shortDesc="#{bindings.ACCT_TYPE.hints.tooltip}"
                              id="soc3" required="true" 
                              autoSubmit="true"
                              binding="#{backingBeanScope.SUP1040V.soc3}"
                              valuePassThru="true"
                              valueChangeListener="#{backingBeanScope.SUP1040V.ValueChangeListener1}">
                             
            <f:selectItems value="#{bindings.ACCT_TYPE.items}" id="si3"/>
          </af:selectOneChoice>
    
     <af:commandToolbarButton text="Export in pdf" id="ctb2">
              <af:fileDownloadActionListener method="#{backingBeanScope.SUP1040V.Report}"
                                             />
            </af:commandToolbarButton>
    . Java
         //while hitting the button following logs are appeared i show it as commented format.
    
        public void Report(FacesContext context, OutputStream out) throws IOException,Exception
            {
            
                FacesContext ctx = FacesContext.getCurrentInstance();
                HttpServletRequest request =
                    (HttpServletRequest)ctx.getExternalContext().getRequest();
                HttpServletResponse response =  
                    (HttpServletResponse)ctx.getExternalContext().getResponse();
                
            .....
                         
                BindingContainer bindings1 = BindingContext.getCurrent().getCurrentBindingsEntry();
                System.out.println("print binding" +bindings1 );
           
    //while using sop i get this in my log : :  print binding  ReportsPageFragments_SUP1040VPageDef_WEB_INF_TaskFlows_SUP1040_V_TF_xml_SUP1040_V_TF
    
           
                JUCtrlListBinding listBinding1 = (JUCtrlListBinding)bindings1.get("ACCT_TYPE");
                System.out.println("print list bindings" +listBinding1 );
           
    //while using sop i get this in my log : :  print list  bindings0
    
    
                Object selectedValue1 = listBinding1.getSelectedValue();
                System.out.println("print selected value" + selectedValue1);
    
    //while using sop i get this in my log : :  print selected  valueViewRow [oracle.jbo.Key[AP ]]    
                
                  
     request.setAttribute("ACCT_TYPE", //here i want the value  "AP" in  String  ); 
    
    if i use like this means
    request.setAttribute("ACCT_TYPE", soc1.getValue()  );  i get the index value.
    
    i need the dataname "ap" so i go above method which say wrotes ...
                 
              
                           ...                                    
                request.getRequestDispatcher(response.encodeURL("/sup1040servlet")).forward(request,response);
                
                System.out.println("hihihihih");
                response.flushBuffer();
                ctx.responseComplete();
           
            }
    
        public void ValueChangeListener1(ValueChangeEvent valueChangeEvent) {
            // Add event code here...
            String AcctType = valueChangeEvent.getNewValue().toString();
            System.out.println("AcctType" + AcctType);
            FacesContext contxt = FacesContext.getCurrentInstance();
            valueChangeEvent.getComponent().processUpdates(contxt); 
          
           BindingContainer bindings1 =
           BindingContext.getCurrent().getCurrentBindingsEntry();
           // Get the sepecific list binding
           JUCtrlListBinding listBinding1 =
           (JUCtrlListBinding)bindings1.get("ACCT_TYPE");
           // Get the value which is currently selected
           Object selectedValue1 = listBinding1.getSelectedValue();
           System.out.println(selectedValue1);
        }
    If I get ap means my report runs. or otherwise it will show an empty page.

    How to get the value of class viewrowimpl as string.

    Published by: ADF7 on March 24, 2012 07:27

    ADF7,
    I'm not sure that understand what you're up to.
    For as far as I understand you want to get the value of display rather than the index
    I use this code

        public void StatusChangedListener(ValueChangeEvent valueChangeEvent)
        {
            BindingContext lBindingContext = BindingContext.getCurrent();
            BindingContainer lBindingContainer = lBindingContext.getCurrentBindingsEntry();
            JUCtrlListBinding list = (JUCtrlListBinding) lBindingContainer.get("Status");
            int newindex = (Integer) valueChangeEvent.getNewValue();
            Object row = list.getDisplayData(); // Wichtig um die liste zu laden!!!!
            Row lFromList = (Row) list.getValueFromList(newindex);
            Object lAttribute = lFromList.getAttribute("Value");
            String newVal = (String) lAttribute;
        }
    

    to get the value of a component of selectOneChoice...

    Timo

  • How to get the value of the global element using javascript or ajax!

    Hello!

    How can I read at global(point application created in the shared components) using ajax or javascript?
    You can imagine that I need to get the value of this element by function as:
    -----
    Function getText() {var itemVal = $x ('MY_GLOBAL_ITEM') .value;}  Return itemVal; }
    -----
    .. .but I can't do it because it is not made to couse of the page it is global element! so, anyone know no work around to do?
    I know that I can make point page and read the value of that, but not what I really need!
    If I have 100 pages and all pages need to use my function, it would take 100 Articles :) - that's why its no good average!

    Please, share your ideas!

    THX

    Rafix,

    You must use a little AJAX to retrieve a request element value. Three steps in this solution. Implementation of a callable JavaScript function, creating an application process on the request and call the JavaScript function with dynamic action.

    1 set up a JavaScript function that can be called by:

    This function calls the process of application level which has a visibility of the element of your application and then returns the value of points.

    Edit your page and JavaScript code according to the code in the 'function and Variable global statement' of your page. You can also add to the model page, that you use, but you also have to encapsulate this code in the script tags.

    getAppItem = function(pItemName){
        var get = new htmldb_Get(null,$v('pFlowId'),'APPLICATION_PROCESS=GET_APP_ITEM',$v('pStepId'));
        get.addParam('x01',pItemName);
        gReturn = get.get();
        get = null;
        return gReturn;
    }
    

    2. creating an application on request process:

    The application of level process has visibility to your application-level element. It is to retrieve the value of points and it prints the htp buffer. Essentially, this acts as a way to return the values of AJAX calls (the javascript function we set previously);

    go to the shared components > procedures > Create.

    Point process: "We Demand: run this application...". »
    Name: GET_APP_ITEM
    Type: Anonymous PL/SQL block

    declare
       -- get the item name passed into the JavaScript function.
       app_item_name varchar2(30) := apex_application.g_x01;
    begin
        -- print its value to the buffer
        htp.p(v(app_item_name));
    end;
    

    3. call the JavaScript function with dynamic action:

    The function call allows to specify an application-level element name and have its returned value. The trigger event is specific to what you need, but the action must be of type to run JavaScript code. In my case immediately the value of P1_NUMBER to my value of demand points. This code doesn't have to be in a dynamic action, but it helps to stay organized. you could call it from any script tag.

    $s('P1_NUMBER',getAppItem('MY_APP_ITEM'));
    

    See you soon,.
    Janet Tyson

Maybe you are looking for