Using an Application module's customised Function in JSF

Dear All
I wrote a function in the application module with the return type of MAP.
this function has input parameters. when i try to access the return in EL for value element of my page components, i am always face the NULL.
but when i deal with the return value in tho code, there is no problem.
On the other hand, if the function does not have any input parameter, the EL works correctly.
Can anyone help me with this problem.
and one more thing. the function is executes every time the page is loaded but i just want it to be executed after i click a button. this means that the return parameter has already the value i need before i execute the function. it seems to be executed automatically at the start of the page loading. what should i do to prevent the execution?
Thanks for helping me

Expose your method. Drag your method from your DataControl onto your page and choose for a 'Form'.
That way, you will get a form with some inputfields (for the parameter(s)) and a submit button.

Similar Messages

  • Use of application module pool and ADF Busines Components

    Hi to all;
    Lets suppose an web application with about 10 CRUD forms and 15 to 20 reports or forms just to query and show data;
    That's clear to me, all the advantages of using App modules pool.
    But for that reports ..... Just an Read only and Forward Only data ?
    I was wondering, if it will be more effective and lightweight if we just take an JNDI JDBC connection query data and show it.
    This imaginary application will make use of application module pool to provide that 10 CRUD web forms and in other hand, will have for reports,JNDI data sources;
    What are your opinion about having this two architectural approach working together in one application ?
    Very thanks;
    Marcos Ortega
    Brazil;

    Hi Deepak;
    BC4J in my opinion is great and i am proud to share this opinion with all of you;
    As a meter of fact, i post this thread to help me better understand BC4J architecture.
    I think that my doubt main point is ...
    Are application modules pool's life cycle an extra work , when the job is just to read and show data ?
    Perhaps, an document about statefull and/or stateless application service release, help me;
    IMHO;
    cached data most of the time must to be discarted for reports, always we want to query database directly, View's object ClearCache() method would be called to reports.
    I think that it's different, when we are talking about sequent requests when we need to span the session, views and entities states.
    Forwards Thanks;

  • Problem in calling application module's custom functions

    i m facing problem in calling application module's custom functions in jsp pages.
    i'll highly appreciate any reply to this mail.
    anant

    Hi,
    I also need to know how to call custom methods
    within an application module implementation.
    I have tried the <jbo:ApplicationModule id=am ...\>
    then later in the JSP <% am.customMethod() %>
    and this does not work. Any hints?I don't know how it works with JSPs, but if you want to call a custom method on a ApplicationModule, you first have to cast it to your custom class type.
    Somethin like this:
    MyAppModule am = (MyAppModule) sessionCookie.useApplicationModule( ... )
    or maybe in your JSP
    <jbo:ApplicationModule id="am">
    <% MyAppModuleClass am = (MyAppModuleClass) am; %>
    I think you forgot to do something like this in your JSP. Note that the code is not tested.
    Hope that helps
    Benjamin

  • Access an Application Module Client Interface in a JSF Web Application

    How to Access an Application Module Client Interface in a JSF Web Application
    I use this code but class ValueBinding is deprecated in JDeveloper11g
    FacesContext fc=FacesContext.getCurrentInstance();
    ValueBinding vb=fc.getApplication().createValueBinding("#{data}");
    BindingContext bc=(BindingContext)vb.getValue(fc);
    DCDataControl dc=bc.findDataControl("SRServiceDataControl");
    ApplicationModule am=(ApplicationModule)dc.getDataProvider();

    user581394,
    JDeveloper 11 and the introduction of ADF Faces RC introduces a new dependency, which is JSF 1.2. The createValueBinding on the FacesContext object is deprecated in JSF 1.2. To resolve an expression in JSF 1.2 use the following method or something similar.
        public static Object resolveExpression(String expression) {
            FacesContext facesContext = getFacesContext();
            Application app = facesContext.getApplication();
            ExpressionFactory elFactory = app.getExpressionFactory();
            ELContext elContext = facesContext.getELContext();
            ValueExpression valueExp =
                elFactory.createValueExpression(elContext, expression,
                                                Object.class);
            return valueExp.getValue(elContext);
        }--RiC                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

  • Help!! - Unable to use the Application Module Deployed as Corba Object in Oracle 8i

    I have been able to successfully deploy an Application Module in Oracle 8i but i am un able to get a reference to the Application Module from the database the code used by me is -
    package client;
    import javax.naming.Context;
    import javax.naming.InitialContext;
    import java.util.Hashtable;
    import oracle.jbo.*;
    import org.omg.CORBA.*;
    public class Corba8IClient{
    Hashtable env = new Hashtable();
    ApplicationModule appMod = null;
    String theAMDefName = "test/jd/freshJBO.FreshJBOModule";
    public Corba8IClient() {
    System.out.println("Started...");
    // Load the Application Module
    try{
    // Component deployed to Oracle8i CORBA Server.
    // Set up the 8i environment
    System.out.println("Setting up initial Context...");
    env.put(Context.INITIAL_CONTEXT_FACTORY, JboContext.JBO_CONTEXT_FACTORY);
    env.put(JboContext.DEPLOY_PLATFORM, JboContext.PLATFORM_ORACLE8I);
    env.put(Context.SECURITY_PRINCIPAL, "jd");
    env.put(Context.SECURITY_CREDENTIALS, "jd");
    env.put(JboContext.HOST_NAME, "Dev51");
    env.put(JboContext.CONNECTION_PORT, "2481");
    env.put(JboContext.ORACLE_SID, "ORA8I");
    // env.put(JboContext.APPLICATION_PATH, "test/jd/");
    System.out.println("Getting initial Context.");
    Context ic = new InitialContext(env);
    System.out.println("Doing Lookup...");
    ApplicationModuleHome home = (ApplicationModuleHome)ic.lookup(theAMDefName);
    System.out.println("Calling create...");
    // home
    System.out.println("Home Class Name : "+home.getClass().getName());
    oracle.jbo.client.remote.corba.aurora.AuroraApplicationModuleHome am = (oracle.jbo.client.remote.corba.aurora.AuroraApplicationModuleHome)home;
    System.out.println("DefName "+am.getDefName());
    appMod = home.create();
    System.out.println("Setting up connetion from AppMod to database...");
    appMod.getTransaction().connect("jdbc:oracle:thin:jd/jd@dev51:1521:ORA8I");
    }catch(Exception e) {
    e.printStackTrace();
    System.out.println("AppMod full Name "+ appMod.getFullName());
    public ApplicationModule getAppMod(){
    return appMod;
    public static void main(String args[]){
    Corba8IClient c8c = new Corba8IClient();
    after running the output is -
    Started...
    Setting up initial Context...
    Getting initial Context.
    Doing Lookup...
    Diagnostics: Silencing all diagnostic output (use -Djbo.debugoutput=console to see it)
    Calling create...
    Home Class Name : oracle.jbo.client.remote.corba.aurora.AuroraApplicationModuleHome
    DefName null
    oracle.jbo.ApplicationModuleCreateException: JBO-25222: Unable to create application module.
    at oracle.jbo.client.remote.corba.CORBAApplicationModuleHomeImpl.create(CORBAApplicationModuleHomeImpl.java:63)
    at client.Corba8IClient.<init>(Corba8IClient.java:39)
    at client.Corba8IClient.main(Corba8IClient.java:53)
    java.lang.NullPointerException
    at client.Corba8IClient.<init>(Corba8IClient.java:45)
    at client.Corba8IClient.main(Corba8IClient.java:53)
    Corba Object is deployed as -
    ObjectName = /test/jd/freshJBOModule
    Server Class = freshJBO.server.o8.FreshJBOModuleServerO8
    Helper Class = oracle.jbo.common.remote.corba.RemoteApplicationModuleHomeHelper
    The Application Module conatians an entity object and a view object for Dept Table in schema jd(Username -jd, Password -jd).

    Moneesh,
    I believe there is a problem with the way you set the variable theAMDefName. It should be:
    String theAMDefName = freshJBO.FreshJBOModule";
    Then you need to reinstate the line you commented out, to set the application path (but remove the trailing / from the path, as shown):
    env.put(JboContext.APPLICATION_PATH, "test/jd");
    If that doesn't work, and for future reference, I suggest testing your deployed application module from the Business Component Browser (aka the tester) before trying your hand-coded client. Start the tester, select Oracle8i as the middle tier server type, make sure the other information in the connect window is correct, then click Connect.
    Good luck
    Blaise

  • Using remotable Application Modules

    I deployed an Application Module to JServer.
    How can i use this remotable AM like an ordinary AM or can anyone tell me where i can
    find documentations about oracle.jbo.common.remote.ejb.RemoteApplicationModule ?
    thanx Tom

    Tom,
    The class you mention is one that we use internally, so we do not provide source or documentation for it.
    See the online help topic:
    User Guides
    Developing Business Components
    Deploying Business Components
    Programming the Client Interface
    for assistance with your other question.

  • Using existing Application Modules Entities in web service provider

    Hi, I want to implement a web service provider having a WSDL file and using JAXWS.
    Is it possible to use in input methods of the service, an Application Module or Entities or View Objects that exist in a separate project.
    I want to perform database operations and facilitate transactions using existing ORM mapping of ADF.
    Thanks,
    Ilias Stavrakis

    Yes, it is possible, but you have to checkout and release the ApplicationModules manually. Use the method <tt>Configuration.createRootApplicationModule(...)</tt> of the class <tt>oracle.jbo.client.Configuration</tt> to checkout modules, and use the method <tt>Configuration.releaseRootApplicationModule(...)</tt> to release it back to the AM pool at the end of processing.
    See this blog entry http://jobinesh.blogspot.com/2010/04/invoking-applicationmodule-from-servlet.html despite the fact that it is not directly related to Web services.

  • How to use an application module custom method in JSP ?

    Hi,
    "TestAM" is an Application Module in which i added a method "TestClient()".
    in a JSP page i have :
    <jbo:ApplicationModule id="am" configname="TestAMLocal" releasemode="Stateful" />
    <jbo:DataSource id="ds" appid="am" viewobject="TestView" rangesize="3"/>
    <%
    My question is how to call the method "TestClient()" in my JSP after these 2 Datatags ?
    (i have exported this method so Jdev have generated the interface "TestAM.java")
    %>
    Thanks for help

    Here is how I did it in my app:
    <jbo:ApplicationModule id="am" configname="TestAMLocal" releasemode="Stateful" />
    <jbo:DataSource id="ds" appid="am" viewobject="TestView" rangesize="3"/>
    <%
    TestAM am2 = (TestAM) TestAM.useApplicationModule();
    am2.TestClient();
    %>
    Hope this helps.

  • Determine all entity associations used in application module?

    Hi,
    ADF 11.1.1.2.0, ADFBC.
    I want to create a JUNIT testcase to loop through all entity associations and compare them with the relations in the Oracle database.
    to get all view objects of the AM I use following method:
    am.getViewObjectNames(true,true);
    How to get all entity associations used in an AM?
    regards
    Peter

    Hi,
    did you try
    View Object --> Entity --> EntityDefImpl --> getAssociationDefImpls() ?
    Frank

  • 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

  • DataBindings and Application Module Bean

    Hallo everybody,
    I am working on JDev 10.1.3.4 and Oracle Application Server 10.1.3.4.
    I developed an 'application module' and I maked it as remotable using 'EJB Session Bean' option;
    then I deployed it on the AS.
    I know how to call remote application module by code in a JClient application ([thanks to a metalink note|https://metalink2.oracle.com/metalink/plsql/f?p=130:14:6076423513290714654::::p14_database_id,p14_docid,p14_show_header,p14_show_help,p14_black_frame,p14_font:NOT,309753.1,1,1,1,helvetica|thanks to a metailk note]):
    bq. JUApplication app = new JUApplication(TestClient.getAppModule()); \\ app.setClientApp(DCDataControl.JCLIENT); \\ +     app.getApplicationModule(+)
    I would like to use remote application module function by DataBindings and %PageDef.
    is it possible? how can I do this?
    best regards
    Edited by: user567554 on Dec 17, 2008 5:44 PM

    Hi Frank,
    thank you for reply.
    Could you make an example how to configure my datacontrol for a remote Application Module Connection?
    I'm able to connect to a remote AM deployed to Local Embedded OC4J, but I'm not able to connect to to a remote AM deployed in a remote AS
    I think need change DataControl Configuration Attribute with the appropiate AM Configuration. Probably my AM Configuration is wrong:
    &lt;AppModuleConfig name="AppModuleEmbeddedASTest2"&gt;
    &lt;DeployPlatform&gt;EjbIas&lt;/DeployPlatform&gt;
    &lt;java.naming.security.principal&gt;oc4jadmin&lt;/java.naming.security.principal&gt;
    &lt;java.naming.security.credentials&gt;*ASpwd*&lt;/java.naming.security.credentials&gt;
    &lt;jbo.internal.embedded&gt;true&lt;/jbo.internal.embedded&gt;
    &lt;JDBCDataSource&gt;jdbc/+myConnDS+&lt;/JDBCDataSource&gt;
    &lt;AppModuleJndiName&gt;AppModuleBean&lt;/AppModuleJndiName&gt;
    &lt;HostName&gt;*AS-IPAddr*&lt;/HostName&gt;
    &lt;ApplicationPath&gt;+ejbAM  (My Application Name)+ &lt;/ApplicationPath&gt;
    &lt;java.naming.security.authentication&gt;simple&lt;/java.naming.security.authentication&gt;
    &lt;ApplicationName&gt;model.AppModule&lt;/ApplicationName&gt;
    &lt;ConnectionPort&gt;*+23791 (found in $ORACLE_HOME/j2ee/myTests//config/rmi.xml)+* &lt;/ConnectionPort&gt;
    &lt;jbo.server.internal_connection&gt;jdbc/myConnCoreDS&lt;/jbo.server.internal_connection&gt;
    &lt;/AppModuleConfig&gt;

  • How do multiple developers share the same application module

    Is there a suggested method for multiple developers to share the same application module? We have 2 developers that will have EOs in the same directory and would like to know how they can share an application module but do development on different pieces of a project.
    Thanks,
    Paula

    Try using CVS or any other source control system. Still there are some points to think about before doing big projects, because there are many files which are updated by JDEV without knowledge by the developer. This causes many conflicts using a version control system like CVS.
    If you developers both are working on the server part of the application, I suggest using multiple application modules. See this blogs:
    http://radio.weblogs.com/0118231/stories/2005/05/27/howGranularShouldMyApplicationModulesBe.html
    http://radio.weblogs.com/0118231/stories/2005/07/19/nestedApplicationModules.html
    On the client side it depends on which technology you are using (struts, swing, jsf, ...).

  • Single session for all Application Modules

    Hello,
    I've got an application that has several Application Modules. All these modules need some data that are set from time to time. I've written some code that calls getSession().getUserData().put("myData",myData). After this method was called in another Application Module i want to retrieve myData with getSession().getUserData().get("myData"). But the result depends if I use 2-tier or 3-tier. In 2-tie I get myData while in 3-tier I get null. My question is:
    Is there a Session object or any other data instance that could be accessed from all Application Modules for on application instance.
    E.g. I've got two user (A,B) who start my application. Through using my app several instance of Application Modules are created. All Application Modules that are created for the instance of User A should be able to share his user name and some other dynamic data while the Application Modules created for B should have no access to that data.
    Doe anybody know if static data of an Application Module are a possible solution?
    regards
    Joerg

    Hi Joerg,
    I am not 100% sure what you are trying to achieve, and with which version of JDeveloper/ ADF, technologies (JSP, Swing), etc, but I can tell you that I have been experimenting with single session accounts myself within a rich-client Swing environment, as I have experienced Oracle DBA guys who want to control user authentication via Oracle accounts (I have achieved this via the JCLoginDialog mechanism, and a bit of a hack)... Frank Nemphius (sp?) posted something about a white paper coming out on a related subject but I don't know where he is with that.
    Anyway, I managed to do it in a prototype by nesting several application modules within a Root Application Module that was essentially simply a Container for the other application modules. Using this mechanism I was able to bind my root application module to any panel I wanted and it would inherit the roots Session.
    ie. I used many application modules and it only used one Oracle Session.
    However, my reservations -
    1) This solution was not tested robustly!
    2) I doubt this would be ideal for a distributed app with thousands of users - My solution is for a very complex app, with a limited number of users.
    Finally, I cannot confirm this is a great solution - I can only tell you it worked in my prototype, and I am currently awaiting the ADF source - when my company and Oracle can decide what level of support we currently have and need!?!? - what exactly does being an "Oracle partner" mean??? Its all very boring and un-interesting to a Java person like me... ;-)
    Once I have the source I will look at how it actually works and perhaps be able to answer questions like this more definitively. Hmm - I wonder if I could get the Oracle JDBC driver source too?? .... Is it written in C or C++?? I know them too... ;-)
    Cheers........Dean

  • Sharing data among Application Modules & Sessions

    Hi,
    I have small BC4J application, which has around 5-6 application modules. One of those application modules is the entry point i.e. the client will first invoke the start method in that application module. This entry point application module will further use other application modules.
    I am using the database tables heavily so I am thinking of caching the required data on the application server side.
    What is the best way of sharing this cache among all the AMs in one session and also among all the sessions?
    For sharing cache in single session, I think we can create the instance of cache in the entry point application module, and then pass it to the rest of the application modules. Please let me know if there is better way of doing this?
    Thanks.
    Nilesh

    Hi Frank,
    We (colleague of Nilesh) unfortunately can't wait for 11g esp. because you can't give a release date.
    The problem we are facing is that we see the same queries hitting the database over and over again. So caching these queries for a 'longer' period of time would save us a lot of round trips to the database.
    The data we want to cache is releasable stable, the data we select is separated from the data we insert. So we can store the data over a longer period of time.
    But as I understand it, there is no solution that would solve such a usecase? (Other then using a different framework/ building a custom solution)
    Message was edited by:
    Thijs Vonk

  • Storing Data in Application Module Session

    I'd like to store information about the current user in the session of the application module. I've been examining the example in the ADF Guide for Forms Developers in Chapter 9, but would like to implement it in a more generic way, in an overridden ApplicationModuleImpl class similar to what is documented in Chapter 28.
    What I'd like to accomplish is:
    A generic setter method similar to:
    public void setVariable(String name, String value) {
    Hashtable userdata = getDBTransaction().getSession.getUserData();
    if (userdata == null) {
    userdata = new Hashtable();
    userdata.put(name.toUpperCase(),value.toUpperCase());
    and a getter method similar to
    public String getVariable(String name) {
    Hashtable userdata = getDBTransaction().getSession.getUserData();
    //null handling omitted
    return (userdata.get(name.toUpperCase()).toString());
    I can test this with calls like:
    setVariable("myName","myValue");
    System.out.println("myName="+getVariable("myName"));
    I don't get any errors, but the output is:
    myName=
    Apparently it isn't either storing the value, or it isn't retrieving it correctly. I have several questions about this:
    1. What am I doing wrong here? It 'looks' like it should work, but isn't.
    2. Is this an appropriate approach to this problem?
    3. Will there need to be any special handling on passivation/activation? Or since it's data stored in the session, will the AM handle that for me?

    In further testing I can see that data is getting stored in my hashtable, and if I retrieve it directly in the setVariable method, the retrieval works. What I've discovered though, is that the code:
    getDBTransaction().getSession.getUserData();
    is returning null, in both the getter and setter methods. I am testing this using the application module tester (right click on the AM, click test). Is this default behavior, i.e. should the above line of code return a null value when using the tester?
    Relatedly, am I going to have to write a front-end for this to test against? (please say it isn't so!)

Maybe you are looking for

  • Supress 0 in report -BI 7.0

    Hello SDNER, In my report I have to supress 0 values for that in Query properties I have set Active (all values = 0). but when I am executing repport in Analyzer 7.0, that 0value is coming so again i need to set properties in Analyzer, Could you pl g

  • Install blocked does not have a valid digital signature verifying publisher.

    Windows XP blocked the install. Error message was: Unknown Publisher. Does not have a valid digital signature that verifies its puiblisher.

  • Better Photoshop integration for exported jpegs

    Hi Jpegs exported by LR have to be saved with new compression parameters if opened & then worked on in Photoshop. This can be very annoying & time consuming when working with numerous files which need a minor correction (such as dodging & burning whi

  • Recievr Comunication chaneel is showing some error

    hi all. while iam trying a file to file scenario. it is showing the error  at reciever CC like. Conversion initialization failed: java.lang.Exception: java.lang.Exception: Error(s) in XML conversion parameters found: Parameter '1.fieldFixedLengths' o

  • Flash intro upload

    ok i am new to this so any help or direction would be great!  I uploaded a flash intro page from t-monster and made the changes I need to make to the files and created a new .swf file.  This is for a flash intro page so my newbie question is how do I