Button to remove the CURRENT row in a table

This test document has a table that works for most as I want, but the buttons Remove line always delete the second line , regardless of the button remove a row is clicked. The code is:

Table1.Row1.instanceManager.removeInstance (1);

How can I change this so that if you click on the button Delete line 5 (for example), it removes the 5 line, not of rank 2. It always clears rank 2, regardless of the button is clicked.

Also, after I line is deleted, how can I get the lines of re - number automatically? The code for the automatic numbering is:

this.rawValue = this.parent.index + 1;

I tried to use this code:

var number = detail.instanceManager.count;

Detail.index + 1;

numbers for automatic (by this blog entry by BR001), but I could never work on my table, although it works very well in his example. In the example of BR001, there a button Delete by rank and it always removes the line it is and it always automatically renumbers. I would use his method, but I spent hours trying to figure out where I am not to follow his example.

Hello

OK, your script will always clear the 2. instance as the removeInstance (1) simply means to delete the instance 1.

You must keep in mind that all nodes have numbers index starting at 0.

So the first instance of Row1 is addressed with Row [0], the second with the row [1]... the tenth line [9].

To remove the current instance, you can use the button Delete as point of reference.

This point of reference you're going upward in the tree of nodes to find the line desired.

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

It = object current i.e. Button2

parent = parent of Button2 which is Subform1

parent = parent Subform1 which is Row1

index = the number of the line pending

OK, to keep the number of rows to update, you must use your line indexChange event (just add it after you existing script shading line).

simple2.rawValue = this.index + 1;

Tags: Adobe LiveCycle

