Delete in af:table always remove the first line when using ExecuteWithParams

Hello world

I got a page with master form and af:table two details related to the master. When I'm trying to remove a line in an af:table of detail, it always removes the first line, any line, I selected before. The table has a single = rowSelection and the line is properly visually selected. I remove the line using a "delete hyperlink" on each line, but I first have to select the line. Delete called a bond (or a method at the bean by removing the current line of the iterator, I tried both, none of them work)

Links page has an ExecuteWithParams defining the correct ID to edit on the master of iterator and an InvokeExecuteWithParams the renderModel value. If I put the refresh condition zero and I hard-code an ID in the binding variable in the model, I am able to delete the selected line.

In addition, I don't know if this information is useful, but if I set the iterator to PPR ChangeEventPolicy, when I select a line, there always select the first line.

Any ideas what I could do wrong? Is this a bug?

I use JDev 11.1.1.7

Thank you

Guillaume

You can try creating a method in ApplicationModule for filter master records instead of executeWithParams?

Ashish

Tags: Java

Similar Questions

  • Is it possible to blackBerry smartphones can remove the BBM5.0 when using OS5.0?

    Is there a way to remove the BBM5.0 when using OS5.0? I tried using DM6.0 but BBM is marked as a component of basic impossible to remove.

    I hate BBM in general because it is always on. I don't want to install an older version.

    If anyone can help me, thanks in advance.

    lusilveira wrote:

    Is there a way to remove the BBM5.0 when using OS5.0? I tried using DM6.0 but BBM is marked as a component of basic impossible to remove.

    I hate BBM in general because it is always on. I don't want to install an older version.

    If anyone can help me, thanks in advance.

    • with a few OSes 5.0.X.X, BBm is a basic application and cannot be deleted.
    • BUT the other OSes, the BBm 5.0.X.X became an addon application and can be removed. (i.e. 5.0.0.43 6 and 5.0.0.462)

    If you have the first category OS, I suggest you try and install BBm for example using AppWorld. Perhaps by upgrading BBm, it will become an add-on.

  • Mr President, how can I enter two rows at the same time with different default values that only the first line to use see?

    Mr President.

    My worm jdev is 12.2.1

    How to enter two rows at the same time with different default values that only the first line to use see?

    Suppose I have a table with four fields as below

    "DEBIT" VARCHAR2(7) , 
      "DRNAME" VARCHAR2(50),
      "CREDIT" VARCHAR2(7) , 
      "CRNAME" VARCHAR2(50),
    

    Now I want that when I click on a button (create an insert) to create the first line with the default values below

    firstrow.png

    So if I click on the button and then validate the second row with different values is also inserted on commit.

    The value of the second row are like the picture below

    tworows.png

    But the second row should be invisible. It could be achieved by adding vc in the vo.

    The difficult part in my question is therefore, to add the second row with the new default values.

    Because I already added default values in the first row.

    Now how to add second time default values.

    Concerning

    Mr President

    I change the code given by expensive Sameh Nassar and get my results.

    Thanks once again dear Sameh Nassar .

    My code to get my goal is

    First line of code is

        protected void doDML(int operation, TransactionEvent e) {    
    
            if(operation != DML_DELETE)
                 {
                     setAmount(getPurqty().multiply(getUnitpurprice()));
                 } 
    
            if (operation == DML_INSERT )
                       {
                               System.out.println("I am in Insert with vid= " + getVid());
                           insertSecondRowInDatabase(getVid(),getLineitem(),"6010010","SALES TAX PAYABLE",
                            (getPurqty().multiply(getUnitpurprice()).multiply(getStaxrate())).divide(100));      
    
                           }
    
            if(operation == DML_UPDATE)
                              {                                                    
    
                                 System.out.println("I am in Update with vid= " + getVid());
                             updateSecondRowInDatabase(getVid(),
                                 (getPurqty().multiply(getUnitpurprice()).multiply(getStaxrate())).divide(100));      
    
                              }                      
    
            super.doDML(operation, e);
        }
        private void insertSecondRowInDatabase(Object value1, Object value2, Object value3, Object value4, Object value5)
                  {
                    PreparedStatement stat = null;
                    try
                    {
                      String sql = "Insert into vdet (VID,LINEITEM,DEBIT,DRNAME,AMOUNT) values " +
                 "('" + value1 + "','" + value2 + "','" + value3 + "','" + value4 + "','" + value5 + "')";  
    
                      stat = getDBTransaction().createPreparedStatement(sql, 1);
                      stat.executeUpdate();
                    }
                    catch (Exception e)
                    {
                      e.printStackTrace();
                    }
                    finally
                    {
                      try
                      {
                        stat.close();
                      }
                      catch (Exception e)
                      {
                        e.printStackTrace();
                      }
                    }
                  }  
    
                  private void updateSecondRowInDatabase(Object value1, Object value5)
                  {
                    PreparedStatement stat = null;
                    try
                    {
                      String sql = "update vdet set  AMOUNT='"+ value5+"' where VID='" + value1 + "'";                     
    
                      stat = getDBTransaction().createPreparedStatement(sql, 1);  
    
                      stat.executeUpdate();
                    }
                    catch (Exception e)
                    {
                      e.printStackTrace();
                    }
                    finally
                    {
                      try
                      {
                        stat.close();
                      }
                      catch (Exception e)
                      {
                        e.printStackTrace();
                      }
                    }                  
    
                  }
    

    Second line code is inside a bean method

        public void addNewPurchaseVoucher(ActionEvent actionEvent) {
            // Add event code here...
    
            BindingContainer bindings = BindingContext.getCurrent().getCurrentBindingsEntry();
                   DCIteratorBinding dciter = (DCIteratorBinding) bindings.get("VoucherView1Iterator");
                   RowSetIterator rsi = dciter.getRowSetIterator();
                   Row lastRow = rsi.last();
                   int lastRowIndex = rsi.getRangeIndexOf(lastRow);
                   Row newRow = rsi.createRow();
                   newRow.setNewRowState(Row.STATUS_NEW);
                   rsi.insertRowAtRangeIndex(lastRowIndex +1, newRow);
                   rsi.setCurrentRow(newRow);
    
                   BindingContainer bindings1 = BindingContext.getCurrent().getCurrentBindingsEntry();
                   DCIteratorBinding dciter1 = (DCIteratorBinding) bindings1.get("VdetView1Iterator");
                   RowSetIterator rsi1 = dciter1.getRowSetIterator();
                   Row lastRow1 = rsi1.last();
                   int lastRowIndex1 = rsi1.getRangeIndexOf(lastRow1);
                   Row newRow1 = rsi1.createRow();
                   newRow1.setNewRowState(Row.STATUS_NEW);
                   rsi1.insertRowAtRangeIndex(lastRowIndex1 +1, newRow1);
                   rsi1.setCurrentRow(newRow1);
        }
    

    And final saveUpdate method is

        public void saveUpdateButton(ActionEvent actionEvent) {
            // Add event code here...
    
            BindingContainer bindingsBC = BindingContext.getCurrent().getCurrentBindingsEntry();      
    
                   OperationBinding commit = bindingsBC.getOperationBinding("Commit");
                   commit.execute(); 
    
            OperationBinding operationBinding = BindingContext.getCurrent().getCurrentBindingsEntry().getOperationBinding("Commit");
            operationBinding.execute();
            DCIteratorBinding iter = (DCIteratorBinding) BindingContext.getCurrent().getCurrentBindingsEntry().get("VdetView1Iterator");// write iterator name from pageDef.
            iter.getViewObject().executeQuery();  
    
        }
    

    Thanks for all the cooperation to obtain the desired results.

    Concerning

  • Remove the first line xml generated xml to VO

    I am combining multiple xml files to generate the report using BIPublisher. I generated xml based on a VO by using VO.writeXML. How can I remove first row (<? xml version = "1.0"? >) in the xml file?

    Use the transformer and setOutputProperty to omit the first line.

    Transformer transformer = TransformerFactory.newInstance () .newTransformer ();
    transformer.setOutputProperty (OutputKeys.OMIT_XML_DECLARATION, 'yes');

    Edited by: Puthanampatti Dec. 6 2012 18:42

  • How to remove the variable created when using definedNamedWhereClauseParam()

    Hello

    My Jdev version 11.1.1.7.0.

    I'm Executive where clause programatically where I need to bind two bind parameters under certain conditions. Example, I have two bind variables X, Y.

    Here's the problem:

    Assume that the first time I'm setting one variable X, so I define X bind variable and execute the query.

    What second time I send only Y but not X. In this implementation of the scenario of VO throw an exception, given that the variable X is already created in the VO object and where clause does not have this setting.

    So how to remove variables created in the original Version all in definedNamedWhereClauseParam(). I need to erase what ever the previously created variable every time I execute method.

    I can make the similar functionlity using setWhereClauseParam (using literals). But I have a few technical restrictions for use.

    Could you please help me how to remove the variable before vo using definedNamedWhereClauseParam.

    Caused by: java.sql.SQLException: try to set a parameter name that does not intervene in the SQL: itemNumber
    at oracle.jdbc.driver.OraclePreparedStatement.setObjectAtName(OraclePreparedStatement.java:15969)
    at oracle.jdbc.driver.OraclePreparedStatementWrapper.setObjectAtName(OraclePreparedStatementWrapper.java:911)
    at weblogic.jdbc.wrapper.PreparedStatement_oracle_jdbc_driver_OraclePreparedStatementWrapper.setObjectAtName (unknown Source)
    at oracle.jbo.server.OracleSQLBuilderImpl.bindParamValue(OracleSQLBuilderImpl.java:4669)
    at oracle.jbo.server.BaseSQLBuilderImpl.bindParametersForStmt(BaseSQLBuilderImpl.java:3687)
    at oracle.jbo.server.ViewObjectImpl.bindParametersForCollection(ViewObjectImpl.java:22742)
    at oracle.jbo.server.QueryCollection.buildResultSet(QueryCollection.java:1298)
    ... more than 96



    Thank you.

    -Diette.

    Published by: Vidya Diette on February 28, 2013 08:43

    Hello

    You need access to the variable Manager. Order of reading in the JavaDocs:

    http://docs.Oracle.com/CD/E28389_01/apirefs.1111/e10653/Oracle/JBO/ViewObject.html--> http://docs.oracle.com/cd/E28389_01/apirefs.1111/e10653/oracle/jbo/VariableManagerOwnerBase.html#getVariableManager%28%29--> http://docs.oracle.com/cd/E28389_01/apirefs.1111/e10653/oracle/jbo/VariableValueManager.html--> http://docs.oracle.com/cd/E28389_01/apirefs.1111/e10653/oracle/jbo/VariableManager.html#removeVariable%28java.lang.String%29

    Frank

  • I can only access buttons of menu on the first line when I use mode full-screen, why?

    Many Web sites I visit have on the first line of the web page in a series of menu options that do not respond when I move the mouse to select options. If I use the mode full screen these buttons work correctly. These buttons work correctly when I use IE or Chrome. I am running Windows 7 and this has happened in the last two weeks.

    Recently, the extension of the Yahoo! toolbar and the extension of Babylon have been reported to cause a problem like that. Disable or uninstall the modules.

       * https://support.mozilla.com/kb/Troubleshooting+extensions+and+themes
    
  • HP 1212 was dark on the output lines when using the charger

    My HP1212nf printer gets dark on output only lines when the charger is used.

    It should be little dust somewhere.  Be sure to thoroughly clean the area mentioned Bob.

  • change the size of the table and remove the duplicate line

    Hello

    I run a program that does a for loop 3 times.  In each loop, the data are collected for x and y points (10 in this example).  How can I output the table with 30 points in a simple 2D array (size 2 x 30)?

    Moreover, from the table, how to delete duplicate rows that contain the same value of x?

    Thank you

    hiNi.

    He probaibly which would have allowed to attach a file that has a consecutive duplicate lines.

    Here is a simple solution.

  • How can I remove the automatic margins when using list tags?

    Hello

    I am trying to create a list of links on my Web page using Dreamweaver CS4. I created a .li tag using CSS so that no bullets/numbers appear and then I created .ul a: link, ul a: hover etc tags composed to make all list items in the bearings.

    However, the text in the list indent automatically (like if I put some kind of margin) and so is out of proportion with the text above it. Without margin/padding is defined in any of the CSS so I am confused.

    Any help would be appreciated.

    Once you add the margin/padding 0 in your css and close support, everything lines up for me. You can post a screenshot of the problem?

  • Update of the Page choose the first line only

    Hello

    I created SearchPG and from there I click on the UpdatePencil and regardless of which line is clicked, I always get the first line of the table of search results.

    Please notify.

    Thank you!

    Hey,.

    Please get your hands on the original Version and run the query in providing parameters of the basic page.

    If you use EO, implement the code in AM or you can add the code to the CO of the UpdatePage.

    I hope this helps.

    Thank you
    Rakesh

  • save after focus leaves cell saves only the first line

    I want that every cell in a table to save when focus leaves the cell. It seems that any line I am on it will always save this value in the first row. After that, I think it seems to save the new value in the correct lines. How can ensure me that the relevant line is saving?

    This is the code for my laptop...
    < af:inputText value = "#{rank." Simple PublishedNotes}' = 'true '.
    required = "#{bindings." CIsForRR.attrDefs.Notes.mandatory}.
    columns = "#{bindings." CIsForRR.attrHints.Notes.displayWidth}.
    Binding = "#{bindings_app_ci_RR.inputText5} '"
    ID = "inputText5" lines = '10' autoSubmit = 'true '.
    valueChangeListener = "#{bindings_app_ci_RR.save_notes_action} '"

    Then my save_notes_action looks like this...
    {} public void save_notes_action (ValueChangeEvent vce)
    FacesContext ctx = FacesContext.getCurrentInstance ();
    Bind ValueBinding = ctx.getApplication ().createvalueBinding("#{data}");
    BindingContext, bc = bind.getValue (ctx) (BindingContext);
    DC DCDataControl = bc.findDataControl("AppModuleDataControl");
    AppModuleImpl am = (AppModuleImpl) dc.getDataProvider ();

    ViewObject vo = am.findViewObject ("RR");
    Line = vo.getCurrentRow ();
    prints the value of vce and the attribute of the current name of the lines
    String newVal = valueChangeEvent.getNewValue (m:System.NET.SocketAddress.ToString ());
    row.setAttribute ("Notes", newVal);
    am.getTransaction () .commit ();
    Refresh();
    }

    My impressions always printed the first line of name.

    Any help is appreciated! Thank you!

    That's because you manually make the change in your code:
    String newVal = valueChangeEvent.getNewValue (m:System.NET.SocketAddress.ToString ());
    row.setAttribute ("Notes", newVal);
    am.getTransaction () .commit ();

    Why not use a table can be changed with the binding of the ADF and simply let ADF do all the work for you.

  • Re: How to remove the black lines that prints when I use my ADF?

    I have an Officejet 6500 has more.  I only get the double lines when using the document feeder.  Fine when I use the flat bed.  I thoroughly cleaned the glass, and it makes no difference.  Help!

    The ADF in the Officejet 6500 a scanner glass is a bit more difficult to access, but the video in the third step of the second Solution in the here document will show how to clean this area.

  • Keep the text perpendicular to the base line when you use the string.

    Is there a way to keep the text perpendicular to the base line when using the warp function?  I'm trying to reproduce a decal with curved text.  When I use the string to get the text that is curved like the original, the letters are slightly tilted.

    You could try to make each letter on a separate text layer, then use Image > transform > free transform to adapt the letters in place.

    A lot more control over the placement of the letter and size that warp text offers.

  • always fill the last line of a table (which may expand)

    Hi, I have problems with a button in the table A that adds a line to another table (table B) and then fills automatically some row of the table (table A) data in the newly created line in the other table (table B)

    Here is my code (then) - I should also mention that table A has a button to add several lines to itself:

    It works almost - however, it does that if the amount of lines in every game table - which they are not necessarily that the user may or may not opt to add the row of the table has to table B. eg. A table might be deep 4 rows, but the table B can have only 2 rows.

    tableB.row.addInstance (0);

    vCol1 var = this.resolveNodes ("tableA.row.cellA");

    vCol2 var = this.resolveNodes ("tableB.row.cellA");

    vCol3 var = this.resolveNodes ("tableA.row.cellB");

    vCol4 var = this.resolveNodes ("tableB.row.cellB");

    for (var I = 0; vCol1.length i < ; I ++) {

    vCol2.item (i) .rawValue = vCol1.item (i) .rawValue;

    vCol4.item (i) .rawValue = vCol3.item (i) .rawValue;

    }

    I'm new to scripting (learning on the fly), so my question is, given that the first command is to add a new row to table B, can I change the code so that vCol4 and vCol2 var are always the very last line created? In this way, all the previous lines that have been added will be shunt down in the list and will not be affected, but click on the new button? Or is there a better way to do this.

    Hello

    I think the key here is that the addInstance method returns the line he simply added.  If your add-in can be something like;

    var button = xfa.host.messageBox ("' you are about to ADD this entry in the Table B. would you continue?", "add to table B Section"1, 2 "");

    If (button is 4)

    {

    newRow = tableB._tableBrow.addInstance var (0);

    newRow.cellA.rawValue = cellA.rawValue;

    newRow.cellB.rawValue = cellB.rawValue;

    }

    I don't know how you want that table a delete button to work?  Should you remove the first row B of the table with a cellA and corresponding cellB?

    Concerning

    Bruce

  • When I rt - click message how can I move "Delete msg" of last resort for the first option

    You want to move the Message 'remove' the last option when you right click for the first option.

    I don't know how it's easy that would be, but if you left click ONCE to highlight the message, or if it is already highlighted, you can press the delete key to remove the message.

Maybe you are looking for