Pageflowscope bean to am impl class

hi experts,
am using jdev 11.11.5.0
i had doubt? can i access amimplclass method through a pageflowscope bean.
if ur answer is yes means . pls paste the link or documents regards this. topic.

Hi,
Yes,
http://adf-lk.blogspot.com/2011/05/oracle-adf-create-view-criteria-and_4727.html
http://www.adftips.com/2010/11/adf-ui-beginner-exposing-amimpl-methods.html
Note:It is not depend on bean Scope.

Similar Messages

  • Accessing Managed Bean Variables in Entity Impl Class

    How can I access managed bean variables in the entity Impl class .
    While inserting a new record in DB , i want to set few entity properties values . The values of those properties are available in the managed bean .
    How can i access those values from Managed Bean and set them the entity Impl class to override the create method.
    Or is there any better recommended approaches ?
    Jdev - 11.1.1.5

    >
    While inserting a new record in DB , i want to set few entity properties values .
    >
    you can user CreateWithparams
    http://www.oracle.com/technetwork/developer-tools/adf/learnmore/13-create-with-params-169140.pdf
    http://andrejusb.blogspot.com/2011/02/createwithparams-operation-for-oracle.html

  • Unable to load impl class error after WAR file rebuilt

    Hi
    I have the source code for a working WAR file. I wanted to make a small change to the code and rebuilt the WAR. Now the previous WAR version works but even when I rebuild the WAR from the unedited code I get the error "unable to load impl class"
    and ClassNotFoundException: Class bytes found but defineClass() failed for ...
    Does anyone know what kind of changes in my environment would cause this problem?
    Thanks
    J Armstrong

    This was caused by using jdk1.6.0_02 to compile the java files where jdk1.50_06 was required

  • Calling Stored Procedure outside of ADF BC 'impl' classes

    Hello
    What is the best way to execute a Stored Procedure outside of the ADF BC 'impl' classes?
    I have a java class that performs batch inserts (using view objects). I am looking for a way to call a Stored Proc from here (How can I get a handle to the getDBTransaction() or is there another way to call the createCallableStatement()?
    Thanks for your help!

    Hi,
    you should be able to get a reference to the AM via your view objects. getDBTransaction is a public method so you should be able to call it from your class.
    You could also consider creating a method to call the stored procedure within your AM which you then expose and call from your java class via the AM's client interface. This would better encapsulate your business process.
    Brenden

  • How to call a method in IMPL class from one context node

    Hi, I´ve been only study the posibility to access a method in the IMPL class  from one context node class...CN## without using events, is there a way to call it ??? I don´t have it as requierement just learning thanks !.

    Hi,
    Try this by following this you can get the custom controller instacne in the view context nodes, for your requirement you can keep the view implementation class instance instead of cuco..
    To get the custom controller instance in Context node getter/setter method:
    1. Declare Cuco instance reference variable in ctxt class..
    2. Set this cuco ref. in the Create context node method of ctxt class:
    try.
    gr_cucoadminh ?= owner->get_custom_controller( 'ICCMP_BTSHEAD/cucoadminh' ). "#EC NOTEXT
    catch cx_root.
    endtry.
    you can avoid this step as this is not needed in case of view isntance
    3. Assign this instance to the respective context node Create method using:
    BTStatusH->gr_cuco ?= gr_cucoadminh.  " here assign the view implementation ref. " me" instead of gr_cucoadminh
    Here gr_cuco is the ref. variable of custom controller in the respective context node for eg. BtstatusH
    Sample implementation of this can be found in
    ICCMP_BTSHEAD/BTSHeader ->context node BTACTIVITYH-> attr ->GR_CUCO(instance of cuco)
    Cheers,
    Sumit Mittal

  • JSF backing bean accessibility from external class

    I am using JSF in my application. Consider i am assigning a value of the inputtext field to a string in my managed bean. This bean has the getters and setters for the string.
    Now my requirement is to get the value of the string i.e. the string value entered in the input text field in another class file. If "A" is a backing bean, I want a class B to access the values(in this case the inputtext value) from A.
    Thanks in Advance.

    Below is the code where i am using the inputtext tag in the JSP page
    <h:inputText value="#{person.name}" />
    "person" is the backing bean which is declared in the faces-config.xml
    PersonBean code:*
    package jsfExample;
    public class PersonBean {
         private String name;
    public void setName(String name) {
              this.name = name;
    public String getName() {
              return this.name;
    Now i have another class in the same package as shown below.
    package jsfExample;
    public class worker extends PersonBean{
    //this function should use the variable name present in the backing bean//
         public void access(){
         PersonBean person= new PersonBean();
         String str=person.getName();
         System.out.println(str);
    //I am getting null value in the str variable inside here//
    but if i print the variable inside the backing bean(*PersonBean*) it is working fine.

  • Call Bean from normal java class

    Dear Friends,
    Is it ok to call an entity bean or session bean frm normal Java class.
    (Java class is in the same application as the beans).
    Is there a special way to lookup the beans from normal java classes.
    Thanking You,
    Chamal.

    it is ok and very commonly done.
    Note that the simple java program must be running in the same local network. You cannot have the java program and EJBs distributed over internet. (I m not certain of it, but mostly I shoudl be correct. If you have the resources, try it out and let me know)
    In most of the cases, EJBs are called by
    1. A servlet
    2. Another EJB
    3. a simple java program.
    In the first 2 cases, you can go for Local Interfaces (more so in the second case than the first). The reason being that the the client and server will be in the same JVM (typically the Application server). Thus, in the first case, if the Web container and the ejb container are in the same app server, EJBs can be local.
    However, in the third case, it is unlikey that you will have the client runnng and the same jvm as the server, because the app server has its own jvm.
    sample code (this method is being called from the main method of a simple java program. it is self explanatory):
    public  void processRequestForSessionBean()
             System.out.println("REQUEST RECEIVED");
             try
                   Hashtable nameHashtable = new Hashtable();
                   nameHashtable.put( Context.INITIAL_CONTEXT_FACTORY, "weblogic.jndi.WLInitialContextFactory" );
                   nameHashtable.put( Context.PROVIDER_URL, "t3://localhost:7001" );
                   InitialContext context = new InitialContext(nameHashtable);
                   System.out.println("created initial context");
                   Object lookupObject = context.lookup("CustomerBean");
                   System.out.println("Got the lookup object");
                   CustomerDataHome home = (CustomerDataHome) PortableRemoteObject.narrow(lookupObject,
                             Class.forName("com.shiv.business.CustomerDataHome"));
                   System.out.println("Home interface");
                   customerData = home.create();
                   System.out.println("Remote Interface");
                   addDataToSB(customerData);
                   ArrayList namesList = customerData.getNames();
                   System.out.println(namesList.toString());
                   //customerData.remove();             
              catch (Exception exception)
                   System.out.println("FATAL ERRORS");
                   exception.printStackTrace();
              }

  • Bean problem: No interface classes found

    Hi ;
    I try to create a adapter . according to tutorial "How To Create Modules for the J2EE Adapter Engine"
    https://www.sdn.sap.com/irj/scn/index?rid=/library/uuid/f013e82c-e56e-2910-c3ae-c602a67b918e&overridelayout=true
    Although I did all steps in it , I copied sda files and extract them  then I imported them to the project but I get this error in Netweaver Studio "Bean problem: No interface classes found" while creating ejb file.
    the document says you must close and reopen project when you come accross this error but it doesnt work?
    Is there any one solve this error?
    ps: I use NWDS 7.0.19 , I copied aii_af_lib.sda, aii_af_svc.sda and aii_af_cpa_svc.sda files from PI 7.01

    Hi Tuncer!
    Did you download and "import" these JAR files into your NWDS Build Path  - classpath variables:
    com.sap.aii.af.lib.mod.jar     <bin>/ext/com.sap.aii.af.lib/lib
    sap.comtcloggingjavaimpl.jar     <bin>/system
    com.sap.aii.af.svc_api.jar     <bin>/services/com.sap.aii.af.svc/lib
    com.sap.aii.af.cpa.svc_api.jar     <bin>/services/com.sap.aii.af.cpa.svc/lib
    com.sap.aii.af.ms.ifc_api.jar     <bin>/interfaces/com.sap.aii.af.ms.ifc/lib
    <bin> stands for: /usr/sap/<SID>/<instance-id>/j2ee/cluster/bin in a PI 7.1 system.
    Windows -> Preferences -> Build Path -> Classpath Variables -> New ...
    Choose a name of your choice and then select the JAR files mentioned above.
    This should resolve your problem.
    Regards,
    Volker

  • Global Attribute Usage in IMPL class

    Hi,
    Can I declare an attirbute in the IMPL class and use it in two different context nodes of the same component?
    Actually, my requirement is to retrieve the value of an attribute in CN1 and use it in the GET_I_ method of an attribute in CN2.
    The approach that I'm following is to retrieve the value of attib1, pass it into the global attribute, and then use this global attribute in GET_I_ method of attrib2 in CN2.
    Is this feasible?
    Any pointers to this would be highly appreciated.
    TIA.
    Regards,
    Richa

    Your approach is feasible !
    Thanks
    Allot points if this helps!

  • Server performance with beans in WEB-INF/classes

    Hi,
    Someone over at oracle corp told me that if i put my beans in WEB-INF/classes, my server would notice a significant performance degradation since the beans would be automatically refreshed or dynamically loaded everytime.
    WHat I am doing now is restarting the webserver everytime a bean is created or changed.
    My goal was to have the new beans automatically noticed by the web server so i didnt have to stop and restart.
    Anyone have any input for me.
    Thanks

    Thanks I will do that but just one question.
    What about when the site it live. Say the boss comes to me and says I need this changed.
    I change the bean, compile it, and MUST restart the web server even though there could be many people on the site. Is that what everyone is doing?
    I think I am a little confused because in a production system I dont feel that the web server should ever be stopped unless there is some type of failure.

  • Instance of IMPL class in custom controller

    Hi,
    I have a requirement where i need a instance of view controller class(impl) in custom controller class. When i am trying to create an instance attribute of impl class in cuco and trying to use in one of the cuco methods  then it is not getting initialized. Let me know how to do achieve this.
    Thanks a lot.
    Regards,
    Lisha

    Hi Lisha,
    This would be because the corresponding view is in viewset which in turn is in the window.
    In that case you will have to drill down the viewset and then get the view.
    Sample code :
    DATA:
        lr_window TYPE REF TO cl_bsp_wd_window,
        lr_viewset      TYPE REF TO cl_bsp_wd_view_controller,
        lr_bpexcp_view         TYPE REF TO CL_BP_EXCEP_BPEXCPTNRESUL_IMPL.
    lr_window ?= me->get_subcontroller_by_viewname( 'BPExceptionSearch.MainWindow' ).
      if  lr_window IS BOUND.
        lr_viewset ?= lr_window->get_subcontroller_by_viewname( 'BP_EXCEPTION/BPExcptnSearchViewSet' ).
        if lr_viewset IS BOUND.
          lr_bpexcp_view  ?= lr_viewset->get_subcontroller_by_viewname( 'BP_EXCEPTION/BPExcptnResult' ).
          if lr_bpexcp_view  IS BOUND.
            TRY.
                lr_bpexcp_view->GV_IS_NEW_CONTRACT = ABAP_TRUE. "#EC NOTEXT
              CATCH cx_sy_dyn_call_error.
                RETURN.
            ENDTRY.
          endif.
        endif.
      endif.
    Regards
    Leon
    Edited by: Leon Limson on Jan 10, 2012 4:54 PM

  • Session geting null in AM Impl class

    All,
    In my root AM IMPL class i am setting the session variables as follows
            if(pAccountNumber!=null) getSession().getUserData().put("accountNumber",  pAccountNumber);
            System.out.println("User Account Number from Session is : " + getSession().getUserData().get("accountNumber")); //this value is getting printed
            if(pBranch!=null) getSession().getUserData().put("branch", pBranch);
            if(pItem!=null) getSession().getUserData().put("item", pItem);
            if(pOrganizationCode!=null) getSession().getUserData().put("organizationCode", pOrganizationCode);
            if(pCustomerId!=null) getSession().getUserData().put("customerId", pCustomerId);
            if(pCustomerName!=null) getSession().getUserData().put("customerName", pCustomerName);In my AM impl class extending the root Ampl class i am calling the getSession() like this
            ViewObjectImpl itemStockVo = getItemStock();
            _logger.fine("Account Number from Session : " + getSession().getUserData().get("accountNumber")); //this is printing as nullPlease advice what is wrong here ?
    thnks
    jdev 11.1.1.5

    Yes can be but as i have not disabled the AM pooling and the account name is coming null evne in the first go, i sense that may not be the issue (I may be wrong here).
    For your second part Timo, i am setting the session value as the default activity when the taskflow loads and i am trying to get it in the next view activity

  • Overriding VO Impl class methods to populate parent-child VO

    Hi All,
    I need to populate parent child VOs by giving webservice calls from respective impl classes.
    Scenario : Lets say suppose i have 2 VOs as DepartmentVO and Employee VO with a viewLink on departmentId. Taking a particular instance, in Department table there are 2 rows and for each parent row we have 2 child rows in Employee.
    Webservice Structure : I have a parent Object and inside that parent object i have list of child objects
    e.g : public class DepartmentDTO{
    private List<EmployeeDTO> employeeList;
    After that i have extended Impl classes for both VOs and overriden method i.e. "executeQueryForCollection" to give a webservice call and get back response of DepartmentDTO[] with List<EmployeeDTO> inside it.
    In DepartmenntVOImpl class i have overriden "createRowFromResultSet" which populates the parent VO with the number of parent records returned from webservice.
    Code for Department impl class is :
    protected ViewRowImpl createRowFromResultSet(Object qc,
    ResultSet resultSet) {
    Iterator deptIter= getPackageClassIterator(qc);
    ViewRowImpl r = createNewRowForCollection(qc);
    DepartmentDTO curDTO = (DepartmentDTO )deptIter.next();
    populateAttributeForRow(r,
    findAttributeDef("DeptId").getIndex(),
    curDTO.geDeptId() );
    populateAttributeForRow(r,
    findAttributeDef("DeptName").getIndex(),
    curDTO.getDeptName() );
    return r;
    Similarly i have overridden "createRowFromResultSet" method in EmployeeVOImpl to populate the child VO(this need to be populated from the list object inside parent object reponse)
    Code as follows :
    protected ViewRowImpl createRowFromResultSet(Object qc,
    ResultSet resultSet) {
    Iterator empItr= getPackageClassIterator(qc);
    ViewRowImpl r = createNewRowForCollection(qc);
    DepartmentDTO curDTO1 = (DepartmentDTO )empItr.next();
    List<EmployeeDTO> list = curDTO1.getEmployeesList();
    for (EmployeeDTO curDTO : list) {
    populateAttributeForRow(r,
    findAttributeDef("EmpId").getIndex(),
    curDTO.getEmpId());
    populateAttributeForRow(r,
    findAttributeDef("EmpName").getIndex(),
    curDTO.getEmpName() );
    populateAttributeForRow(r,
    findAttributeDef("EmpLastName").getIndex(),
    curDTO.getEmpLastName() );
    populateAttributeForRow(r,
    findAttributeDef("DeptId").getIndex(),
    curDTO.getDeptId());
    return r;
    Though the code looks simple and correct but the child records are not getting populated correctly. Am not sure if the code implementation to populate parent child VOs from webservcie is correct or not.
    Would appreciate for Help or valuable Suggestions.
    -Sanjeeb

    Hi Ray,
    Go for custom BADIs in this case. In fact, that is exactly the functionality you are looking for !
    Just go through this excellent five part blog on Enhancement framework by Thomas Weiss.
    What the New Enhancement Framework Is For – Its Basic Structure and Elements For Beginners
    The new Enhancement Framework Part 2 - What Else You Need to Know Before Building an Enhancement
    How To Define a New BAdI Within the Enhancement Framework - Part 3 of the Series
    How to implement a BAdI And How to Use a Filter - Part 4 of the Series on the New Enhancement Framework
    Source Code Enhancements - Part 5 of the Series on the New Enhancement Framework
    Cheers,
    Mahesh

  • Get Object Type in Impl-Class

    Hi Experts,
    I have the requirement to show a warning that the user shall maintain a Partner "Enduser" in the Assignmentblock "Partners" when creating an Opportunity. The code for the warning is implemented in the Impl-Class of the View BTPARTNER/Partner (my Assignmentblock "Partners"). The problem is, that the Assignment Block  is also used in other Scenarios, but the Waring shall only appear in the Opportunity View.
    How can I check the current Scenario? I thought of getting the Object Type BT111_OPPT and check it.
    Anyone know how to get the Object Type or any other solution for the problem?
    Thanks and regards,
    Sebastian

    Hi,
    I think using the Object_type to display warning message in your case is fine and it should work. Now as you are looking how to get object_type here..my suggestion would be  in View BTPARTNER/Partner  you have a context node called 'BTPartnerSet' after getting the current entity (by using get_current() ) you can get the parent which would be BTAdminH and in this entity you have object_type as a attribute so you can easily call get_property or get_property_by_string () and can put your check.
    Regards
    Ajay

  • Accessing impl class attribute

    Hi Experts,
    if i declare one variable in controller class of a view and how can access the variable in contex naode .

    Hi srinivas.yangal,
    You can access the View implementation Class Attributes in Context.
    1] Go to Context Node Implementation Class
    2] Create a attribute GV_VIEW_CONTROLLER in Impl class of Context Node.
    DATA : GV_VIEW_CONTROLLER TYPE REF TO CL_BSP_WD_VIEW_CONTROLLER .
    3] Go to INIT method of Context Node.
    4] Assign instance LV_VIEW_CONTROLLER to GV_VIEW_CONTROLLER of Context Node Impl. Class.
    GV_VIEW_CONTROLLER = LV_VIEW_CONTROLLER.
    Then you can access your Instance attributes defined in View Impl. class inside the context node through GV_VIEW_CONTROLLER attribute as follows.
    ABC = GV_VIEW_CONTROLLER->XYZ.
    Reward points if useful.
    Kind Regards,
    Dhananjay.
    Edited by: Dhananjay SAP CRM on Nov 24, 2011 12:56 PM

Maybe you are looking for