Scope of java class used for building data control

Hello,
I have tried a sample application where in we are using Datacontrols to render the UI.
The data control is generated off a simple java class(abc.java) which is used to render a "Page called - Employee". This java class then uses a session bean which in turn talks with the database entities. The database entities(POJO's - employee.java) are then exposed in the abc.java and used to display data on the UI such as employee name, id , etc.
My question is regarding the scope of abc.java. I presume, that the constructor of this class will be called when the page is rendered.
Now say i am navigating from some Page-A to Page-Employee. On click of a button in Page A, i want to go to the Database, retrieve a particular employee's details and then place it in the employee entity exposed in abc.java so that it gets displayed when Page-Employee is rendered.
If the actionlistener method of the button click in Page A has the code of - 1)create new instance of abc - new abc() 2)retrieve employee entity 3) set employee entity in the class level attribute of abc
But on going to the next page-employee, a new instance of abc is getting created and i am losing the employee that i had retrieved in the previous screen.
Is there a scope for abc that can be set somewhere similar to managed beans? or is there some other solution.
-thanks

Hi,
Say, on an 'employee create page' we use data controls which are generated from a java class, 'EmployeeService'.
This java class has the POJO(entity) - Employee whose attributes like name, description are used to create input text boxes on the employee page.
Now, assume we come to the Employee create page from some other page in the application; where exactly is the best place to make an instance of the employee entity.
Do we place- Employee emp = new Employee(); in the constructor of the EmployeeService.java class or is there some other way?
Any pointers would help.
Thanks
Edited by: user9935204 on Feb 4, 2010 8:44 PM

