How to import a simple JavaBean as a modelObject ?? -- Urgent

Hi All,
     Taking leaves from the tutorial how to use EJB's in WebDynPro applications,   I am trying to use a SimpleJava bean as a modelObject  and instead of Using EJB's to persist data, I want to connect to the backend using the JDBC connection, So I have put on certain methods to getConnection() and one method to addUser( ) with in the JavaBean model class only.
Now, after extracting out the bean jar and importing it as a model, while trying to  execute the addUser( ) from the JavaBean in the Save Action
  wdContext.currentUserInfoBeanElement().modelObject().addUser( )
I get the error that the method modelObject is undefined for IPrivateResourceEntry.IUserInfoBeanElement( )
It would be really helpful If somebody could suggest how do I solve this ? or better still some error free step by step way to use a simple javabean with methods.So that I am able to persist data from the model class only!!
following is my JavaBean Model class
public class UserInfoBean
     private String empId;
     private String name;
     private String primarySkill;
     private String designation;
     private String emailId;
     private String deskPhone;
     private String mobile;
     private String workLocation;
     private String photoPath;
     private Connection connection;
     private ResultSet rs;
     public UserInfoBean()
     public void execute()
     public void addUser()
          Connection connection = null;
          try
               connection = getConnection();
               String query = null;
               PreparedStatement ps = connection.prepareStatement("insert into User (Employee_Id,Name,Phone1,Phone2,"+
                                                                 "Location,Designation,Technology,Email_Id,Photo_Path)"+
                                                                 "values(?,?,?,?,?,?,?,?,?)");
               try
                    ps.setString(1,getEmpId());
                    ps.setString(2,getName());
                    ps.setString(3,getDeskPhone());
                    ps.setString(4,getMobile());
                    ps.setString(5,getWorkLocation());
                    ps.setString(6,getDesignation());
                    ps.setString(7,getPrimarySkill());
                    ps.setString(8,getEmailId());
                    ps.setString(9,getPhotoPath());
                    ps.executeUpdate();
               catch(SQLException se)
                    se.printStackTrace();
               catch(Exception e)
                    e.printStackTrace();
               finally
                    ps.close();
          catch(Exception e)
               e.printStackTrace();
     public static Connection getConnection() throws SQLException, ClassNotFoundException
          Connection connection = null;
          Class.forName(IConstants.SQL_DRIVER);
          connection = DriverManager.getConnection(IConstants.SQL_URL,IConstants.SQL_UN,IConstants.SQL_PWD);
          return connection;     */     
          java.sql.Connection connection = null ;
          try
               InitialContext initialContext = new InitialContext();
               DataSource dataSource = (DataSource)initialContext.lookup("jdbc/aliasforradar");
               connection = dataSource.getConnection();
          catch (SQLException e)
               e.getMessage();                              
          catch (NamingException e) {
               e.getMessage();
          return connection;
@return
     public String getDesignation() {
          return designation;
@return
     public String getDeskPhone() {
          return deskPhone;
@return
     public String getEmailId() {
          return emailId;
@return
     public String getEmpId() {
          return empId;
@return
     public String getMobile() {
          return mobile;
@return
     public String getName() {
          return name;
@return
     public String getPhotoPath() {
          return photoPath;
@return
     public String getPrimarySkill() {
          return primarySkill;
@return
     public String getWorkLocation() {
          return workLocation;
@param string
     public void setDesignation(String string) {
          designation = string;
@param string
     public void setDeskPhone(String string) {
          deskPhone = string;
@param string
     public void setEmailId(String string) {
          emailId = string;
@param string
     public void setEmpId(String string) {
          empId = string;
@param string
     public void setMobile(String string) {
          mobile = string;
@param string
     public void setName(String string) {
          name = string;
@param string
     public void setPhotoPath(String string) {
          photoPath = string;
@param string
     public void setPrimarySkill(String string) {
          primarySkill = string;
@param string
     public void setWorkLocation(String string) {
          workLocation = string;

Did you type casted modelObject to UserInfoBean.
Like
((UserInfoBean)wdContext.currentUserInfoBeanElement().modelObject()).addUser();
Regards,
Ashwani

Similar Messages

  • I am disgusted: how is it possible that i cannot import a simple f...ing vob into adobe premiere???

    i am disgusted: how is it possible that i cannot import a simple f...ing vob into adobe premiere???

    I think you would need to transcode those clips to a format PPro can deal with more easily before you begin.
    https://forums.adobe.com/thread/464549

  • How to import MXF files to Final Cut Pro with smooth editing

    Summary: Follow this tutorial to learn how to import and edit MXF files in Final Cut Pro by converting MTS to FCP native format.
    If you have a Panasonic P2, Canon XF or Sony XDCAM series camcorder,
    you may be familiar with Material eXchange Format (MXF). Though MXF is a
    great video format to record high-definition videos, it is not easy to
    use in that they are not natively supported by most NLE systems like
    Final Cut Pro. In order to import MXF to FCP for editing, the easy workaround is to transcode MXF files to FCP compatible video formats.
    Along with some help from a top MXF Converter, it can be done. To
    help those who wanna edit MXF files in FCP without problems, here I
    share with you a simple guide on how to convert MXF files to edit in
    Final Cut Pro 6/7 or FCP X.
    First of all, downloading the App- Brorsoft MXF Converter for Mac
    Overall, the program is a professional yet easy-to-use MXF Converter
    on Mac (Mavericks included) which can not only convert XF100, Canon
    C300, XF105 and XF305, Panasonic P2 recorded MXF files, but also provide
    simple video editing functions for you. The MXF to FCP Converter not
    only can convert MXF to ProRes for FCP, but also can transcode MXF
    videos for editing in Avid MC, Adobe Premiere Pro, iMovie, FCE, etc.
    Just download it and follow the tutorial below to get the work done.
    Transcoding (P2) MXF files to ProRes for Final Cut Pro 6/7/X
    1. Import MXF files to the converter
    Launch the best MXF to FCP Converter, and then click the “add files” button to browse and import MXF videos from your camcorder or hard drive.
    2. Select FCP editable format
    Click the Format bar, and move mouse cursor to choose “Final Cut Pro > Apple ProRes 422 (*.mov)” as output format.
    Tips:
    a. Settings- click to set video
    resolution(1920×1080/1440×1080/1280×720/720×480), bitrate (from 1Mbps to
    20Mbps), frame rate (24p/30p)
    b. Editor (next to “Add” icon)- click to set deinterlace, trim, crop, add effect, attach subtitles, etc
    3. Start transcoding MXF video to FCP
    Click “Convert” button to start converting MXF files to Apple ProRes
    MOV for FCP 6/7/X under Mac OS. Once the MXF to ProRes 422 conversion
    is done, you can transfer MXF footage into Final Cut Pro (X) for editing
    smoothly on Mac with ease.
    Source:How to import MXF files to Final Cut Pro with smooth editing
    [quote] jacknjchn.tumblr.com/post/76914947404/cant-import-mxf-footage-to-fcp-transcoding-mxf-to-fcp [/quote]

    You may refer to this step by step guide on how to convert MXF to Final Cut Pro more supported Apple ProRes or DV at http://www.idealshare.net/imovie-fcp/mxf-final-cut-pro.html
    It also applies to convert MXF to other video or audio format. It even applies to convert other videos like AVCHD, MOD, TOD, AVI, and MPEG etc to FCP format.

  • How to import the data in a .xls or .xlsx file into a oracle database table

    Hi,
    Please tell me how to import the data in a .xls or .xlsx file into a oracle database table in Oracle 10gR2 using Oracle Warehouse Builder 10gR2.

    ....can we do something through Non-Oracle->ODBC?Yes, it is possible, look at this thread
    [SQLServer access from AIX Warehouse builder|http://forums.oracle.com/forums/thread.jspa?messageID=2502982]
    If your server (with target DB and OWB runtime) is on Windows OS this configuration will be simpler - you can use single server.
    And additional link on OWB blog (with 11g transparent gateway)
    [http://blogs.oracle.com/warehousebuilder/2008/01/11g_heterogeneous_agent.html]
    (configuring nonoracle connection with 10g generic connectivity very similar to 11g gateway)
    Also look at
    http://asktom.oracle.com/pls/asktom/f?p=100:11:0::::P11_QUESTION_ID:4406709207206#18830681837358
    Regards,
    Oleg

  • How to import Console Add-in programmatically in VMM?

    Hello All,
    In my C# application, I want to import Console Add-in.
    To do this currently I am creating a folder structure with similar permissions as it was created during the import of Console Add-in from VMM UI.
    But when I start the VMM, it shows the following error : 
    “Your personal add-ins folder is editable by users other than yourself and the Administrators group. This presents a potential security risk by which user could malicious code to be executed using your credential. Please check the following
    folder and remove any permission assigned to the other users. 
    C:\Program Files\Microsoft System Center 2012 R2\Virtual Machine Manager\Bin\AddInPipeline\Addins\SCVMMTESTING_Administrator ” 
    Is there any other way to import console add-in programmatically in VMM.
    Below is the image for your reference-
    Thanks & Regards,
    Nupur Sharma
    Nupur Sharma

    Hi KVC,
    Im using Essbase 11.1.2 and developed my cube in EAS console, now Im doing the migration from DEV to PROD. I've copied the cube to PROD, but only outline and rule files are copied, no data in it, I exported all level 0 data to a txt file and copied it to PROD, my question is how to import data from the txt file? should I create a new rule file and load data in EAS console? is there a simple way to import these data?
    Thanks,
    -Rrmj

  • JDialog Problem: How to make a simple "About" dialog box?

    Hi, anyone can try me out the problem, how to make a simple "About" dialog box? I try to click on the MenuBar item, then request it display a JDialog, how? Following is my example code, what wrong code inside?
    ** Main.java**
    ============================
    publc class Main extends JFrame{
    public Main() {
              super();
              setJMenuBar();
              initialize();
    public void setJMenuBar()
         JMenuBar menubar = new JMenuBar();
            setJMenuBar(menubar);
            JMenu menu1 = new JMenu("File");      
            JMenuItem item = new JMenuItem("About");      
            item.addActionListener(new ActionListener() {
                public void actionPerformed(ActionEvent ae) {
                  // About about = new About(this);
               // about.show();
            menu1.add(item);
         menubar.add(menu1);
    public static void main(String args[]){
         Main main = new Main();
    }** About.java**
    =============================
    import java.awt.*;
    import javax.swing.*;
    public class About extends JDialog{
         JPanel jp_top, jp_center, jp_bottom;
         public About(JFrame owner){
              super(owner);
              setDefaultCloseOperation( DISPOSE_ON_CLOSE );
              Image img = Toolkit.getDefaultToolkit().getImage(DateChooser.class.getResource("Duke.gif"));          
              setIconImage( img );
              setSize(500,800);
              Container contentPane = getContentPane();
             contentPane.setLayout(new BorderLayout());           
             contentPane.add(getTop(), BorderLayout.NORTH);
              contentPane.add(getCenter(), BorderLayout.CENTER);
              contentPane.add(getBottom(), BorderLayout.SOUTH);
              setResizable(false);
               pack();            
               setVisible(true);
         public JPanel getTop(){
              jp_top = new JPanel();
              return jp_top;
         public JPanel getCenter(){
              jp_center = new JPanel();
              return jp_center;
         public JPanel getBottom(){
              jp_bottom = new JPanel();
              jp_bottom.setLayout(new BoxLayout(jp_bottom, BoxLayout.X_AXIS));
              JButton jb = new JButton("OK");
              jp_bottom.add(jb);
              return jp_bottom;
    }

    Code looks reasonable except
    a) the code in the actionPerformed is commment out
    b) the owner of the dialog should be the frame
    If you need further help then you need to create a "Short, Self Contained, Compilable and Executable, Example Program (SSCCE)",
    see http://homepage1.nifty.com/algafield/sscce.html,
    that demonstrates the incorrect behaviour, because I can't guess exactly what you are doing based on the information provided.

  • How to make a simple Quiz?

    Could anyone help me with some hints and maybe sample code (or tutorial :)) how to make a simple quiz, with multiple
    answers choices, and a score function.
    //D

    You could for example do it like this:
    import java.io.*;
    class Quiz
    public static void main (String [] args)
    BufferedReader in = new BufferedReader (new InputStreamReader(System.in));
    System.out.println("SUPERQUIZ");
    System.out.println("How many legs does a horse have?");
    System.out.println();
    System.out.println("1");
    System.out.println("2");
    System.out.println("3");
    System.out.println("4");
    int answer = Integer.parseInt(in.readLine());
    if (answer == 4)
    System.out.println("The answer is correct");
    else
    System.out.println("The answer is incorrect");
    This is just a basic program, hope you understand it (hopefully it works).
    �sbj�rn

  • How can Import Mysql my database and Table into website -

    Hi,
    friend i am using CS3 ,i made all need tables in database ,I need  to know
    how can import that database /table into website.
    I know  in domin there is admin Mysql inside i have found impotr/export/ but
    when  I click import i do not know where my database/table been save to  import it

    If all you are trying to do is change an existing tablepace from a single datafile to multiple datafiles, then a simple import will work fine. Just create the tablespace in the new database with multiple files, then do the import normally.
    If you want to move segments into different tablespaces, or change the names of the tablespaces, then you will need to precreate the tables before importing. Then, do the export with indexes=N and constraints=N. Run import with the resulting file, then re-create the constraints and indexes in the new tablespaces.
    TTFN
    John

  • Add a Component visually on a complete simple javabean

    Hi all!
    I wrote a simple javabean(jPanel, on this panel i have 1 jButton and some JLabels) in Netbeans.
    I can use and display this Javabean in Netbeans(5 and 6). But i cant add visually an Component(like jButton) on the javabeans. the Components are positioned side by side. I want the button on the javabean(Panel) and not side by side.
    Can somebody help me?
    best regards??

    Kayaman & CeciNEstPasUnProgrammeur,
    Thanks for your input.
    I cannot use an array as I do not know the number of components in advance. I could use JTable but I am not doing so now.
    I have decided to use Vector as components can be added dynamically and retrieved. I have made sure that I have individual Vector classes for different group of items - one for JComboboxes and another for JTextFields. The challenge was how to change the textfield's values based on the combobox's selection. I overcame that by using setActionCommand() method to the combobox and listening for events. Do you think this is a good way or does it consume a lot of memory? Any input will be appreciated.

  • How to import from iPhoto to Lightroom

    I am a beginner--just downloaded trial of Lightroom and can't figure out how to import my photos from iPhoto.  Any help would be appreciated....thanks!

    To simply import the original files is quite a simple process.
    Locate the iPhoto Library (default is your Pictures Folder). Right click on it and select "Show Package Contents".
    Locate the Masters folder and drag it onto the Lightroom icon or an open Library window. This will invoke the Import command.
    Be sure "Include Subfolders" is checked.
    Now you can import all the original files.
    If your goal is to maintain structure of the Events it gets a little more tedious. Drag the event onto the Lightroom icon or the Library window. Once imported you can group them into a Collection Name that mimics the Event.
    Repeat with other events.
    With the impending demise of iPhoto and Aperture, I suspect Apple may be working with Adobe to develop an automated process that will also maintain metadata that was added in those programs. If you can wait a while, it may be worth it.

  • How to import movies on ipad thrugh my leptop.. i slact amovies folder but only 2 movis are copy not all...

    hi i m rahul ... i using ipad 2.. i  have a questen... if i m slect a folder for coping movies through my leptop.. only two movis are copy. not all.. agan i mtry agan same problem. can anybode scect me wat is tha proper way how to import all movies to itune through my leptop. plz

    The movies have to be in a compatible format - those that are supported by the iPad are (from http://www.apple.com/ipad/specs/) :
    Video formats supported: H.264 video up to 720p, 30 frames per second, Main Profile level 3.1 with AAC-LC audio up to 160 Kbps, 48kHz, stereo audio in .m4v, .mp4, and .mov file formats; MPEG-4 video, up to 2.5 Mbps, 640 by 480 pixels, 30 frames per second, Simple Profile with AAC-LC audio up to 160 Kbps per channel, 48kHz, stereo audio in .m4v, .mp4, and .mov file formats; Motion JPEG (M-JPEG) up to 35 Mbps, 1280 by 720 pixels, 30 frames per second, audio in ulaw, PCM stereo audio in .avi file format

  • How to Import Real media

    Hi, everyone
    This might look simple but has been bothering me for a while since I bought QT Pro. Does anyone know how to import Real media (rm, etc) into QT? Any plug-in / software can help me on this?
    Thanks a lot for taking time to help me!
    Eddie

    Convert Real audio and video into MP3 and AVI files

  • HT201302 how to import photos from iphone 5 to my computer using Windows 8 ?

    Can some one explain step by step how to import photos from iphone 5 to computer using Windos 8 ? thank you!

    Plug it into PC and the iPhone should show up in "Computer" on PC then a simple matter of dragging and dropping
    see here for details
    http://support.apple.com/kb/HT4083

  • HT1296 How to IMPORT data from iphone to pc without icloud or itunes?

    I don't understand how many article I have read and every one is talking about "how to EXPORT data from iDevice to pc but no article is available about "how to IMPORT data (Music, Videos or office files) to iDevice without using icloud or itunes?" can somebody have the answer???

    Well I wonder why that is?  Very simple answer, because YOU CAN'T!

  • How to build a simple app with xcode

    I am new to coding and I could like to know the basics of xcode and how to build a simple app

    Then you're going to need to learn Objective-C, the concepts of object oriented programming, and a whole ton more.  Xcode is just a tool used to write and manage a software project.
    To learn to program, you must first get the compiler which you use to write and test programs.  Thus you need to get a copy of Xcode from Apple's developer site.
              * Find a book on xcode.  Be sure to get a book that covers the current version of xcode.  But before getting far into xcode, you must ...
    Next, you must learn the programming language used to create mac and iOS programs.
              * Read the book "Programming in Objective-C", By Stephen G. Kochan
              * Find a book on xcode.  Be sure to get a book that covers the current version of xcode.
    Next learn about Cocoa, the graphical environment and other support libraries that you need for OSX and iOS.
              * There are many books on this, check ratings and evaluations at Amazon books. 
    Once you have the basics, you really need to learn the technicals of programming, like design patterns, algorithms, data structures, concurrent processes.
              * University or college courses
              * Textbooks used in these courses, if you want to do it on your own.
    Although computer science majors at the college level take 4 years to learn their trade, the first three semesters cover the important basic topics of programming.  If you can take a course in Programming 1 at a local school that will get you started.  You can certainly do it on your own, but programming can be a frustrating trip and working with others is very helpful.

Maybe you are looking for

  • IPhoto 9.6 is stuck at 1% (or sometimes 99%) Repairing

    My iphoto library location is on my local network drive mounted with AFP protocol. It is Western Digital My Cloud. All my photo files are located on that drive (speed is max of 1Gb/s) iPhoto took a day or two to build the db with about 10k photos, to

  • CPU time & buffer busy waits events are causing performance degradation.

    Oracle Version : - 11.2.0.2.0 Standard Edition OS Platform :- Linux x86 64-bit Edited by: 861928 on Aug 17, 2011 5:52 PM

  • SG&A allocation

    Good Afternoon! I am trying to set up a calculation where I allocate corporate SG&A expenses to several internal companies. There is a Dimension for the "Total Company" - that has the children (separate corporations) listed below... and each of the c

  • How many x in y

    Hi I need to make charge based on 100s or any part thereof. So for 223 I need to charge three times (100 + 100 + 23) etc. How do I calculate this figure of three from 223? I know there is mod but it gives me 223 mod 100 = 23 but not how many hundreds

  • Saved images will not open

    When I save an image to my picture folder, it will not display picture when I try to open it, it is just a page of jumbled letters.