How to import custom classes from model to view controller in adf?

hi...
i have some custom classes in model layer in adf.
i want to use them in view controller but i cannot import them.
how is this possible?
my jdev version is 11.1.1.5

You normally don't have to do anything special. The view controller project has a dependency to the model project. So simply typing the class name should show you hte option to generate the need import statement for the class.
However, not all classes which reside in the model project should be imported into the view Controller as it might break the MVC pattern.
Timo

Similar Messages

  • Import java class from model package

    I have a java class in model package.I create a managed bean in the view package and I want to import the first java class with "import model.class1" but this error "import model.class1 not found" is shown.What should I do?

    Hi,
    Why are you importing the Model classes to your backing bean? You should not be doing that. Instead, expose the method in model as client interface (whichever you want to call in the backing bean), create the method binding in your pagedef. Then, from the backing bean, you can execute the method programatically.
    -Arun

  • How to import a class from a package at the same level

    Hello friends,
    i have a class as Plaf.java
    as
    package org.vaibhav.swing.plaf;
    import java.awt.*;
    import javax.swing.*;
    public class Plaf {
    other code
    }as you see, this is in org.vaibhav.swing.plaf package.
    I have one more class as
    package org.vaibhav.swing.frames;
    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.*;
    public class StartFrame extends JFrame implements ActionListener {
    other code
    }and this class is in package org.vaibhav.swing.frames
    Please hlp me how to use the class Plaf in StartFrame.java. Rather what import statement should i use in StartFrame.java.
    please help.
    thank you
    Message was edited by:
    vaibhavpingle

    but it then gives me this error
    StartFrame.java:11: package org.vaibhav.swing.plaf
    does not exist
    import org.vaibhav.swing.plaf.*;
    Have you first compiled Plaf.java and saved it in this directory strucuture
    /org/vaibhav/swing/plaf/
    And also have you set your classpath to the parent directory of org folder.
    Message was edited by:
    qUesT_foR_knOwLeDge

  • How to invoke custom classes from logon PAR

    Hi all,
    Can someone tell me how I can invoke a java class that I have written on Click of a Submit button from the Help Page of the Login Screens. I have to customise this screen, changing the existing functionality.
    Regards,
    Ashwini.

    Hi Ashwini,
    On the onClick method of the Submit button refer the even handler method you have defined in you DynPage and in that event handler you can instantiate the required java class and call its functions.
    ex:
    in you JSP define:
    <hbj:button
         id="submitButton"
         text="Submit"
         tooltip="Click to search the forum"
         onClick="onSubmit"
    />
    in you DynPage define a event handler method called 'onSubmit(Event event)' and write you logic.
    Cheers
    Kiran

  • How to get Result Class from Model invocation

    Hi experts,
    I would like to invoke a webservice request which return a list of Object as a response.
    I refer to the adaptive web service model for web dynpro, however, the example is only to sent a list of input object to the web service.
    //@@begin javadoc:sendEmail()
    /** Declared method. */
    //@@end
    public void sendEmail() {
    //@@begin sendEmail()
    // call Email Web Service and update dependent model node 'Response'
    wdContext.currentRequest_SendEmailElement().modelObject().execute();
    wdContext.nodeResponse().invalidate();
    //@@end
    if I were to have an object say SaleDetails return as response instead of a integer (returnCode as show in the example). Can i do the following:
    wdContext.currentRequest_SendEmailElement().modelObject().execute();
    wdContext.nodeResponse().invalidate();
    SaleDetails details = (SaleDetails) wdContext.currentRequest_SendEmailElement().getAttributeValue("saledetails");
    can advise?
    thank you.

    Hi,
    You are talking about the response of the model node. If the webservice is supposed to return an object of type SaleDetails, then the response node will contain a node of SaleDetails type with all the attributes of SaleDetails.
    You dont have to explicitly cast anything.
    thanks & regards,
    Manoj

  • How to import custom java jar/class into oracle to be used in java proc ?

    Hi
    I would like to know how to import custom java jar/class files into oracle to be used in java stored procedure.
    I am developing a oracle pl/sql procedure to call java program. The java program will be created as procedure and will be published.
    But, my question is that I do have a other external jar/class file that need to be imported into this java program.
    example
    raise_sal.java
    import java.util.*;
    import oracle.sql.*;
    <<reference other java programs >>
    import cmpmsgsvc.xxxx.* ;
    import cmpmsgsvc.yyyy.* ;
    import cmpmsgsvc.zzzz.* ;
    how do I import the cmpmsgsvc jar/class file into oracle so that I don't have any
    compilation errros on raise_sal.java program ??
    what are the steps to import/compile and validate to do this?
    thanks for your help in advance.
    Thanks
    rrb.

    Kuassi
    Problem is that, I have 6 jar files that are needed to be included in the main java program. And, there are more than 50+ classes, propertiers in those 6 jar files.
    It might be not good idea to have all those 50+ classes in the production database.
    Is there anyway that I keep all those 6 jar files in unix box (our's is oracle erp installation with oracle being installed on unix box) and just refer them in the main java program. I mean database will be loaded with main java program and it should able to refer other 6 jar files from unix.
    if we create a directory and keep all jar files in there and include that directory in classpath variable, does this works? or what is other method?
    Please let me know.
    Thanks

  • How to import a class not in the package from a package

    how to import a class not in the package from a package?

    http://java.sun.com/docs/books/tutorial/java/interpack/usepkgs.html

  • Accessing custom classes from JSP

    Hi Guys,
    I am having some problems accessing my custom classes from my JSP.
    1) I've created a very simple class, SimpleCountingBean that just has accessors for an int. The class is in the package "SimpleCountingBean". I compiled this class locally on my laptop and uploaded the *.class file to my ISP.
    2) I've checked my classpath and yes, the file "SimpleCountingBean/SimpleCountingBean.class" is located off of one of the directories listed in the classpath.
    3) When I attempt to use this class in my JSP, via the following import statement:
    import "SimpleCountingBean.*"
    I get the following compile error
    java.lang.NoClassDefFoundError: SimpleCountingBean/SimpleCountingBean
    I'm pretty sure that my classpath is properly setup because when I purposely garble the import statement, I get the "package not found" compile error.
    Do I need to upload some other files in addition to the class file? Any suggestions would of course be appreciated.
    Sonny.

    Trying to get some clearer view.. so don't mind..
    So you uploaded all your .jsp files into your account which is:
    home/sonny
    and it compiles and work. But custom classes doesn't seems to be working, where did you place your classes?
    From my knowledge of tomcat, classes are normally placed in, in this case:
    home/sonny/web-inf/classes
    Maybe it differs from windows enviroment to *nix enviroment.. well, I'm just saying out so if its not the case.. don't mind me.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

  • Importing a class from another context?

    Hi JSP techies,
    Im using RESIN and having a simple problem of figuring out how to import classes from another context, if Im using the right word.
    ie.
    My .jsp files are under $home/resin/doc/test dir. And in the jsp file, I would like to import a servlet class or a plain java class. But the servlet classes and all other classes are located under $home/resin/webapps/project/WEB-INF/classes/a/b/c
    Hence when I say
    <% page import="a.b.c.*" %>
    I get an error saying "a" not found.
    1. When I say "servlet classes are in a different CONTEXT", is that right? or is it just another directory?
    2. How can I make the jsp file import the classes from the servlets class path?
    Note: Ofcourse, when I copy the package to the
    $home/resin/doc/WEB-INF/classes dir, everything works fine. But thats simply not an efficient way to get around. Could anyone clear my doubts on this regd.?
    Thanks in advance.
    Arun

    Oh... I get it now. I'm sorry, I had you poorly misunderstood. You are trying to import servlets from another web app or servlet context. I would suggest you put servlets that are common to all web apps in the system classpath and not tie them to any particular web app. In other words create a package directory structure from the system's root directory or any where outside of any web apps and point the system classpath to the beginning of that directory structure. I have a similar thing going with Tomcat. I have a folder in my root called Java_Class which is in my classpath. I build all common utilities in this directory. So I have a com/craig/web structure that holds my AppServlet which is in package com.craig.web. This servlet is visible to all web apps via the Windows classpath. Servlets particular to an application like say an MusicOrderProcess servlet would reside in a package under the webserverhome/webapps/MusicStore/WEB-INF/classes directory where webserver home is the home directory of the webserver you are using. I've tested this across webservers as well (orionserver and Tomcat) and it works.
    From the prompt you include in your posts I am guessing that you are running on UNIX. Move your common servlets out of their respective web apps and into a common directory structure. Configure the UNIX $CLASSPATH (or is it $classpath?) environment variable to point to this sturcture and you'll be on your way!
    Post again if you have more questions!

  • How to import Custom idoc into  IR?

    I have a custom idoc and i need to map it with the receiver format after importing into IR . Please let me know the sequence of steps to import custom idoc into  Integration repository?
    I think I need to first import into IDX2 and then import into repository. Am I correct?

    Hi Prateek,
    thanks for the information .The normal standard idocs we import by searching the idoc eg- for importing matmas we type mat and we search it, since it is a standard idoc it will be available in the list (after selecting the chek box "Import of idoc or rfc interfaces from sap system permitted").
    But my question is how we import custom idoc as they wont be present in the list?

  • How to call Java class from Forms 6i?

    Hi friends,
    I need to call a Java class from my Forms 6i application.
    (It runs under WIndows XP. It's a client/server application and I have only the client and the Form builder installed on my PC)
    I don't know almost anything about Java's world so your help would be very useful for me.
    Could you tell me exactly what i have to do?
    I've read in metalink several Notes, but they supposed that the Java architecture is already installed in the computer.... I only have the default installation of Developer 6i... so I would need to know:
    - How to install/configure the neccesary to execute Java classes without problem
    - How to invoke the .class from Forms 6i.
    Thanks a lot
    Jose.

    And also this one:
    Problem Description
    Installed Forms 6i Rel 2 on a MS Windows machine. When trying to Import the Java
    Classes getting the errors
    PDE-UJI0001 Failed to create the JVM
    Solution Description
    You need to to install JDK 1.2.2 to run the Java Importer. And set the PATH's
    and classpath's correctly.
    Explanation
    1. Download and install the JDK 1.2.2.
    Possibly available at: http://java.sun.com/products/archive/
    2. Assuming the JDK 1.2.2 is installed in c:\jdk1.2.2 directory and the JRE in
    C:\PROGRA~1\JAVASOFT\JRE\1.2 directory; ORACLE_HOME=C:\Dev6iR2.
    Set the PATH to
    set PATH=c:\jdk1.2.2\bin;C:\PROGRA~1\JAVASOFT\JRE\1.2\bin;C:\PROGRA~1\JAVASOFT\JRE\1.2\bin\classic;%PATH%
    ( If you are using ias9i then the JDK 1.2.2 comes with the ias installtion ,
    in this case please set the PATH to
    D:\ias9i\Apache\jdk\bin;D:\ias9i\Apache\jdk\jre\bin;D:\ias9i\Apache\jdk\jre\bin\classic;%PATH% )
    3. Set the CLASSPATH to set CLASSPATH=%CLASSPATH%;C:\Dev6iR2\TOOLS\COMMON60\JAVA\IMPORTER.JAR;.
    (If you do not set the CLASSPATH correctly you will get the error
    PDE-UJI002 Unable to find the required java importer classes)
    4. Now run the Forms Builder by using the command.
    C:\Dev6iR2\bin\ifbld60.exe
    Now the Java Importer Should Run fine.
    Francois

  • For some reason is all my music gone from iTunes, but I do still have the songs on my iPod Touch... So my problem is that I don't know how to import my files from iPod Touch back to iTunes.

    Hey all
    I should export my music to another program, because I do also have this MP4, which needs some files. Well, I did that and it seems like Windows Media Player couldn't open the files, but then I go back to iTunes and I see all my files are gone. Nothing is left, and now I can't syncronize files to my iPod Touch without deleting all the existing files. So now the only thing I want to know, if it's possible, is how to import music (not from Apple Store) from my iPod Touch to iTunes?

    You can use one of the third-party programs discussed here to transfer non-iTunes purchased music to a computer.
    new PC: Apple Support Communities

  • How to import java Classes in report Builder 10g

    How to import java Classes in report Builder 10g .....
    Arshad

    Hello,
    To import the Java classes:
    Add your jar in the REPORTS_CLASSPATH
    Launch Reports Builder.
    Note:
    You must launch Reports Builder now so that the new REPORTS_CLASSPATH is used.
    Choose Program > Import Java Classes to display the Import Java Classes dialog box.
    Regards

  • How to load java class from jsp page?

    hi all!
    Does anyone know how to load java class from jsp page?
    I try to load java class from jsp page.
    Is it possible to load java class fom jsp page?
    thanks and have a good day!

    What I mean is How to load/open java class file from jsp page?
    I think we can open Applet from jsp page by using
    <applet code=helloApplet.class width=100 height=100>
    </applet>
    but, how to open java class which is an application made by Frame?
    thanks and have a good day

  • How to import a logo from flat file to SAP in SMARTFORM.

    how to import a logo from flat file to SAP in SMARTFORM. i need to know whether TIFF format is used and also the full steps.
    Thanks,

    Hi,
    You can not directly use a logo from a file into a Smart form. First you will have to upload it to SAP. This has to be done only once. Once it is imported into SAP then you can use it in smart form. To import a logo to SAP, goto SE78. Open the tree under GRAPHICS. Select the file type and click on the Import (first button on the toolbar, just before delete button). Select the logo file and give it some appropriate name along with description. Select appropriate type of the image and click Continue. Your logo will be uploaded into SAP from a file. Now in your smartform, Create a Graphic Node, give the name of the logo along with other properties. In this way you can import a logo from a flat file into SAP and consequently in a smart form.
    Reward points if the answer is helpful.
    Regards,
    Mukul

Maybe you are looking for

  • How to sort out different issues on Satellite A505-S6973

    Can anyone tell me, if the warranty period on my laptop has not passed, can i return my laptop to toshiba and have all my issues sorted out. Would there be a cost to do whatever repairs software related needs be done and how i am supposed to go about

  • How to reference a column value in a particular block.

    I am having problem in referencing a column in a particular Block in WEBi report. Scenario: I have only one query in the query panel and i am creating a sample report having different blocks.                Now there are four blocks in my report,    

  • "The ipod could not be synced because the sync session failed to start"  What does this mean?

    When syncing on iTunes, the syncing meter runs in iTunes in my computer but nothing appears in my device (It should have Sync In Progress).  Whenever I edit my music files (editing title, album and artwork), it edits in iTunes but when I eject my dev

  • Error Installing Oracle 8.1.7 in NT4

    Hi Iam trying to install Oracle 8.1.7. on Windows NT4 server SP6 on my E: drive with 10GB free,the C: drive has 3GBfree. The installation files are also on the the E: drive. At the very beginning of the installation after choosing the default compone

  • How to make 2 lines in a ColumnHeader of a JTable

    Hallo ! Ich have a JTable with an "Abstract Table Model" and a "TableColumnModel". I need 2 lines in the ColumnHeader to describe the ColumnName. How can I do this ? Pleas help me. Thank you ! Wolfgang