Adding/Deleting rows in a Table

I am trying to get a couple of buttons to work in a table to add/delete rows. I have followed the directions in the LiveCycle designer help and it isn't working.
In a test setup the only difference I can see from the help file is my Table is called Table1 and the subform containing the 2 buttons is called Subform1
I have therefore amended the script for the click event for the AddRow to
"Table1.Row1.instanceManager.addInstance(1);"
Any ideas where I am going wrong?
TIA
Antony

Hi,
My usecase is that user enters a url with parameters for example in the text box--> http://host:port/employee/all?department=abc&location=india. Now i want to parse this url , get the parameters out and put it in the table so that it is convenient for users to modify these parameters. User has a option to add and delete the parameter in the table. So once all this is done and user clicks on say save i don't need to send this table to server. i just have to make sure that the values added/deleted from the table are in sync with the url. So in the server i get all the parameters from the url and continue.
Since this is only needed on the client side i wanted to know if we can create a table with no values and then say on tabbing out of the url text box call a javascript that takes value from it and adds new rows to the table.
I am using JDEVADF_MAIN_GENERIC_140109.0434.S

Similar Messages

  • Prevent user from deleting rows from all tables in his own schema

    Hi,
    How can I prevent user from deleting rows in all tables in his own schema.
    I want the user to not able to delete rows from any existing or new tables that might be added in the future.
    The user does not have the "DELETE ANY TABLE" system privilege.
    Please advise.
    Thanks.

    Nowadays, I'd also avoid triggers (if possible).
    Sometimes, when I daydream, I'm rewriting a few applications that I've contributed to as a newbie, and I'm very ashamed of it nowadays.
    From what I've experienced, in retrospective, the emphasis on teaching 'Oracle stuff' has been lying far too much on PL/SQL row-by-row oriented processing instead of letting Oracle 'crunch' sets at once.
    Most of my debugging hours ended up in discovering one or more database triggers 'doing stuff automagically'.
    Another nice blogpost: http://rwijk.blogspot.com/2007/09/database-triggers-are-evil.html
    Regarding OP's question:
    I would just rethink/reconsider this requirement completely.
    Correctly implementing privileges and roles seems the best way to go, yes.
    Triggers? Nah...
    pre-post-edit, noticed thread got updated just before posting
    Don't know what you mean with 'namedropping', but I think it's legitimate to point other readers to interesting Oracle related opinions/articles that do have a technical background and lots of interesting examples.
    post dreaded OTN outage edit (from here)
    Again: I would just rethink/reconsider this requirement completely.
    Both trigger/vpd are being used to hide a design flaw here.

  • Deleting rows from a table

    COuld anyone tell me how to delete rows from a table which has millions of rows.
    TIA,
    Oracle user

    if you are deleting all the rows, use "truncate table" in sql*plus.
    or if you are deleting all but a handful of rows, then copy the rows you still want to a spare table, drop the original table, and rename the spare table back to the original table's name.
    hope this helps

  • Insert row and delete row in a table control

    Hi Experts,
    I am using a table control in module pool programming, How can I Insert row and delete row in a table control?
    Thanks in Advance....

    Santhosh,
    Iam using this code..
    FORM fcode_delete_row
                  USING    p_tc_name           TYPE dynfnam
                           p_table_name
                           p_mark_name   .
    -BEGIN OF LOCAL DATA----
      DATA l_table_name       LIKE feld-name.
    data: p_mark_name type c.
      FIELD-SYMBOLS <tc>         TYPE cxtab_control.
      FIELD-SYMBOLS <table>      TYPE STANDARD TABLE.
      FIELD-SYMBOLS <wa>.
      FIELD-SYMBOLS <mark_field>.
    -END OF LOCAL DATA----
      ASSIGN (p_tc_name) TO <tc>.
    get the table, which belongs to the tc                               *
      CONCATENATE p_table_name '[]' INTO l_table_name. "table body
      ASSIGN (l_table_name) TO <table>.                "not headerline
    delete marked lines                                                  *
      DESCRIBE TABLE <table> LINES <tc>-lines.
      LOOP AT <table> ASSIGNING <wa>.
      access to the component 'FLAG' of the table header                 *
        ASSIGN COMPONENT p_mark_name OF STRUCTURE <wa> TO <mark_field>.
    if <MARK_FIELD> = 'X'.
        PERFORM f_save_confirmation_9101.
        IF gv_answer EQ '1'.
          DELETE <table> INDEX syst-tabix.
          IF sy-subrc = 0.
            <tc>-lines = <tc>-lines - 1.
          ENDIF.
          ELSE.
          ENDIF.
        ENDIF.
      ENDLOOP.
    in this code   ASSIGN COMPONENT p_mark_name OF STRUCTURE <wa> TO <mark_field>.
    if <MARK_FIELD> = 'X'.
    this code is not working...

  • What is the keyboard shortcut for "delete row" in a table?

    What is the keyboard shortcut for "delete row" in a table within a pages document?

    Click on the row number to select the entire row. Right-click, and select Delete Row from the menu. There is no keyboard shortcut.

  • Delete row in database table

    Hi!
    Is there a way to delete row in database table by telling the number of the row?
    Thanx!

    Oh, sorry I didn't properly read your post.
    Try out what rvflannery suggests.
    But, for reference, you should always delete a row by it's unique ID.
    Don't go deleting things, by their position on a table, because a rows position can change.
    V

  • How to default the value of a selectOneChoice when adding a row to a table

    I have a table where one of the fields is a selectOneChoice. When adding a row to the table, the new row to be added displays the selectoneChoice field blank. I would like to have this field default to a specific value within the selectoneChoice when clicking the add button. Any suggestion on the code I need to add in the backing bean? Thanks in advance.

    After some studying I figured out how to do this... code below for anyone interested:
    DCIteratorBinding dcib = (DCIteratorBinding) bindings.get("someIterator");
    RowSetIterator iter = dcib.getRowSetIterator();
    Row newRow = iter.createRow();
    newRow.setAttribute("yourFieldName",fieldDefaultValue);
    iter.insertRowAtRangeIndex(0, newRow);
    iter.closeRowSetIterator();

  • How could I insert the deleted row into another table within a trigger?

    Hi,
    How could I insert the deleted row into another table within a trigger? The destination table has the same columns as the source table. Since the statements are in the trigger, it is not allowed to query the source table named 'test'. Thanks! The trigger is as follows, uncompleted:
    CREATE TRIGGER delete_trigger
    AFTER DELETE
    ON test
    FOR EACH ROW
    BEGIN
    -- How could I insert the deleted row into another table
    END delete_trigger;
    Message was edited by:
    user569548

    Hi,
    I'm not sure what's wrong there.
    I read the oracle docs about ANALYZE and ALL_TAB_COLUMNS, and did the following:
    ANALYZE TABLE my_tab VALIDATE STRUCTURE; //went ok.
    SELECT column_name
    FROM all_tab_columns
    WHERE table_name = 'my_tab'; //but no rows selected?
    This topic might not be what this thread should be about. Here I posted a new thread:
    How to get colum names of the newly created table?
    Thanks.
    Message was edited by:
    user569548

  • Disable users from adding-deleting row/columns

    we are running sharepoint 2010 and I would like to setup some type of persmission that will disable certain users from adding-deleting  rows/columns.
    any suggestions will be appreciated
    thank you

    Each list in sharepoint can be assigned certain roles.YOu can break the inheritance for that list and assign a group as a new role to the list.The users belonging to that group will only have access to that list depending to what permissions you give that
    group.The code goes something like this:
    SPWeb web = (SPWeb)properties.Feature.Parent;
    string ListName = "C";
    SPList list = web.Lists[ListName];           
                list.BreakRoleInheritance(true);           
    string GroupName = "Owners";
    SPGroup group = web.SiteGroups[GroupName];
    SPGroupCollection removeGroups = web.SiteGroups;
    foreach (SPGroup removeGroup
    in removeGroups)
    if(removeGroup.Name != GroupName)
    SPPrincipal principal = (SPPrincipal)removeGroup;               
                        list.RoleAssignments.Remove(principal);
    SPRoleDefinition rDefination = web.RoleDefinitions.GetByType(SPRoleType.Administrator);
    SPRoleAssignment rAssignment =
    new SPRoleAssignment(group);
                rAssignment.RoleDefinitionBindings.Add(rDefination);
                list.RoleAssignments.Add(rAssignment);
                list.Update();

  • Deleting rows in a table with a button

    Good Day All;
    I seemed to have run into a snag with trying to add a delete button in a table that will delete a row. Let me expain.
    The form has 1 table that has 7 cells made up of text fields and drop downs. This table is in its own subform.
    There is a button to add rows as the user requires. The code I am using to add rows: psl_list_subform.instanceManager.addInstance(1);
    I have been asked to add a delete button so a user can delete rows. I have added this to the end of the table. SO each time a row gets repeated, there is a delete button. The code I am “trying” to use is;
    Table4.Row1.instanceManager.removeInstance(this.parent.index);
    When I click on the button to delete, nothing happens. I brought up the JavaScript debugger, there are no errors.
    Any ideas what I missed.
    Thanks All
    Chomp

    Hi,
    from my understanding of your form, you adding new instances of the subform "psl_list_subform" which contains a single table row.
    The hierarchy that will look like "psl_list_subform.Table4.Row1.RemoveButton".
    To remove an instance of the subform, from a button within the table row the script needs to refer to the 3rd parent of the remove button.
    this.parent.parent.parent.instanceManager.removeInstance(this.parent.parent.parent.index);
    Explaination: this = RemoveButton, 1st parent = Row1, 2nd parent = Table4, 3rd parent = psl_list_subform

  • Deleting Row from Advanced Table Region

    Dear Members,
    I have an OAF Page where I am using Advanced Table Region to display the data of a table.
    As soon as the page opens I am displaying one line in Advanced Table Region. In this region I have also given a button called ADD ANOTHER ROW +(using the feature of ADVANCED TABLE COMPONENTS, FOOTER, TABLE FOOTER , ADD TABLE ROW)+.
    So when user clicks on this button a new row will be added. Now if user wants to delete it how to achieve this.
    Kindly please help me in achieving this functionality.
    Many thanks in advance.
    Best Regards,
    Arun Reddy D.

    Hi Arun,
    First you need to create a button or image called Delete on your Advanced table region.
    Action Type : firePartialAction
    Event: delete
    Then In your CO PFR , write the below code
        if ("delete".equals(pageContext.getParameter(EVENT_PARAM)))
          String rowRef = pageContext.getParameter(OAWebBeanConstants.EVENT_SOURCE_ROW_REFERENCE);
          OARow row = (OARow)am.findRowByRef(rowRef);
          row.remove();
        }Hope this helps. :)
    Thanks,
    SK
    Edited by: SK on Feb 9, 2011 5:21 PM

  • Dynamically adding a row in a table in JSF

    Hi All,
    I am searching for a control in JSF using which I can dynamically add more than one row in a table. Currently I am handling this in javasript where I have to click on the "Add Row" button to add one more row at the bottom of the table. I want to get rid of javascript.
    If anyone knows about such control then please help me.
    Thanks in advance.
    Regards,
    Saket

    hello Saketh,
    here is the code for Create Delete Update code where a row is added for every button click..and the JSF code is at the bottom.. today u r blessed with ocean. :-) have fun!!
    package redrose;
    import net.sf.hibernate.Session;
    import net.sf.hibernate.Transaction;
    import net.sf.hibernate.Query;
    import javax.faces.model.DataModel;
    import javax.faces.model.ListDataModel;
    public class RowEntry {
         private DataModel datamodel = null;
         static Integer sid;
         private Medata mdobject = null;
         private Medata nm=null;
          * @return Returns the newMdobject.
         public Medata getNm() {
              nm = new Medata();
              return nm;
          * @param newMdobject The newMdobject to set.
         public void setNm(Medata newMdobject) {
              this.nm = newMdobject;
          * @return Returns the mdobject.
         public Medata getMdobject() {
              return mdobject;
          * @param mdobject The mdobject to set.
         public void setMdobject(Medata mdobject) {
              this.mdobject = mdobject;
         public DataModel getDatamodel()
              datamodel = new ListDataModel();
              Session hibSession;     
              try{
                   hibSession = HibernateSessionFactory.currentSession();
                   Query q = hibSession.createQuery("FROM Medata");                    
                   q.setMaxResults(9999);
                   datamodel.setWrappedData(q.list());
              catch(Exception ex){
                    System.err.println("%%%% Error GetData %%%%");
                    ex.printStackTrace();
              return datamodel;
          * Inserting a new Record by reading from Client
         public void insertEntry()
                  Transaction tx = null;
                   Session session = null;
                   try{
                        session = HibernateSessionFactory.currentSession();
                        tx = session.beginTransaction();
                        Medata     dbmedata = new Medata();
                             dbmedata.setEmploy(nm.getEmploy());
                             session.save(dbmedata);
                        tx.commit();
                        session.close();
                   catch(Exception ex){
                        System.err.println("%%%% Modify Data %%%%");
                        ex.printStackTrace();
          * Modify data
         public void updateEntry()
              int a =0;
             if (this.datamodel == null) return;
             Medata mdupdate = (Medata) this.datamodel.getRowData();
             if (mdupdate == null ) return;
              Transaction tx = null;
              Session session = null;
              try{
                   session = HibernateSessionFactory.currentSession();
                   tx = session.beginTransaction();
                   Medata dbmedata = (Medata) session.load(Medata.class,mdupdate.getId());
                   if (dbmedata != null){ // we have to update the record
                        dbmedata.setEmploy(mdupdate.getEmploy());
                        session.update(dbmedata);
                   else // we have to insert the record
                        dbmedata = new Medata();
                        dbmedata.setEmploy(mdupdate.getEmploy());
                        session.save(dbmedata);
                   tx.commit();
                   session.close();
              catch(Exception ex){
                   System.err.println("%%%% Modify Data %%%%");
                   ex.printStackTrace();
          * Delete Data
         public void removeEntry()
             if (this.datamodel == null) return;
             Medata mdupdate = (Medata) this.datamodel.getRowData();
              Transaction tx = null;
              Session session = null;
              try{
                   session = HibernateSessionFactory.currentSession();
                   tx = session.beginTransaction();
                   Medata dbmedata = (Medata) session.load(Medata.class,mdupdate.getId());
             if (mdupdate == null ) return;
                   if (dbmedata != null){ // we have to update the record
                        session.delete(dbmedata);
                        tx.commit();
              catch(Exception ex){
                   System.err.println("%%%% Delete Data %%%%");
                   ex.printStackTrace();
    Here starts the JSF code
    <%@ page language="java" %>
    <%@ taglib uri="http://java.sun.com/jsf/html" prefix="h" %>
    <%@ taglib uri="http://java.sun.com/jsf/core" prefix="f" %>
    <%
    String path = request.getContextPath();
    String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
    %>
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
    <html>
    <head>
         <base href="<%=basePath%>">
         <title>My JSF 'trial.jsp' starting page</title>
         <meta http-equiv="pragma" content="no-cache">
         <meta http-equiv="cache-control" content="no-cache">
         <meta http-equiv="expires" content="0">   
         <meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
         <meta http-equiv="description" content="This is my page">
         <!--
         <link rel="stylesheet" type="text/css" href="styles.css">
         -->
    </head>
    <body>
         <f:view>
              <h:form>
         <h:dataTable border="3" value="#{bla.all}" var="currentRow">
                          <h:column>
                            <f:facet name="header">
                                 <h:outputText value="Employee Name" />
                            </f:facet>
                  <h:inputText value="#{currentRow.employ}">
                            </h:inputText>
                       </h:column>
                          <h:column>
                            <f:facet name="header">
                                 <h:outputText value="Employee Number" />
                            </f:facet>
                            <h:inputText value="#{currentRow.id}"></h:inputText>
                       </h:column>
                       <h:column>
                       <f:facet name="header">
                       </f:facet>
                       <h:commandButton id="Delete" action="#{bla.insert}" value="Delete"></h:commandButton>
                  <h:commandButton id="Modify" action="#{bla.modify}" value="Modify"></h:commandButton>
                       </h:column>
                  </h:dataTable>
                   <h:commandButton id="Insert" action="#{bla.insert}" value="Insert"></h:commandButton>
               <%--h:outputText value="#{bla.sid}"></h:outputText--%>
               </h:form>
         </f:view>
    </body>
    </html>
    Faces-config file starts here
    <managed-bean>
              <description>Inserts a record</description>
              <managed-bean-name>bla</managed-bean-name>
              <managed-bean-class>redrose.RowEntry</managed-bean-class>
              <managed-bean-scope>session</managed-bean-scope>
         </managed-bean>     
         

  • Transport deleted row in custom table

    I have a custom table with maintenance view.  I have no problem adding/changing rows in table and transporting. But, how do I capture the deleted rows in a transport?? There's nothing there to select and 'add to transport request'!

    Hi,
    In the table maintenance generator in SE11, in the recording routine check the "Standard recording routine" and then save it.
    Then create a customizing CR in SE09.
    Then go to SM30 then enter the table and then press maintain..
    If you delete the entry I believe it will ask for a CR..
    Hope this helps..
    Thanks,
    Naren

  • Deleting Rows From A Table After Running a Report

    I've created a report that inserts rows into a table on the asp page then calls a BI Publisher report to display the data. After running the report in BI Publisher I need to delete the rows from the table that had just been inserted. How is the best way to go about this in BI Publisher?

    The best way I know of would be to use an "afterReport trigger".
    An afterReport trigger fires after the XML output has been generated.
    Thanks,
    Bipuser

  • Deleting row from a table binded to a matrix

    Hi all
    i have a form with a matrix binded to a user table which is handled as a Master Data lines by UDO.
    i want to enable deleting lines from the table by selecting a row in the matrix and clicking a delete button.
    currently i'm handling the click event by usint the method DeletRow of the matrix object.
    when i press the Update button (UID = "1"). the fact that a row was deleted from the matrix does not affect the bounded table.
    my question is how in code can i cause the deletion of a row from the matrix to also be deleted from the database table?
    appreciate the help
    Yoav

    Hi Yechiel
    flushToDatasource make the following:
    Flushes current data from the GUI to the bounded data source using the following process:
    1)Cleans the data source.
    2)Copies each row from the matrix to the corresponding data source record.
    In other words: This method load data from Matrix to DataSource (but not to database)
    the next step is update database from userdatasource
    Note: You migth read sdk help for more information

Maybe you are looking for

  • R12- Unable to Create Invoice usin AR_INVOICE_API_PUB.create_single_invoice

    Hi All, I am trying to create an AR invoice using an API AR_INVOICE_API_PUB.create_single_invoice. But neither it gives any error nor any record in the table Ra_Interface_Lines_All. Can you please help on the issue, or am i using a wrong API to achie

  • How to find out the containing jinternalframe?

    anyone know the solution to this problem?: 1. i have a jinternalframe 2. in the jinternalframe i have a jlist 3. each list cell is rendered with a jlabel 4. i have an action emanating from one of the list cells 5. in the action handler, i need to get

  • Error: Adobe Acrobat 7.0 Standard

    When I try to convert a powerpoint presentation into Adobe PDF I get the error message "Missing PDFMaker files" Then asks "Do you want to run the installer in repair mode"    I have clicked yes. But continues to get the same error message "Missing PD

  • Slow to convert Oracle 11g XMLType into Java String or Document

    After retrieving a result set from an Oracle 11g database, it takes roughly 75 seconds to convert the XMLType (this is a structured XML Storage, registered with an xsd) into either a java String or Document. I'm using Java 1.6, have the xdb.jar and x

  • Adobe Premiere Elements 4 unlock Key

    I have the site license for Adobe Premiere Elements 4.  Just this year the school upgraded the computers in my room and up until that time I could use Elements 4 to burn the students DVD projects.  I now need to use the Elements 4 for this year's pro