Sharing Methods within Extension Framework Modules

I'm working on a framework extension based upon the framework provided with the SRDemoSampleADFBC application.
I have created a couple of methods in my ApplicationModuleImpl that I will use on the client side, but I also need to reference them from other modules inside the framework extension; the ViewObjectImpl, for example.
How can I reference these methods? They are declared in the AMImpl as:
public void setMyValue(String name, String value) {
Hashtable userdata = getDBTransaction().getSession().getUserData();
if (userdata == null) {
userdata = new Hashtable();
userdata.put(name.toUpperCase(), value);
and
public String getMyValue(String name) {
Hashtable userdata = getDBTransaction().getSession().getUserData();
if (userdata == null) {
return "";
if (userdata.get(name.toUpperCase()) == null) {
return "";
else
return (userdata.get(name.toUpperCase()).toString());
When I try to reference these methods from the ViewObjectImpl, the compiler can't resolve the reference. I realize this is probably a stupid java newbie question, but I just can't get this to work the way I want it to. I've tried stuffing the methods into the Utils module, but the methods look at the transaction which apparently can't be referenced inside that module.

I've gone through that I understand needs to be done, but the reference to my method from the viewObjectImpl still fails to resolve. Here's what I did:
1. I reviewed secetion 25.4 and created a new myApplicationModule that references the 2 methods I want to expose.
2. On my test application's application module I opened the property editor, went to the client interface, and ensured that the 2 methods are shuttled to the right side as selected (they already were).
3. On that same page, I clicked on the Interfaces button, and and shuttled over to the left my new ApplicationModule I had created in step 1.
I don't understand what you mean in your points, getting the current AM and testing that it's an instanceof my custom AMImpl class and casting it to my custom class name.
It appears that I've gotten it so I can call it from the client, just not from within my custom framework extension classes.

Similar Messages

  • How to connect with VPN of type L2TP programatically in IOS8 ? canse NEtwoatically in IOS8 ? can i use NEtwork/Extension framework for this?rk/Extension framework for this?

    I have a mobileconfig file and the VPNType is L2TP . How can i connect to this VPN programatically in IOS8 ?Apple's Network/Extension framework has methods which supports IPSEC and IKEV2 protocols(NEVPNProtocolIPSec, NEVPNProtocolIKEv2). Can i use Network/Extension framework to connect with L2TP type VPN ?

    I have a mobileconfig file and the VPNType is L2TP . How can i connect to this VPN programatically in IOS8 ?Apple's Network/Extension framework has methods which supports IPSEC and IKEV2 protocols(NEVPNProtocolIPSec, NEVPNProtocolIKEv2). Can i use Network/Extension framework to connect with L2TP type VPN ?

  • "The Selection is not within a valid module" - unable to run on server

    Hi,
    I have WLP 10.2 portal web and ear projects, but for some reason I am unable to run on server the .portal files or any other resources within the project.
    When I try to run I get the error - The selection is not within a valid module. Does anyone have any idea in what scenarios this might happen?
    Thanks,
    Sid

    never faced this before but came across this eclipse bug
    http://dev.eclipse.org/newslists/news.eclipse.webtools/msg13972.html
    'The current handling of project modules is such that the project name must match the deploy-name in the .settings/org.eclipse.wst.common.component for "everything" to work correctly. If they don't match, I believe the symptom you are experiencing is one of the "things" that goes wrong.'

  • Help with creating a method within a class

    I need help creating another method within the same class.
    Here is part of my progam, and could anyone help me convert the switch statement into a seperate
    method within the same class?
    import javax.swing.JOptionPane;
    public class Yahtzee
         public static void main (String[] args)
              String numStr, playerStr, str, tobenamed;
              int num, times = 13, roll, x, y, maxRoll = 3, z = 0, t;
              int firstDie, secondDie, thirdDie, fourthDie, fifthDie, maxDie = 5, reroll;
              int rerolling = 0, categoryChoice, score, nextDie1, nextDie2, nextDie3, nextDie4;
              Die die1, die2, die3, die4, die5;
              do
              numStr = JOptionPane.showInputDialog ("Enter the number of player: ");
              num = Integer.parseInt(numStr);
              while (num < 1 || num > 6); //end of do loop
              String [] player = new String[num];
              // boolean //finsih later to make category choice only once.
              for (x = 0; x < num; x++)
                   playerStr = JOptionPane.showInputDialog ("Name of Player" + (x + 1) + " :");
                   player[x] = playerStr;  
              } //end of for loop
              die1 = new Die();
               die2 = new Die();
               die3 = new Die();
               die4 = new Die();
               die5 = new Die();
              int scoring [][] = new int [num][13];//scoring aray
              int[] numDie = new int[maxDie];
              String[][] usedCategory = new String [num][times];
              for (x=0; x < 13; x++)
                   for (y = 0; y < num; y++)
                      usedCategory[y][x] = " ";
              for (int choices = 0; choices < times; choices++)
                   //player turns for loop.
                   for (x = 0; x < num; x++)
                        //rolls the die;
                          for (y = 0; y < maxDie; y++)
                               numDie[y] =  die1.roll();
                     numStr = JOptionPane.showInputDialog (player[x] + "\n~~~~~~~~~~~~~~~~~~~~~~~"
                                                                            + "\nDie1: " + numDie[0]
                                                                                + "\nDie2: " + numDie[1]
                                                                                + "\nDie3: " + numDie[2]
                                                                                + "\nDie4: " + numDie[3]
                                                                                + "\nDie5: " + numDie[4]
                                                                                + "\nWhich dice do you want to reroll");
                    reroll = numStr.length();
                    if (reroll == 0)
                        t = maxRoll;
                   else{                                                      
                    //reroll
                         for(t = 0; t < maxRoll; t++ )
                             for (y = 0; y < reroll; y++)
                                    rerolling = numStr.charAt(y);
                                 //create another mwthod later.
                                    switch (rerolling)
                                         case '1':
                                              numDie[0] =  die1.roll();
                                              break;
                                         case '2':
                                              numDie[1] =  die1.roll();
                                              break;
                                         case '3':
                                              numDie[2] =  die1.roll();
                                              break;
                                         case '4':
                                              numDie[3] =  die1.roll();
                                              break;
                                         case '5':
                                              numDie[4] =  die1.roll();
                                              break;
                                         default:
                                         t = maxRoll;//to be changed
                                    } //end of switch class
                              }//end of reroll for loop
                                   JOptionPane.showMessegeDialog (player[x] + "\n~~~~~~~~~~~~~~~~~~~~~~~"
                                                                                      + "\nDie1: " + numDie[0]
                                                                                          + "\nDie2: " + numDie[1]
                                                                                          + "\nDie3: " + numDie[2]
                                                                                          + "\nDie4: " + numDie[3]
                                                                                          + "\nDie5: " + numDie[4]
                                                                                          + "\nWhich dice do you want to reroll"
                                               switch (rerolling)
                                         case '1':
                                              numDie[0] =  die1.roll();
                                              break;
                                         case '2':
                                              numDie[1] =  die1.roll();
                                              break;
                                         case '3':
                                              numDie[2] =  die1.roll();
                                              break;
                                         case '4':
                                              numDie[3] =  die1.roll();
                                              break;
                                         case '5':
                                              numDie[4] =  die1.roll();
                                              break;
                                         default:
                                         t = maxRoll; //not really anything yet, or is it?
                                    } //end of rerolling switch class
                                       //categorychoice = Integer.parseInt(category);
                              }//end of t for loop            
                   }//end of player for loop.

    samuraiexe wrote:
    well, i should have said it is a yahtzee program, and i ask the user what they want to reroll and whatever number they press, the switch will activate the case and the array that it will reroll.
    HOw would i pass it as an argument?You put it in the argument list. Modifying your original code a bit:
    public static void switchReroll (int[] dice, int position) {
         switch (position) {
         case '1':
                 dice[0] =  die1.roll()
                 break;
         case '2':
                 dice[1] =  die1.roll();
                 break;
         case '3':
                 dice[2] =  die1.roll();
                     break;
         case '4':
                 dice[3] =  die1.roll();
                 break;
         case '5':
                  dice[4] =  die1.roll();
                 break;
         default:
                 t = maxRoll;//to be changed
        } //end of switch
    }which you could then call as this:
    switchReroll(numDie, reroll);Note that your code still isn't done; the above won't compile. This is just an example of how you could pass the stuff as an argument (and note how the values have different names in the main method than in the switchReroll method -- this works, but also note that it's the same array of ints in both).
    By the way -- you really don't need a switch statement for this. You can do the same thing with a couple lines of code, which would lessen the advantage for a separate method. But I'd suggest continuing down this path, and then you could change the implementation of the method later.

  • Trying to understand methods - calling methods within own class - help

    I'm trying to write a simple program to search for letters in a string. I'm having a ton op problems; java seems so complicated with a lot of rules.
    The main problem I'm having (for now) is calling a method within the same class as main.
    import java.io.*;
    class LookForLetters{
        public static void main(String[] args)
         int i = 0;     
         int j = 0;
         int l = 0;
         int m = 0;
         String question1 = "Enter the line to be searched"; 
         String question2 = "Enter the line to be searched";       
         returnResponse stringtosearch = new returnResponse(question1); // here's where my problem is
            char[] chartosearch = stringtosearch.toCharArray();
         returnResponse letterstofind = new returnResponse(question2);
            char[] chartofind = letterstofind.toCharArray();     
         int findlength = chartosearch.length();
         int searchlength = chartofind.length();
         int[] k = new int[searchlength];
         for(i = 0; i < findlength; i++)
             for(j = 0; j < searchlength; j++)   
              if(chartosearch[i] == chartofind[j])
                  k[l] = i;
                  l++;
                  System.out.print("T");
             System.out.print(i + " " + l);
                if(l == 0)
                    System.out.print(chartofind[i] + " is the not in the sentence.");
                    System.out.println();       
                else
                    System.out.print(chartofind[i] + " is the ");
                 for(m = 0; m < l; m++)
                     System.out.print(k[l] + " ");
                    System.out.print("letter of your sentence");
                    System.out.println();
                    l = 0;
        public String returnResponse(String question){
         String response = " ";
         System.out.print(question);
         try
             InputStreamReader isr = new InputStreamReader(System.in);
                BufferedReaderbr = new BufferedReader(isr);
             response = br.readLine();            
         catch(IOException e)
             System.out.print("error");
         return response;
    }The compiler says that it can't find the returnResponse method. when I try to instantiate the whole class, it says the package is not included. Please help.

    JoachimSauer wrote:
    DaneWKim wrote:
    thank you very much for your response. I'm sure it's obvious that I'm really confused. I'm used to C and assembly programming, so the OO concepts are really foggy.That particular line doesn't even deal with any OO concept. But the fact that you already know C helps me give a (hopefully) more useful answer:
    What is the return type of the method you're trying to call?
    What is the type of the variable you want to assign the return value to?
    Are those compatible? Or even more general: do they both exist?I changed it to:
            String stringtosearch = returnResponse(question1);
            char[] chartosearch = stringtosearch.toCharArray();
         String letterstofind = returnResponse(question2);
            char[] chartofind = letterstofind.toCharArray();I guess I'm getting confused with medthods, class and types. There's a whole host of new vocabulary and rules with OO and java that have me a bit confused. I appreciate your help.

  • Sharing view objects across application modules

    Our application uses multiple application modules because of the complex functional requirements. We have come across sharing view objects among application modules. I want to understand the best practice, sharing view object instances across application modules. These view objects can be based on Entity Objects also.
    Please let me know if there any suggestions.
    Thanks,
    Satya

    Hi Satya,
    You won't be able to share view objects between application modules, but what you can do is to share the bind variables between application modules, if each of your module contains the 'common' view object.
    A solution for sharing data between application modules is provided on this blog: http://andrejusb.blogspot.co.uk/2012/05/solution-for-sharing-global-user-data.html
    You can use this approach to share bind variables between AM's and re-query the same data.
    Hope this helps,
    Florin Marcus
    www.redsamuraiconsulting.com

  • Is it possible to circumvent error message within a function module?

    Hello friends,
    Is it possible to circumvent error message generation from within a function module? My program calls a FM (namely FKK_S_CADOCUMENT_WRITEOFF) to do some updates. However, in certain cases this FM throws error messages and terminates the whole process. I cannot control the aftermath because it never gets back to the calling program.It stops at the FM level and not at my program level.
    In essence, what I would like to do is to let the FM do its thing, generate some kind of exception (but no error message), come back to the calling program, and then I can capture the status in my program and do what is necessary from then on.
    Your help is greatly appreciated

    Hi,
    Do not use Excerption Tab.
    Instead declare a variable or Structure at export parameter.
    Which will return you error Description or Status of the FM.
    For Example.
    Goto Se37 ---> key in FM name of yours.
    Go to Table tab
    At Parameter Name Column key in RETURN, Type as LIKE and Associate type as BAPIRET2.
    ThankS & regards,
    ShreeMohan
    Edited by: ShreeMohan Pugalia on Aug 10, 2009 12:31 PM

  • ADF Groovy call method in different application module

    Hi All,
    I have two different application modules(Say TestAM.xml and MyTestAM.xml). I have a method in second application module. I want to call that method from Entity object. Normally we use adf.object.applicationModule.getName()  if it is in the first application module
    So how do I call a method in second application module from Entity object?
    I am using JDev 11.1.1.5 and ADF BC.
    Thanks,
    Rajesh

    Hi,
    In my opinion the second way have a advantage, which its method could be invoke automatically using a invokeAction on pageDef, if necessary.
    regards

  • How to solve: The JVM shared library "/System/Library/Frameworks/JavaVM.framework" does not contain the JNI_CreateJavaVM symbol ?

    I cannot run Eclipse or Aptana any more because I get the following error
    The JVM shared library "/System/Library/Frameworks/JavaVM.framework"
    does not contain the JNI_CreateJavaVM symbol.
    I already tired to reinstall Java from the oracle website but it does not help.

    By everything, did you mean eclipse and java?

  • Performing disk reads from within a kernel module

    Hi,
    i want to perform direct io reads from a specific disk from within a kernel module. i tried to perform a physio call, but although the function returns 0 (success) my buffer has not changed.
    any ideas or pointers to example code would be appreciated.
    Oren

    Hi,
    i want to perform direct io reads from a specific disk
    from within a kernel module. i tried to perform a
    physio call, but although the function returns 0
    (success) my buffer has not changed.
    any ideas or pointers to example code would be
    appreciated.
    OrenIt's kinda non-trivial... physio() might be not good enough as if your disk is SCSI it won't perform sync I/O for you - you'd better use the aphysio(), or get the dev_ops of the disk and call it's strategy directly...
    Do not forget to set completion (iodone) routine pointer in your buf structure - it'll be called upon I/O completion in asyncronous case. You might then wait on some CV in your I/O routine right after you've dispatched the strategy (either directly, or via aphysio), and in iodone() routine just signal the CV.
    Hope this helps,
    Ilya.

  • Is NFS the only supported sharing method?

    Is NFS the only file systen sharing method certified for use in SAP NetWeaver 7?
    Are SAMBA or XFS supported ?

    > I'm currently using NFS to share the following:
    >
    > 1.) /usr/sap/trans from Production to Quality Assurance and Development
    > 2.) /sapmnt/<sid> from the Central Instance to the associated Dialog Intances
    > 3.) A file system used for storage of interface files. These files would be used by non-SAP systems
    > 4.) A file system used to store the SAP applications CD images. This is used as a central repository when performing upgrades and installations
    Sounds good and reasonable.
    Why do you want to change?
    Markus

  • Support for HTTP Extension Framework

    Hi,
    I need to use some headers defined in HTTP Extension Framework
    (RFC 2274). Does Weblogic provide support for this extension
    framework ? If so which version of Weblogic should i be using ?
    Thanks & Regards,
    Prasad Shetty

    Hello Kumar,
    Yes, these are part of HTTP 1.1 extensions. In case this is not currently supported, would really appreciate if you could let me know if it is planned in the future releases.
    Regards,
    Prasad Shetty
    Kumar Allamraju <[email protected]> wrote in message news:[email protected]..
    Are these extensions part of HTTP 1.1?
    Prasad Shetty wrote:
    Hi,
    I need to use some headers defined in HTTP Extension Framework
    (RFC 2274). Does Weblogic provide support for this extension
    framework ? If so which version of Weblogic should i be using ?
    Thanks & Regards,
    Prasad Shetty
    [att1.html]

  • Have any extension framework that design based on BC4J/ADF

    Hi all:
    have any one know that whether have any commercial or opensource extension framework that design based on BC4J or ADF, we need a complete application framework to build ERP system through JClient technology,
    we wish concentrate on translating business rules and process to code instead of worrying about the technical plumbing required to create application systems. and need a set of standard components to ensure a consistent look-and-feel and corporate identity among all applications.
    Oracle JHeadstart is good extension framework and 4GL tool that is based on struts/JSP/UIX solution, but we need a JClient 4GL tool like it.
    JTwister is a good application framework solution for Swing technology, but cannot adopt with BC4J/ADF.
    if you have any idea, please give me a suggestion.

    http://www.inpowersoft.com/bc4j/index.htm - might be what you are looking for.

  • Can I add or edit Keywords and captions from within the Map module?

    I frequently find a need to edit or add to the caption while reviewing  and geotagging photos in the Map module.  Constantly toggling between modules is inconvenient.  Is there a way to add/edit captions or keywords while working in the Map module  (or view the map module while working in the Library?
    Thanks!
    Steve

    thank you
          From: Modesto Vega <[email protected]>
    To: Steve Murray <[email protected]>
    Sent: Thursday, January 29, 2015 3:27 PM
    Subject:  Can I add or edit Keywords and captions from within the Map module?
    Can I add or edit Keywords and captions from within the Map module?
    created by Modesto Vega in Photoshop Lightroom - View the full discussionYou should be able to change the title, the caption, the sublocation, the city, the state/province, the country, the ISO country code, the altitude, the direction, and a few other fields. However, you cannot add keywords. It would be real nice if Adobe could add this to the Map module. If the reply above answers your question, please take a moment to mark this answer as correct by visiting: https://forums.adobe.com/message/7145077#7145077 and clicking ‘Correct’ below the answer Replies to this message go to everyone subscribed to this thread, not directly to the person who posted the message. To post a reply, either reply to this email or visit the message page: Please note that the Adobe Forums do not accept email attachments. If you want to embed an image in your message please visit the thread in the forum and click the camera icon: https://forums.adobe.com/message/7145077#7145077 To unsubscribe from this thread, please visit the message page at , click "Following" at the top right, & "Stop Following"  Start a new discussion in Photoshop Lightroom by email or at Adobe Community For more information about maintaining your forum email notifications please go to https://forums.adobe.com/thread/1516624.

  • NWDS 7.3 - extension framework not working

    Hi experts,
    I m trying to build and run an extension framework on a different requirement on the lines of this. I have defined it on the task extension after successfully deploying it on the connected AS JAVA. But I'm not getting any result on the IdM UI. There is already another EAR deployed not by me, which is running good. I have created everything from scratch with new names and servlet not as IdMRegisterServlet. Should there be any problem due to that ?
    Because when I looked into the application tc~idm~jmx~app I could find only IdMRegisterServlet and not the one I designed.. Though I have meticulously followed the steps while deploying. If this is the case how will I be able to register it in the tc~idm~jmx~app ?
    Any advise would be a Lifesaver.
    Thanks
    Rimesh

    Hi Rimesh,
    I guess the problem is not in the name of the servlet. You can use any name.
    Please check:
    1. If the application-j2ee-engine.xml of your new extension application contains a reference to
    tc/idm/jmx/app application:
    application-j2ee-engine xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance
    xsi:noNamespaceSchemaLocation="application-j2ee-engine.xsd">
    <reference reference-type="hard">
    <reference-target provider-name="sap.com"
    target-type="application">tc/idm/jmx/app
    </reference-target>
    </reference>
    application-j2ee-engine>
    2. Check if your servlet is part of the web.xml of the war project:
    <servlet>
    <description></description>
    <display-name>IdMRegisterServlet</display-name>
    <servlet-name>IdMRegisterServlet</servlet-name>
    <servlet-class>testcustomer.idm.impl.IdMRegisterServlet</servlet-class>
    <load-on-startup>1</load-on-startup>
    </servlet>
    If that does not help just write me.
    Kind Regards,
    Stefan

Maybe you are looking for

  • Push Notifications and slowness

    Has anyone been experiencing general slowness on some applications with push notifications enabled? I was complaining to one app support person about how slow their application loaded but found out that if I disabled the push notifications, the app l

  • Using a script to automate UNC definition updates for FEP 2010

    Hi all, I tested the script mentioned in this article http://blogs.technet.com/b/clientsecurity/archive/2010/09/16/using-a-script-to-automate-unc-definition-updates.aspx with no success. I am getting the following error: Line: 11 Char: 5 Error: The o

  • Database generating a large number of ORA-1403 errors in Alert Log & trace

    Hi, Many ORA-1403: no data found messages appear in the alert log, but users are not seeing this error on their screens. The errors are only generated in the alert log along with an associated trace file. We have not set the "set events 1403 trace" f

  • Dynamic query in timecard using LOV or CHOICE_LIST???

    Hi I want to use a dynamic query for custom Project and Task. E.g. Once a project is selected form Project CHOICE_LIST, the task CHOICE_LIST should show only the tasks related to that particular project. I have created CHOICE_LIST field for Project a

  • Firefox keeps open firefox homepage in new tab

    After updating to ver. 20.0 whenever I open Firefox, it starts by going through the plug-in compatibility check, then it opens the browser to not only my homepage, but also to the Firefox homepage for downloading the Android version. Running Windows