JavaScript is delete the wrong line of table

I created a table in livecycle are 8.2. I have buttons add and remove lines. The Add button works fine, but the delete button removes the wrong line. For example, in preview mode PDF, if I add three rows and try to remove the third, the second is removed.

To add a line, I use the code:

UserTable._Row1.addInstance (1);

To delete a line, I use the code:

UserTable._Row1.removeInstance (1);

I tried many variations I found online, include (this.parent.index) and the (real). I don't know anything about javascript other than that I used for this form. Can someone help me?

Thanks in advance!

Hello

The setting for the addInstance() is the value 1 (true) or 0 (false) and it is about if the new instance will be merged with the data model.

When it somes to removeInstance(), the parameter is the instance number you want to delete, based on a system of numbering from scratch.

So if there were four instances of a repeating line (line 1), then the numbering would be Row1 [0], Row1 [1], Row1 [2] and Row1 [3]. If you want to remove the second instance of the script wouls look like

_Row1.removeInstance(1);

Here are a few examples, have a look at the delete line key:

https://Acrobat.com/#d=X1msu65emlM10IWKxkiUyw

https://Acrobat.com/#d=tIpEHFadQtSOefZkU9EBfQ

https://Acrobat.com/#d=RZ1lzX23 * u7L4N9rtWCYPQ

Herein, you will see that I used "this.parent.index" as a parameter.

Hope that helps,

Niall

Tags: Adobe LiveCycle

