How to use ApplicationModule custom methods in JSP?

I have an ApplicationModule for which I have defined several custom methods (in the ApplicationModuleImpl class). I wish to invoke these methods from a JSP. I'm having trouble getting a scriptable reference to the application module object in the JSP. I can get data from the view objects using the jbo:xxx data tags, but I can't get any sort of reference to the application module object that would allow me to invoke the methods. I have tried editing the application module to expose the methods as client methods, but still can't get a reference to them.
My main questions:
1. Is there a way to invoke the custom methods somewhere between the jbo:ApplicationModule tag and the jbo:ReleasePageResources tag?
2. Is there a way to declare and use the application module without using the jbo:ApplicationModule tag? Would I ever benefit from doing this?

Alan, here's how to call a custom method String getSomeInfo() that I've created on my application module, MyModule in this example. Also, in this example the id parameter in the ApplicationModule tag is "am" (<jbo:ApplicationModule id="am"...):
First, edit your application module. In the app module editor, go to the Client Methods tab and move getSomeInfo into the selected list.
Next, edit your JSP to call your custom method.
<% MyModule myAm = (MyModule)am.useApplicationModule(); String someInfo = myAm.getSomeInfo(); %>
You also have to add the correct import statements to the page tag in your JSP:
<%@ page contentType="text/html;charset=windows-1252" import="oracle.jbo.*, MyModule.common.*"%>
Hope this helps
Blaise

