Inserting and deleting with JavaBean Data Control

Hi,
I have been teaching myself how to use Data Controls with a Struts applications. In order to understand the fundamentals, I thought I could just use a simple javabean encapsulated in a Service facade to implement trivial CRUD operations.
Upto this point I have the ability to Diplay a table of my objects, Edit a single object and display a single object using the Data control and struts. Unfortunately I am now stuck since all the help documents assume that either I am using a Database bound business object or an EJB to implement my CRUD use cases. These have a lot more operations on their data control that are unavailable to JavaBean data controls.
How do I go about implementing create and delete use cases with plain JavaBeans? Presumably there are Oracle foundation classes that I can extend that would allow me to expose more operations to the Data Control Pallete.
Thanks for the input
Suhail

For JavaBean DataControl, you will have to write custom methods in servicefacade class which will create, delete or update the collections.
Though you are not using EJB, following tutorial, shows how custom methods which implement crud operations are used with sessionfacacde (EJB Session bean).
http://otn.oracle.com/products/jdev/collateral/tutorials/9050/ejbdatabinding_tut.html
Following thread has discussion on how to refresh the collections from JavaBean.
10g ADF : how to update the binding values in the UI layer ?
or
10g ADF : how to update the binding values in the UI layer ?
raghu
JDev Team