Similar Questions

  • Delete the data in partitioned tables

    Hello

    Oracle 11.2.0.3.0 version, running on Linux Enterprise.

    I need to remove all the data from two tables (several 100 million lines each) that are partitioned.

    (1) table 1 is a partition table have varied to a DATE column

    (2) Table2 is a partition of reference table; partitioning is referenced on a relationship of foreign key to Table1 (column: key Table1.Primary)

    As I have no need for data, but want to keep the structure of the table, I would ideally like to delete partitions at the same time that the deletion of the data, so that the 2 tables partitioned and empty.

    Additionally, Table1 has some partitioned index I would be rebuilt as an index unpartitioned (given that Table1 will be empty).

    I thought I would start by removing all partitions of Table1 (via "ALTER TABLE DROP PARTITION nom_partition Table1"), but when the script came to the last partition, I got this error message:

    ORA-14083: cannot delete the only one partition of a partitioned table

    ORA-06512: at "SYS." DROP_PARTITIONS', line 46

    If someone could advise as to the best approach to what I want to achieve with regard to the two tables? Two tables down and recreate them then without partitions would be the easiest way?

    Thanks in advance for any guidance.

    If someone could advise as to the best approach to what I want to achieve with regard to the two tables? Two tables down and recreate them then without partitions would be the easiest way?

    Yes - delete the tables and re-create them.

    As says the exception that you cannot delete the last partition. A table is partitioned either or it is not.

    There was no interest at all to use DBMS_REDEFINITION to redefine tables because you do not want the data anyway.

  • Delete the row in a table

    Adding table rows works fine when I use this script: Table.Row1.instanceManager.addInstance (1);

    When users click on Delete, always, it removes the second (and shifts the rest upwards), any line, they want to remove. I have the following script to delete a table row:

    Table.Row1.instanceManager.removeInstance (1);

    What I have to change in order to remove the line that is clicked?

    Hello

    Add to that a proceeding is easy because you must specify true or false (1 or 0)

    but for deletion line is a little different, instead of this, or specify true false, you must specify which line to remove...

    If your button Delete is inside the line itself, you can use the index of the parent of the button line delete

    Table.Row1.instanceManager.removeInstance (this.parent.parent.index);

  • delete the first line of operation alwaysdeletes

    Hi all

    I'm new to jdeveloper and I have some problems with the delete operation. I have a standard jsp page with data child parent. The child table has emplid and seqno in the form of key fields. When you try to delete the third (or any other line) row in the child table it somehow always deletes the line first. I tried using standard deletion operation and also have tried to use the code to remove the data below. Can someone please help me understand what could be the problem?
    I use jdeveloper 11.1.2.2

    Thanks in advance.

    {} public void deleterow (ActionEvent actionEvent)
    DCBindingContainer links =
    (DCBindingContainer) BindingContext.getCurrent () .getCurrentBindingsEntry ();
    DCIteratorBinding dcItteratorBindings = bindings.findIteratorBinding("EMPL_PROVW1Iterator");
    System.out.println ("HI" + dcItteratorBindings.GetCurrentRow ());
    dcItteratorBindings.removeCurrentRow ();

    This is the reason why...
    can u paste your table code so that I can help you...
    chk this
    http://docs.Oracle.com/CD/E21043_01/Web.1111/b31974/web_tables_forms.htm#CJAGIGAB

    
    
  • I deleted the wrong user. Came back but all the documents and some programs are not available. How can I get back them?

    Windows Vista Home Edition of Preimium.  I deleted by mistake the wrong USER account.  I went back and he added.  Still lacks most of the documents and some programs and my e-mail program is missing.  I Retored back to an earlier date and is not good, but when I search in the search bar in the start menu, I find the documents but can't seem to them.

    Hello

    It gives you a warning before you delete an account that you will lose data from it, if you do not save it.

    Try this free program to search for these files:

    http://www.Piriform.com/Recuva

    See you soon.

  • Find and delete the graphic lines of geometric limits

    Hello world

    I'm really desperate after days of web browsing and the forums that I still cannot understand this.

    I'm working on InDesign CS3 on a MacBook Pro with Snow Leopard.

    I have a catalog of 300 pages, set up thanks to a data merge. Unfortunately this way, I produce 2 graphic lines at the end of each page to which I would like rather to remove. Since I don't want to do it manually to each page and I'll have to set up this catalog quite frequently in the future I would like to remove these lines using Applescript.

    Since I have about 12 more of the same lines on each page (same style, color, stroke etc) I thought that the only way to tell which Applescript to remove is the geometrical limitations because these lines always run the same coordinates on each page.

    Unfortunately I can't understand it. I tried the following code:

    tell application "Adobe InDesign CS3"
         tell document 1
              repeat with oneFrame in (get graphic lines whose stroke weight = 1)
                   if geometric bounds of oneFrame is {0, 0, 0, 210} then
                        delete oneFrame
                   end if
              end repeat
         end tell
    end tell
    
    
    

    RESPONSE

    tell application "Adobe InDesign CS3"
         get every graphic line of document 1 whose stroke weight = 1
              --> {graphic line id 187 of page id 177 of spread id 172 of document "Untitled-16"}
         get geometric bounds of graphic line id 187 of page id 177 of spread id 172 of document "Untitled-16"
              --> {0.0, 0.0, 0.0, 210.0}
         delete graphic line id 187 of page id 177 of spread id 172 of document "Untitled-16"
    end tell
    
    
    

    It worked well for the line to x y 0mm 0mm with a length of 210mm.

    I tried the same thing with a line x 3mm y 134mm length of 210mm with the following code

    tell application "Adobe InDesign CS3"
         tell document 1
              repeat with oneFrame in (get graphic lines whose stroke weight = 1)
                   if geometric bounds of oneFrame is {134, 3, 134, 213} then
                        delete oneFrame
                   end if
              end repeat
         end tell
    end tell
    
    
    
    

    ANSWER:

    tell application "Adobe InDesign CS3"
         get every graphic line of document 1 whose stroke weight = 1
              --> {graphic line id 213 of page id 177 of spread id 172 of document "Untitled-16"}
         get geometric bounds of graphic line id 213 of page id 177 of spread id 172 of document "Untitled-16"
              --> {134.0, 3.0, 134.0, 213.0}
    end tell
    
    

    It was my best shot. No idea if I'm on the right track or totally out of bounds.

    Any help would be much appreciated!

    Thanks in advance...

    Osinho

    Take a look at that show the values for the geometric limits. These figures related to your x and is coordinated and you refer to them by their article in the list, for example, item 1 is the first "134,0" in your list, point 2 is called the "3.0", etc. So you need to refer to "that item 2 of geometric limits = [regardless of the value you're trying to match].

    If your document is very complicated, I think I would add another modifier to ensure that you get the right things, to say if these lines have a color that is not used on other graphic in the document lines, or if their weight of race is different, or even tests two items in the list of geometric limits if there is two that appear systematically in all the elements you want to delete - something for you make sure that you ONLY get references to the items that you want and are not likely to delete something, you need to keep.

    Good luck and welcome to AppleScript!

  • How to get the values of the modified line of table of the ADF?

    JDev 11.

    I have a table that is filled with bean data.
    I need to save changes after the user makes changes in any table cell. InputText is defined for the table column component.
    I've defined ValueChangeListener for inputText field and AutoSubmit = true. So when the user change the value field inputText, the method is called:

    public void SaveMaterial (ValueChangeEvent valueChangeEvent) {}
    getSelectedRow();
    SaveMaterial (material);
    }

    This method must call getSelectedRow that take values of the selected table row and save them in object:

    private line {} getSelectedRow()

    Table richeTableau = this.getMaterialTable ();
    Selection of the iterator = table.getSelectedRowKeys () .iterator ();
    While (selection.hasNext ())
    {
    Key of the object = next ();
    table.setRowKey (key);
    Object o = table.getRowData ();
    material = o (HARDWARE);
    }
    System.out.println ("selected hardware Desc =" + material.getEnumb ());
    Returns a null value.
    }

    Problem is that getSelectedRow method is not new (edited) values, old values are still used.

    I tried to use ActiveButton with the same method and it works very well in this case. New values are inserted and active line in the object selected.

    JSF:

    < af:table var = 'row' rowSelection = "single" columnSelection = "unique."
    value = "#{ManageWO.Material}" binding = "#{ManageWO.materialTable}" > "

    < af:column sortable = "false" headerText = "E-number" >
    "< af:inputText value =" #{row.enumb} "valueChangeListener =" #{ManageWO.SaveMaterial} "autoSubmit ="true"/ >
    < / af:column >

    < af:column sortable = "false" headerText = "Description" >
    "< af:inputText value =" #{row.desc} "valueChangeListener =" #{ManageWO.SaveMaterial} "autoSubmit ="true"/ >
    < / af:column >
    ......
    < / af:table >

    < af:activeCommandToolbarButton text = "Save" action = "#{ManageWO.EditData}" / >


    What is a good place where Save method must be called to get the new values (edited) table of the ADF?

    Thank you.

    Have you looked into the valueChangeEvent?

    There oldValue and newValue attributes.

    public void SaveMaterial(ValueChangeEvent valueChangeEvent) {
    Object oldVal = valueChangeEvent.getOldValue();
    Object newVal = valueChangeEvent.getNewValue();
    // check if you see what you are looking for.....
    getSelectedRow();
    SaveMaterial(material);
    }
    

    Timo

  • I have two versions of Xp on my computer, it's freezing and the other is perfect, so how can I delete the wrong version

    I have xp SP3 version, I got a bug problem and had to reload windows, the old version must have not been only partially removed. When I start the computer, I get a blue screen, if I press f8 and then get the choice which version I want to if I choose the right one, the computer works well. I would like to delete the incorrect version.

    Paul

    Read this, remove a second version of Windows http://support.microsoft.com/?kbid=888023

  • How can Z10 blackBerry I delete the wrong email for Z10 auto-sauve?

    I've mistyped my email address in my Z10 when trying to send a picture to my computer at home.  Now, whenever I try to send me an email, it will be set to the wrong address, even if I type everything correctly.  The Z10 seems to have recorded and gives the priority of use.

    How to remove these incorrect addresses stored in memory?
    PS. I tried to put myself in the contacts, but he always took an old, bad.

    I discovered that by sending email to myself from my ad for me in contacts, it bypasses this system of auto-grab.  So, I just can't send e-mail program.

  • JavaScript to extract the second line only a field of text as a PDF?  Is this possible?

    I have a PDF form created in Acrobat DC.  One of the fields is a for the name and address multi line text field.  The user between that info with carriage returns in a field named the plaintiff that ends in a format such as:

    Name

    Mailing address

    City, State Zip

    I need to extract JUST the second line of this field to complete another field of text with these data.  So, my second text field called StreetAddress and would automatically extract only the second input line in the text field named candidate.

    Is it still possible?  If so, can someone give me an example of how this can be accomplished?  I don't want to ask the applicant to each line of input in separate fields.

    Of course, it is possible. Use this code as the "StreetAddress": custom calculation script

    var fullAddress = this.getField("Applicant").valueAsString;
    var lines = fullAddress.split("\r");
    if (lines.length>1) event.value = lines[1];
    else event.value = "";
    
  • Lightroom deletes the wrong files! -WARNING

    http://regex.info/blog/2013-06-10/2268

    WARNING WARNING WARNING

    One thing I don't like is a bug related to publish very dangerous which remains in the final 5.0, which can bring you to remove your master images without even realizing account!

    The problem is thatindicated in a publication rack selection can be not the real game of selected images, and so when you intend to perform operations (update metadata, delete images, export, etc.) on what you see as the selected images, it might not happen... a completely a different set of images may be affected (updated, remove, exported).

    I noticed a similar problem when sending images more in PS. but since the library view.

    I select images in LR and send their PS. I edit in PS and close them.

    then I go back to LR and select different photos 'try' send them to the PS... instead the SAME images I selected before (and are now disabled) must send to the PS

    Thank God I did not remove one of my photos. But if I had deleted the selection-> puff.

    of course, I have backups... but this does not alter the seriousness of this bug.

    It doesn't always happen. of course not... these nasty bugs happen randomly.

    Stay away from LR 5.

    Let's stick to this topic please, personal insults are not acceptable here.

    Yes, there is a bug that is being investigated, and it's good for people to know about it, so they can avoid it, but let's be cautious and scaremongering.  It seems he has been around for a long time.

    Jeffrey has updated his blog - http://regex.info/blog/2013-06-12/2270

    To be on the safe side, avoid to remove photos from a view of Publishing Services for now.

  • Impossible to delete the partitions of a table with the number of rows is zero

    Hi all

    I want to delete all partitions on all the tables in a schema having the number of lines equal to zero.

    I use the queries below to get a solution.

    Select 'EDIT '. '' || 'TABLE ' | TABLE_NAME | 'DROP '. 'PARTITION | Nom_partition from dba_tab_partitions where TABLE_OWNER = "xyz";

    Select count (*) in the table table_name partition (nom_partition).

    Edited by: 887563 October 17, 2011 13:39

    If you trust your statistics, you can simply use the stat num_rows in dba_tab_partitions:

    select *
    from dba_tab_partitions
    where table_owner = 'MY_SCHEMA'
    and num_rows = 0;
    

    But I think what you try to get some code like this:

    declare
      v_rows number;
      v_statement varchar2(500);
    begin
      for c in (select *
                from dba_tab_partitions
                where table_owner = 'MY_SCHEMA') loop
        v_statement := 'select count(*) from '||c.table_name||
                       ' partition ('||c.partition_name||') where rownum=1';
        --dbms_output.put_line(v_statement);  --for debugging
        execute immediate(v_statement)
        into v_rows;
        --dbms_output.put_line(c.table_name||' '||c.partition_name||' '||v_rows);  --for debugging
        if v_rows = 0 then
          v_statement := 'ALTER TABLE '||c.TABLE_NAME||' DROP PARTITION ' || c.PARTITION_NAME;
          dbms_output.put_line(v_statement); --shows the drop statements
          --execute immediate(v_statement); --remove comment to execute
        end if;
      end loop;
    end;
    
  • JavaScript help: get the current line inside tabular

    Hello world

    I hit a roadblock for a simple JS code: to get a current line for my tabular form. My environment is: Apex 4.2.6 on Oracle 11.2 with 3 Bootstrap for styling.

    The query in tabular form is as simple as this:

    Select

    "REF #"

    «INV #»

    "MANUFACTURER."

    "DISCOUNT."

    'PRICE ',.

    "UPC",

    "DESCRIPTION."

    quantity,

    "LINE NO.",.

    "" step by step

    of Order_items

    Now the emphasis here is "stepper", it is defined as "text save any State", in the expression of the HTML, I added this:

    < div class = "btn-group" >

    < button type = "button" class = "btn, btn - lg" onclick = "plusClicked ()" > + < / button >

    < button type = "button" class = "btn, btn - lg" onclick = "minusClicked (); ">-< / button >

    < / div > <!-/-> button

    The screen is as follows:

    Screen Shot 2015-02-06 at 9.44.49 AM.png

    In the header of the Page Javascript section:

    function plusClicked() {}

    var line, qty;

    Row = $(this). Closest ("TR");

    I tried row = $(this) .parent () .closest ("tr");

    same undefined result

    Qty = Row.Find ('input [Name = F09]'). Val();  F09 is the entry for the qty column name

    Alert ('most clicked qty =' + Qty);

    }

    The result is always: 'most clicked qty = undefined ".  Inspect the code says this:

    Screen Shot 2015-02-06 at 9.57.49 AM.png

    Any help and suggestions are greatly appreciated.

    The few I tested it seems solid to me.  I think you have to pass 'this' to plusClicked and minusClicked.

    onclick = "plusClicked (this)" "

    Then, the function can do:

    function plusClicked (btn) {}

    var line, qty;

    Row = $(BTN). Closest ("TR");

    Qty = Row.Find ('input [Name = F09]'). Val();  F09 is the entry for the qty column name

    Alert ('most clicked qty =' + Qty);

    }

    The other approach, I like it for it's with a DA.  I would like to add a class to the buttons instead of the onclick.

    DA would be during the click on jQuery selector .btnPlus

    and the JS to run would be:

    var $row = $(this.triggeringElement) .closest ("tr");

    var qty = $row.find('input[name=f09]').val ();

    Alert ('most clicked qty =' + Qty);

    I hope this helps.

    Thank you

    -Jorge

  • Report of Script delete the first line

    Hello all-

    I have the following report script:

    < INSTALLATION < SYM < SUPSHARE < sparse
    {NoIndentGen} {SupPageHeading} {SUPFEED} {SupZeroRows} {SUPEMPTYROWS}
    {SupBrackets} {ROWREPEAT} {TABDELIMIT} {decimal 0} {SUPMISSINGROWS}

    < END
    Members page
    < PAGE ("Emp", "HP", "Curr', 'Version', 'DType', 'HSP_Rates')
    "Emp".
    "HP".
    "USD".
    Final
    "UnAlloc.
    'HSP_InputValue '.

    Members of the column
    < SYM
    * < COLUMN ('accounts', 'Periods'). *
    * "Indirect labor *" "teacher tax."
    Rules of selection and output options for dimension: periods of time
    < link ((< LEV ("", "Lev0, périodes")) AND (< IDESC ("YearTotal")))
    {CALCULATION COLUMN "P1" = 3 + 4}
    {CALCULATION COLUMN "P2" = 5 + 6}
    {CALCULATION COLUMN "P3" = 7 + 8}
    {CALCULATION COLUMN "P4" = 9 + 10}
    {CALCULATION COLUMN "P5" = 11 + 12}
    {CALCULATION COLUMN 'P6' = 13 + 14}
    {CALCULATION OF COLUMN "P7" = 15 + 16}
    {CALCULATION COLUMN 'P8' = 17 + 18}
    {CALCULATION COLUMN "P9" = 19 + 20}
    {CALCULATION COLUMN "P10" = 21 + 22}
    {CALCULATION COLUMN "P11" = 23 + 24}
    {CALCULATION COLUMN "P12" = 25 + 26}
    {CALCULATE THE COLUMN "P13" = 27 + 28}
    {ORDER 0,1,2,29,30,31,32,33,34,35,36,37,38,39,40,41 FIXCOLUMNS 16}
    Line members
    < ROW ('entities', 'Scenario', "Years")
    Rules of selection and output options for dimension: entities
    < link ((< LEV ("", "Lev0, entités")) AND (< IDESC ("Entities")))
    "Forecasting".
    FY10
    !
    End of report

    The report works fine but the text file created by this script still introduced a starting line that contains the name of the account. I regret that the line is not empty it has the header for the accounts, but I want to delete it. Is this possible? I have

    don't want to use the title of column delete I like P1, P2... P13 as my column heading.

    Please notify

    To get rid of it, you'd have to suppre topics, but who's going to get rid of the desired topics. As a work around, you could add the repression and create a file that has the desired header. If you run this from a command script, the last step would be to add the header file and report all file in a final file. You can do this using the command copy. Something like
    Copy headefile.txt + reportfile.rpt Finalfile.txt

  • What is your strategy in order to locate the wrong line?

    Hi Experts,

    We, the developers to meet VALUE_ERROR error sometimes when we try to convert columns TO_NUMBER TO_CHAR or TO_DATE. For this reason would be a mistake. (for example: ORA-01722 invalid number etc.)  So what is your strategy in order to find which line this error occur?

    with

    Q1 as (select decode (mod (rownum, 50), 0, "x", rownum) neck of the double connection of level < = 100)

    Select to_number (col) in q1;

    Select * from version of v$.

    Oracle Database 11 g Release 11.2.0.4.0 - 64 bit Production

    Thank you

    Hello

    I used dml error logging and custom conversion function.

    create or replace
    function IsNumber(p_value varchar2) return number
    is
      l_number  number;
    begin
      l_number := to_number(p_value);
      return 1;
    exception when others then
      return 0;
    end;
    /
    
    with
    q1 as (select decode(mod(rownum, 50), 0, 'x', rownum) col from dual connect by level <= 100)
    select * from q1 where IsNumber(col) = 0;
    
    Function ISNUMBER compiled
    
    COL
    ----------------------------------------
    x
    x
    

Maybe you are looking for

  • APPLE 5S PHONE DOES NOT RING ON INCOMING CALLS

    APPLE 5S PHONE DOES NOT RING ON INCOMING CALLS

  • Satellite L100-120 WLAN connectivity problem

    It is very difficult to connect to a wifi network, the activity is very slow between 200-500 bytes sent and received, and often, with excellent signal, I get the message "no or limited connectivity. Now I use an external adapter that gives me good co

  • Resolution problem with Age of Empires on Windows 7.

    I can't get Age of Empires to work in a resolution of 1280 x 800; It plays only at 640 x 480. I tried all the different compatibility options, and none of them worked. This game worked on Windows Vista, but since I have upgraded to Windows 7. How to

  • Cannot read the original product key on the sticker.

    I would like to reinstall Vista from scratch, but it was done once already with a product key different than the original one. I would use the original this time, but the sticker is worn off the coast and unreadable. Are there any other unique identi

  • Phone number in html format

    My problem is related to the recognition of phone number in the Blackberry browser: I have created a simple webpage using html and displays the numbers as 07811987654I need to click on it and call the phone call