Similar Messages

  • How to detect if a user has changed a record using a custom method?

    I am in the process of developing a test case application using ADF JSF and a collection of Java objects that are not populated by a database.
    Details of what I have developed so far can be found on this post:
    how to create a new record using a custom method?
    Is it possible to detect if a user has changed the value(s) of a record?
    I have set the edit page up (as described in the other post) and this works fine, but how could I tell if the user has changed something on that record. This is what I would like to do, but am not sure how to achieve it or whether it is possible....
    when the user puts a record in edit mode, take a copy of that record
    then when the user presses save or exit to navigate away from the edit page do a comparison between the original values and the potentially changed ones
    then depending on the outcome of the comparison call an appropriate action
    Thanks in advance for your help
    David

    If you just want to know if the value has changed you can put it in a while loop and use shift registers to see if the value has changed.
    Brian
    Attachments:
    Changed.vi ‏22 KB

  • How to use PPF customizing Auto GR after packing

    Our Goods Receive Business scenario is
    1. Filled Batch in EWM Inbound Delivery           
    2. Manual Pack product to Handling unit
    3. After packing, Automatic Good Receive
    4. Then create Warehouse Task automatically .
    Question
    We want to know how to use PPF customizing Auto GR after we Pack product to Handling unit?
    Can anyone help us to figure out that problem?
    Thank you
    Chang

    Hi Faical,
    I have set configuration as below, but it does'nt work.
    Can you help us to figure out the reason.
    We are appreciate your help!
    2. Manual Pack product to Handling unit
    3. After packing, Automatic Good Receive
    method: /SCWM/AU_GR_POST in processing details and for schedule condition:  /SCWM/WHR_FULL_PACKED. 
    time of processing : processing when save document
    3.After packing, Automatic Good Receive
    4. Then create Warehouse Task automatically
    method: /SCWM/AU_GR_POST in processing details and for schedule condition: /SCWM/TO_CREATE
    time of processing : immediate processing

  • How to use the index method for pathpoints object in illustrator through javascripts

    hii...
    am using Illustrator CS2 using javascripts...
    how to use the index method for pathpoints object in illustrator through javascripts..

    Hi, what are you trying to do with path points?
    CarlosCanto

  • How to use the POST method In Oracle APEX 3.1

    Hi,
    In APEX if we are submitting the page the parameters( Variables ) will pass through URL.
    How to hide the these parameters from URL??
    I Hope POST method will solve this problem.
    How to use the POST method in APEX???
    Help me out to solve this problem.
    thanks in advance.
    Cheers,
    Shan

    In APEX if we are submitting the page the parameters( Variables ) will pass through URL.No they won't. Submission POSTs the <tt>wwv_flow</tt> form.
    Sometimes a branch may be performed after submission, generating a URL in which parameter values are visible. To avoid this, use the save state before branching option.
    Other actions&mdash;like using navigation lists, or clicking a link in a report&mdash;will perform a GET using parameters in the URL. In these cases using Session State Protection is advised.

  • How to use the customer types in customer master data

    how to use the customer types in customer master data?
    menu path is Extras -> account group info -> customer types

    hi,
    This is an option given to you to choose (if you need to) the way you perceive this customer.Here you get options including ompetitors,Salespartner, prospect,
    default sp ,consumer.
    See it helps you to differentiate between prospect(which you may use for quotation or inquiry purpose)Sales partner and the competetor.
    I hope this clarifies your quiery.Reward points if so.
    Thanking you,
    Best regards,
    R.Srinivasan

  • How to use debug my jdevloper devloped jsp applications using tomcat 4.0?

    hello,
    how to use debug my jdevloper devloped jsp applications using tomcat 4.0?
    how to run with using tomcat path with browser?
    can any one help?
    thanks
    pullareddy

    Hi Pullareddy,
    Charles' answer will work for Servlets in Tomcat, but debugging JSPs is a bit more complicated than debugging Servlets.
    Here's what you need to do:
    (I don't have Tomcat, so I don't know the details of Tomcat configuration files and I can't guarentee that Tomcat provides the flexibility so that you can configure it for debugging JSPs. Each application server is configured a bit differently. Hopefully you can adjust the following instructions to Tomcat.)
    1. You need to replace Tomcat's JSP engine with OJSP and you need to setup debugging parameters for OJSP.
    This is not specifically in the JDev documentation, but you may be able to apply the information found in the topic "Remote Debugging in OC4J".
    Here are some tips:
    A. You'll probably need to specify the following jars in some Tomcat config file: ojsp.jar, ojsputil.jar, xmlparserv2.jar, ojc.jar, and jdev-rt.jar.
    B. The OJSP class name is oracle.jsp.runtimev2.JspServlet.
    C. The debug parameters are:
    debug_mode = true
    developer_mode = true
    encode_to_java = true
    emit_debuginfo = true
    jspjavacompiler = oracle.jdevimpl.jsp.JspOjcCompiler
    2. You need to make Tomcat start the Java command with debugging options. (This is what Charles was talking about. One of the debug options is -XXdebug). This is in the JDev documentation in the topic "Starting a Java Process in Debug Mode". Please read that documentation help topic.
    3. You need to delete any old .java or .class files which were created in the past for your JSP. If you leave old .java or .class files around, then the debugger may not be able to stop at breakpoints in your JSPs. So, be sure to clean up old files.
    4. Set your project settings for remote debugging. This is on the Debugger - Remote panel in the Project Settings dialog box. You probably want either Attach to OJVM or Attach to JPDA. Which radio button you choose depends on what command line options you specified in step 2.
    -Liz

  • How to use my findTheHighest method to find the highest value in my two dim

    I am going to create a 13row by 10 colume two dimensional array.
    how to use my findTheHighest method to find the highest value in my two dimensional array.
    .When i compile this program , i got those as following;
    "Exception in thread "main" java.lang.ArrayIndexOutOfBoundsExce
    at TaxEvolution.findTheHighest(TaxEvolution.java:31)
    at TaxEvolutionClient.main(TaxEvolutionClient.java:25)"
    public class TaxEvolution{
    public double[][] salesTaxRates;
    public TaxEvolution()
      salesTaxRates = new double[13][10];
      fillProvinTaxRates();
    private void fillProvinTaxRates()
      for ( int row = 0; row < salesTaxRates.length; row++ )
        for ( int column = 0; column < salesTaxRates[row].length; column++ )
          salesTaxRates[row][column]= (int)(Math.random()*5000) + 1;
    public double findTheHighest()
        double highest = salesTaxRates[0][0];
        for ( int row = 0; row <= salesTaxRates.length; row++ )
          for ( int column = 0; column <= salesTaxRates[row].length; column++ )
             if ( salesTaxRates[row][column] >= highest )
                   highest = salesTaxRates[row][column];
        return highest;   
    public double[][] arrayTaxEvolution()
      double[][] returnTaxRates = new double[13][10];
      for ( int row = 0; row < salesTaxRates.length; row++ )
        for ( int column = 0; column < salesTaxRates[row].length; column++ )
          returnTaxRates = salesTaxRates;
      return returnTaxRates;
    public class TaxEvolutionClient{
    public static void main( String[] args ){
      TaxEvolution protaxRateList = new TaxEvolution();
      double[][] taxRateList = protaxRateList.arrayTaxEvolution();
        for ( int i = 0; i < taxRateList.length; i++ )
          for ( int j = 0; j < taxRateList[0].length; j++ )
            System.out.print( taxRateList[i][j] + "\t" );               
            System.out.print( protaxRateList.findTheHighest + "\t" );
    }

    Multiposted
    http://forum.java.sun.com/thread.jspa?threadID=699057&tstart=0

  • How to use the custom control ?

    Hi Friends,
    plz help to use of  custom control in screen painter ?
    and how to use the custom control ?
    Thanking you.
    Regards,
    Subash.

    HI,
    Screen Elements
    A screen can contain a wide variety of elements, either for displaying field contents, or for allowing the user to interact with the program (for example, filling out input fields or choosing pushbutton functions). You use the Screen Painter to arrange elements on the screen.
    You can use the following elements:
    ·        Text fields
    Display elements, which cannot be changed either by the user or by the ABAP program.
    ·        Input/output fields and templates
    Used to display data from the ABAP program or for entering data on the screen. Linked to screen fields.
    ·        Dropdown list boxes
    Special input/output fields that allow users to choose one entry from a fixed list of possible entries.
    ·        Checkbox elements
    Special input/output fields that the user can either select (value ‘X’) or deselect (value SPACE). Checkbox elements can be linked with function codes.
    ·        Radio button elements
    Special input/output fields that are combined into groups. Within a radio button group, only a single button can be selected at any one time. When the user selects one button, all of the others are automatically deselected. Radio button elements can be linked with function codes.
    ·        Pushbuttons
    Elements on the screen that trigger the PAI event of the screen flow logic when chosen by the user. There is a function code attached to each pushbutton, which is passed to the ABAP program when it is chosen.
    ·        Frame
    Pure display elements that group together elements on the screen, such as radio button groups.
    ·        Subscreens
    Area on the screen in which you can place another screen.
    ·        Table controls
    Tabular input/output fields.
    ·        Tabstrip controls
    Areas on the screen in which you can switch between various pages.
    ·        Custom Controls
    Areas on the screen in which you can display controls. Controls are software components of the presentation server.
    ·        Status icons
    Display elements, indicating the status of the application program.
    ·        OK field
    Every screen has a twenty-character OK_CODE field (also known as the function code field) that is not displayed directly on the screen. User actions that trigger the PAI event also place the corresponding function code into this field, from where it is passed to the ABAP program. You can also use the command field in the standard toolbar to enter the OK field. To be able to use the OK field, you need to assign a name to it.
    All screen elements have a set of attributes, some of which are set automatically, others of which have to be specified in the Screen Painter. They determine things such as the layout of the screen elements on the screen. You can set the attributes of screen elements in the Screen Painter - either for a single element, or using the element list, which lists all of the elements belonging to the current screen. Some of the attributes that you set statically in the Screen Painter can be overwritten dynamically in the ABAP program.
    with regards,
    sowjanyagosala

  • How to use singloeton factory methods ?

    Hi Guys,
    Can any one   please help me like how to use singleton factory  methods in oops? i am very new to  OOPS concepts ?
    Thanks in advance

    PRINTER - part2
      METHOD constructor.
        "initial printer cartridge fill
        me->number = i_number.
        me->cartridge = i_units.
        me->cost = me->cartridge * 10.
      ENDMETHOD.                  
      METHOD increase_cost.
        cost = cost + i_units.
      ENDMETHOD.                   
      METHOD consume_cartrigde.
        cartridge = cartridge - i_units.
      ENDMETHOD.                   
      METHOD get_total_cost.
        DATA lo_printer TYPE REF TO lcl_printer.
        LOOP AT it_printers INTO lo_printer.
          r_cost = r_cost + lo_printer->get_cost( ).
        ENDLOOP.
      ENDMETHOD.                 
      METHOD get_cost.
        r_cost = cost.
      ENDMETHOD.                
      METHOD get_cartridge.
        r_cartridge = cartridge.
      ENDMETHOD.                   
      METHOD get_number.
        r_number = number.
      ENDMETHOD.                  
    * helper method to show current state of printers
      METHOD show_printers.
        DATA lv_mess   TYPE string.
        DATA lv_number TYPE i.
        DATA lv_cartridge  TYPE i.
        DATA lv_cartridge_c TYPE c LENGTH 5.
        DATA lv_cost TYPE i.
        DATA lv_cost_c TYPE c LENGTH 5.
        DATA lv_number_c TYPE c LENGTH 2.
        DATA lo_printer TYPE REF TO lcl_printer.
        LOOP AT it_printers INTO lo_printer.
          lv_number_c = lv_number = lo_printer->get_number( ).
          lv_cost_c = lv_cost  = lo_printer->get_cost( ).
          lv_cartridge_c = lv_cartridge = lo_printer->get_cartridge( ).
          CONCATENATE lv_mess 'Printer:' lv_number_c ', cost:' lv_cost_c ', cartridge:' lv_cartridge_c
                      cl_abap_char_utilities=>cr_lf INTO lv_mess SEPARATED BY space.
        ENDLOOP.
        MESSAGE lv_mess TYPE 'I'.
      ENDMETHOD.                   
    ENDCLASS.  
    CLIENT
    DATA go_printer  TYPE REF TO lcl_printer. "printers
    DATA go_job TYPE REF TO lcl_job.          "job
    DATA  gv_mess TYPE string.
    DATA: gv_number TYPE i,
          gv_number_c TYPE c LENGTH 10.
    SELECTION-SCREEN BEGIN OF BLOCK bl1 WITH FRAME.
    PARAMETERS: pa_print  TYPE i OBLIGATORY, "printer number
                pa_units TYPE i DEFAULT 100. "initial printer filling
    SELECTION-SCREEN PUSHBUTTON /10(15) addp  USER-COMMAND fcadd  VISIBLE LENGTH 15.
    SELECTION-SCREEN PUSHBUTTON /10(15) refil USER-COMMAND fcref  VISIBLE LENGTH 15.
    SELECTION-SCREEN PUSHBUTTON /10(15) show  USER-COMMAND fcshow VISIBLE LENGTH 15.
    SELECTION-SCREEN PUSHBUTTON /10(15) print USER-COMMAND fcprnt VISIBLE LENGTH 15.
    SELECTION-SCREEN PUSHBUTTON /10(15) total USER-COMMAND fctot  VISIBLE LENGTH 15.
    SELECTION-SCREEN END OF BLOCK bl1.
    SELECTION-SCREEN BEGIN OF BLOCK bl2 WITH FRAME.
    PARAMETERS: pa_col   TYPE c1,
                pa_pages TYPE i,
                pa_numb  TYPE i. "to which printer you want the job be send to
    SELECTION-SCREEN END OF BLOCK bl2.
    INITIALIZATION.
      addp = 'Add printer'.
      show = 'Show printers'.
      print = 'Print'.
      total = 'Total cost'.
      refil = 'Refill'.
    AT SELECTION-SCREEN.
      CLEAR: gv_number, gv_number_c, gv_mess.
      CASE sy-ucomm.
        WHEN 'FCADD'.
          go_printer = lcl_printer=>factory( i_number = pa_print
                                             i_units  = pa_units ).
        WHEN 'FCSHOW'.
          IF go_printer IS NOT BOUND.
            MESSAGE 'Add at least one printer first' TYPE 'E'.
          ELSE.
            go_printer->show_printers( ).
          ENDIF.
        WHEN 'FCPRNT'.
          IF pa_pages IS INITIAL.
            MESSAGE 'Provide number of pages' TYPE 'E'.
          ENDIF.
          CREATE OBJECT go_job EXPORTING i_pages = pa_pages i_color = pa_col.
          IF lcl_printer=>get_printer( pa_numb ) IS NOT BOUND.
            gv_number_c = pa_numb.
            condense gv_number_c.
            CONCATENATE 'Printer' gv_number_c 'doesn`t exist, select correct one' INTO gv_mess SEPARATED BY space.
            MESSAGE gv_mess TYPE 'E'.
          ELSE.
            go_printer->print( i_number = pa_numb
                               io_job   = go_job ).
          ENDIF.
        WHEN 'FCTOT'.
          IF go_printer IS BOUND.
            gv_number_c = gv_number = go_printer->get_total_cost( ).
          ENDIF.
          CONCATENATE 'Total cost of all printers for printing and initial cartridge filling is: ' gv_number_c INTO gv_mess
                      SEPARATED BY space.
          MESSAGE gv_mess TYPE 'I'.
        WHEN 'FCREF'.
          IF lcl_printer=>get_printer( pa_print ) IS NOT BOUND.
            gv_number_c = pa_print.
            CONCATENATE 'Printer doesn`t exist' gv_number_c INTO gv_mess SEPARATED BY space.
            MESSAGE gv_mess TYPE 'E'.
          ELSE.
            go_printer->fill_cartridge( i_number = pa_print
                                        i_units = pa_units ).
          ENDIF.
      ENDCASE.
    Regards
    Marcin

  • How to use super.finalize method?

    Hi,
    pls guide how to use super.finalise ( ) method ?
    Regards,
    Pavani

    http://www.janeg.ca/scjp/gc/finalize.html
    Armin

  • How to use a custom database authentication with APEX_AUTHENTICATION??

    i have Custom user authentication method.
    create or replace function user_check(username varchar2,password varchar2) return boolem
    is
    check_out integer;
    begin
    select count(*) into check_out from "user" where USER_EMAIL=username and USER_PASS=password;
    if check_out >0 then
    return true;
    else
    return false;
    end if;
    end;
    apex_authentication.login() how to use. And how to make apex_authentication.login() use my method Verify User Login

    You can't mix custom authentication and the internal APEX authentication functions.. So either you use the pre-built user authentication in APEX or you can build your own CUSTOM authentication...
    Many examples of custom authentication are out there...
    Thank you,
    Tony Miller
    Ruckersville, VA

  • How to use JNDI lookup from a JSP

    Hello,
    I know I should not be doing this (writing the lookup code in a JSP) but have to do it for some reasons.
    I am using this code in my JSP:
    try
         Context ctx = new InitialContext();
         dataSource = (DataSource)ctx.lookup("jdbc/mybillingora");
         conn = dataSource.getConnection();
         statement = conn.createStatement();
    catch(Exception excep)
    Is this code enough for a JNDI look up?? When I use this code, I get an exception:
    "javax.naming.NameNotFound exception:jdbc/mybillingora"
    Do I need to do something else??
    Why do we use :
    Properties env = new Properties();
    env.put(Context.INITIAL_CONTEXT_FACTORY,
    "<some_context_factory>");
    env.put(Context.PROVIDER_URL, PROVIDER_URL);
    env.put(Context.SECURITY_PRINCIPAL, JNDI_USER);
    env.put(Context.SECURITY_CREDENTIALS, JNDI_PWD);
    InitialContext = new InitialDirContext(env);
    where JNDI_USER is the userid If ACL is configured at the JNDI server
    where JNDI_PWD is the password If ACL is configured at the JNDI server
    Context.INITIAL_CONTEXT_FACTORY is the initial Context factory and depends on ur JNDI service provider.
    PROVIDER_URL is the url of the JNDI server containing protocol/ip/port
    do i need to use this??
    would appreciate your help on this....
    Thanks

    If Tomcat is your servlet/JSP engine, they have a nice bit about how to do it:
    http://jakarta.apache.org/tomcat/tomcat-4.1-doc/jndi-datasource-examples-howto.html
    MOD

  • How to use ShowValue within a UIX/JSP page to display an active link?

    I am storing URL's in the DB and want to display them as active links on a UIX/JSP page. I thought that I had this working some time ago, but now it no longer works.
    Using <bc4juix:RenderValue datasource="ds1" dataitem="myTextField" /> will display "http://www.otn.oracle.com" as an inactive link using UIX/XML which is expected.
    Using <jbo:ShowValue datasource="ds1" dataitem="myTextField" /> will display an active link using if using BC4J/JSP, which is expected.
    However, I have not been able to do this using a UIX/JSP page.
    Is it possible to use ShowValue within a UIX/JSP page to display an active link?
    Thanks,
    Bill G

    Hi Juan,
    I've done the following and it does not work for me;
    --- snip ---
    <uix:form name="form1" method="GET">
    <bc4juix:Table datasource="ds1" >
    <uix:columnHeaderStamp>
    <uix:styledText textBinding="LABEL"/>
    </uix:columnHeaderStamp>
    <%--
    <jbo:AttributeIterate id="dsAttributes" datasource="ds1" hideattributes="UixShowHide">
    <bc4juix:RenderValue datasource="ds1" dataitem="<%=dsAttributes.getName()%>" />
    </jbo:AttributeIterate>
    --%>
    <bc4juix:RenderValue datasource="ds1" dataitem="FacilityDesc" />
    <bc4juix:RenderValue datasource="ds1" dataitem="LocationId" />
    <bc4juix:RenderValue datasource="ds1" dataitem="LocationDesc" />
    <%-- ** THE FOLLOWING DOES NOT DISPLAY ON THE BROWSE_EDIT_PAGE ** --%>
    <jbo:ShowValue datasource="ds1" dataitem="Notes" ></jbo:ShowValue>
    <%-- ** THE FOLLOWING DOES NOT DISPLAY ON THE BROWSE_EDIT_PAGE ** --%>
    <uix:rawText>
    <jbo:ShowValue datasource="ds1" dataitem="Notes" ></jbo:ShowValue>
    </uix:rawText>
    <%-- ** THE FOLLOWING DOES NOT DISPLAY ON THE BROWSE_EDIT_PAGE ** --%>
    <uix:contents>
    <uix:rawText>
    <jbo:ShowValue datasource="ds1" dataitem="Notes" ></jbo:ShowValue>
    </uix:rawText>
    </uix:contents>
    --- snip ---
    Bill G...

  • How to use a custom script in a batch process?

    I was recently told that I can Photomerge, crop and save 2 separate folders of images to a 3rd folder in a batch process if I created a custom Javascript.  Are there any examples of how to integrate a custom script as an action in a batch process?

    if you recieve an image from mms you can save the object to gallery and then select it as wallpaper
    If  i have helped at all a click on the white star below would be nice thanks.
    Now using the Lumia 1520

Maybe you are looking for

  • Multibyte character support in Jdbc Driver

    Hi, I want to use multibyte characters in my Application and to store it in my database. If my database provider does not support a Multibyte data type, Can my Jdbc Driver provide support for the same ? For a column of type ISO88591 which is of singl

  • Help needed in creating file structure

    Hi friends, - <Validity>   <Validity Time="1">12102010</Validity>   </Validity> This is a node of an xml file which i need to use in my scenario.but i was stuck in creating data type for this node.how to create data type for this node? as at target s

  • External KM Repository and Microsoft 2007 extensions compatibility issues

    Hi, We are currently having issues when trying to open Microsoft Office 2007 documents through an external KM repository (connected to a Windows share drive).  The new extensions are not recognized, and so the user is only allowed to save the documen

  • Sorting the Mail

    Without using the preview option, is there a way to open a message and sort it to a sub mailbox that I created? It seems there are no toolbar features that allow this. On the iPhone, I can move the message to a folder right from the message, is that

  • How to resolve error 50103

    Dear All I am trying to collect data from two sensors. Both sensors ouput is Analoge Voltage. My purpose is to acquire data from both sensors and then plot thier waveforms, multiply both waveforms and get FFT. The error coming is 50103. The immage of