Similar Messages

  • Using Insert and Delete icons in table control wizard.

    Can anyone tell me how to perform a new row insertion or deletion in a table created using the table control wizard.
    I see there is a form fcode_insert_row and fcode_delete_row, but dont know how to call them and what parameters to pass and all.
    Since iam new to SAP-ABAP, some code samples will be a great help.
    Thanks to all in advance.

    Hi Lavanya ,
    You have to add the icons personally in the table control.. . Put fcode for addition button as INSE and delete as DELE ..coding will be already thr in the wizard no need to anything just add icons in the table control by selecting from f4 help on icons option of screen.
    Thanks,
    Vishnu .

  • How do I insert and delete pages from a pdf with acrobat 10X?

    How do I insert and delete pages from a pdf with acrobat 10X?

    Alternatively, be sure your page thumbnails panel is open, and click on the icon highlighted in this image, just under the heading.
    You will see a dropdown with the options you need.

  • 10.9.1 used terminal with rm-rf and deleted my user data. Can I get back the deleted data? Help.

    10.9.1 used terminal with rm-rf and deleted my user data. Can I get back the deleted data? Help.  I really just need mail file and desktop files recovered.

    If data were on the SSD drive with TRIM - practically no chance. If HDD - use DIY recovery software such as DiskDrill or DataResue.
    As quickly as possible turn off the drive where deleted data.
    Use an external HDD with installed OSX for data recovery.
    Alex
    Apple Certified Support Professional

  • Lots of inserts and deletes, can i make it faster ?

    Hi ,
    i have lots of records handling thro' JSP and Javabeans.
    So i have to do insert and deletes likek 400 of then at a time.
    Is there amy other way of improving performance other than writing a Stored procedure ??
    Currently i am executing one at a time in a tight loop.
    thanks.

    Hi,
    If you are not considering Stored Procedures, then the next option is to try "Batch" execution as suggested by Mr. mchan.. But it takes up memory based on the size of data which are batched. In between, using PreparedStatement might not be always beneficial since only a very few drivers support pre-compilation of sql statements. So try batching.. :-)
    regards Stallon

  • JavaBeans Data Control / Managed beans interaction

    Working in JDev/ADF 11g
    I have an Application Scoped ADF managed bean that initializes some services for my ADF application. (These are non-database backed business services and so they do not integrate as tightly with Jdev as data controls). They require some constructor arguments and other initialization parameters and so they cannot be written as pure beans.
    I wrote Java Beans to use as data controls that wrap these services. What I would like to do is to keep the creation of these services in the application scoped bean, so they can be used programmatically in other areas. When the data controls beans are initialized, I want to grab their underlying services from the application scoped bean via the ADFContext.
    My issue is that at the time the data control beans are instantiated, the ADFContext returns null when accessing the application scoped bean - ie it has not been created yet.
    What is the proper way to pass initialization data to JavaBean data controls? Ideally I could simply pass the data control a reference to its underlying service.
    If Im going about this all the wrong way, with the application scoped bean holding the application wide business services, please feel free to advise me otherwise.
    Thanks!

    Okay - so I figured out one way to do this (detailed below), but my question still stands as to if there is a proper way to get information to a JavaBean data control when it is instantiated.
    What I just learned is that although my application scoped bean does not exist when the data control is created, it can exist when the the data control is called by the .jspx. I say 'can' because it will only exist if the .jspx backing bean references the application scoped bean as a managed property. i.e. ADF will create the data control, create the page bean, create the application bean (b/c the page needs it), and then call the data control, at which point the data control will find the application scoped bean. This is sort of a hack, since it requires an unintuitive setting for it work. so I think my question still stands, how to pass data from the application scoped bean to the data control.

  • SSO and EUS with EM Grid Control

    Trying to configure both SSO using client certificate authentication process and Enterprise Users, I noted that the parameter used to configure both is the same (oracle.sysman.emSDK.sec.DirectoryAuthenticationType) in emons.properties.
    Can I use both SSO and EUS with EM Grid Control???

    Hello
    i am interested in a very special feature: is it possible to get notified if alerts occur in alert logs in an 8i/9i database when using Grid control and the 10g agent on the 8i/9i systems?
    Moreover, the 10g agent should be able to get Performance Data using the v$ views or direct sga access without using statspack, right?
    Do you know where I can find documentation about the supported features when using Grid Control with 8i/9i databases?

  • I used time machine to restore on a formatted MAC. Now the HDD space has reduced by 100GB but I cannot see any of the files. How do I find and delete those 100GB data from the HDD?

    I used time machine to restore on a formatted MAC. Now the HDD space has reduced by 100GB but I cannot see any of the files. How do I find and delete those 100GB data from the HDD?

    dglenn9000 wrote:
    I created a new user account just to see if it was my user Library or if there was something wrong with my system. And the new user account is doing most of the same things so I will need to do a full restore anyway.
    Not necessarily. I'd suggest downloading and installing the "combo" update. That's a combination (thus the clever name) of all the updates to Leopard since it was first released, so installing it should fix anything that's gone wrong since then, such as with one of the normal "point" updates. Info and download available at: http://support.apple.com/downloads/MacOS_X_10_5_8_ComboUpdate Be sure to do a +Repair Permissions+ via Disk Utility (in your Applications/Utilities folder) afterwards.

  • Insert and Delete at the same time?

    Hi,
    I have a dynamic list and dynamic form. When a person inserts a record using the dynamic form, I would like to delete a record from another table using a foreign key when the new record is added (assuming a record exists in the other table). Is this achievable, and if so, can anyone provide any help?
    Thanks in advance for any advice provided.
    Gary

    As kendenny says, this appears to be a misunderstanding of how database transactions work.
    As Hoek says, if it's an insert and delete on the same table, there is a MERGE statement that can help do that as a single statement.
    However, you do not do an INSERT from one table and a DELETE at the same time from another table.  But that doesn't matter, because that's the point of logica transactions on a database.
    You perform your insert, which starts a transaction (if one isn't already started).
    You then delete from your other table (which adds to the transaction)
    When you're happy that both things are done, you COMMIT your transaction which then applies those changes.
    If you're not happy with something you can ROLLBACK, and that will undo all the changes from the transaction.
    So, the commit and rollback allow the changes to be applied as one logical unit, even though the changes are applied in multiple steps.

  • Java.lang.NullPointerExecption error with ExecuteWithParam data control

    Hello,
    my application has a database connexion ; with the wizards, I made a Businness Components from Tables ; after that, I've changed the querry of my one and only View (btw, there are 4 entity objects). I put on a view criteria with a bind variable and the query in the xml file view is like this :
    SELECT CRAH.JOURINPUT,
    CRAH.CODEPROJET,
    CRAH.CODEANA,
    CRAH.DUREE,
    CRAH.DESCRIPTION,
    CRAH.IDUSER
    FROM CRAH CRAH
    WHERE Iduser=:VarIduser
    In my jsf page, I've dragged and dropped the ExecuteWithParams data control (in the same view as above) as an ADF Parameter form. I finally create an ADF table by dragging'n'dropping this very same view's datacontrol.
    The problem is when I run, it works!!! but after like 2 click on the execute with parameter button, I get a java.lang.NullPointerExecption for every attribute in the table.
    Could anybody gets me a piece of advice on this ? The thing is it works when I test with the Application Module. What's the problem here ?

    Hello.
    Well, even with a simple EO/VO for a single table, one view criteria and its bind variable, I get the same error. It still works in the AM test run. I get this error message in the embedded OC4J log :
    08/07/09 09:19:20 [757] **** refreshControl() for BindingContainer :oracle_jbo_uicli_binding_JUFormBinding_140
    08/07/09 09:19:20 [758] DCUtil, returning:oracle.adf.model.binding.DCParameter, for AMCADataControl
    08/07/09 09:19:20 [759] Reusing DC transform for AMCADataControl_sessiondef.view_pageDefs_view2PageDef_VOCA1_0_DynamicRegion
    08/07/09 09:19:20 [760] INFO: getDCKey for data.view_view2PageDef yielded view.DataBindings.cpx
    08/07/09 09:19:20 [761] variables variables passivated >>> ExecuteWithParams_CAVAR=FG
    08/07/09 09:19:20 [772] WARNING: data control: oracle_jbo_uicli_binding_JUFormBinding_140 is unknown in: view.DataBindings.cpx
    08/07/09 09:19:20 [773] INFO: getDCKey for data.view_view2PageDef yielded view.DataBindings.cpx
    So, do you think I did something wrong with the data control ? Because the problems core seems to be here. The thing is that they are automaticly created... so is there something else to do ?
    Frédéric

  • Using ConnBean and CursorBean with a Data Source

    Hi all,
    I',m making a web app. using the Jdev (RUP4) with OA Extension. I looked in the help menu under "About Data-Access JavaBeans and Tags". Here I found the following example, but for some stange reason I cannot get the setProperty to work.
    Example: Using ConnBean and CursorBean with a Data Source This following is a sample JSP page that uses ConnBean with a data source to open a connection, then uses CursorBean to execute a query.
    <%@ page import="java.sql.*, oracle.jsp.dbutil.*" %>
    <jsp:useBean id="cbean" class="oracle.jsp.dbutil.ConnBean" scope="session">
    <jsp:setProperty name="cbean" property="dataSource"
    value="<%=request.getParameter("datasource")%>"/>
    </jsp:useBean>
    <% try {
    cbean.connect();
    String sql="SELECT ename, sal FROM scott.emp ORDER BY ename";
    CursorBean cb = cbean.getCursorBean (CursorBean.PREP_STMT, sql);
    out.println(cb.getResultAsHTMLTable());
    cb.close();
    cbean.close();
    } catch (SQLException e) {
    out.println("<P>" + "There was an error doing the query:");
    out.println("<PRE>" + e + "</PRE>\n<P>"); }
    %>
    Does anyone know how to set the "Property" to a datasource and make it work?
    Best regards,
    MHCI

    There is no point-and-click (Import Data Source Metadata) way to use an LDAP server as a datasource. You have to use the Java Function provided on dev2dev. If you need help with it, please post here.
    - Mike

  • Searching update insert and delete statements

    Hi.
    Suppose, there is change request containing 10 or more programs.
    One of the program has statements, working with database tables,
    like update, insert or delete.
    Is there any transaction where we can select request number and find
    programs working with tables directly.

    Hello
    1. Goto table E071 with TRKORR = change request and OBJECT = {reps, repo, rept}
    2. In field OBJ_NAME will be all reports names in this request
    3. In abap-programm upload this reports into internal table
    4. Search for 'update' 'insert' and 'delete'
    P.s. it is only for reports

  • Any Examples of using ActiveCollectionModelDecorator with POJO data control

    Are there any Examples of using ActiveCollectionModelDecorator with POJO data control in any of the sample packs?

    OK, here's an quick example. Create a new Windows Forms application and add a ScatterGraph and a Label to the form. Add a cursor to the ScatterGraph, then add the code below to the form. This generates 50 random data points when the form is loaded and plots them, then uses the cursor's AfterMove event to display the current X and Y positions in the label. Here's the code:
    Private Sub OnFormLoad(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
    Const dataLength As Integer = 50
    Dim xData(dataLength - 1) As Double
    Dim yData(dataLength - 1) As Double
    Dim rnd As Random = New Random
    For i As Integer = 0 To dataLength - 1
    xData(i) = i
    yData(i) = rnd.NextDouble() * 10
    Next
    ScatterGraph1.PlotXY(xData, yData)
    End Sub
    Private Sub OnAfterMoveXYCursor(ByVal sender As Object, ByVal e As NationalInstruments.UI.AfterMoveXYCursorEventArgs) Handles XyCursor1.AfterMove
    Label1.Text = String.Format("({0}, {1})", e.XPosition, e.YPosition)
    End Sub
    Hope this helps.
    - Elton

  • How to insert and delete fragments by clicking a button and how to script it?

    I have a  question on livecycle. I am collecting the inventor information as a bunch of text fields, each asking for a certain details. Please see below
    Now I have grouped them all in to one fragment called inventordetails and saved as .xdp file, so I could reuse this entire block. I want to add a button underneath this block, “ADD MORE INVENTORS” and when clicked this will insert another block and so forth and so on. However I was not sure as to how to insert and delete a fragment. Do  you think you can help with this? I appreciate any help in this regard.
    Best
    Subashini

    1.       I have a subform1 which is flowed
    2.       I have subform2 inside subform1 which is positioned
    3.       Inside subform2 I have two buttons 1. ADD INVENTOR 2. DELETE INVENTOR
    4.       Also inside subform1 I insert a fragment called inventor
    Now I want to script the buttons so that when clicked the inventor fragment either gets inserted again or deleted.
    I greatly appreciate any help in this regard.
    Best
    Subashini

  • Insert and Delete Button related code

    Hi Expert,
    I have requirement to create custom assignment block with custom table (value node), and add two button "Insert" and "Delete" on that AB.
    I have created the custom AB and button in "DO_PREPARE_OUTPUT" method.
    I need to create event handler for EH_ONINSERT and EH_ONDELETE, once the user click on "Insert" button one row editible row should append on AB and similar way if user select any row in AB and click on delete button entry should be deleted from AB.
    And i need "SAVE" button on top on overview page so entry should get saved in table.
    Regards,
    Kapil

    Hi Kapil,
    You can refer below mentioned link for your web ui related developments.
    SAP CRM WEB UI : 48.ADDING EDIT,CANCEL AND SAVE BUTTONS TO THE OVERVIEW PAGE TOOLBAR
    Rgds
    Hari

Maybe you are looking for