Error by calling the method on Bean managed from an other managed Bean

Hello

(Jdev 11.1.1.2.0)

Help please:

I have a managed bean (page scope of stream) that is used by my homepage for navigation of flow dynamic region:

* / public class RegionNavigationBean implements Serializable {* +}
private String dynamicTaskFlowId = "/ WEB-INF/home-task-flow-definition.xml#home-task-flow-definition"; +

* public RegionNavigationBean() {* +}
*}*

* public TaskFlowId getDynamicTaskFlowId() {* +}
Return TaskFlowId.parse (dynamicTaskFlowId); +
*}*

* public void setDynamicTaskFlowId (String taskFlowId) {* +}
this.dynamicTaskFlowId = taskFlowId; +
*}*
*}*

taskFlowId is set to the homepage def to + * ${pageFlowScope.regionNavigationBean.dynamicTaskFlowId} * +.

In a table (i.e. display on my model layer object) DB I store a menu ID and a corresponding task_flow_id.

Then I created a class of earphone action (RegionNavigationListener - scope of stream page) which I link to my menu on my main page items (property listener action on the item of menu = + * #{pageFlowScope.regionNavigationAction.processAction} * +)

In this action (processAction method) listening port, I retrieve rowset in the VO menu and find the record that matches my menu ID that triggered the action event, recovering the task_flow_id that needs to be accessed.

I then try to retrieve the instance of the RegionNavigationBean with the following statement: RegionNavigationBean regNav = (RegionNavigationBean) JSFUtils.getManagedBeanValue ("regionNavigationBean"); +.
It seems to work fine, but as soon as I try to use it I get a NullPointerException error, for example:
regNav.setDynamicTaskFlowId (menusRow.gettaskFlowId ()); +
or:
System.out.println ("%" + regNav.toString ()); +

This is quite new to me... any help would be appreciated!

Thank you
Mario

Hi Mario,.

I tried following codes to get a bean managed in a region, it is very good for me.
ManagedBean is the name of the class.

FacesContext ctx = FacesContext.getCurrentInstance ();
Application app = ctx.getApplication ();
ManagedBean MB = (ManagedBean) app.evaluateExpressionGet (ctx, "#{pageFlowScope.managedBeanName}", ManagedBean.class);

Todd

Tags: Java

Similar Questions

  • How to call the method of bean of support on the component date. MinValue

    Hello

    I have a method in bean

    {} public void sample()

    Set the entry code

    }

    I want to call the sample method when I click the date component. MinValue in .jsff

    Right now using the < af:clientListener method = 'onClick' type = "click on" / > inside the < af:inputDate > element

    < af:resource type = "javascript" >

    function onClick (clickEvent) {}

    Alert ("hiii");

    Here, I want to call the sample method by clicking on date. MinValue

    }

    < / af:resource >

    Any Solution would be Appreciable

    Try to follow this:

    -Inside af: inputDate add clientListener and serverListener

    
         
         
    
    

    The serverListener method must map to a function in backbean

    -in java script method write this

    function onClick(event)
    {
      var source = event.getSource();
      AdfCustomEvent.queue(source,"serverListenerOperations", {}, false);
    }
    
  • Call the method in the root Movie Clip

    Hi all

    In AS 2, I was able to call a method declared in the chronology of the root of a moviclip by placing code similar to "_root.callMethod ()". I'm doing the same AS 3, but I get an error "1119: access of the meshes of property may be undefined in a reference with static type flash.display:DisplayObject.".

    On the first frame of my main script, I have:
    var st:String = "HELLO";

    I also have a movieclip in the main scenario that has the following on its 1 setting:
    trace ("ST ROOT OF CLIP -" + root.st);

    When launched, I get the above error.

    How can I access variables declared in other clips and the main timeline and calling the methods declared in other MC and the main timeline?

    Thanks for your help in advance.
    V

    You must convert this object to display as a dynamic class - for example, a movieclip:

  • Call the method call activities before you navigate to the target jsf page

    Dear all,

    I use JDeveloper Studio Edition Version 12.1.3.0.0.

    Requirement:

    I have a stubborn taskflow. The stubborn workflow is without using page fragments.

    I have three pages: login.jsf, admin.jsf, user.jsf. I have a method call activity in the taskflow. The login.jsf is the default page. The page of login.jsf have an af:selectOneRadio with two af:selectItem: Admin and user. It also has an af:button. When the user select the af: af selectItem: selectOneRadio and click on the af: button, it should call the method call activity (doLogin) and based on logic it will redirect to the page admin.jsf or user.jsf page.

    Please find the taskflow below:

    How to achieve the solution to the prescription above.

    Thank you and best regards,

    Susanto Paul

    Hi all

    I'm able to resolve the obligation.

    The post below was really helpful.

    http://andrejusb.blogspot.in/2011/09/programmatic-ADF-task-flow-router.html

    Thank you best regards &,.

    Susanto Paul

  • Call the method of the object, the view object entity

    Hi all
    I use jdeveloper 11.2.1.0, and I need to call the method in the object class to view object entity class.
    Someone knows how to do?

    Thank you.

    http://andrejusb.blogspot.in/2009/11/calling-custom-entity-method-from-view.html

  • Error when calling a method AM of Bean managed

    Hi friends,

    JDev's Studio Edition Version 11.1.2.4.0

    I have a page (HomePG) that has a read-only table. Select a field in the table and you enter a value for the inputText and then clicking on a button, the selected employee's salary should be replaced by the value entered in the inputText field.

    I am trying to call a method of the managed bean AM and I get an error while doing this. I created a link to the method in the page where the call is made.

    Here is the code of the AOS

    ' Public Sub hikeSelectedRow (Key key, BigDecimal val) {}

    ViewObjectImpl emp = getEMPVO1();

    RowSetIterator empVO = emp.createRowSetIterator ("Test");

    System.out.println ("in selected Update");

    System.out.println ("in selected, Update key:" + key);

    Row [] selectedEmpArr;

    selectedEmpArr = empVO.findByKey (key, 1); -> Error comes here

    System.out.println ("in selected, Update key:" + key.toString ());

    EMPVORowImpl selectedEmp = (EMPVORowImpl) selectedEmpArr [0];

    selectedEmp.setSal (selectedEmp.getSal () .add (val));

    System.out.println ("added, made Bravo");

    getTransaction () .commit ();

    }

    The line is selected in the Managed bean and is also selected. However during appraisal findByKey get the performance I get the below error. Can someone please.

    The error I get is

    < ActionListenerImpl > < processAction > java.lang.NumberFormatException: for input string: "[oracle.jbo.Key [7566]].

    javax.faces.el.EvaluationException: java.lang.NumberFormatException: for input string: "[oracle.jbo.Key [7566]].

    at org.apache.myfaces.trinidad.component.MethodExpressionMethodBinding.invoke(MethodExpressionMethodBinding.java:51)

    at com.sun.faces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:102)

    at org.apache.myfaces.trinidad.component.UIXCommand.broadcast(UIXCommand.java:190)

    to oracle.adf.view.rich.component.fragment.ContextSwitchingComponent$ 1.run(ContextSwitchingComponent.java:130)

    at oracle.adf.view.rich.component.fragment.ContextSwitchingComponent._processPhase(ContextSwitchingComponent.java:461)

    at oracle.adf.view.rich.component.fragment.ContextSwitchingComponent.broadcast(ContextSwitchingComponent.java:134)

    at oracle.adf.view.rich.component.fragment.UIXInclude.broadcast(UIXInclude.java:112)

    to oracle.adf.view.rich.component.fragment.ContextSwitchingComponent$ 1.run(ContextSwitchingComponent.java:130)

    at oracle.adf.view.rich.component.fragment.ContextSwitchingComponent._processPhase(ContextSwitchingComponent.java:461)

    at oracle.adf.view.rich.component.fragment.ContextSwitchingComponent.broadcast(ContextSwitchingComponent.java:134)

    KeyVal key = new key (new Object() {Integer.parseInt (((List) tableIterator.next ()) m:System.NET.SocketAddress.ToString ())});

    So, what will return: (tableIterator.next ()) m:System.NET.SocketAddress.ToString () (list)?

    I suppose this relates a strange string?

    Check out this blog for a correct use of the RowKeySet (and is also described in a easier way to get the current line in the case of single selection): ADF:TABLE - Get selected or lines. John Brunswick

    Dario

  • How to call the taskflow or bean method after returning from operational-stream-call activity.

    I use JDev 11.1.2.4.0.

    Here is my scenario:

    A page contains a table with a button 'Add' called a popup.  The popup has controls to select data and save/Cancel buttons.  The Save button calls a managed bean method will add a line to the iterator in the table is built on.  I'd like the table to refresh the closure of the pop-up window.

    This is how I implemented it:

    I have taskflow1 that contains an activity view (page1).  Page 1, I have a button that calls managedBean1.method1 () who does a job and returns a result of 'showpopup '.  ShowPopup goes to a task-flows-call activity, called taskflow2.  Taskflow2 has a point of view (page 2, which is presented as a popup) activity and a return.   I want to call a method in managedBean1 to refresh the table once the popup is closed and I can't understand the right way to do it.

    After writing this I wonder if I should create the popup in the calling page rather than creating a separate workflow.  I started with a separate workflow because the popup is a quite complex.

    Thanks for help.

    Rudy

    Add a listener to return the button 'Add '. It will be called by ADF Faces upon return of the taskflow. For example:

    useWindow = "true" windowWidth = "600" windowHeight = "400".

    action = "#{MyBean.Method1} '"

    returnListener = "#{MyBean.myReturnListener}" / >

    And the bean method:

    public void myReturnListener (ReturnEvent returnEvent)

    {

    Do something, for example to update the table on the screen

    AdfFacesContext.getCurrentInstance () .addPartialTarget (myTable);

    }

    NB. don't forget to mark the taskflow call activity to 'run as dialog '.

    If you need the taskflow return result, you can get it in the earpiece to return via the method ReturnEvent.getReturnValue ().

    Dimitar

  • sessionscope beans, calling the method

    "Win7 64 bit" JDeveloper 11g 11.1.1.7

    I have a workflow with page 2 and a callus of method. page 2 sail with a call to mettod to page 1.

    property method * method call is "#{sessionScope.Dd.assign_x}".

    DD is java bean. assign_x is the method to store a number on x.

    When I browse from page 2 to page 1 displays an error.

    Internal error 500 - Se

    javax.el.PropertyNotFoundException: Target Unreachable, 'Dd' returned null at com.sun.el.parser.AstValue.getTarget(Unknown Source) at com.sun.el.parser.AstValue.getMethodInfo(Unknown Source) at com.sun.el.MethodExpressionImpl.getMethodInfo(Unknown Source) at oracle.adf.controller.internal.util.ELInterfaceImpl.getReturnType(ELInterfaceImpl.java:214) at oracle.adfinternal.controller.activity.MethodCallActivityLogic.execute(MethodCallActivityLogic.java:135) at oracle.adfinternal.controller.engine.ControlFlowEngine.executeActivity(ControlFlowEngine.java:1068)

    How can I call a mettod and store a value in a Bean sessionScope?

    Thank you...

    Massage hiking you bean is not found.  Where you defined the bean to have a scope of session?

    In the adf, it should be done in the ADF - config.Xml. Once you have done you should not specify the scope of application as it is picked up automatically for the normal tasks of jsf.  Only for the adf glasses added, you specify the scope.

    Timo

  • Calling the method to a different bean

    Inside a workflow, I am running the code inside a managed bean, and I want to call a different managed bean method. How can I do this?

    Hello

    You can do this in two ways:

    Using Dependency Injection:

    In the configuration file of your project faces that defines the management of bean, a bean managed
    property may be declared as initialized with a reference to an another managed bean:


    neededBean
    fqn.to.NeededBean
    session


    usingBean
    fqn.to.UsingBean
    request

    neededBean
    #{neededBean}

    2. with the help of research

    FacesContext facesContext = FacesContext.getCurrentInstance ();
    NeededBean neededBean
    = (NeededBean) facesContext.getApplication)
    .createValueBinding("#{neededBean}").getValue (facesContext);

  • In Windows Mail, I get the following script error: unexpected call to method or property access - URL: res://ieframe.dll/preview.js

    Original title: HELP

    {Moderator note: version of Windows has not been confirmed}

    In microsoft mail I get the following script error and cannot print emails, then the error lock the computer.

    Script error

    An error has occurred in the script on this page

    Line 215

    1 tank

    Unexpected call to method or property access

    Code 0

    URL: res://ieframe.dll/preview.js

    Do you want to continue running scripts on this page

    Yes No

    I can print other documents.

    Please help I need to be able to print my emails.

    Thank you

    Windows Mail uses the Internet Explorer print engine to print.  You can print from Internet Explorer?  It is possible that your antivirus software might be the cause.  You can try to turn off and then restart and see if it will print.  Otherwise, you will need to provide more detailed information depending on your version of Windows, what e-mail program, you are using and what version of Internet Explorer you are using.

    Steve

  • Loading of a DLL on RT: Missing Export "DecodePointer" "Kernel32.dll" and 7 error when calling the DLL

    Hi, I recently changed to Visual Studio 2010 and Windows 7 64-bit.

    I have an existing Office RT system running RT 2009.  This system calls a DLL that I already built using Visual Studio .net 2003 and Windows XP.

    Since I've recompiled the DLL I get an error 7 file not found error when I call the RT DLL, even if I simply replaced the old DLL with a new one in the file system so the path has not changed.

    I also noticed that the message on the screen connected to the RT system during startup:

    "achieveworldpeace.dll" load error: lack of export 'DecodePointer' of ' Kernel32.dll'.

    Any ideas on this problem?  It is perhaps as simple as a switch in the compiler?

    Thank you.

    I'm not sure it's a simple switch in the project settings in Visual C. The problem is clearly in the standard C runtime library that gets linked to your DLL and refers to exports of Windows which are not available on the RT system. Don't forget that the RT system is a limited Win32 API emulation.

    I usually avoid these problems using Visual C 6 to create DLLs for LabVIEW projects. The standard library of the C runtimes will not know what Windows API reference more recent exports because they have supported even under Win95. So unless your explicitedly reference code not supported RT APIs you wouldn't have problems. If you do not use the standard C file i/o functions and management of memory in your DLL functions, you can also try to link statically C runtime libraries in your DLL, or vice versa depending on what you have now. It may or may not work. Otherwise there is not much else but by using an earlier version of Visual Studio.

  • Error in browser after the publication of BC's Muse "MuseJSAssert: error by calling the selection function:...» »

    Get an error when the Muse in British Colombia - just started happening in the last hour.

    Can someone help or advise at all?

    http://forums.Adobe.com/message/6143407#6143407

    Just installed from Exchange of Muse (preloader).

    He was on the top most layer - look - it was fine.

    the opacity of the background of the preloader - pubished - had this twisted:

    MuseJSAssert: Error calling the function switch: TypeError: object [object Object] has no method 'museOverlay '.

    removed the preloader - published still GET and always error in all browsers.

    Use muse to post on BusinessCatalyst - popular ideas (just restart the machine and will try to publish again without the preloader to see if it suits it!)

    Hello

    I think that it is related to the degradation of the performance of EU data center, see BC status page for details - http://status.businesscatalyst.com/

    Please try again once the service is fully restored.

    Thank you

    Mihai

  • AM how to call the methods of class Impl EO

    Hello world

    I try to display database data in a table, and I need to add a transitional and calculated attribute.

    So I created an EO, I added a transitional attribute, and now I need to create the method that calculates its value.

    I created this method of AOS.

    Back to EO Impl class, I want to call this method in the Get accessor of my transitional attribute.

    To call this AM method in the EO Impl category, I have to get the AM, and I don't know how to do it. Because I'm used to getting the pageContext controller AM.

    I googled and found that I don't need to create the method in the AM, I found that I just have to code directly in the Get accessor.

    But again, to calculate my transitional attribute, I have need for some queries and for that I need OADBTransaction, which means once again, I need to get the AM in the Impl EO class.

    I'm confused, I don't know how to do, if anyone can help please

    Thank you

    Kind regards

    Afaf

    If you derive the value based on the query, it would be better to do it in a single query.

    If you can stick the main request and the subquery (s) here, I take a look.

    If this is not possible using the query, you can get the oaDBTransaction like below in the VO RowImpl.

    Import oracle.apps.fnd.framework.OAApplicationModule;

            OAApplicationModule appModule = (OAApplicationModule)this.getApplicationModule();
            appModule.getOADBTransaction()
    

    See you soon

    AJ

  • ORA-900 sql not valid reporting error while calling the optimize_index pl/sql procedure


    Hi Experts,

    I'm on Oracle 11.2.0.3 on Linux and I have installed in my database Oracle text. I want to configure annex dbms_job to optimize my oracle text index. So first, I created a pl/sql procedure to optimize indexes. It gives me error ORA-900, but the sql even if I run in sqlplus works very well! Can you please help me the question is to find:

    Here is the procedure:

    (Either incidentally CTXAPP role has been granted in the schema where these Oracle text indexes are created and where the below procedure to optimize the index is running.)

    CREATE OR REPLACE PROCEDURE optimize_ora_txt_indexes_debug
    IS
       CURSOR cur_context_indexes
       IS
            SELECT index_name
              FROM user_indexes
             WHERE index_type = 'DOMAIN'
        AND ROWNUM<2  
        ORDER BY INDEX_NAME;
       v_user         VARCHAR2 (30);
       v_pod          VARCHAR2 (30);
       v_start_time   TIMESTAMP;
       v_end_time     TIMESTAMP;
       v_elapsed      VARCHAR2 (40);
       v_msg   VARCHAR2 (1000);
       v_error_code      NUMBER;
       v_error_msg   VARCHAR2 (1000);
       v_sql VARCHAR2 (1000);
    BEGIN
    
       FOR c IN cur_context_indexes
       LOOP
          BEGIN
            v_sql:= 'ctx_ddl.optimize_index (idx_name =>'||chr(39)|| c.index_name||chr(39)||', optlevel => '||chr(39)||'FULL'||chr(39)||')';
            dbms_output.put_line(v_sql);
            execute immediate v_sql;
          EXCEPTION
             WHEN OTHERS
             THEN
                v_error_code := SQLCODE;
                v_error_msg := SQLERRM;
                v_msg :=
                      'Error while optimizing the index '
                   || c.index_name
                   || ' '
                   || TO_CHAR (v_error_code)
                   || ' '
                   || v_error_msg;
                DBMS_OUTPUT.put_line (v_msg);
    
          END;
       END LOOP;
    
    EXCEPTION
       WHEN OTHERS
       THEN
          v_error_code := SQLCODE;
          v_error_msg := SQLERRM;
          v_msg :=
                'Error while in the optimize index procedure'
             || ' '
             || TO_CHAR (v_error_code)
             || ' '
             || v_error_msg;
          DBMS_OUTPUT.put_line (v_msg);
    
    END optimize_ora_txt_indexes_debug;
    /
    
     --the procedure compiles successfully. 
     Now when I run it , I get the error:
    SQL>exec optimize_ora_txt_indexes_debug;
    ctx_ddl.optimize_index (idx_name =>'ACCESS_CLNT_IDX04', optlevel => 'FULL')
    Error while optimizing the index ACCESS_CLNT_IDX04 -900 ORA-00900: invalid SQL
    statement
    
    
     --When I run the same command from sqlplus as execute statement , it works fine:
    SQL>exec ctx_ddl.optimize_index (idx_name =>'ACCESS_CLNT_IDX04', optlevel => 'FULL');
    PL/SQL procedure successfully completed.
     
     
    
    
    

    If everything runs from sqlplus, but fails in plsql... I'll be very grateful for pointers solve the problem.

    Thanks,

    OrauserN

    Hello

    It is a problem of pl/sql syntax. A call with EXEC is the same using BEGIN... Code of... END of block;

    SO, you need to include a beginning and an end to your call:

     v_sql:= 'BEGIN ctx_ddl.optimize_index (idx_name =>'||chr(39)|| c.index_name||chr(39)||', optlevel => '||chr(39)||'FULL'||chr(39)||'); END;';
    

    That's all.

    Herald tiomela

    http://htendam.WordPress.com

  • Calling the method

    Hello world

    Currently, I'm doing my own version of the ADT of stack. I have various methods including one called isEmpty(). It is perhaps an obvious question, but I want to use the method isEmpty() I created in all of my other methods that need it. For example, in the code below, I want to use it in the pop() method to test if the stack is empty, before I have to try to burst something from him. The problem is that it is not let me use the method I created and instead tells me to use .length as for a regular table. How can I do so that it allows me to use the method that I did? Any help appreciated, thanks.

    Sorry for the terrible copy paste btw, but I can't seem to be able to figure out how to paste the code with the lines and all.


    public class Stack < T > implements StackADT < T > {}

    Private [] T = table (new Object [] t [50]; object of type casts in [T])
    Private boolean doubleExpand = true; Original table expand

    {} public boolean isEmpty()

    for (T elem: array) {}
    If (elem! = null) {}
    Returns false;
    }
    }
    Returns true;

    }
    public T pop() {}

    If (array.isEmpty ()) {}
    code
    }
    }
    }

    Published by: 989888 on February 22, 2013 23:01

    I want to use the method isEmpty() I created in all of my other methods that need it.

    So call it.

    For example, in the code below, I want to use it in the pop() method to test if the stack is empty, before I have to try to burst something from him. The problem is that it is not let me use the method I created

    You didn't create it. You can't create methods in the classes in table.

    Instead it tells me to use .length as for a regular table.

    QED. It is a regular table. You are calling methods on a table, not only your own classes.

Maybe you are looking for