Binding Session Values to hidden variables

I need to access some session data (eg: signedin userid..) in ADF BC while doing an update, so that i can store it in database.
Please suggest..

Hey Timo,
This is how i acheived this:
1) Exposed a method in AppModule to set the user signedin..
2) In the backing beanretreived the App Module..and set the userSignedin..
ValueBinding vb = context.getApplication().createValueBinding("#{data}");
BindingContext bc = (BindingContext) vb.getValue(context);
DCDataControl dc = bc.findDataControl("AppModuleDataControl");
AppModuleImpl appModuleImpl = (AppModuleImpl) dc.getDataProvider();
AppModule am = (AppModule)appModuleImpl;
3) And in the entity.. exposed the accessor methods for UpdatebleVO and retreived the App Module from it..and from it the user signedin..
AppModuleImpl am = (AppModuleImpl)getEmpUVO1().getApplicationModule();
It works..Please suggest ifthere is any easy way..
Thanks
Edited by: user11922045 on Oct 26, 2010 1:50 PM

Similar Messages

  • How to access the hidden variable in jsp

    hi all,
    i need help to know how to access the hidden variable in the same jsp.
    Following is the code snippet just have a look at that.
    ArrayList arrRankingSummary = (java.util.ArrayList)session.getAttribute("arrRankingSummary");
    <logic:iterate id="rankingSummary" name="arrRankingSummary">
    <input type="hidden" name="allApplicantID" value='<bean:write name="rankingSummary" property="APPLICANTID"/>' />
    <input type="hidden" name="allAdmissionRank" value='<bean:write name="rankingSummary" property="ADMISSIONRANK"/>' />
    </logic:iterate>
    <input type="hidden" name="applicantID" value='<bean:write name="rankingSummary" property="APPLICANTID"/>' />
    <TD align=center><Input type=Text name="admissionRank" class=Textverysmall size=2 value='<bean:write name="rankingSummary" property="ADMISSIONRANK"/>' maxlength="10" /> </TD>
    I want to remove the element from arraylist on these condition
    if(allApplicantID.value ==applicantID.value){
    arrRankingSummary .remove("admissionRank");
    Now the pbm is i m not getting how to access the hidden variable in jsp or how to use the values of hidden variable for the condition.
    Pls help me out.
    Thanks in adv.
    Regards,
    Ritu

    hi ram,
    as i mentioned i m creating hidden variables & i m doing some validation on form submit.
    The following is js code snippet for validation.
    for (var i = 0; i < document.forms[0].admissionRank.length; i++)
    admissionRank = document.forms[0].admissionRank.value;
    for(var j = 0; j < document.forms[0].allAdmissionRank.length; j++)
    //alert ("admissionRank : " + admissionRank + " document.forms[0].allAdmissionRank[" + j + "].value : " + document.forms[0].allAdmissionRank[j].value + "\ndocument.forms[0].allApplicantID[" + j + "].value : " + document.forms[0].allApplicantID[j].value + " document.forms[0].applicantID[" + i + "].value : " + document.forms[0].applicantID[i].value);
    if(admissionRank == document.forms[0].allAdmissionRank[j].value && document.forms[0].allApplicantID[j].value != document.forms[0].applicantID[i].value && admissionRank != "" && document.forms[0].allAdmissionRank[j].value != "")
    flag = false;
    document.forms[0].admissionRank[i].focus();
    document.forms[0].admissionRank[i].select();
    break;
    if (flag == false)
    break;
    In this validation i want admissionRank to be removed from the original arraylist if following condition gets satisfied
    "(document.forms[0].allApplicantID[j].value == document.forms[0].applicantID[i].value )"
    Thanks in adv
    Ritu

  • How to pass session variable value with GO URL to override session value

    Hi Gurus,
    We have below requirement.Please help us at the earliest.
    How to pass session variable value with GO URL to override session value. ( It is not working after making changes to authentication xml file session init block creation as explained by oracle (Bug No14372679 : which they claim it is fixed in 1.7 version  Ref No :Bug 14372679 : REQUEST VARIABLE NOT OVERRIDING SESSION VARIABLE RUNNING THRU A GO URL )
    Please provide step by step solution.No vague answers.
    I followed below steps mentioned.
    RPD:
    ****-> Created a session variable called STATUS
    -> Create Session Init block called Init_Status with SQL
        select 'ACTIVE' from dual;
    -> Assigned the session variable STATUS to Init block Init_Status
    authenticationschemas.xml:
    Added
    <RequestVariable source="url" type="informational"
    nameInSource="RE_CODE" biVariableName="NQ_SESSION.STATUS"/>
    Report
    Edit column "Contract Status" and added session variable as
    VALUEOF(NQ_SESSION.STATUS)
    URL:
    http://localhost:9704/analytics/saw.dll?PortalGo&Action=prompt&path=%2Fshared%2FQAV%2FTest_Report_By%20Contract%20Status&RE_CODE='EXPIRED'
    Issue:
    When  I run the URL above with parameter EXPIRED, the report still shows for  ACTIVE only. The URL is not making any difference with report.
    Report is picking the default value from RPD session variable init query.
    could you please let me know if I am missing something.

    Hi,
    Check those links might help you.
    Integrating Oracle OBIEE Content using GO URL
    How to set session variables using url variables | OBIEE Blog
    OBIEE 10G - How to set a request/session variable using the Saw Url (Go/Dashboard) | GerardNico.com (BI, OBIEE, O…
    Thanks,
    Satya

  • Bind input field value to a variable fails

    Business need : The user wants to re-evaluate lines by a percentage value which he fills via his BI-IP screen.
    I created an INPUT FIELD in WAD and I am trying to link a variable value (initially created in BI-IP through transaction RSPLAN)
    to this INPUT FIELD.
    Whenever I fill the input field with a value, the value is not being transferred to the variable.
    Please help how to bind an INPUT field value to a variable to be transmitted to a planning function.
    I have made many trials but in vain.
    Please help.

    Hi.
    I will present my scenario (it works in my system). From this scenario you may "cut" implementation for your scenario.
    Lets sat I have an input fileld item and I want to read value (in my case numeric value) and pass this value to any planning sequence.
    1. Create in Bex variable (in my case it is formula variable) lets say Z_INPUT_VAR
    2. In WAD, when you executin planning sequence (lets say by pressing button execute) in command EXEC_PLANNING_SEQUENCE_SIMPLE define data binding.
    When you clicked data binding->variable input MANUALY your variable name (Z_INPUT_VAR) in popup window.
    3. In variable type select (ITEM_INPUT) type
    4. In web item select your input field item.
    This way you will pass inputed value to vaariable and planning sequence.
    Then in planning function you also may use VARV() to read value of Z_INPUT_VAR variable.
    Regards.

  • Pass bind value to a variable

    How possible is it to pass a bind value to a variable?
    <cfselect id="addo" name="addo"
    bind="cfc:asproxy.getRList()"display="ListName" value="ListID"
    BindOnLoad="true" />
    The above bind value in addo then passed to the below, making
    available to the whole page as "valueaddo"
    <cfset valueaddo =#addo#>

    Thank you Bitaites.
    I tried to add a new action in the page definitions --> bindings --> insert inside binding create new action --> and then choose the data collection --> select an Action as "ExecuteWithParams" --> in the Value field I put the value e.g. 'APPROVER'.
    Is something I did wrong? Because it seems not work... =(
    Can you explain a little bit about how to do it?
    Thanks a lot!!

  • Retrieving hidden variable value

    Hi,
    Iam developing a web application in servlets ,which contains a textarea in the form.
    When form is submitted the textarea value gets inserted to database.
    In the form there is a provision to view and edit the already entered text and then save.
    But the problem is iam not able to retrieve the value of textarea completly(During Edit save option)
    Only the first word in textarea is obtained.
    for eg :
    textarea name=text
    value ="this is a hidden variable"
    when i retrieve text in next form  using getParameter iam able to get only "this"
    ie first word in the line.
    Pls help
    Thanks,
    Arvin

    Thanks BalusC,
    BalusC wrote:
    When a value contains spaces, then you need to quote the value in the 'value' attribute. Exactly as you did in your code example (which you apparently didn't do in your real code). But you should rather put the textarea value in the element body than in the element's 'value' attribute, otherwise any newlines or HTML tags in the value will break down the complete HTML DOM tree.I added a single quote in the value for text field and for the textarea i put the value before close of textarea(<textarea>value</textarea>)
    Happy New Year!!!
    Regards,
    Aravind

  • How to Print the Value of a variable inside a PL/SQL package

    Hi Friends,
    Here is my Scenario
    I have a PL/SQL Package. Let us call it Baseline Package.
    This Package includes a dynamically built merge Statement.
    Execute Immediate v_merge_query.
    I have a procedure which replaces which few Keywords from the Package Text and Creates a new one depending on Inputs I provide. (This is something like a Code generator)
    Now while Creating the new package, I need to print the Value of v_merge_query.... I Need s Static Query to be Printed inside the new package and not a dynamic query.
    My Question is "Is there a way to print the value of the variable inside a different PL/SQL package?
    Thanks in Advance,
    Mohit

    Print where?
    That PL/SQL code is server-side code. It runs in an Oracle server process.
    That server process does not have a keyboard. Or a screen/monitor. Or display canvas. Or an attached printer.
    That server process is incapable of "printing" as that is not its job or responsibility and not part of its environment.
    What is can do is record data for the client to look at afterwards. This can be done using static PL/SQL session variables. Or a SQL table.
    The former is done by DBMS_OUTPUT - a very primitive interface for writing text into a static PL/SQL string array. That btw resides in expensive private process server memory. The client can query the array after a database call and render the contents.
    PS. Also keep in mind that bind variables are critical for performance and server robustness - especially when (ab)using dynamic SQL.

  • Session value

    hi experts,
    am using jdev 11.1.1.5.0 - adfbc- oracle db10g.
    here i what i want.
    following season class >> scope is session scope..
      <af:inputText label="anni" id="pann"
                                  value="#{season.p_ann}"
                                  contentStyle="text-transform:uppercase;"
                                  required="false"
                                  shortDesc="anni"
                                  />
    public class season{
        String p_ann;
        public void setP_ann(String p_ann) {
            this.p_ann=p_ann;
        public String getP_ann() {
            return p_ann;
    }i want to get this value of getP_ann() in seasonEO > ann attribute section >> edit attribute wizard >> default value.
    in that place i want. the session value.
    how can get this.?

    hi all,
    thanks for all valuable suggestion, and one small sweet thanks to all spending time here for my thread.
    here i watched out all of the posts,
    helpfull resource for me. to achieve my task.
    Thread: Groovy expression to access the session scope variable in ADF 11g
    Groovy expression to access the session scope variable in ADF 11g
    Thread: set value in global variable. //important
    Re: set value in global variable.
    Thread: Use sessionScope as Binding Variable value //important
    Use sessionScope as Binding Variable value

  • Spreadsheet from Iframe in APEX 4.1 not using session values

    We recently upgrade to Apex 4.1 and now the spreadsheet option within an iframe is not using the session values to limit the records downloaded into the spreadsheet. This only happens with Internet Explorer running running under windows 7. I don't have control to change anything on the webserrver where the Apex Iframe is running. Is there any option within APEX that can be set so that the spreadsheet will only contain what is displayed on the form versus all the records. The spreadsheet download ignores any criteria that was applied the the report on the same page.
    Thanks,
    Nancy

    Hi Dan,
    thank you for your answer. I have the solution now from Kleber_M, this works.
    Dan McGhan wrote:
    1. Use bind variables in my query. It would look something like:
    SELECT *
    FROM region
    WHERE region LIKE '%'|| :P3_REGION ||'%'
    AND country LIKE '%'|| :P3_COUNTRY ||'%'
    AND city LIKE '%'|| :P3_CITY ||'%'
    This was only a mistake when writing the post, i forgot the colon. I use bind variables of course.
    2. Make sure you have a comma separated list of item names that the report depends on beneath the SQL Query where it says Page Items to Submit. This will make sure that the value of those items on the page are bound into session state prior to the query executing.I tried this, too, but without success...
    3. Use Dynamic Actions to perform the refresh action when any of the three items changes. This would be both more performant and a better experience for the end user than a full page refresh.How can i do this. This sounds good, because when refreshing the page often some items oder actions are done that i don´t want to.
    Regards,
    Matze

  • How To retain Session Value in OBIEE

    I have a requirement to pass session variable from one page to next page in the dashboard.
    Requirement :
    In Presentation Part:
    Prompt : Column1: Year
    Column2: Quarter
    I have to pass the Value selected in the dashboard prompt to the repository. To achieve this, I have stored the Year and Quarter Column value in 2 Request variables from the prompt.
    Request Variable1 : VarYear stores Year Value selected
    Request Variable2 : VarQuarter stores Quarter Value selected
    In Repository Part:
    1. I have created 02 session variables in repository with the same name as : VarYear and VarQuarter
    2. Under the Intitialization Block of Both Variables I have written a dummy Query as
    'SELECT PER_NAME_ENT_YEAR FROM W_DAY_D WHERE PER_NAME_ENT_QTR IS NOT
    NULL'
    3. Checked the Box to 'Enable any user to set the value' for both the session variables.
    4. Used the session variable to pass as a filter under the content tab of the LTS of Revenue Measure as follows:
    '"Oracle Data Warehouse".Catalog.dbo.Dim_W_DAY_D.PER_NAME_ENT_YEAR = VALUEOF(NQ_SESSION."VarYear") AND "Oracle Data Warehouse".Catalog.dbo.Dim_W_DAY_D.PER_NAME_ENT_QTR = VALUEOF(NQ_SESSION."VarQuarter")'
    Resolution : The session variables from the prompt is passing properly to the RPD and returning the result as expected for the current page(Both Prompt and the Report are in same page where I used the measure Revenue which is getting filtered in the LTS on the basis of Quarter & Year under Content Tab).
    Reuirement2 With Issue :
    I have to navigate from one page to another on click of Revenue measure value. The target page also contain the same Revenue measure as in First page. But On navigating from one page to another page the session value is getting lost and passing the by default value coming from the Session Initialization block insted of the value selected in the prompt.
    As per my understanding the session value should not be replaced untill a user log out from the application. But in my case for First page where I have both Promt and the Revenue measure the Prompt value is passing properly but When I am moving to second page where I have only the Revenue measure the session value which is already set early is replaced by Session IB query result.
    Please suggest me if there is any resolution for my issue.
    Thanks a Lot in advance.
    :)

    I've had this issue myself and here is what i found. The only way I could get it to work was to have the Prompts that populate the Session Variables on the pages. In other words if I had the prompt on one page and then used guided navigation to go to another dashboard page I needed to have the same prompts located on that page for the session values to get passed into. Since in my case I didn't want the prompts to display or the User to know I had to add Dashboard prompts in order to captures the passed Session Variable values, I placed the dashboard prompts for my Session Variables in a separate section and then hid that section from the User. I hid the section by selecting Properties - Custom CSS Style Options (HTML Only) and then clicked on the check box for Use Custom CSS Style. In the text box enter display:none which will cause the section to be hidden from the User. The prompts will then exist on the dashboard page to receive the session values and the User will never know it is there.
    Hopefully this helps.
    Eric
    http://www.BIConsultingGroup.com

  • Can we pass the session values to with  ExecuteParms

    hi jdev experts,
    Using jdev 11.1.1.5.0-adfbc
    normally what we do in execute with params. manullay write query something
    like ah:
    select * from employees where empolyeeid= :eid
    here
    eid is bindvariable.
    drag and drop in the type of  execute with params into jspx page it will works fine.
    but my requirement same only one thing is added.
    i will explain in details from start to end.
    i had employee login page.
    Username:100       // this username holds in session
    password:100
    login button
    enters into index page welcome "100"
    when hits search page search page opens
    search page means i write vo as :
    empsearchvo
    select * from employees where empolyeeid= :eid and salary = :sid
    bindvariable
    eid: (default value) adf.context.current.sessionScope.get('eid') in expersion
    sid:
    this vo exposed as execute with params with af:table
    my search page:
    eid: 100   -output text         // by default no need enter the session value showing here.
    sid :  10000  -inputtext        //user has to enter this details
    search (excutewithprams)
    af:table details
    employeeid  | salry | address  | and so on details.is this possible.?
    why am posting the thread means session value is not coming ui. so i cant get my result in af:table.
    can anyone help me? out.

    You should assign the session variable to the parameter at the binding layer of your page.
    Go to the binding tab of your JSF page, find the execute with params - look for the paramter and set the NDValue to point to your session value.
    Similar to this:
    https://blogs.oracle.com/shay/entry/passing_parameters_to_adf_appl

  • [SOLVED]How can I setWhereClause using a session value ?

    I have a session value that I want to use to pass as the bind variable to my Where clause on a View object.
    I have dragged the view from the data control pallete onto my page as an ADF form.
    I need to be able to set the Where clause of this view programmatically but I don't know where I should do this. Basically on entering this page the where clause should get set programmatically to the session value.
    I thought about creating a static block in my page's backing bean and doing it there but how would I access the view object from there ?
    Or should I create a Service method that sets the where clause and does an executeQuery and expose that to my page and execute it from my page's backing bean ?
    cheers

    Hi Dom,
    If you are using Oracle's binding layer - you could add a binding for "ExecuteWithParams" to the pagedef (right-click the bindings folder, add action binding, pick your View Object, choose execute with parameters as action); use an EL expression based upon sessionScope as the value for the bind variable.Then, add an invokeAction to the pageDef (right-click executables folder, choose invokeAction), specifying your executeWithParams binding as the binds property.
    Hope this gets you started.
    John

  • Are these hidden variables?

    http://www1.macys.com/catalog/index.ognc?CategoryID=24143&PageID=24143*1*24*-1*-1&kw=Coats %20%26%20Jackets&LinkType=EverGreen
    these ?
    categoryid=2414&pageid=24143*1*24*-1*-1
    Are these hidden variables ?
    what are they?
    what is the main advantage?
    and how is this set in an application?
    in fusebox?
    thanks

    There are several ways of passing variables from one page to
    the next. These generally are known as scoped variables. Scopes
    that address this issue are FORM, URL, SESSION, CLIENT and
    APPLICATION.
    You have supplied a URL that contains URL scope variables.
    These can be found after the "?" in the URL, and have the format
    variableName=variableValue. So you have these variables:
    CategoryId, PageID, kw and LinkType. The page that is called often
    takes these variables and their values and performs a database
    query. In your specific case, the database is being queried for
    Jackets.
    FORM variables (<INPUT> tag) produce form fields that
    are one of two types: TYPE="text" and TYPE="hidden". The are coded
    on the page where your form is laid out. TYPE="text" displays a
    text box into which the user can enter data. TYPE="hidden" does not
    display a text box. Both of these pass the name and value of the
    form field.
    A discussion about ColdFusion variables and the advantages of
    each of these variable scopes can be found at
    http://livedocs.adobe.com/coldfusion/8/htmldocs/help.html?content=Variables_01.html#114417 6

  • How to check empty string and null? Assign same value to multiple variables

    Hi,
    1.
    How do I check for empty string and null?
    in_value IN VARCHAR2
    2. Also how do I assign same value to multiple variables?
    var_one NUMBER := 0;
    var_two NUMBER := 0;
    var_one := var_two := 0; --- Gives an error
    Thanks

    MichaelS wrote:
    Not always: Beware of CHAR's:
    Bug 727361: ZERO-LENGTH STRING DOES NOT RETURN NULL WHEN USED WITH CHAR DATA TYPE IN PL/SQL:
    SQL> declare
      2    l_str1   char (10) := '';
      3    l_str2   char (10) := null;
      4  begin
      5  
      6    if l_str1 is null
      7    then
      8      dbms_output.put_line ('oh STR1 is null');
      9    elsif l_str1 is not null
    10    then
    11      dbms_output.put_line ('oh STR1 is NOT null');
    12    end if;
    13  
    14    if l_str2 is null
    15    then
    16      dbms_output.put_line ('oh STR2 is null');
    17    elsif l_str2 is not null
    18    then
    19      dbms_output.put_line ('oh STR2 is NOT null');
    20    end if;
    21  end;
    22  /
    oh STR1 is NOT null
    oh STR2 is null
    PL/SQL procedure successfully completed.
    SQL> alter session set events '10932 trace name context forever, level 16384';
    Session altered.
    SQL> declare
      2    l_str1   char (10) := '';
      3    l_str2   char (10) := null;
      4  begin
      5  
      6    if l_str1 is null
      7    then
      8      dbms_output.put_line ('oh STR1 is null');
      9    elsif l_str1 is not null
    10    then
    11      dbms_output.put_line ('oh STR1 is NOT null');
    12    end if;
    13  
    14    if l_str2 is null
    15    then
    16      dbms_output.put_line ('oh STR2 is null');
    17    elsif l_str2 is not null
    18    then
    19      dbms_output.put_line ('oh STR2 is NOT null');
    20    end if;
    21  end;
    22  /
    oh STR1 is null
    oh STR2 is null
    PL/SQL procedure successfully completed.
    SQL> SY.

  • Change the value of a variable used in a View query

    I am using JDeveloper 11g to develop a simple portlet application which displays data loaded from database. I am displaying the data by dragging the ViewObject from the AppModuleDataControl to the View.jspx page and selecting the option ADF Read-only Table. My ViewObject has a single variable :empId. Now is it possible to change the value of this variable with a value that comes from the request object. On the internet I found the following code:
            FacesContext facesContext = FacesContext.getCurrentInstance();
            Application app = facesContext.getApplication();
            ExpressionFactory elFactory = app.getExpressionFactory();
            ELContext elContext = facesContext.getELContext();
            ValueExpression valueExp =
            elFactory.createValueExpression(elContext, "#{data.AppModuleDataControl.dataProvider}",
            Object.class);
            ApplicationModule am = (ApplicationModule)valueExp.getValue(elContext);
            ViewObject emplVO;
            emplVO = am.findViewObject("EmployeeView1");
            emplVO.setNamedWhereClauseParam("empId", "1");I have put this code in the public void processAction(ActionRequest request, ActionResponse response) method. However this does not work when I deploy it.
    Does anyone know if the above code is correct in this case and if there is a better way how I can set this up?

    Hi there:
    Did you add a break point and debug the code to see what is the value for the :empid parameters passed in to your view object?
    If you are sure you have passed in the correct value for ":empid" parameter, then do the following:
    String amDef = "yourAmDef";
    String config = "yourConfig";
    ApplicationModule am =
    Configuration.createRootApplicationModule(amDef,config);
    ViewObject emplVO;
    emplVO = am.findViewObject("EmployeeView1");
    emplVO.setNamedWhereClauseParam("empId", "1");
    empVO.executeQuery();
    which will execute your view object with the new bind variable value and refresh the view.
    Please mark my answer as 'Correct' if it solves your problem, or 'Helpful' if it does.
    Thanks,
    Alex
    Edited by: Alexbie on 27-Aug-2010 8:52 AM

Maybe you are looking for

  • A/R / A/P Aging question

    Our customer frequently needs to run aging reports as of a date in the past (i.e. they are running 11/30/13 right now).  In order to get the report to tie to the trial balance, we need to select criteria to include customers/vendors with a -0- balanc

  • MY "No Audio device detected" Solut

    Before I begin, I would like to say if this doesn't help you out I am sorry. My goal is for this method to at least help out one person, if so I would feel content in passing on what had worked for me to this community. I would like to also mention m

  • Multiple Instances created for a web service in OWSM

    Hi, I have created a gateway and added some services to the gateway. When i am invoking the webservice through the gateway, multiple instances of the service are created in bpel console. I have done everything as per the OWSM guide. Urgent Issue. Tha

  • Detail Info Pop Up

    Hi I saw an article a week or two ago about a cool example of having a hover over icon which when clicked showed some detail info in another cell somewhere on the page. I read it and though "Hmm, thats nice" and forgot about it but now I have the nee

  • Javascript Autocomplete by Tom Petrus and VC

    Hi I am using the following on my interactive report to provide a google search like autocomplete as the user enters a name, surname, date etc This works find apart from when searching for a surname such as 'Rees' it does not bring this back but will