Similar Questions

  • Impossible to get the handle to the current row in a table

    Hi Experts,

    I am facing a problem all of a sudden.

    My page has a table of data, which has an (image) column, updated image. I can't pass the parameter as the vo is not the headerid of the column on the page, but it is made wrong.

    That's why I can't use the ${oa.xxEcreditCardResultsVO1.CreditCardHdrId} in the settings of the image update.

    Now, I want to access the current row. I wrote the code below: but I have similar question, same CreditCardHdrId (first line) is filled in the variable reqNumber

    for all lines.

    Any line that I select, there the headerID of the first line.

    rvo.getCurrentRow () does not work in this scenario. Could you please advice how to manage? I'm totally stuck here.

    Thanks in advance,

    Suman

    ElseIf ("update".equals (pageContext.getParameter (EVENT_PARAM)))
    {
    {
    OAApplicationModule am = pageContext.getApplicationModule (webBean);
    ORT OAViewObject = (OAViewObject) am.findViewObject ("xxEcreditCardResultsVO1");
    Holy xxEcreditCardResultsVORowImpl = (xxEcreditCardResultsVORowImpl) rvo.getCurrentRow ();
    Number reqNumber = (Number) rRow.getCreditCardHdrId ();
    HashMap hashMap = new HashMap();
    hashMap.put ("param", reqNumber);
    pageContext.setForwardURL ("OA.jsp?page=/oracle/apps/xxdm/ecrc/webui/xxUpdEmpDetailsPG",
    NULL,
    OAWebBeanConstants.KEEP_MENU_CONTEXT,
    NULL,
    hashMap,
    true,
    OAWebBeanConstants.ADD_BREAD_CRUMB_NO,
    OAWebBeanConstants.IGNORE_MESSAGES);
    }

    Don't know what's happening, might need to give it a try.

    You can try to specify the parameter and see what happens?

  • Cannot get removeInstance to remove the current instance

    I have a form that contains a table inside a subform that I added a button to add additional instances of the subform that contains the table. Add instance works fine, however, I have also a button to remove the current of the subform that contains instance the table, and it does not work well. Keep remove the first instance of the subform rather than the current instance. For example, lets say the first table is to order product A, then the user can add another instance of the table to order product B and then add a third table to the product C command. Then, let the user didn't need the second table (product B) for a reason, so they click on the button on delete in the second table, but instead of removing the second table containing product B, it deletes the first table that contains produced.

    I have the subform (OrderMain) defined to repeat with a minimum number of 1. The button to add an instance of the OrderMain subform contains the following code:

    this.resolveNode('MasterSubform._OrderMain').addInstance (1);

    If (xfa.host.version & lt; 8) {}

    XFA. Form.Recalculate (1);

    }

    The button to remove the current instance of the subform has the following code:

    this.resolveNode('MasterSubform._OrderMain').removeInstance (this.parent.index);

    If (xfa.host.version & lt; 8) {}

    XFA. Form.Recalculate (1);

    }

    I tried to adjust the parent index, but that did not work. I also put the code in the button Delete of table to view a message that contains the current index of parent and each instance returns an index of parent of 0. I use Adobe Acrobat XI to test the form. What I'm doing wrong here?

    I have it. Finish by checking the relative path of the Remove button to the OrderMain subform. While the button Delete in a subform that is different, I have taken into account in the determination of the index of the OrderMain subform repeatable. Given that each "parent" refers to an another subform, I changed the code of the delete button for the following:

    this.resolveNode('MasterSubform._OrderMain').removeInstance (this. parent.parent.parent.parent.index);

    If (xfa.host.version< 8)="">

    XFA. Form.Recalculate (1);

    }

  • Helps to remove the current instance of Row1 of a Table.

    I have a table in which I have a line of Row1, header and footer line.  I have a button in the header which adds new instances of Row1.  There is a button in Row1 which is supposed to remove the current instance.  However, when I click the button to delete an instance, it always removes the first instance of Row1.  I used the wizard in Action to get the code for the button:

    this.resolveNode('Table9._Row1').removeInstance (this.parent.index);

    If (xfa. Host.version < 8) {}

    XFA. Form.Recalculate (1);

    }

    Any help would be greatly appreciated.

    Thank you

    J

    Hi, the code looks ok to me, but if your button is in a subform with a table cell, then you would have to use this.parent.parent.index in the removeInstance. Regards Bruce

  • Remove the current read help page!

    Hi, I've created a form that adds a new instance when I click on a button with the click script

    "Mysubform.addinstanceManger.addInstance (1);

    This copy of my complete form to a new page which is what I want.

    However, when read in on the web, I want to create a delete button that deletes the current page, the user is veiwing if they decide they want to.

    example, if the first form is completed and they click on the add new page and fill out the second form and click again if they need to fill another.

    Now, if for example they have created 4 pages and decide they want to delete say, page 2 or maybe 3. but keeping other pages with the information already entered. How to create a button that deletes the current page, they choose to remove it.

    Detaiiled any help would be greatly appreciated! as I am new to scripting and LC.

    Very strange. I think I have it right this time.

  • How to identify the current row in the table of selectOneChoice compact mode

    Hello

    I have an af:table in which one of the columns is selectOneChoice in compact mode.  When you select the point in this selectOneChoice, valueChangeListener fires and do some work based on this line.  However, my problem is that it is difficult to identify the current line, because the selectOneChoice is in compact mode.  If the selectOneChoice is not in compact mode, when the user selects an item in selectOnechoice, af selectionListener: table is triggered to identify the current row.  But if selectOneChoice is in compact mode, user has the option to choose from selectOneChoice and valueChangeListener fires before af selectionListener: table is triggered.  Therefore, not able to identify the current row.

    As a workaround is not so perfect, I tried to put the line identifier (in my case it is DetailSeq) in shortDesc and do it from there.  But users complain seeing this not user-friendly in shortDesc/hintText.  I tried to put DetailSeq as the id of the selectOneChoice, but it works not (cannot get the selectOneChoice in the table Id)

    < af:table >

    ....

    < af:column = 'Action' id headerText = "c5" width = "30" >

    < af:selectOneChoice id = "has$ {row.» AutoSubmit DetailSeq}' = 'true' valueChangeListener = "#{viewScope.backing_requestOverview.onSelectAction}" label = "Action" mode = "compact" shortDesc = "#{row." " DetailSeq} ">"

    < f: selectItems value = "#{backing_requestOverview.requestActionsMap [row." StatusUid]}"id ="si333"/ >

    < / af:selectOneChoice >

    < / af:column >

    ....

    < / af:table >

    In the valueChangeListener:

    {} public void onSelectAction (ValueChangeEvent valueChangeEvent)

    RichSelectOneChoice actionChoice = (RichSelectOneChoice) valueChangeEvent.getComponent ();

    LOGGER.info ("Short Desc:" + actionChoice.getShortDesc ());

    LOGGER.info ("Id of the component:" + actionChoice.getId ());

    }

    Any advice?

    Thank you

    -Mina

    Have you tried the setPropertyListener?

    Timo

  • Unable to set the Current Row key

    Dear all,

    I thought this for awhile. Kindly help me please on what is the problem with this code.

    I can access my required iterator in my managed bean and I wanted to programmatically set the
    current line with this pseudo-code.
    Row[] rowDatas = someBindings.getAllRowsInRange();
    for (int index = 0; index < rowDatas.length; index++) {
         Row rowTemp = rowDatas[index];
         if (someCondition == true) {
              someBindings.setCurrentRowWithKeyValue(rowTemp.getKey().toStringFormat(true));
              break;
         }
    }
    I wanted to find all the rows in my iterator, that's why I call getAllRowsInRange()
    Loop through all the lines, then find a row that matches a condition. The value of this line as the key of the current line.

    My problem is that it doesn't define the current row to the row that matches my criteria.
    One reason behind this?

    I'm stuck with this for a while...

    Hello

    Just check wat this line is back: rowTemp.getKey () .toStringFormat (true)

    It returns the value of the current key (i.e. 100) or something like long number 271367896897890709890.

    setCurrentRowWithKeyValue(); will only the exact value.

  • Best way to update the individual rows of a Table?

    I took a quick glance at a few examples, but did not get a clarification on this.  I am looking to have something close to a listbox control or the table to where I can update just one column of values to line a 1 time per second pace.  I'm looking to display our acquisition of data values in a table or a listbox control.  The single list box seemed to work well for that, but I couldn't use the row headers to list the names of channel beside the channel values.  I thought to link the values of cursor in two areas of list to do this, but did not find any info on it for the single list box.

    I have a few questions:

    (1) I have a 1 d table to where I want to use this data to constantly update the first column (with a multitude of lines) of a table.  I'm looking for the best route to not take too much time for treatment by doing this.

    What is the best way to update the individual rows of a table?   Invoke the node "Value of the cell value"... or is there another method?

    (2) why is that, after each iteration else, row values are deleted?

    Also, for adding additional channels originally arrray... it is better to use the 'Array' subset then the function "Construct the table" or function "Subset of the table" and "insert table"?

    See the attached example.

    Thank you.

    Jeff· Þ· Bohrer says:

    (2) why is that, after each iteration else, row values are deleted?

    Classic race condition.  dump the loop and node-p and just wire the 2D table on the terminal Board. !

    I don't see the race condition.  What I see is the table once the last element has been written for it all run the oil.  I saw looked it with point culminating performance on.

    But I agree entirely with writing to the Terminal.  It is a 1 d array, so you will need to use an array of generation and convert a 2D array in order so that he could write correctly.

  • Apply a paragraph style to the first cell in the first row of a table

    I want to apply a paragraph style to the first cell in the first row of a table.

    I use JavaScript with ID CS 5.

    Thank you.

    . aragraphStyles.itemByName ("NameOfStyle") .p appliedParagraphStyle = app.activeDocument.paragraphStyleGroups.itemByName ("NameOfGroup")

  • Remove the extra white column of table of FY

    How to remove the extra space of af: table at the end?

    thnks

    to control the width of the table:
    Set the style class: AFStretchWidth
    and the value of columnStretching to last (or choose any column)

    to control the height
    Set the style inline to height: 154px; (change the number you need)

  • Hide the first row of a table

    Hi all

    Can only hide the first row of a table (no matter what that data as there are)

    Thanks in advance,
    Imtiaz.

    Use

  • Cannot delete the current row in the table in advance (the line above are deleted)

    Hi all

    I have an advanced table that contains say 5 records. Every row has sown delete icon. I suppose that if I click on the button Delete the current will be to remove. Now I have a problem if I remove the line 5, line 4 will remove. If I remove the line 3, line 2 is deleted. The line above the line to delete is removed by clicking on the button Delete.

    I had this procedure must manage the deletion (nothing wrong with that)

    public Boolean DeleteAuthorizedBudget() throws SQLException
    {
    Boolean rowFound = false;
    System.out.println ("DeleteAuthorizedBudget > >");
    try {}
    JcpaProjMtnReqBudgetVOImpl vo = getJcpaProjMtnReqBudgetVO1();
    vo.getCurrentRow () .remove ();
    Returns true;
    } catch (Exception e) {}
    e.printStackTrace ();
    } {Finally
    System.out.println ("DeleteAuthorizedBudget > >");
    }
    return (rowFound? Boolean.TRUE: Boolean.FALSE);

    }

    Concerning

    Laurent

    Cool. Then close the thread by checking the useful and accurate answers.

  • How to remove the current firefox download icon

    I want to just the Home icon, nothing else. For some reason the current icon download is in place and I have no idea of what drove to view it, but I hope that I can remove it from the screen.

    Move this icon in the Palette to customize.

    https://support.Mozilla.org/en-us/KB/customize-Firefox-controls-buttons-and-toolbars

  • synchronize the current row of the table and its binding

    Hello

    There are several line table on the page.
    I select a line but say one first, second.
    push button for call actionListener

    in bean, I read the data in row and experience the first row:

    DCBindingContainer dcBindings = (DCBindingContainer) BindingContext.getCurrent () .getCurrentBindingsEntry ();
    dciter = (DCIteratorBinding) dcBindings.get ("VOView1Iterator");
    IdS = dciter.getCurrentRow ().getAttribute("Id").toString ();
    -Here's the first line id, not the second one
    and this sounds strange!

    Should I synchronize it manually or there is something wrong here?

    Published by: grodno on December 6, 2012 03:05

    Hi grodno.

    Make sure you have on your table:

    selectionListener = #{bindings. DepartmentsView.collectionModel.makeCurrent} where "DepartmentsView" is the id of your tree/table on the pageDefenition.

    In this way the table knows that we must change the current line according to your selection

  • Delete the command button to remove the particular line of VO

    Hello

    I dragged & tomb6e a VO jspx page as a table, the data control palette dragged delete operation as a button on the table as the last column.
    By pressing the button Delete, that is, remove top row of VO. I want to remove the delete button w.r.t. specific line on the list of columns...?


    Kind regards.

    Can you confirm if the property table in your bed jsff/jspx selectionListener -
    #{bindings. { . collectionModel.makeCurrent}

Maybe you are looking for