Similar Messages

  • 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

  • Can not locate Java class using JNI within C++ DLL

    I am using trying to use JNI to call a Java class from C++. The Java class uses JMS to send messages to a JMS message queue. At first I coded the C++ in a console application that created the JavaVM and used JNI to access the Java class. All worked fine. Then I called the Java class using JNI from threads and ran into the problem of the Java class not able to locate the JMS related classes. This was solved by placing the following line in the constructor of the Java class.
    Thread.currentThread().setContextClassLoader(ClassLoader.getSystemClassLoader());
    Then I moved the JNI code from a console application to a DLL in specific an extension DLL that is called by SQL Server or Oracle server. The DLL will use JNI to call the Java class and send messages to a JMS message queue.
    The problem I am having now when the DLL code is called by SQL Server the call to
    JNI_CreateJavaVM
    appears to work correctly but the call to find the Java class using
    jvmEnv->FindClass(pName)
    fails. It appears the is a class loading problem which occurs due to the fact JNI is called from a DLL. When the VM is created I pass the class path information using the statement
    -Djava.class.path=
    And as I stated before it all works when running from a console application. I am new to JNI and really need help in the form of some sample code that will solve this problem. I believe I need to somehow load the classpath information from the DLL but I can not find examples on how to do this using JNI. I have tried several ways using URLClassLoader and getSystemClassLoader from JNI and either it does not work or it crashes very badly.
    I used the following code to determine what the existing class path is and the string returns empty.
    jcls = jvmEnv->FindClass("java/lang/System");
    jmid = jvmEnv->GetStaticMethodID(jcls, "getProperty", "(Ljava/lang/String;)Ljava/lang/String;");
    jstrClassPath = jvmEnv->NewStringUTF("java.class.path");
    jstr = (jstring)jvmEnv->CallStaticObjectMethod(jcls, jmid, jstrClassPath);
    m_jstr = (jstring)jvmEnv->NewGlobalRef(jstr);
    pstr = jvmEnv->GetStringUTFChars(m_jstr, 0);
    Can anyone please help with example code that will solve this problem. Thanks in advance for any help.
    Charles�

    I have determined the problem occurs when the application/component is compiled using VC 6.0. The test application was compiled using VC 7.1 and works correctly by locating the class path information. If the test application is compiled using VC 6.0 it has the same problem.
    The jvm.dll I am using is version 1.4.2.80. Currently this is not an option to compile all the applications that use JNI using VC 7.1 so can someone please tell me how to solve this problem.

  • What are the classes used for bropdownListBox in BSP and purpose and how

    what are the classes used for bropdownListBox in BSP and purpose and how
    thank you,
    Regards.
    Jagrut BharatKumar Shukla

    Benje001,
    Right-click on the CWAI control on your form. Choose Properties. The first tab is the Channels tab. After you choose your device from the drop down box on the right, you can type in the Channels box which channel you want to use.
    If you want to see a CWAI control that is already configured, all of the shipping examples will have this already done.
    Also, if you have questions about any item on the CWAI (or any other NI ActiveX control) you can click the ? icon in the right corner of the properties page and then click on the item in the dialog that you need help with. This "What's this" help will describe that particular control on the dialog.
    Hope that helps!
    Regards,
    Shannon R.
    Applications Engineer
    National Instruments

  • Which CKM is used for moving data from Oracle to delimited file ?

    Hi All
    Please let me know Which CKM is used for moving data from Oracle to delimited file ?
    Also is there need of defining each columns before hand in target datastore. Cant ODI take it from the oracle table itself ?

    Addy,
    A CKM is a Check KM which is used to validate data and log errors. It is not going to assist you in data movement. You will need an LKM SQL to File append as answered in another thread.
    Assuming that you have a one to one mapping, to make things simpler you can duplicate the Oracle based model and create a file based model. This will take all the column definitions from the Oracle based model.
    Alternatively, you can also use an ODI tool odiSQLUnload to dump the data to a file
    HTH

  • Can anyone help i want to call java class using visual basic

    I want to call java class using visual basic and send some arguments to the main class

    Hi,
    I don't know VB, but you can surely launch a command line like :
    javaw.exe mypackage.MyMainClass myArgument1
    Regards

  • What message type to use for syndicating data back to R3 from XI

    What message type to use for syndicating data back to R3 from XI. It gives a Message type IDOC error code 51.

    Hi Rehman,
    You are getting error 51 which means "Error: Application document not posted".
    This might because of two reasons:
    1. Your IDoc doesn't contains all the mandatory fields required by the inbound function module to post the IDoc.
    2. You have assigned wrong inbound function module to post the IDoc.
    Please check these cases.
    Hope this will help you.
    Thanks,
    Shiv Prashant Dixit

  • Urgent !!!!!!!!!!!! regarding CREATE JAVA CLASS USING BFILE

    We have Oracle 8.1.7 spatial database. We got to load some java classes into the database. We would like to make it as the java programs to be loaded from a client system into the oracle server. I am using CREATE DIRECTORY command to create a directory object (say suppose \\prav\loadjavaclasses\. Then using the CREATE OR REPLACE JAVA CLASS USING BFILE (object_name, 'CLASSNAME.CLASS'). This .class file is in the network identified by prav which in turn has a shared directory (full privileges) loadjavaclasses folder. Can you please help in this regard.
    Please mail me to [email protected]
    thanks in advance
    SudhaSrikanthan
    null

    use loadjava

  • Essential PL/SQL , Java Classes/Methods for working on BLOB

     Are there any methods/procedures with which we could work on a BLOB object which contains purely text?
     Essential PL/SQL , Java Classes/Methods for working on BLOB:
    null

     Are there any methods/procedures with which we could work on a BLOB object which contains purely text?
     Essential PL/SQL , Java Classes/Methods for working on BLOB:
    null

  • Can Oracle Access Manager (OAM) be used for configuring data-level access?

    Hi,
    Can OAM 10gR3 or 11g be used for configuring data-level access in PS 9.10 and OBI 11g.
    This would mean that data-level configuration are stored centrally within OAM database and PS 9.10 pulls these settings for its appropriate Row and ChartField security and OBI 11g queries OAM database tables to populate the initialization blocks during login.
    If you have configured this successfuly, please feel free to provide highlevel details/steps about the configuration and any complexities that can pre present.
    Thanks.

    I recently worked on an interesting implementation that utilized OAM configured against OID in which OAM was configured to control authentication/authorization and then all applications that were serviced by OAM utilized the users login to pass to the database at which point the Oracle database utilized VPD, which was configured against the same OID instance, to leverage user attributes/groups in order to configure fine-grained access control to data within the database. Not sure if this would work for you unless your requirements are similar but it worked very well for this particular implementation as it allowed them to have SSO for their own apps and for BI Publisher which then could pass allong the userid to be leveraged by the database to do fine grained access control.
    Edited by: oblix_fan on Jun 23, 2011 8:10 AM

  • Should we really go for bean data controls for a new project?

    Hi,
    I am still new data controls and trying to figure out the advantages of using bean data controls for our new project. Our UI is going to have customized UI components and our back end is going to be a tcp/ip server.
    Is it a good idea to develop java beans and then create data controls to bind to UI layer? I think it makes sense to use data controls if we want to use existing java beans. Maybe we would be separating the model layer by using data controls, but only thing it would be doing for us would be the simple object calls to my java beans. Would it be better to use data controls or use I choose to make object calls?
    Thanks,
    Manoj

    Hi,
    the POJO data control will always give you a benefit and develope productivity, unless what you have to build fits on a single page - in which case you may not mind the burdon of manual UI component binding
    Frank

  • HT204053 Enter the Apple ID you want to use for iCloud in Control Panel Network Internet iCloud.  Enter the Apple ID you want to use for store purchases (including iTunes in the Cloud and iTunes Match) in iTunes iTunes Store.

    Enter the Apple ID you want to use for iCloud in Control Panel > Network > Internet > iCloud. 
    Enter the Apple ID you want to use for store purchases (including iTunes in the Cloud and iTunes Match) in iTunes > iTunes Store.

    Welcome to the Apple community.
    iTunes and iCloud and different accounts, you will need to delete both accounts from your device before adding the new details in their place.
    For iCloud go to settings > iCloud, scroll down and hit the delete button. You can then sign back in using your correct details. For iTunes go to settings >store, tap your account ID and then sign out, you can then sign back in using your correct Apple ID.

  • Problem connecting using VB Oracle Data Control oradc.ocx but otherwise ok.

    I am trying to run one of the sample vb apps DataCtrl that uses the Oracle Data Control (oradc.ocx) to simplify connecting to a database and getting the data into a databound control. I have tried every combination of name/id/pw and get the same error - ORA-12154:TNS:could not resolve service name.
    I have 2 of the sample databases created - "employees" and "demo". Using XE, i can open and view both db's with no problem. Using the ODBC configuration dialog I can configure and test the connection to both and tests ok. I have used programs to convert Oracle to Excel and Excel to Oracle and both find the db with no problem either.
    If I tnsping to XE, employees or demo, the response is negative. The file tnsnames.ora exists in the /admin dir and lists only XE. The file sqlnet.ora has nothing (except comments) in it.
    I have read every bit of documentation on the internet and no help. I just opened "employees" and "demo" again with XE without a problem. However when I try to run the Oracle/Excel conversion programs now, they are now showing the 'name error also. I have tried both the sample VB app and the Oracle/Excel converter programs with XE/employees open and closed and it makes no difference.
    Everything that I have read indicates that you should be able to use the actual db name, ie; "employees". I have run out of combinations of names/ids/pws and hope I can get some help here. Thanks in advance.

    The firewall was blocking TNSLSNR.exe!

  • How to use Spatial Java Class to update spatial data?

    Hi,
    I am new to Oracle and couldn't find enough information on how to update spatial data.
    Here are my questions?
    1)Where could I find Spatial Java Class Javadoc?
    2)I'd like to update spatial data inside a ResultSet.next() loop.
    After I got the Geometry object and Point object how do I change the x and y values of Point object and save it back to the database.
    3)
    GeometryAdapter sdoAdapter = OraSpatialManager.getGeometryAdapter("SDO", "8.1.6", null, STRUCT.class, null, conn);
    Can I use the above GeometryAdapter for saving Geometry back to database?
    4)
    SpatialReference sref = srManager.retrieve(8265);
    // SRID = 8265: LAT-LON (NAD 83)
    Do I need to create a SpatialReference object and why retrieve the SRID '8256'? Do I have to create SRID '8256'?
    Thanks for any help
    Gwowen

    You can find some sample code that shows you how to do that using
    the SDOAPI java library. Look under the "Sample Code" section on
    OTN's Spatial page:
    http://otn.oracle.com/sample_code/products/spatial/content.html
    The sample file SampleNewToSDO.java is what you will need.
    hoep this helps,
    -LJ

  • How to convert a .jsp to a .java/.class file for use in peoplesoft

    Hi java/jsp experts,
    I want to convert a .jsp to a .java/.class file. is there a tool available, please let me know if you have any pointers....
    or can i do it manually:
    these are a few lines that the .jsp contains, and i would like to translate this to be in .java/.class format:
    <%@ page import="sun.misc.BASE64Encoder, javax.crypto., javax.crypto.spec."%>
    <%@ page import="java.util.StringTokenizer" %>
    <%@ page import="java.util.Map" %>
    <%!
    sb.append("<input type=\"hidden\" name=\"orderPage_serialNumber\" value=\"");
    sb.append(serialNumber);
    sb.append("\">\n");
    return sb.toString();
    %>
    how can i translate the above import statements and html elements from jsp to java, please let me know.
    Once i have the .java file created from the .jsp, I will compile .java to create the .class file and invoke the .class in peoplecode by using java apis available in peopletools.
    Thanks in advance.

    Is there a way convert a binary .exe file( compiled by
    another compiler) into Java .class/.jar file ? Anyone
    know of a free program that can do this?It's not possible. There are many decompilers and disassemblers for Java but nothing will take you from ANY binary to Java source. It would be the end of computing as we know it and the beginning of a new era -:)

