ADF 11 g: unable to get the value managed bean

Hello

I am facing a strange problem in ADF 11 g.
The backup of my main page bean is known as MainC.java
From this file, I am setting some parameters in a file called PIn.java (PInis a simple bean with getter and setter methods)
Code parameter set is running successfully to support bean (MainC.java).
But when am retrieving data I'm not getting any value.

I tried the same thing by using a java class instead of backing bean, but there, too, the problem is same value sets but not able to recover.

My faces - config.xml is to be entered for the managed - bean PIn.java and I have tried with all eligible scopes for the bean.

Please give pointers to resolve this problem.

Thanks in advance

SRY... my mistake :-)

FacesContext context = FacesContext.getCurrentInstance();
HttpSession session = (HttpSession)context.getExternalContext().getSession(true);
sessionInstance = (PiV)session.getAttribute("PiV");
if(sessionInstance == null) {
    sessionInstance = new PiV();
    session.setAttribute("PiV", sessionInstance);
}

The clause if the new statement was erroneous. It has been created a new body, whose only knews by your method :-) Now your variable overall "sessionInstance" has been completed.

Majo

Tags: Java

Similar Questions

  • Unable to get the values of FixedCost

    I set up recurring fixed costs in Chargeback (with monthly cost values). Now I'm doing it via java api but the returned value is always null.

    I tried to check through the REST API call, but I see the same question it too:

    <?

    xml version= « 1.0 » encodage= « UTF-8 » ? >

    < "" Response xmlns= "http://www.vmware.com/vcenter/chargeback/2.0""" xmlns:xsi= 'http://www.w3.org/2001/XMLSchema-instance"" " status= 'success' isValidLicense="true">

    <FixedCosts>

    <FixedCost id= « 3221 » >

    <Name>L1 Service level< /name>

    <Description />

    <IsDeleted>false< /IsDeleted>

    <IsProrated>true< /IsProrated>

    <IsPowerStateBased>false< /IsPowerStateBased>

    <Type id="0">

    <Nom>récurrents< /nom>

    </Type>

    <Currency id="104">

    <Name>USD</Name>

    </Currency>

    <Values /> <-no value here too

    < /FixedCost>

    < /FixedCosts>

    </ Réponse>

    Hello

    You must use the API of 'Get values of fixed cost' to get the values for a fixed cost for the specified time.

    Kind regards

    Agnes

  • Unable to get the values of the attributes of the Annotation VM Notes and Custom (product)

    Hi Experts,

    Need help to enter the values of the following custom attribute annotation is my script. No problem collecting other information.

    below is the codes where im having issues. There is no output for the VM Notes and the product.

    @{N = "VM Notes";} E={$_. Summary.Config.Annotation}},

    @{N = ' product'; E = {$key = $_.} AvailableField | where {$_.} Name - eq 'Product'} | Select the key - ExpandProperty

    $_. CustomValue | where {$_.} Key - eq $key} | {{Select - ExpandProperty value}}.

    Below is the script when the above code is integrated.

    $vCenterServerName = "test.com"

    SE connect-VIServer $vCenterServerName - xxx-xxxx password user

    $SMTPServer = "xxxx".

    $ToAddress = "xxxxx".

    $FromAddress = $vCenterServerName + "@xxx.com.

    $Subject = ' report VMPath for all VMs in vcenter - tpe.corp.kazootek.com.

    $date = get-Date-format-M - d - yyyy

    $reportlocation = "C:\test\vcenter-xxx-vmpath-$date.csv".

    $vmFields = ' Name ',' Parent ',' Config.Template ',' Runtime.Host ',' ResourcePool ',' Config.Hardware ',' Summary.Storage ',' Runtime.Powerstate ',' Summary.Config.Annotation '.

    # $report = C:\test\tpe_mate1.csv - UseCulture | %{

    $report = get-View - ViewType VirtualMachine-property $vmFields | %{

    $esx = get-view-id $_. Runtime.Host - name of the property, material

    $_ | Select Name,

    @{N = "VM Notes";} E={$_. Summary.Config.Annotation}},

    @{N = ' product'; E = {$key = $_.} AvailableField | where {$_.} Name - eq 'Product'} | Select the key - ExpandProperty

    $_. CustomValue | where {$_.} Key - eq $key} | {{Select - ExpandProperty value}}.

    @{N = 'Template'; E={$_. Config.Template}},

    @{N = 'Center'; E = {}

    $obj = get-view-Id $_. ResourcePool-name of the Parent property

    While ($obj - isnot [VMware.Vim.Datacenter]) {}

    $obj is get-view $obj. Parent - the Parent property name

    }

    $obj. Name

    }},

    @{N = "Cluster"; E = {}

    $obj = get-view-Id $_. ResourcePool-name of the Parent property

    While ($obj - isnot [VMware.Vim.ClusterComputeResource]) {}

    $obj is get-view $obj. Parent - the Parent property name

    }

    $obj. Name

    }},

    @{N = 'Host'; E = {$esx. Name}},

    @{N = "NumCpu"; E={$_. Config.Hardware.NumCpu}},

    @{N = "MemoryGB"; E = {[int]($_.)} Config.Hardware.MemoryMB/1KB)}}.

    @{N = "ProvisionedSpaceGB"; E = {($_.Summary.Storage.Committed+$_.Summary.Storage.Uncommitted)/1 GB)}},

    @{N = "Powerstate"; E={$_. Runtime.PowerState}},

    @{N = "Path"; E = {}

    $current = get-view-Id $_. Parent - the Parent property name

    $path = $_. Name

    {}

    $parent = $current

    if($parent.) Name - only "vm") {$path = $parent. {Name + "\" + $path}

    $current is get-view $current. Parent - the Parent property name

    } While ($current. Parent - no $null)

    [channel]: join ('-',($path.)) Split('\') [0.. ($path). Split('\'). (Count-2)]))

    }},

    @{N = "FolderId"; E={$_. Parent.ToString ()}}.

    @{N = "Manufacturer"; E = {$esx. Hardware.SystemInfo.Vendor}},

    @{N = ' model'; E = {$esx. Hardware.SystemInfo.Model}},

    @{N = "ProcessorType"; E = {$esx. Hardware.CpuPkg [0]. Description}}

    }

    # }

    $report | Export-Csv $reportlocation - NoTypeInformation - UseCulture

    Write-Host "Report exported to csv file" + $reportlocation

    Send-Mailmessage-to $FromAddress - to $ToAddress - subject $Subject - $reportlocation - SmtpServer $SMTPServer attachments

    Write-Host "report was sent by E-mail to '$ToAddress' to ' $FromAddress

    You must add the $vmFields variable AvailableField and CustomValue

    $vmFields = ' Name ',' Parent ',' Config.Template ',' Runtime.Host ',' ResourcePool ',' Config.Hardware ',' Summary.Storage ',.

    'Runtime.Powerstate ',' Summary.Config.Annotation ',' AvailableField', ' CustomValue.

  • Unable to get the values of the variables of group

    Hello try to learn writing scripts;

    Cannot read variables from the Panel; He reads only the first definition of the default variable. What I am doing wrong?

    Here I would like to read wvalue and hvalue , but in main function, it always shows the first wvalue/hvalue '... It does not update until the user changes the.

    #target photoshop
    var wvalue =1;
    var hvalue =1;
    var docRef = app.activeDocument;
        var dlg = new Window('dialog', 'Test',[100,100,380,280]);
        dlg.mspanel = dlg.add('panel', [25,15,250,150], 'Test Panel');
        dlg.mspanel.widthtext = dlg.mspanel.add('statictext', [15,17,50,37], 'Width:', {name:'widthtext'});
        dlg.mspanel.widthdivision = dlg.mspanel.add('edittext', [60,15,90,35],wvalue, {name:'widthdivision'});
        dlg.mspanel.heighttext = dlg.mspanel.add('statictext', [100,17,140,37], 'Height:', {name:'heighttext'});
        dlg.mspanel.heightdivision = dlg.mspanel.add('edittext', [150,15,180,35],hvalue, {name:'hdiv'});
        dlg.mspanel.okbtn = dlg.mspanel.add('button', [15,50,180,75], 'Ok', {name:'ok'});
        dlg.mspanel.cancelbtn= dlg.mspanel.add('button', [15,85,180,110], 'Cancel', {name:'cancel'});
        dlg.mspanel.okbtn.onClick = main;
        dlg.show();
        function main() {
        alert(wvalue);
            dlg.close();
        }
    

    OK found;

    I should have written;

    wvalue = dlg.mspanel.widthdivision.text
    
  • Unable to get the values of 'Snap' slide to always marks graduation (solved with the answer if anyone wants to know).

    Hi all

    Cursor (JavaFX 2.2)

    has a method called "snapToTicks" that I put real in my document FXML both within my IDE.  Now, the thing is when I click on the cursor, it will go to the nearest graduation; However when I drag my slider he slide normally.

    I have 0-5 major ticks, 0 minor graduation, so it should be easy to align with each of them, and if I add ticks minor it will jump to those.

    I'm assuming that's what this method is supposed to do, but is there a way so that it can align when manually drag you?

    I have also tried to block increment, but this doesn't seem to change anything? According to this, it seems that the distance of the secondary graduations?

    Thank you

    ~ KZ

    Right then I thought about it lol, so rather than remove this I thought that after she.

    Slider.valueProperty () .addListener (new ChangeListener)

    {

    public void changed (ObservableValue ov, old_val, new_val number number)

    {

    Slider.setValue (new_val.intValue ());

    }

    });

  • Unable to get the value of the variable to help assess...

    < cfcontent type = "application / vnd.ms - excel" >
    < cfset count = 0 >
    < cfloop index = 'Add' from = '1' = '1' = '1' step to >
    < cfset count = count + 1 >
    < cfset number = ' Form.inj_ #count # ' >
    < cfset #Number = num # >
    < cfset tick = "Form.tick_ #count # ' >
    < cfset sk = #tick # >
    < cfset quality = "Form.quality_ #count # ' >
    < cfset #Quality = qa # >
    < cfset description = ' Form.description_ #count # ' >
    < cfset of #description = # >
    < cfoutput >
    < table border = "1" width = "100%" >
    < b >
    < td align = "center" > #count # < table >
    < td align = "center" > #Evaluate ('sk') # < table >
    < td align = "center" > #Evaluate ('qa') # < table >
    < td align = "center" > #Evaluate ('a') # < table >
    < /tr >
    < /table >
    < / cfoutput >
    < / cfloop >

    Having very little idea of what you're trying to do, that looks like a classic case where the table notation would be used.

    
    
    
      
      
    
    #count# #Form["tick_" & count]# #Form["quality_" & count]# #Form["description_" & count]#

    That's my best guess to translate your very confusing code.

  • The search filter - how to get the value of the metadata entered by the user

    Hello

    I wrote a fixUpAndValidateQuery filter where I want to modify search QueryText.

    I tried to update some of the metadata values entered by the user and then let the fire search query.
    But I'm unable to get the values of metadata user has entered in my java code filter.
    I'm getting like below

    DocType string = binder.getLocal ("dDocType");

    It returns the value "no" even if the user gives the value of the Doctype in the search engine.

    Am I missing something here?

    Kind regards
    Rajendra

    Search filters tend to manipulate the query that ends up being called by the search service. If this isn't what you're trying to accomplish there are probably better filters for you before the actual query is run or after the query is executed.

    If you really need a connection of database at the moment and you can't find a better filter for what you're trying to do that has a database connection, you can always create one like:

    final Provider dbProvider = Providers.getProvider("SystemDatabase");
    final Workspace myWorkspace = (Workspace) dbProvider.getProvider();
    

    Warning: If configure you your own db connection for a filter where no database connection is available, you will need TO release the connection too.

    myWorkspace.releaseConnection();
    

    Published by: fscherpe on February 16, 2011 06:07

  • 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

  • [JDev12c, ADF] How to get the value of a field from the selected line in af:table and...

    Hallo,

    I want to double click on a line of an af:table to call a page that displays a form (based on a View object) with the details of the selected line.

    I need to go to the second page the value of a field on the line that is selected on the first page.

    How can I do this? In particular, how can I get the value of a field from the selected line? How can I call the second page on double-click on the af line: table?

    Thank you

    F.

    Why would user, you need to pass a value of the line to the shape?

    The framework selects the line you want to display in the form. All you have to do is to show the form with the selected line. It is the framework automatically as long as you use e vo even the same data control.

    Timo

    Post edited by: Timo Hahn
    And the handling double-clicks is described here http://www.oracle.com/technetwork/developer-tools/adf/learnmore/56-handle-doubleclick-in-table-170924.pdf

  • ([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

  • Get the value of the portfolio-parent

    Hello

    Sorry, I'm in trouble explaiing what I want to do, but I'll try my best.

    I have four 'levels' portfolio and ideally, I would like to have a user select a year in the high parent page and have it spread down to the forms under.  I went as far only to create a category for all portfolios that accesses the value of parents above him.  Once on the level of form, I am unable to get this value.  I guess that the getHomePortfolio method does not once on the level of form, but I don't know.

    Unfortunately it doesn't seem to be the documentation with examples on how to use the functions at all so I'm poking around in hopes of understanding how everything fits together.  Unfortunately, I was in it for a year without any chance to find the most of.

    Does anyone have information on how I can create a global variable that is accessible from any level?

    Thank you.

    No, just another way to get the desired response. Probably you won't need the audit NaN since your RegEx is specific enough that it will return only an index for any string of 2000-20 to 2099-20.

    I suspect that you will need a text category for each position of FY you need year and add the "FY" + starting value of the year.

    V/r,

    Gene

  • get the values of the selected items to RichSelectManyChoice

    Hi all

    I have a RichSelectManyChoice

    When the user clicks on the "submit" button I want to get the values of the selected items...


    ----------------------------------------------------------page.jspx-----------------------------------------------------------------------------

    <? XML version = "1.0" encoding = "UTF - 8"? >

    " < = xmlns:jsp jsp:root ' http://Java.Sun.com/JSP/page "version ="2.1"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 = "untitled1.jspx" id = "d1" > "

    < af:messages id = "m1" / >

    < af:form id = "f1" >

    < af:panelGridLayout id = "pgl1" >

    < af:gridRow height = "100%" id = "gr1" >

    < af:gridCell width = '100% ' halign = "stretch" valign = "stretch" id = "gc1" >

    <! - content - >

    < af:selectManyChoice value = "#{bindings." CountriesView1.inputValue}.

    label = "#{bindings." CountriesView1.label}"id ="smc1.

    valuePassThru Binding = "#{suspect." Country}"="true">

    < f: selectItems value = "#{bindings." CountriesView1.items}"id ="si1"/ >

    < f: validator binding = "#{bindings." CountriesView1.validator} "/ >"

    < / af:selectManyChoice >

    < / af:gridCell >

    < / af:gridRow >

    < / af:panelGridLayout >

    < text af:button = "Button 1" id = "b1" action = "#{suspect.valide}" / >

    < / af:form >

    < / af:document >

    < / f: view >

    < / jsp:root >

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

    --------------------------------------------------------------------suspect.java-------------------------------------------------------------------

    package test.view;

    import com.sun.org.apache.xpath.internal.operations.String;

    Import oracle.adf.view.rich.component.rich.input.RichSelectManyChoice;

    public class suspect {}

    RichSelectManyChoice campaign private;

    String string = null;

    public suspect() {}

    ????????????????????????????????????????

    }

    public void valide() {}

    }

    {} public void setCountry (RichSelectManyChoice country)

    This.Country = country;

    }

    public RichSelectManyChoice {} getCountry()

    back country;

    }

    }

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


    Anyone has an idea please?

    Hello

    You can use

    JUCtrlListBinding listBindings = (JUCtrlListBinding) getBindings () .get ("CountriesView1");

    Object [] str = listBindings.getSelectedValues ();

    for (int i = 0; i)< str.length;="" i++)="">

    System.out.println (STR [i]);

    }

    in this loop, you will get all the values of selectManyChoice, for details see Ashish Awasthi (Jdev/ADF) Blog: using the selection Multiple (component selectManyListbox & selectManyCheckbox) in ADF

    hope it helps

  • Getting the value of a Boolean value defined in the pageFlowScope...

    I have a link on one of my feeds defined task as a java.lang.Boolean with a value type of #{pageFlowScope.isAdmin}.  For the test, in my PageDefFile, I have the parameter defined as: < parameter id = "isAdmin" value = "false" / >

    In my managed bean, I'm trying to access the value of the "isAdmin" binding as follows:

    Boolean isAdmin = (Boolean) flowScope.get ("isAdmin");


    This gives me a caused by: java.lang.ClassCastException: java.lang.String cannot be cast java.lang.Boolean when I try to run the action.

    What I'm doing wrong here?  I know it's something stupid, but it's just one of those days... Thank you!

    write as

    to get the value in use of pageflowscope below

    ADFContext adfCtx = ADFContext.getCurrent();

        Map pageScope = adfCtx.getPageFlowScope();

     String appScopeValue=  (String)pageScope.get("vinay");

    Read more: http://www.techartifact.com/blogs/2012/10/setting-the-value-in-different-scope-in-adf-in-programmatic-way.html#ixzz30ISmbA9S

    to try to channel Boolean value as

    Boolean value = Boolean.parseBoolean (strBoolean);

  • How to get the values of the list?

    I have no idea for the values in the list.

    For example: I have table countries (CountryID, CountryName).

    I do a SelectOnechoi for another form with another table.

    Display values is CountryName (England, France)... now, I want to get the values of CountryID by CountryName.

    CountryID: 1

    CountryName: England

    CountryID: 2

    CountryName: France

    How can I do?

    It's called list of person in charge of value. Check http://www.oracle.com/technetwork/developer-tools/adf/learnmore/march2011-otn-harvest-351896.pdf ('building model driven dependent list with Oracle ADF BC') and

    https://blogs.Oracle.com/aramamoo/entry/how_to_create_multi_level and

    http://hasamali.blogspot.de/2011/04/ADF-BC-dependent-lov-in-Oracle-ADF.html

    Timo

  • How to get the value of the outputtext in javascript and send it to backing bean

    Hi Experts ADF,

    JDev Version 11.1.1.7.0

    I have the following: the value of the outputtext must be treated in javascript and the serverlistener method has the same value. I founded this value returns a string that wshould see the mouseover NIJ.

    Help, please. Thanks in advance.

    < af:column sortProperty = "#{bindings." OrderProposalReadClient.hints.exceptions.name}.

    filterable = "true" sortable = "true".

    headerText = "#{suiviewBundle.EXCEPTIONS} '"

    ID = "c16" >

    < af:outputText value = "#{row.exceptions}" id = "ot32" clientComponent = "true" > "

    < af:clientListener type = "mouseOver".

    method = "customJsFunction" / >

    < af:serverListener type = "mycustomserverEvent".

    Method="#{pageFlowScope.ChangeOrderProposalBean.handleServerEvent}"/ >

    < / af:outputText >

    < / af:column >

    JavaScript

    < af:resource type = "javascript" >

    var customJsFunction = function (event)

    {

    var exceptiondata = AdfPage.PAGE.findComponentByAbsoluteId ('ot32');

    AdfCustomEvent.queue ();

    Returns true;

    }

    < / af:resource >

    BackingBean

    public String handleServerEvent(EC ClientEvent)

    {

    Please let me know how to get the value that javascript code sends here.

    Let's say javascript sends the value of outputtext as "001".

    So, I have to check "001" in my list and return a value that appears on mouseover.

    }

    Kind regards
    Roy

    Hello, Roy.

    To use the value on another component of the user interface, I shows an example:

    -code of the page

    shortDesc = "shortDesc" >

    method = "customJsFunction" / >


    -the javascript code

    var customJsFunction = function (event)

    {

    var exceptiondata = event.getSource ().findComponent("ot32").getValue ();

    AdfCustomEvent.queue (event.getSource (),

    "mycustomserverEvent,"

    {param1:exceptiondata},

    (true);

    Returns true;

    }

    -OutputTextCase11.java

    public void handleServerEvent (EC ClientEvent)

    {

    String param = (String) ce.getParameters () .get ("param1");

    RichOutputText outputText = (RichOutputText) ce.getComponent () .findComponent ("ot1");

    outputText.setShortDesc (param);

    outputText.setValue (param);

    AdfFacesContext.getCurrentInstance () .addPartialTarget (outputText);

    }

    I hope this helps you.

    RFH.

Maybe you are looking for