Calling a method in AbstractPortalComponent from JSP

Hi,
I have an abstract portal component with 2 methods:
1. doContent - in this, I specify the name of the jsp to be included in the response - umlogonPage, and am setting a portal event named 'fireCRMRFC'.
2. dofireCRMRFC - in this, I specify the code to connect to the backend crm and get back some value.
In my umLogonPage.jsp, how can I trigger the method 'doFireCRMRFC'? Is it possible at all?
Thanks
OJ

Hi Praveen
I understand you partially...I have implemented this:
public void doContent(IPortalComponentRequest request, IPortalComponentResponse response)
          IResource jspResource = request.getResource("jsp", "/umLogonPage.jsp");
          response.include(request, jspResource);
          IPortalComponentURI rfcURI = request.createPortalComponentURI();
          rfcURI.setPortalRequestEvent(request.createRequestEvent("fireCRMRFC"));
and
public void dofireCRMRFC(IPortalComponentRequest portalReq, IEvent event){
<Connectivity code to backend.>
And I read in another thread and help site that I can raise an event from the jsp to this method (maybe through the doCOntent), but it said this is possible. Can you give me an example of a code that I would have to use in my jsp?
I am trying to understand how this works so I really appreciate your willingness to help.
Thanks
oj

Similar Messages

  • Calling a method in AbstractPortalComponent from JSP without htmlb

    Hi,
    I am trying to trigger an event in a java method in an AbstractPortalComponent from a jsp.
    The event is caught in method doContent:
    IPageContext myContext = PageContextFactory.createPageContext(request, response);
    Event lastEvent = myContext.getCurrentEvent();
    if ((lastEvent != null) && (lastEvent.getComponentName().equals("Compute"))) {
      response.write("Compute");
    The problem is that I cannot trigger it from my jsp. In the jsp is used:
    <%
    IPortalComponentURI uri = componentRequest.createPortalComponentURI();
    uri.setPortalRequestEvent(componentRequest.createRequestEvent("Compute"));
    String linkEvent = uri.toString();
    %>
    and
    <.a href="<%=linkEvent%>">click</a.>     
    (i put some dots because otherwise the editor sees it as html)
    Please help.
    Raymond

    Hi Praveen,
    It still does not work. presentEvent is null.
    In line: if (null != event && "Compute".equalsIgnoreCase(presentEvent.getAction())) you wrote "event" Shouldn't that be presentEvent. I changed it to presentEvent.
    I think the problem is in the jsp. It seems to me that the jsp is not sending a correct event.
    Please keep in mind that I am not using htmlb in my jsp.
    Raymond

  • Calling a Method in Bean from JSP

    Is there a defined jsp tag for calling a method in a Bean? Right now, in a bean named "bean", I would use: <% bean.doSomething(); %>. Is there a tag for this?

    I've wondered this too, the getProperty and setProperty tags only allow you call setters and getters. What if you've got a method called doSomething()?

  • Anyone know the way to call SQLLoader utility or similar from JSP/Servlet?

    Anyone know the way to call SQLLoader utility or similar from JSP or Servlet?
    i would like to make a big data load from web interface, using SQL Loader or similar, because this utility allows a great performance.
    I think that i can make a JSP or Servlet to open file, and create insert statement into a loop, but the performance is very bad for 30000 inpuits.
    Help me please
    Thanks
    Note: my english is very bad. Sorry.

    Hi there,
    I tried this codes into a Bean like this:
    package com.tuxedo.beans;
    import java.io.*;
    public class TuxTest
         public void RunTest()
              try{
                   Runtime rt = Runtime.getRuntime();
                   Process pr = rt.exec("command /k c:\test.bat");
              } catch (IOException e) {
                   System.err.println("Error: " + e.getMessage());
    }and call it with a JSP like this:
    <html>
    <head><title>Tuxedo Test</title></head>
    <body>
    To run a test on local batch file
    <jsp:useBean id="test1 " class="com.tuxedo.beans.TuxTest"/>
    <jsp: RunTest name="test1"/>
    </body>
    </html>i had created folder %tomcat%\webapps\ROOT\WEB-INF\classes\com\tuxedo\beans to store the bean.
    Yet the JSP file executed, but i dun see any response by calling the batch file, anyone have any idea?
    the batch file is like this:
    @echo off
    echo
    echo Hello World!
    echo
    pausePlease help!

  • How to call cystal report8 report file from jsp page

    hi guys
    present i am using cystal report8 already i am having ReportViewer.jar and ReportviewerBean.jar files
    using that please send me sample code how to call that report from jsp page..
    and how to pass the parameters from jsp page to crystalreport8 report file.
    it was very urgent task to me..so please send sample code on above topic..
    or send me crystalreport8 API
    thanks
    regards

    Hi,
    I also want to work on crystal report but i dont have the ReportViewerBean.jar and ReportViewer.jar. So, please tell from where will i get those jar files.
    Thanks in advanced.

  • Calling a method in Class from webdynpro

    Hi All,
    I have to perform some action when i click the button created in my webdynpro screen.
    However I must not write the code for the button action inside the button event. But I have to create a class and inside the class i have to create the method for this button event.
    Can anyone tell me how to call a method in a class created in SE24 from webdynpro on clicking the button.
    Thanks in advance.

    hi..
    When you want to perform some action after clicking a Button, then you have to write the code only in 'Events' - 'On Action' event. From your question, i assume that, you wanna use Assistance class in your webdynpro so as to increase better performance. Here is the link which will guide yuo with screen shot for using assistance class in WD-ABAP.
    http://wiki.sdn.sap.com/wiki/display/WDABAP/AssistanceclassfunctionalityinWDA
    thanks,
    Padma

  • Calling a method in view from component controller?

    Hi,
    Is it posible to call a method that is defined in the Component Controller in the View?
    If it is posible please give some sample code how to call the method?
    Regards,
    Padmalatha.K

    Padmalatha, all the methods defined in a controller from 'Methods' tab are instance methods. An instance method defined in a component controller is callable from any view controller that holds a reference to the component controller.
    Defining methods between the tags
    //@@begin others
    //@@end
    is useful if you want to declare static methods.

  • How to call a method in bean from application module Impl?

    i have to call a method which is in a bean from AppmoduleImpl class. Is it possible ?

    The model layer should never depend on a specific view layer - this breaks reusability.
    What you need to do is expose a service method on your AM. Then your view can call this method and pass a parameter into the model layer.

  • How to call a method in Viewimpl from transient attributes value

    Hai,
    I have a method in ViewImpl say validate().I need to call this method from an transient attributes value where value type is expression.i used adf.object.validate() but its not working.
    Can any one help me
    Thanks in advance

    Hai,
    Jabr i read these in a pdf where it explains about Introduction to Groovy support in JDeveloper and Oracle ADF 11g
    Referencing custom methods in the EntityImpl class
    If you have defined a method in your EntityImpl class, then this can be called as part of your
    expression for an attribute default:
    adf.object.getDefaultSalaryForGrade()
    Unlike when referencing an attribute of the entity object, which can be done by simply
    referencing the attribute name, when referencing a method, you are required to prefix the
    method name with adf.object.
    So is there a way?
    regards

  • Calling PL/SQL stored procedure from JSP tag

    Hello,
    I need to call a PL/SQL procedure from a JSP tag , I donot want to use any Bean to call the PL/SQL procedure. How would I call PL/SQL stored procedure from within JSP using JSP tag library, need some code.
    Thank you
    Syed

    need to call a PL/SQL procedure from a JSP tag , I donot want to use any Bean to call the PL/SQL procedure. How would I call PL/SQL stored procedure from within JSP using JSP tag library, need some code.
    regards
    Indira Rani Bandi

  • Is it possible to call the SQL Server DB from jsp to java?

    im doing a configurable system where you can create your own table using the system. i can do the creation of table by running the statement CREATE TABLE...........(with attributes) in java.
    Let's say i have created tblST1 with attributes st_ID, st_Name, st_Description.
    My problem is i dont know if it's possible to retrieve all the attributes from jsp to java.

    jverd: i need your help. Iv read all the links u posted but im having a hard time in understanding them.
    For the site http://java.sun.com/j2se/1.4.2/docs/api/java/sql/ResultSetMetaData.html , there's a code there which is...
    ResultSet rs = stmt.executeQuery("SELECT a, b, c FROM TABLE2");
    ResultSetMetaData rsmd = rs.getMetaData();
    int numberOfColumns = rsmd.getColumnCount();
    boolean b = rsmd.isSearchable(1);
    what i did was, i inserted it in my java code which is :
    public boolean checkFieldTable2()
              boolean checked = false;
              try
                   IRMS_DBConnect db = new IRMS_DBConnect();
                   db.openCon();
                   ResultSet rs = stmt.executeQuery("SELECT a, b, c FROM TABLE2");
              ResultSetMetaData rsmd = rs.getMetaData();
              int numberOfColumns = rsmd.getColumnCount();
              boolean b = rsmd.isSearchable(1);
                   db.closeCon();
                   checked = true;
              catch (Exception ex)
                   System.out.println("Error on Execution: " + ex);
              return checked;
    and i compiled it and there was an error that the variable stmt was not initialized. Am i doing the right way?
    Can anyone help me pls? pls pls pls

  • Error when I call a method of AppModule from a backing bean.

    I use Jdeveloper 10.1.3.0.3 EA.
    In my application I have created ApplModule and UsrView(for my table USR).
    I have a login page (login.jsp and the backing login.java) with 2 fields userName and password and an ADF Faces Core command button (cmdCheckPass) and the method cmdCheckPass _action() for the click event .
    The problem is that I can’t call method testPassword(userName, password) which is written in AppModule. (I get error:
    javax.faces.FacesException: #{backing_login.cmdCheckPass_action}: javax.faces.el.EvaluationException: java.lang.NullPointerException) from line:
    answer = app.testPass(st1,st2);
    The code is as follows:
    public String cmdCheckPass_action() {
    String answer="";
    String mes = "";
    String st1=this.getInputText1().getValue().toString();
    String st2=this.getInputText2().getValue().toString();
    AppModuleImpl app = new AppModuleImpl();
    answer = app.testPass(st1,st2);
    if (answer == "OK") {
    return "toMain";
    } else {
    answer = "";
    mes="Invalid username, password !!!";
    FacesContext.getCurrentInstance().addMessage(null,new FacesMessage(mes));
    return answer;}
    I don’t know if theoretically is right to call, from a backing bean, a custom method of AppModule.
    Can I have any help on this?
    Thanks in advance,
    Panos

    Some quick ideas:
    Is the clip the same NTSC/PAL standard as the project you are importing it to?
    Have you tried to rename the offending clip (do NOT rename any clips inside the iMovie /Media folder!!).
    How much free space do you have on the iMovie project volume -- what is the size of the imported clip?

  • How to call EJB deployed on websphere from JSP running on Tomcat?

    I am trying to establish communication between two app servers. I have a sample EJB deployed on Websphere and wish to call its business methods from a JSP page which is running on Apache Tomcat server. (ie) Tomcat is client to websphere. Is it possible to do? If so, what are the client Jar files of websphere that I should make available to JSP page on Tomcat? Do I need to set any Jars in Tomcat environment variables? Lood forward for your immediate help. Thanks in advance

    Please see the thread
    http://forum.java.sun.com/thread.jspa?threadID=514536.
    Hope that helps..

  • Call a pl/sql function froma jsp

    I need to call an pl/sql function which basically returns true or false depending on the count. based on the return value I have to alert a message. how can i call the pl/sql fucntion in a jsp?
    thanks for ur help.

    You call the function the same way you would from anywhere, although i don't recommend you call database functions directly from a JSP page as it's bad form.

  • Call applet method with arguments from JavaScript

    I have an applet with a method doSomething(int a, String b, double c), I want get a,b,c from threee text fields put into an HTML page, and pass them to the applet method. I've a very poor knowledge in JavaScript, how can I pass correctly the arguments without raise a CastException? It seems to me that JavaScript doesn't have int, String, double.....

    Hi!
    You can verify before you send the parameters to the applet
    Something like that:
    var result = parseInt (a);
    if (result =NaN)
    alert("Sorry not Int");
    return false;
    and after that you can send the parammeters to the applet that way:
    document.yourApplet.Your_function_from_applet(result,..)
    hope this help!
    adina

Maybe you are looking for