Maybe you are looking for

  • Dynamicaly Photo Print Problem in Adobe Form

    Hello Expert, I want to display Employee Photo on Performance Apprisal form Dynamicaly on Adobe Form(SFP). for which, i trieed two  method - 1)-     DATA : lv_pernr1 TYPE tdobname. CONSTANTS: c_graphics TYPE tdobjectgr VALUE 'GRAPHICS', c_bmap TYPE t

  • My Zen V Plus has totally crashe

    I need help majorly. This morning my Zen crashed, but I managed to reset it after an hour or so :| ... Then before, I took it from the computer (it needed recharging as the freezing caused it to lose alot of it's power) but when I tried to turn it on

  • How to hide overlap of lower tracks with larger dimensions

    The clips that I am placing on higher tracks are smaller. Therefore some of the image from the lower tracks show through. I know that I could go through the trouble of adding another track that is all black. But isn't there an easier way using the vi

  • MySQL Master/Slave w/IP-Failover

    Hello All, I just currently setup a MySQL Master and Slave which are working great! I used these instructions and it is working excellent on Leopard Server 10.5.8 running MySQL 5.1.37 GA release: http://homepage.mac.com/kelleherk/iblog/C711669388/E35

  • New 4507R+E Install

    Hello all, I have just received shipment of 3 4507R+E with dual Sup7L-E running Enterprise Services. With them we have enough 10G SFP to populate the 2 slots in each Sup7L-E. I was wondering what kind of suggestions that you all have for implentation