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);

Tags: Java

Similar Questions

  • Problem getting the pageFlowScope number parameter in backing bean

    Hi, I use a taskflow with parameters of type oracle.jbo.domain.Number.

    I want to replace a method in my grain of support in order to take the value of the parameters pageflowscope.

    (inMarkNbr, inColorNbr)

    But I take as the result the following error:

    Error: oracle.jbo.domain.Number cannot be cast to impossible

    Error type: class java.lang.ClassCastException

    StackTrace:

    view.backing.pages.AutoProfile8.doApply(AutoProfile8.java:17)

    Could you help me please?

    //Some Imports
    import java.sql.SQLException;
    import java.util.Map;
    import javax.faces.event.ActionEvent;
    import oracle.adf.model.OperationBinding;
    import oracle.adf.view.rich.context.AdfFacesContext;
    import oracle.adf.share.logging.ADFLogger;
    import oracle.jbo.domain.Number;
    
    public class AutoProfile8 extends Auto{
    
        private static ADFLogger logger = ADFLogger.createADFLogger(AutoProfile8.class);
    
        public AutoProfile8() {
            super();
        }
        // here is the line of error
        @Override
        public void doApply(ActionEvent actionEvent) {
         
            Map<String, Object> map = AdfFacesContext.getCurrentInstance().getPageFlowScope();
            Object markObj = map.get("inMarkNbr");
            Object colorObj = map.get("inColorNbr");
         
            Number mark;
            Number color;
         
            try {
                mark = new Number(markObj);
            } catch (SQLException e) {
                logger.severe("Unable to find mark Number", e);
            }
         
            try {
                color = new Number(colorObj);
            } catch (SQLException e) {
                logger.severe("Unable to find color Number", e);
            }
         
    
            System.out.println(mark.getValue() + " "+color.getValue());
         
            if(mark != null)
            {
                OperationBinding oper1 = (OperationBinding) ADFUtils.findOperation("CallMethodFromAplModule");
                oper1.getParamsMap().put("markNbr", mark.getValue());
                oper1.getParamsMap().put("colorNbr", color.getValue());
                oper1.execute();
            }
         
            super.doApply(actionEvent);
        }
    }
    
    

    paste here shoot to screen with your definition of parameters TF and tell us, what exactly is the line

    view.backing.pages.AutoProfile8.doApply(AutoProfile8.java:23)

    ClassCastException occurs?

    I suspect that you are a parameter defined as impossible. The exact type of the parameter must be oracle.jbo.domain.Number, exactly that.

    In addition, a color as a set mark

    Mark oracle.jbo.domain.Number;

    color oracle.jbo.domain.Number;

    mark = new oracle.jbo.domain.Number (markObj);

    ...

  • 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

  • How to get the values of page jspx (view layer) to the custom method defined in AM

    Hello

    I have 1 text field and 1 submit to homepage.jspx. When I click the button submit, it will call the custom method defined in the 'Module of the Application' java class (ApplicationModuleImpl.java). Can I know how to get the value of this text field in this custom method.

    I used the getter and setter method, however it didn't work as it is defining the value correctly, but get method returns null. Its not allowing to use FacesContext. Could someone please tell me how to get the value of the text field to this custom method (that is, using ADFContext,... something like that)

    Thanks in advance

    User,
    you have mixed up something here. Bean (as you did) cannot use the module of the application. They belong to different layers.
    I suggest you to look at some first tutorials (http://docs.oracle.com/cd/E18941_01/tutorials/toc.htm) or watch the developer guide http://docs.oracle.com/cd/E16162_01/web.1112/e16182/toc.htm and take a look at some of the videos http://www.oracle.com/technetwork/developer-tools/adf/learnmore/adfinsider-093342.html

    Timo

  • How can I get the string value displayed on a digital control defined for the relative time.

    I have a digital potentiometer to display relative time in increments of 30 minutes.

    I want to record the value displayed on the control string.  Unfortunately, when I use the "convert to decimal string.vi" number, the resulting string is just the value in seconds.

    How can I get the value as a string? (for example 01:30 for an hour and thirty minutes)

    Thank you

    Sean

    Hi Sean.C!

    M_Peeker's suggestion is a good thing.  A stage that could clarify things is that you must set the % t <%H:%M> format string entry.

    < br / > Kristen:.

  • Not able to get the value of the type defined in the other program

    Hi all

    I have create a type in a single package spec (Globally), now I'm using the same type in another package. Simply I'm calling the first package and try to store the value in the Type and use the same type in the second package.

    But I'm not able to get the value

    Type declaration

    Declared in package Spec
    
    TYPE t_aa_derive_tbl_type IS TABLE OF xxxx%ROWTYPE;
       t_aa_derive t_aa_derive_tbl_type;
    

    Package 1

    Package1. PROCEDURE name(
    some parameters);
    is
    Cursor
    c1 is Select * from dual;
    
    begin
          OPEN c_aa_derive;
            FETCH c_aa_derive
            BULK COLLECT INTO t_aa_derive;
            CLOSE c_aa_derive;
           
         END get_aa_derive;
    

    In my second package

    I'll call you

    Package1. PROCEDURE name(
    some parameters);
    
    and then i am trying to
    
    for i in 1 .. package1.t_aa_derive.COUNT
      LOOP
    
    ....
    
    ....
    ...
    
    end loop;
    

    I can not entered the loop for some reason any.

    Could someone guide me if anything I missed.

    See you soon,.

    San

    And what did you like refcursor c_aa_derive in the call to package1.name? Is it returns all rows? If this isn't the case, COUNT will be 0.

    SY.

  • 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

  • Get the current value of the menu a cluster ring

    Hello

    I am trying to program a bunch of rings of menu to use the same options and disable the option even in the other rings of menu if it has already been chosen. It works essentially as is at the moment, but it shows each button by using a 'deactivated' option because I'm turning off the option even in the buttons that have this value. I did it using a loop knot and property and [] DisabledItems en mass. Now, I want to go to the iteration of the loop for the menu ring which already has this value.

    To do this however, I want to get the current numeric value of the ring of menu and an array of search values. If the value of menu rings appear in this table, then I want to move to the current iteration of the loop. The problem I have is that when I try to use a property node and type the property value, instead of giving me a long 32 output, it gives me the so-called 'Variant', which I have not seen before. I'm not sure how to find a table and see if the value I have is in this table. "Search table" seems just an index to be returned, I think that I want a Boolean or something. I'm also not sure how to skip an iteration of the loop (although I imagine it won't be too difficult to understand mine, I hope).

    I apologize if this is very obvious, or if my message is not clear. I started using LabVIEW, a few weeks ago and I'm still learning. I have included a picture of my Subvi downstairs.

    Thank you
    Nathan

    Variant of data allows to convert the variant to a numeric type (whatever representation you need).

    Search D 1 table returns-1 if the element was not found.  If you just compare the index with a greater or equal to zero and the result will be if the element was found in the table.

  • How can I get the max of a measurement value

    How can I get the max of a measurement value?

    http://forums.NI.com/T5/LabVIEW/how-can-I-return-the-maximum-value-from-a-voltage-sensor-over/m-p/30...

    I tried the while loop max-min-solution described in this link. But this using my myRio acceleration measurement no longer works. It seems to hang.

    I use the I2C Communication.

    The inner circle while loop is a bad construction.  It will be either executed once, if enter the Boolean value is True, or forever if the value is false.

    Put your records on the timed loop shift and eliminate inside while loop.  Then your code should work.

  • get the values of the different acquisition channels

    Hello everyone,

    I finished my project and I want to do something and I did not how. I am acquising three signals from three different pressure sensons with the use of the DAQAssistant configuration to acquire form three analogue ports (there is a screenshot it below) and after it is shown in the same graph (second picture below).

    This works fine, but my problem lies in the fact that I want to measure the maximum value and the value of the minimum pressure of each channel and always it is measured the first of them. I divided the measures in time-slopes as it is shown in the last picture. I have tried every single Vi of part manipulation of the function range signal, but I'm still not in the way of their use or I'm totally wrong actuing in this way.

    Could someone give me a hand?

    Thanks in advance.

    Best regards

    Miguel.

    Really, we do not have enough information to give you good advice, but I can give you some generic advice.  If you want the max and min an array of values, values use the Max & Min table from the palette of Array.  Unfortunately, the DAQ assistant returns the type of dynamic data, which can be either a table of waveforms or waveform unique depending on how you do.  Configuring your DAQ Assistant, it seems you are getting a picture of waveforms, but to use it as a form of single wave.  Just after taking the data, convert your dynamic data type data type in a table using waveforms the DDT express VI in the Express-> palette of data manipulation.  It would probably break a lot of your code, and it's a good thing.  Broken parts are parts that are probably causing you problems.  You can now use the index table to get the individual waveforms to the table and get elements of waveform for the picture of the waveform data.  Use this table with table Max & Min to actually find your max and min values.

    Alternatively, you can use Split Signal of the Express-> palette Manipulation of data to split your output into three unique waveform signals.  Each of these signals can be plugged directly into the table Max & Min (LabVIEW will be script in the necessary converter).  However, I highly recommend that you do NOT.  It leaves you the problem that your data type is not defined yet, as this is always a type of dynamic data.

    Also note that the use of globals as seen in the pictures of your code is a bad habit that can lead to all sorts of problems.  However, I can't offer a lot of advice on how to fix it without the rest of your code (Tip: will probably involve some shift registers).  Please post your screws if you have questions, so we can offer the best advice.

  • How to get the balance of an element value

    Hello

    I have a requirement to obtain related information with balance. I am able to read the information on the element except balance.how to get the value of the particular item balance.

    for the application-> transfer and process-> queries with trust-> value the month selected and chosen balances button and queries with the obtained item name break it down the value of the balance.

    These values I want in my query.i tried backend with calling package by passing parameters like the number of transfer, balance the id and date but iam getting value "0".

    IAM new to hrms, Please help me on how to get this balance of values

    Thank you

    Hello

    It is not very clear what you want to display in the form of balance for a given range of dates.

    It depends on how you have configured your balances and periods and balance which you are referring.

    The API allows for a given only date that matches the date earned.

    Say, for example, that you have a "basic salary" defined with a "Treatment period assignment to Date" dimension and feed of the element that corresponds to the base salary.

    "If you need get the 'wage base Total' (balance?) for the period February 1, 2015 ' to March 31, 2015", then you need get dates earned for payroll passes made during that period and call the package above with the appropriate settings.

    Another way is by querying the tables/views directly: you can use, for example - it's perhaps easier to your situation:

    Select sum (nvl (pbv.value, 0))

    of pay_balance_values_v the VB.

    where pbv.balance_name = 'base salary.

    and pbv.database_item_suffix = '_ASG_PTD. '

    and pbv.assignment_id =

    and pbv.effective_date between to_date (' 01/02/2015 ',' dd/mm/yyyy')

    and to_date (' 31/03/2015 ',' dd/mm/yyyy');

    Kind regards
    Rajen

  • How to get the value of a literal XML node content in BPEL 2.0?

    Hello!

    I have a problem creating A Expression in the distribution of the XML literal one activity, I would like to help me...

    Well, I have the same activity in the 1.0 version of BPEL and is now different is BPEL 2.0,.

    I have a Web Service < WSEjecutaComandos > when having a function of controls remote that connects,

    Entries of my Web Service: "int numEquipo, String [] comandos, int numCta, int publicar, int, String date version"

    The second argument is an array of string type...

    Now in my BPEL process, I do is the following assignment:

    ************************************************************

    < assign the name = "AssignCreaPath" >

    < copy >

    < from >

    < literal >

    " < fnCRexecElement xmlns =" http://Servicios/ ">

    < numEquipo > 2 < / numEquipo >

    < comandos >mkdir etl/entries/mmkis /< / comandos >

    < numCuenta > 1 < / numCuenta >

    < publicar > 0 < / publicar >

    < / fnCRexecElement >

    < / literal >

    < / from >

    < to > $InvokeClear_fnCRexec_InputVariable.parameters < /pour >

    < / copy >

    < copy >

    (< a >concat(ora:getContentAsString($InvokeClear_fnCRexec_InputVariable.parameters/comandos),$inputVariable.payload/client:fecha)< / from >

    < to >$InvokeClear_fnCRexec_InputVariable.parameters/comandos< /pour >

    < / copy >

    < copy >

    < a > $InvokeVersion_fnGetVersionProcesoByFecha_OutputVariable.parameters/version < / from >

    < to > $InvokeClear_fnCRexec_InputVariable.parameters/version < /pour >

    < / copy >

    < copy >

    < a > $inputVariable.payload / client: date < / from >

    < to > $InvokeClear_fnCRexec_InputVariable.parameters/date < /pour >

    < / copy >

    < / assign >

    ***************************************************

    Well the conflict I have is as follows,

    previously defined an entitlement with the XML Fragment copied on the payload to the Web Service (WSEjecutaComandos), input variable

    and the XML code is copied to each of the variables,

    Then him concatenating input values (I noted in red) < comandos > with the value of 'farm' (String), and once again copy Variable < comandos > and has not had any problems

    but now with the new BPEL 2.0, I do the same thing now using literal XML (this good!) but the option to concatenate (that I've noticed in red) and copied to the same variable ( I noticed blue ), I mark the following error message:

    Error1.png

    I should know, I am doing wrong, or you need to to XPath function as the value that they already have the variable < comandos > will concatenate date,

    and is the final value of my entry, my Web Service.

    must be defined as table of values of type < comandos [i] >

    define the following activities before $InvokeClear_fnCRexec_InputVariable.parameters/comandos [1],

    but it seems that this BPEL 2.0 does not respect me in the form of hooks index.

    Thank you...

    See you soon,.

    I found the solution to get the value of an xml element and it concatenated with another variable within a beneficiary.

    is:

    ORA: getNodeValue (ora:getChildElement($InvokeCreaPath_fnCRexec_InputVariable.parameters,2))

    first get the desire here in my tree xml element is position 2 < comandos=""> and then get the value of this node.

    See you soon,.

  • get the return value of a method of the application module in the workflow

    Hello

    I use jdeveloper 11.1.1.7.0

    I defined a method (return type is useful java card) in the Module of the Application and add this method to the client interface.

    also I have a workflow and in this TF firstly I should execute this method and put the return value for the pageFlowScope parameter. I know that to use this method as a methodCall and set it as an activity by default, but I don't know how to get the return value before entering the jsff page and set the pageFlowScope parameter.

    Habib

    Concerning

    When you add the activity to the way to deal, there are 'Return value' property that you can set to #{pageFlowScope.yourVariable}

    Dario

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

  • OEID 3.1 get the index value in a multi-assign set attribute

    Hello

    In OEID 3.1 EQL represents assign many attributes of the corpus as defined. How can I get a single value from this overall picture? If the table contains only one value, how can I get this value as the value of the single award and not a game/table.

    http://docs.Oracle.com/CD/E40518_01/server.760/es_eql/TOC.htm#sets%20and%20Multi-assign%20Data

    Thank you.

    1. "How can I get a single value from a game?

    If I understand your question, I think that you want to use a universal or existential (SOME) (ALL) qualifier for records based on a unique value that exists in a return set.

    They are documented here:

    "+ gMapTitle +".

    In the example for the qualification of SOME, the two important lines are:

    SELECT bodyAttr AS body

    WHERE SOME IN x body SATISFIED (x = "robust")

    This means that the query is basically this:

    1. Select the multi-assign Body attribute and its values as a set back.

    2 values in this organization has set, return every record that has an assignment of "Robust" in its attribute of body. In other words, you use the value "Robust" (throughout the body) to get the records you want.

    2. "If a set contains only one value, how can I get this value as the single entitled value and not a game?

    Whatever the number of items is in a game, you can use the IS_MEMBER_OF function to test if a given value is in this value. The given value can be a single-assign attribute. However, I'm not sure if that's what you're asking.

    In both cases, keep in mind sets that were put in place because to 7.5 (and previous), EQL chooses an arbitrary value of a multiple assign attribute for each input record, rather than select all attribute values. Sets now allow EQL select all values in a multiple assign attribute.

Maybe you are looking for