ADF Lov Value to Scope Variables

Hi,
How can i assign sessionScope variable to a bind variable in my VO ?
I have a project number field and it has an LOV attached. When i select the project from the Input List, Project Id shoud go into #{sessionScope.projectId} variable.
Please help.
Thanks,
Lakshmi.
Edited by: Lakshmi on Aug 22, 2011 5:44 PM

Hi,
Basically you will bind in your action operation in page definition the session property like this:
<action IterBinding="MyViewGIterator" id="ExecuteWithParams"
InstanceName="AppModuleDataControl.MyViewG"
DataControl="AppModuleDataControl" RequiresUpdateModel="true"
Action="95">
<NamedData NDName="IdParm" NDValue="${sessionScope.projectId}"
NDType="java.lang.String"/>
</action>Follow this thead:
http://andrejusb.blogspot.com/2007/05/executewithparams-in-your-oracle-adf.html

Similar Messages

  • Unable to set the selected value for a ADF LOV

    Hi,
    I am developing an application using jdeveloper 10.1.3 and Struts.
    I have created a ADF LOV on my JSP Page as given below:
    <html:select property="lob" onchange="javascript:selectLOB(this.form)">
    <html:optionsCollection label="prompt" value="index" property="lob.displayData"/>
    </html:select>
    When i submit the form, i am able to get the value of the selected Value in the List.
    JUCtrlListBinding listBinding = (JUCtrlListBinding) formBean.get("Lob");
    Row r = (Row) listBinding.getSelectedValue();
    String SoLob = (String) r.getAttribute("LobLob");
    But i am unable to set the selected value back in the list when i return to the form again.
    I tried the following:
    int x = listBinding.getSelectedIndex();
    listBinding.setSelectedIndex(x);
    It would be really helpful if some one could let me know what needs to be done.
    Thanks,
    Subashini

    Gyan,
    I tried with the code you suggest , its trying to set the value of a field, but my requirement is to change the property for
    "Rendered" on the field so that based on search parameters we can hide result table column.
    After searching online, I modified the controller code as follows
    1.Created a new transient attribute (Testrender) with type "Boolean" and always updateable.
    2.changed the "Rendered" property value on the field I want to hide as ${oa.PoSearchVO1.Testrender}.
    3. Modified the controller code as follows :
            OAApplicationModule am = pageContext.getApplicationModule(webBean);
            OAViewObject testvo = (OAViewObject)am.findViewObject("PoSearchVO1");
            OADBTransaction txn = am.getOADBTransaction();
            if (testvo != null)
              OARow row = (OARow)testvo.first();
                if (a.equalsIgnoreCase("Approved"))
                     row.setAttribute("Testrender", Boolean.FALSE);
                else
                     row.setAttribute("Testrender", Boolean.TRUE);
            } But now when i run the page and populate the search field and click "Go" its hiding the field but throwing the following error and the search results are also bad.
    Its using only the value of one search parameter but not the second one .
    The search cannot be executed because the table has pending changes that would be lost. I think the vo is getting dirty when I update the transient attribute value. So I used txn.rollback ,then search is working fine but its not hiding the field.
    So can you please let me know how to proceed from here ?

  • How can Filter ADF BC LOV values in ADF Faces UI?

    How can Filter ADF BC LOV values in ADF Faces UI?
    Hi i am bit struggle with filtering LOV values in ADF Faces UI.
    I have table In UI ,that is from ADF BC .Now i am Filtering that table data using Select one choice in same page.That SOC is named Type App:  ,So according to selection of Type in SOC table have to display.This portion is done.But my requirement is ,when i got perticular result table ,i want to add one more row related to that type only,so for that i had take popup and drag datacontrol as a form.In that form first column is Select one choice ,select Items will come from BC table.So here i want to filter those LOV values according selection in Type SOC.Suppose Type SOC contain Type1,Type2 values,then when i am selectin Type1,Type1 related date willl diplay on table,now click on ADD button popup will open and in that Type SOC will Dispaly only Type1 related values not Type 2 type values.Type1,Type2 values come from same Table.
    Here i am asking every one,please do help.

    fyi
    The HR schema I used to build the example application had some modifications in the context of https://tuhra2.samplecode.oracle.com/ .
    So after running "demo/schema/mksample" as documented in "Resetting Sample Schemas" ...
    at http://download.oracle.com/docs/cd/E11882_01/server.112/e10831/installation.htm#I6236
    ... I got "java.sql.SQLSyntaxErrorException: ORA-00904: "EMPLOYEES"."MODIFIED_DATE": invalid identifier ", using the example application in BindVarDefaultsInUIApp-v0.02.zip .
    So, I have updated the example application to match the reset HR schema:
    - see http://www.consideringred.com/files/oracle/2010/BindVarDefaultsInUIApp-v0.03.zip
    - see screencast at http://screencast.com/t/gd6zKn63j
    Because Re: af:table filter date format : task-flow navigation issue to get feedback, I created service request 3-2193340441 using My Oracle Support about (q1) and (q2).
    regards
    Jan

  • Print memory scope variables value

    All,
    How do i print all the memory scope variable and their values that are set via the MB or the taskflow or the UI page using setAction/PropertyListener ?
    I mean where should i write the code ?
    thnks
    Jdev11.1.1.5
    Edited by: in the line of fire on Oct 13, 2011 9:50 AM

    @Frank
    if you can detail this +"If the managed bean uses a HashMap to store values then the bean itself can be used to expose an interface for all of what you want it to do. So its an architecture decision to make (which you should do when designing the application)"+
    As of now what i am doing is
        public void printMemoryVariables(){
            logger.info("inside printMemoryVariables");
            AdfFacesContext adfFacesCtx = AdfFacesContext.getCurrentInstance();
            // get the PageFlowScope Params
            Map<String, Object> scopePageFlowScopeVar= adfFacesCtx.getPageFlowScope();
            // get the requestScope Params
            Map<String, Object> scopeRequestScopeVar= adfFacesCtx.getViewScope();
            Collection scopePageFlowScopeVarValues = scopePageFlowScopeVar.values();
            Collection scopePageFlowScopeVarKeys = scopePageFlowScopeVar.keySet();
            //obtain an Iterator for Collection
            Iterator itrValues = scopePageFlowScopeVarValues.iterator();
            Iterator itrKeys = scopePageFlowScopeVarKeys.iterator();
            //iterate through HashMap values iterator
            while(itrValues.hasNext() && itrKeys.hasNext()){
                logger.info("Key : " + itrKeys.next() +  "Values: " + itrValues.next());
        }And calling this in the initializer of the taskflow. But is it possible to get the values during the task flow execution

  • Suggestion: JavaScript scope variables and event listeners

    Invoking Java from JavaScript in ADF Mobile is surprisingly efficient although it is still relatively expensive compared to plain HTML5/JavaScript/CSS stuff in the native UIWebView. But whenever you want to do something "dynamic" you have to revert to invoking Java, even for simple use cases. As far as I can see it as soon as you use listeners on components, managed beans or data controls you're in the Java world.
    Why not add similar concepts that are pure JavaScript implementations for performance. As an example I want to have a SelectOneButton component and depending on its state I want to enable/disable an InputText component. As far as I can see it I would need Java to make this happen. First, I would need a Java managed bean to keep the enabled/disabled state. Then I would set the value property of the SelectOneButton with an EL expression to this managed bean property, or for other scenarios use a Java based ActionListener to change the state. Then the InputText component could use an EL expression in its Disabled property.
    For this simple use case this would still perform fast, but real applications grow more complex.
    Why not have the option of creating JavaScript based managed "beans"? The could live on javaScriptPageFlowScope or javaScriptViewScope. Then the AMX components could reference this from EL and it would be even better if we can create pure javascript ActionListeners (or other listeners). This would make it similar to the choice with ADF Faces application between doing a server roundtrip with partial-page-rendering and using pure clientListeners and clientAttributes for optimal performance.
    For situations where we do need to power of Java, it would be great if we can access these javascript scope variables from Java.

    This is a good suggestion, Wilfred. We haven't gotten to this level of optimization in the framework yet. At some point it's likely we'll have an option for the developer to specify the layer to handle the method.
    Thanks

  • Selected Lov Value as Parameter to Concurrent Program in oaf

    Hi,
    iam new to OAF ,Can any one please help me how to pass selected lov value as a parameter to the Concurrent program in oaf.
    i created one lov in oaf page after selecting value in lov i want that value to be passed as parameter to concurrent program.
    Please help me how to implemet code so that Lov will pass as parameter to the concurent program in Controller.

    Check these links. You need to get the value from the LOV to a variable, add it to the vector and pass to the conc program. Below link provides the details on concurrent program submission.
    http://prasanna-adf.blogspot.com/2008/11/call-concurrent-program-from-oa.html
    For fetching LOV values, check the Dev Guide
    Thanks
    Shree

  • 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

  • Can you change the value of a variable that is reset by a parameter?

    Sorry if this is simple but I just crashed a package and can't do an autopsy. I suspect I sent it into an infinite loop. I know you can't change the value of any passed in parameters. What I tried to do was have the parameter set the value of a variable
    and then I tried to change the value of the variable. Is that even allowed?
    I was trying to do this:
    MyCheckVariable = MyParameter (which equals true)
    (some cool stuff happens)
    MyCheckVariable = False
    I hit F5 and my package turned into the Energizer Bunny. Is the way I try to reset the variable the culprit?

    This is a prototype so I just created a project parameter and set it to true. In the real world the parameter will be used to control an optional part of the process because on a re-run after error that part doesn't have to be ran again.
    So when I say MyCheckVariable = MyParameter (which equals true) in reality what I actually have is in the variables window I'm using an expression and it looks like this in the variables window
    name = runDownload
    Scope = Package
    Data Type = Boolean
    Value = True (but greyed out)
    Expression = @[$Project::param_runDownload]

  • How to change the dynamically  LOV value to old value if it errors out

    We have an use case like when a value is selected from LOV, some validations(EO validations) occur on that and if the validation fails we are throwing exception.But the new value is appearing in LOV text box. We need to display the old value in the LOV if the validation fails. Can you please let me know if there is any way to do that?

    After thinking about this, I wondered if I had mis-read the use-case....so I added #2
    Please state your Jdeveloper version, and elaborate on your use-case:
    *1. Are you saying that the LOV contains incorrect values that the user has chosen?*
    If so you should restrict the LOV values to what is acceptable for the row (based on what other values are in the row)
    By restricting the values in the LOV the wrong value can no longer be selected, you would not need to build in functionality to revert back to previous values.
    I woud start by creating a view criteria for the view object the LOV is based on. The form values would send the binding variables to the view criteria, and that would then execute the query (invoking the view criteriea). The LOV would then contain some information on only acceptable values.
    You may be able to adapt some of the ideas presented in this video (on cascading list boxes) to make your LOV work properly. http://youtu.be/WTevRnXq04o
    This video shows some ways to manipulate view criteria: http://youtu.be/dX93fiBCxEg
    *2. Are you saying that the user has selected other fields in the form -- validation on those fields fails, and you want to revert back, but the LOV still contains the values selected?*
    In that case, you need to clear the values in the form and re-execute the view object -- and refreshing to the correct value.
    Stuart
    Edited by: Stuart Fleming on Sep 12, 2012 12:04 PM
    Edited by: Stuart Fleming on Sep 12, 2012 6:52 PM
    Edited by: Stuart Fleming on Sep 12, 2012 6:52 PM

  • How to change value of user variable with change in Page View Dropdown

    Hi All,
    I have a classic planning application, on one of my dataform i put members of Dim_A in Page view and on row view i filter members of Dim_B on the basis of User variable i.e row contains the @Childern(&My_User_Variable). I have following members in both Dimensions:
    Dim_A
    ___A_Mem1
    ___A_Mem2
    ___A_Mem3
    Dim_B
    ___B_Mem1
    ______B_Mem1_1
    ______B_Mem1_2
    ______B_Mem1_3
    ___B_Mem2
    ______B_Mem2_1
    ______B_Mem2_2
    ______B_Mem2_3
    ___B_Mem3
    ______B_Mem3_1
    ______B_Mem3_2
    ______B_Mem3_3
    Now is there any way through which the value of My_User_Variable changes automatically when user select a member of Dim_A in Page View drop down, so that when user press go button then my rows would also be re filtered according to new value of User Variable.
    Right now user first make change in User Variable then select its matching member from Dim_A and then rows are filtered, so i want my user to only make selection in Drop down and press go rest all would be done automatically.

    Hi,
    There was a little controversial post on a similar question:
    Re: Hyperion Planning Data Form
    I love controversy!
    Cheers,
    Alp

  • How long is the life time of process scope variable ?

    Hi All,
    How long is the life time of process scope variable befoer it expires ?
    Is it the same with the life time of session scope ?
    How can we set the value in OAS when deployment ?
    Thank you,
    xtanto

    Hi,
    http://www.oracle.com/technology/products/jdev/htdocs/partners/addins/exchange/jsf/doc/devguide/communicatingBetweenPages.html
    " Finally, processScope never empties itself; the only way to clear processScope is to manually force it to clear:
    AdfFacesContext afContext = AdfFacesContext.getCurrentInstance();
    afContext.getProcessScope().clear();
    Otherwise the variable lives for the duration of the window process. The referenced document above also shows how to set a variable to process scope
    Frank

  • How to pass pageFlowScope variable value as bind variable for VO

    Hi,
    I have one fixed lov (not based on datasource), if i select any value in that lov i want to pass this value to a pageFlowScope variable.
    After this i want to use this value as bind variable for VO. whenever the vo executes thereafter this bind variable should filter that vo results.
    My jdev version: 11.1.0.0
    Thanks in advance,
    SAN

    san-717,
    can you elaborate on the use case instead of the implementation you don't get done? I understand you have data displayed in a tree: so lets assume the tree structure is Locations, Departments and Employees according to the Oracle HR sample schema.
    1. What is the LOV supposed to do ?
    2. Where is the LOV located ?
    3. What values does the LOV show ?
    4. Is the LOV a select choice component or a real LOV (with search dialog)
    5. Where is the bind variable used ?
    To me it sounds like you want to filter the tree data based on the select choice value. However, you wont do this by passing the bind parameter to all View Objects involved as they may not have the attribute in their query. So your use case is important to answer the question
    Frank

  • Session scope variables and weird behaviour of AdfContext()

    Hello,
    what is the best method and correct API to create a session scope variable?
    I am currently using ADFContext().getCurrent().getSessionScope().get()/put(), but it looks like it has some problems: for some unkown reasons I loose the variable, that is get() returns null when called from a method of a (overridden)ViewRowImpl. Why does this happen?
    Thanks you in advance

    There are a couple of ways you can set values on a sessions scope but I would have to question if you really need a scope as high as session to accomplish what you want to do. At any rate, you should be able to store the value using the method you described but you could also try setting it using EL by using the setExpressionValue and resolveExpression methods in JSFUtils.java (you can find this in the latest fusion demo application). JSFUtils also has a getFromSession and storeOnSession that you could try.
    With all that said I don't think it is good practice to access scope variables from your model layer. You should write your method in the ViewRowImpl class to accept the value as a method parameter and then pass the value in through the binding layer or when invoking the method from your bean class.

  • Initialization of global/scope variables ONLY through ASSIGN?

    Is it only possible to initialize global resp. scope variables through an explicit ASSIGN?
    Or can I place e.g. a value="...." attribute inside the BPEL source code at the variable declaration
    to initialize it directly?
    Or even better: can I init the variable through JDeveloper GUI?
    Peter

    I looked this up on Oracle Support and there was one thread that it said that it could be resolved with a 11.1.1.6. to 11.1.1.6.2 patch update.
    We have one test environment on 11.1.1.6.6 to which we have uploaded the RPD to receive the same error, although it now additionally indicated a "Blacklisted Connection Pool". Here are the error details:\
    [2013-01-22T00:30:32.000-08:00] [OracleBIServerComponent] [ERROR:1] [] [] [ecid: 004osJjn__ADCgH_qt0FyY0006Py000000] [tid: e9c8a950] [nQSError: 17014] Could not connect to Oracle database. [[
    [nQSError: 17001] Oracle Error code: 12545, message: ORA-12545: Connect failed because target host or object does not exist
    at OCI call OCIServerAttach.
    [nQSError: 43059] Init block ‘XYZ’: Dynamic refresh of repository scope variables has failed.
    [2013-01-22T00:30:32.000-08:00] [OracleBIServerComponent] [ERROR:1] [] [] [ecid: 004osJjn__ADCgH_qt0FyY0006Py000000] [tid: e9c8a950] [43143] Blacklisted connection pool: 'ABC'
    This is the way I have defined the DSN for the OCI 10g/ 11g within the RPD connection pool:
    (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=10.53.36.93)(PORT=1541))(ADDRESS=(PROTOCOL=TCP)(HOST=10.53.36.94)(PORT=1541))(ADDRESS=(PROTOCOL=TCP)(HOST=10.53.36.95)(PORT=1541))(ADDRESS=(PROTOCOL=TCP)(HOST=10.53.36.96)(PORT=1541))(LOAD_BALANCE=yes)(CONNECT_DATA=(SERVER=DEDICATED)(SERVICE_NAME=a.b.c)))
    My next test would be to individually test each host and see which one causes it to error out.
    Any insights of what I could look to additionally do?
    PS: The DBA is yet to get back with the exact version of the Oracle 11g DB but it is greater than 11.1.0.7 since that was the version they were running 6 months back and might have upgraded.

  • Pass lov value from one page to another page

    hi
    can any one please help me how to pass selected lov value in one page to another page
    iam able to get the lov value in controller but how to pass that value as parameter to the VO in another page.

    Hi,
    Get the value in controller, create a hash map and put that value in hashmap.
    Then pass that hashmap in pageContext.forwardImmediately method.
    If you want to use that value in multiple pages, then put that in session variable.
    --Sushant                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

Maybe you are looking for

  • Problem with my printer "sorry not recognised"

    Dispite posting the problem i had after MUCH hard work and searching for how to do this, i never got a reply (i thought this was a support forum), i hate to say it but support from HP has seriously gone down hill, i have a problem with my printer whi

  • ABAP routine for loading previous months data in infopackage

    Hi, I have an infopackage included in a process chain. The issue is that I need to load previous month's data through the infopackage and I have a data field which is of date type. I could not find an appropriate OLAP variable so I chose the ABAP cod

  • Audio playback issues; Macbook Pro OS X 10.6.8 Intel Core Duo 2007/2008 model

    Hiya,      I cannot fully remember when this issue started but recently it has made listening to music, watching videos impossible. Whenever i play audio via iTunes, QuickTime, YouTube, Streaming via Chrome/Safari after about 5-10 seconds the sound w

  • SQL Server NTFS allocation unit size for SSD disk

    Hi, I have read that the recommended NTFS allocation unit size for SQL Server generally is 64 kb since data pages are 8 kb and SQL Server usually reads pages in extents which are 8 pages = 64 kb. Wanted to check if this is true also for SSD disks or

  • Lem upgrading from Photoshop CS3 extended version, to CS4 standard

    I own of Adobe Photoshop CS3 extended, and I'm trying to upgrade to CS4 and CS5 of which are standard additions. My serial number for my CS3 extended is not working when I input it for the installation on CS4. What do I need to do.