Get the first line selected on the CommandButton Click

Hi guys,.
My version of jdev is 11.1.1.5.0. I have table on my Page of Adf.

< af:table value = "#{bindings." MyvwVO1.collectionModel}.

var = "row" rows = "#{bindings." MyvwVO1.rangeSize}.

emptyText = "#{bindings." MyvwVO1.viewable? "{'No data to display.': 'Access Denied.'}".

filterModel = "#{bindings." MyvwVO1.queryDescriptor}.

queryListener = ' #{bindings. " MyvwVO1.processQuery}.

filterVisible = "true" varStatus = 'vs' rowBandingInterval = '1 '.

columnSelection = 'single '.

Summary = "Table of suppliers.

selectionListener = "#{bindings." MyvwVO1.collectionModel.makeCurrent}.

rowSelection = "single" id = "t2".

"partialTriggers =": soc1: ctb2: cb22.

fetchSize = "#{bindings." MyvwVO1.rangeSize}.

Binding = "#{MyBN.supplierTableBinding}" >

< af:column id = "c14" frozen = "true" align = "center" >

< af:commandButton action = "viewNext" text = "Next view" id = "cb1" >

< af:setActionListener from = "#{bindings." CurrSupplierSiteId.inputValue}.

to = "#{bindings." SupplierSiteID.inputValue} "/ >"

< af:setActionListener from = "#{bindings." CurrSupplierSiteId.inputValue}.

to = "#{MyBN.supplier_site_id}" / >

< / af:commandButton >

< / af:column >


When I'm clicking viewNext button. When debugging, I get first line provider site Id instead of the current line selected.

I also removed the selectedRowKeys of af: table. Now his show is not first line select default, but still get the Site Id of first line supplier back Bean.

{} public void setSupplier_site_id (number supplier_site_id)

This.supplier_site_id = supplier_site_id;

}

public {getSupplier_site_id() number

Return supplier_site_id;

}

No idea what I'm doing wrong.


Thank you

Raul

you pass line value.right... so from value as link will not be work.try send as #{row.abc.value} go on setactionListener and so on. You pass the rank value.

Tags: Java

Similar Questions

  • How to get the user clicks SeriesName APEX 4.2 flash chart and defined on a hidden element?

    Hello

    I'm developing a graphic clickable flash of APEX, which should be linked to a specific set of data on another page using the SeriesName (clicked several sets of cards).

    (Returned by a function) sql for APEX chart is

    Select distinct null link, d. DNAME label
    , sum(e. SAL ) over (partition by e. ( DEPTNO salary ( )
    , sum(e. Comm ) over (partition by e. DEPTNO ) comm
    de d Dep. , emp e
    e. DEPTNO = d . DEPTNO

    Currently I am able to disply SeriesName (e.g. salary or Comm) on the 2D chart. This is done by including {% SeriesName} Custome XML.

    But I am unable to detect which series name, the user clicks on - pay is comm.  for example, I am not able to enter the name of the series clicked and set it to a hidden item (called P38_SERIES_NAME).  I have to use JavaScript to achieve this? If so, how?

    The reason why I want to use the unique sql is due to that I will have to call a function to return the dynamic and running sql code, I don't know how many series I. i.e. could be comm, average age, salary, bonus etc...

    What is the easiest way to achieve this?   I use APEX 4.2 and Oracle 11 g.

    Thanks for your advice.

    Concerning

    Susanna Su

    Susanna,

    What you experience is the difference between session state and the value of the element on the page. The URL you have is generated on the rendering of the page and use the value of current session state of the question right now. Then when the page is on the client side and that you set the value of the item through javascript this value is still next to the customer and not in session state. Put the value in session state would not matter, however, because the link has already been made. Your best option is to send the page, ensuring the correct value is set to session state and use a branch in present after the process to redirect the user to the correct page.

    I have also described this here: https://forums.oracle.com/message/11110579#11110579

  • HP dm4-1160us - cannot get the right click of the mouse using my touchpad

    Hi all

    I bought my HP dm4-1160us model yesterday of staples. When I use it for the first time, I found a strange problem with the touch pad. When I click right click button on the touchpad, I couldn't see the right display context menu, also same problem with both left click button. I couldn't choose any text while pressing the left button or...

    Anyone, please help me if you know the solution for this. I'm sure it's a configuration problem, but your ideas are very important to me...!

    see you soon

    KIRU

    Hello

    It's all DONE... I found the solution.

    The problem was due to the physical development of the touch pad. New song itself came with this incoherent design. When the side of the left and right buttons on the touchpad was not seated properly, instead he pulled little as in an oblique position. Don't know why, just made a hard push down on the side buttons of the touchpad today... which is it... suddenly I heard a noise like fit inside in the correct position and now my touchpad is flat...! I tried the left button and right click on... WOW... worked.

    I have almost given up for the use of left & right click on my touchpad, instead I started to use my mouse...

    Thank you...

  • The application's command line arguments get the path to the file in windows Explorer

    Hello

    I am trying to open a file with my labview application .exe, so I thought that windows was sending the file path double clicked in Explorer solutions in the form of argument, but all I get is the name of my exe file.

    Does anyone know how to set up windows or the application to get the double click path from the Explorer, which has the file extension has already been associated with my exe?

    Thank you!

    I'm not sure I understand, but I think you want your Labview program to open another file, as a file of perimeter?

    Have three basic choices.

    Hardcode the path with file name in your program http://zone.ni.com/reference/en-XX/help/371361K-01/glang/path_constant/

    Use the file open vi and for the user to select the file to open http://zone.ni.com/reference/en-XX/help/371361J-01/glang/file_dialog/

    Write your program to accept a http://digital.ni.com/public.nsf/allkb/17C3AD70493CE0208625666A00763364 command line argument

  • Hello. for the last few days my adobe acrobat reader dc was not usable. If I click on it or one of my documents, I get the following mnessage.

    message reads "a problem caused blocking the program works correctly. Windows will close the program and notify etc.

    No solution is suggeseted by windows.

    I tried to re - install and it's the same thing.

    I read a previous answer to a similar question, which suggests a repair from the menu help. It does not work like windows is constantly looking for an answer and I am unable to get the cursor click Help.

    I use windows 10

    Any help appreciated

    Hello

    Please perform this cleanup tool to uninstall the reader Download Adobe Reader and Acrobat cleaning - Adobe Labs tool , reboot your system & reinstall it using this link Adobe - Adobe Acrobat Reader DC Distribution

    Let me know how it goes.

    Kind regards

    Nicos

  • How to get the State of the button?

    I want to know how to get the State clicked the button? If it is clicked State or State clicked?

    For ex: I have the following code...

    {( < composants: IconButton id =»bold_btn"largeur =»22" icône =»@Embed('/assets/bold.png')"click ="onBoldClick ()"enabled =" {}this.loadCompleted}"toggle ="true"/ >

    How to find if the "BOLD" button is checked or not?

    this.bold_btn. ???

    Please mark

  • Retrieve child line selected a tree table

    Hi all

    I have a tree table which includes two levels and one of the data in the column of the child node has a command link. Clicking on it calls a support bean method that tries to get the line that contains the command link that was clicked. The problem is, trying to get the line clicked (selected), it always returns the row parent of the node. I searched and followed by some examples of code, but it does not work for me.

    For example, if the table tree looks like, where X expands to show the children X 1 and X 2 lines:

    X

    L X 1

    L X 2

    Then clicking on the link to X 1 or X 2 will call code that returns the line for X.

    Here is the code in my grain of support:

       public void viewInspectionRecord(ActionEvent actionEvent) {
    
          RowKeySet rks = treeTable.getSelectedRowKeys(); 
          
          Iterator rksIterator = rks.iterator(); 
          
          if (rksIterator.hasNext()){ 
             List key = (List) rksIterator.next(); 
        
             JUCtrlHierBinding treeTableBinding = (JUCtrlHierBinding) ((CollectionModel) treeTable.getValue()).getWrappedData();     
             JUCtrlHierNodeBinding nodeBinding =  treeTableBinding.findNodeByKeyPath(key);     
             
             Row rowData = nodeBinding.getRow();
            
             if (rowData == null) {
                 FacesMessage facesMessage = new FacesMessage("Please select an Inspection Record record to view details");
                 FacesContext.getCurrentInstance().addMessage(null, facesMessage);
                 
                 return;
             }   
             
             Object irId = rowData.getAttribute("QarsInspectionRecordId");
             
             ...
      }
    

    rowData.getAttribute("QarsInspectionRecordId") eventually throw a NullPointerException because it is an attribute defined with the parent node and any children.

    Any ideas what's happening?

    Thank you

    Bill

    Hello

    see this hope, it will help you to get the line selected on your link, click

    http://oracleadf-Java.blogspot.in/2013/08/tree-table-component-with-declarative.html

    If you use treeTable selection listener then see.

    http://oracleadf-Java.blogspot.in/2012/11/tree-table-component-in-Oracle.html

  • How to add two lines when the second row is not visible, but also gets the first data line too?

    Mr President

    Jdev worm is 12.2.1

    How to add two lines when the second row is not visible, but also gets the first data line too?

    I want to add two lines like below picture, but want the second to remain invisible.

    tworows.png

    I asked this question but my way of asking was wrong, that's why for me once again.

    Concerning

    Try to follow these steps:

    1. in the database table to add the new column "JOIN_COLUMN" and add the new sequence "JOIN_SEQ".

    2. Add this new column in the entity object. (You can add this in entity object by right clicking on the entity object and then select "Synchronize with database" then the new column and press on sync)

    3. in your bookmark create button to create only one line NOT 2 rows.

    4 - Open the object entity--> java--> java class--> on the entity object class generate and Tick tick on the accessors and methods of data manipulation

    5 - Open the generated class to EntityImpl and go to the doDML method and write this code

      protected void doDML(int operation, TransactionEvent e)
      {
        if(operation == DML_INSERT)
        {
          SequenceImpl seq = new SequenceImpl("JOIN_SEQ", getDBTransaction());
          oracle.jbo.domain.Number seqValue = seq.getSequenceNumber();
          setJoinColumn(seqValue);
          insertSecondRowInDatabase(getAttribute1(), getAttribute2(), getAttribute3(), getJoinColumn());
        }
    
        if(operation == DML_UPDATE)
        {
          updateSecondRowInDatabase(getAttribute1(), getAttribute2(), getAttribute3(), getJoinColumn());
        }
    
        super.doDML(operation, e);
      }
    
      private void insertSecondRowInDatabase(Object value1, Object value2, Object value3, Object joinColumn)
      {
        PreparedStatement stat = null;
        try
        {
          String sql = "Insert into table_name (COLUMN_1,COLUMN_2,COLUMN_3,JOIN_COLUMN, HIDDEN_COLUMN) values ('" + value1 + "','" + value2 + "','" + value3 + "','" + joinColumn + "', 1)";
          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 value2, Object value3, Object joinColumn)
      {
        PreparedStatement stat = null;
        try
        {
          String sql = "update table_name set column_1='" + value1 + "', column_2='" + value2 + "', column_3='" + value3 + "' where JOIN_COLUMN='" + joinColumn + "'";
          stat = getDBTransaction().createPreparedStatement(sql, 1);
          stat.executeUpdate();
        }
        catch (Exception e)
        {
          e.printStackTrace();
        }
        finally
        {
          try
          {
            stat.close();
          }
          catch (Exception e)
          {
            e.printStackTrace();
          }
        }
      }
    
  • ListView MAF 2.1 how to get the value of line selection

    Hi all

    I'm trying to get the select line of a page with a listview amx

    to pass values of line as a parameter to the detail page

    which to get data from web service, but with links

    I always get the first value in the line of my list view.

    How can I refresh the values?

    Is - this java is better than the binding for this case?

    Can you help me please?

    Thanks for your help

    You can set the value of the selected line in a variable pageFlowScope and pass it to the method on the next page.

    Something similar to this:

    https://blogs.Oracle.com/Shay/entry/adf_mobile_update_through_web

  • [JDev12c, ADF] How to get the value of a field from the selected line in af:table and...

    Hallo,

    I want to double click on a line of an af:table to call a page that displays a form (based on a View object) with the details of the selected line.

    I need to go to the second page the value of a field on the line that is selected on the first page.

    How can I do this? In particular, how can I get the value of a field from the selected line? How can I call the second page on double-click on the af line: table?

    Thank you

    F.

    Why would user, you need to pass a value of the line to the shape?

    The framework selects the line you want to display in the form. All you have to do is to show the form with the selected line. It is the framework automatically as long as you use e vo even the same data control.

    Timo

    Post edited by: Timo Hahn
    And the handling double-clicks is described here http://www.oracle.com/technetwork/developer-tools/adf/learnmore/56-handle-doubleclick-in-table-170924.pdf

  • Select the first line of the annotations in a vm

    Hello

    I want to extract only the first line of the note annotations of a vm.

    I tried WAT

    $vm = get - vm host1

    $vm.description | Select - 1 first

    But I continue to receive the full description, which looks like this

    Microsoft exchange server

    support: 24 x 7

    OTAP: Production

    Status: In Production

    Try something like this

    $vm = get-vm windows1$vm.description -split '["\n\r"|"\r\n"|\n|\r]' | select -First 1
    
  • Using of "get the N first lines only" does / * + FIRST_ROWS ([N]) * / redundant index?

    I know FIRST_ROWS indicator shows the optimizer to minimize the time of the first row.  I know that the new feature of 12 c for "fetch [FIRST |]» [NEXT] [N] LINES [ONLY |] WITH LINKS] "get first/next N lines only / with ties" will implement the query using ROW_NUMBER().  Should I leave hint in case it improves performance, or the clause FETCH FIRST made this redundant suspicion?

    Hi Wes and Hoek,

    Oracle said on the indicators in the 12 c setting guide. Each version of this statement becomes stronger.

    The disadvantage of the advice is additional code that you must manage, audit and control. Tips have been introduced in Oracle7, when users have little recourse if the optimizer generated suboptimal plans. Because changes in the database and host environment can make obsolete tips or negative consequences, it is a good practice to test the use of indicators, but use other techniques to manage the execution plans.

    Oracle provides several tools, including how to set up SQL, SQL plan management and SQL Performance Analyzer to solve performance problems unresolved by the optimizer. Oracle strongly recommends that you use these tools instead of advice because they provide new solutions like the change of environment data and database.

    Oracle presents advice in V7, basically as an admission that its optimizer based on CSSTidy based cost did not get things right all the time and tried to get rid of them since. In addition, the preferred method of setting when you are browsing the major updates was to review advice to remove them. It will be interesting to what extent can it be pushed in V12.

    In what concerns the first lines index and ROWNUM limiting, unless you just try to get the garbage data, it's meaningless without the presence of an ORDER BY. Once you have an ORDER BY, the query must retrieve all the data before it can return anything. The exception to this rule is if there is an index that the database can use to retrieve already ordered data, that is to say on the order of columns. Therefore, the essence of the indication of FIRST LINES. It will be aggressive looking in the index in favor if the index is in line with the order of. (Try the setting of a SIEBEL instance if you need proof)

    I don't have a 12 c to test at the moment, but looking at the examples of Martin, it appears the optimizer is aware of the new windowing function in the new FETCH FIRST/NEXT structure and selects a plan that gives the best answer. If you go through the effort to review suggested rownum limited requests to remove the tips if possible, maybe you should just rewrite with new windowing function.

    Concerning

    André

  • How to get the selected line of the selecetOneChoise

    Hello

    I use jdeveloper 11.1.2.3.0

    I have a simple vision with 'id' and 'name' attributes
    I dragged the view as selecetOneChoise and has chosen to show only the name.
    When the value of the selecetOneChoise is changed, I need to use the 'id' of the new value selected as a setting for another opinion.
    I tried to get it through the iterator, like this:
     
          public void onValueChangeListener(ValueChangeEvent valueChangeEvent) {
            DCIteratorBinding it = getBindings().findIteratorBinding("firstIterator");
            Row row = it.getCurrentRow();
            
            DCIteratorBinding it2 = getBindings().findIteratorBinding("secondIterator");
            ViewObject vo = it2.getViewObject();
            vo.setNamedWhereClauseParam("p_id", row.getAttribute("id").toString());
            vo.executeQuery();
           }
    but I get the old value instead of the new value.

    no idea why this is happening?
    or y at - it another way to get the 'id' of the selected value?
    It is urgent, thank you very much!

    Use this solution in your method first, and then write the code...

    code................

    for example :-{} public void onValueChangeListener (ValueChangeEvent valueChangeEvent)
    FacesContext will involve = FacesContext.getCurrentInstance ();
    valueChangeEvent.getComponent () .processUpdates (contxt);

    DCIteratorBinding it = getBindings () .findIteratorBinding ("firstIterator");
    Line = it.getCurrentRow ();

    It2 DCIteratorBinding is getBindings () .findIteratorBinding ("secondIterator");.
    ViewObject vo = it2.getViewObject ();
    vo.setNamedWhereClauseParam ("p_id", row.getAttribute("id").toString ());
    vo.executeQuery ();
    }

    Popz

    Published by: Popz on 2 April 2013 05:34

  • How can I default first line below the selected line in the table of the adf

    Hello

    I use Jdeveloper 11 g,
    I created Adf quick query with table and changed selectionListener table as #{CustRMMap.onRMGroupNameChange}.
    and when I click on find fast query no row is selected.
    I want the first row to be selected / highlighted by default when I click search.

    Patel Imran

    You can also set an attributeValue in pagedef.xml
    bind this attributeValue with column of your table. This sets the value of the selected line to the variable attruibute.
    Will now link this with your desired component attributeValue.
    Put partial trigger on the component that should display this value.
    This will save you to write custom code and use the default table selection listener property, which marks the first default line.

    Apart from this, if you want to govern the first default line of managed bean selection use this code...

    + _Table = selectionEvent.getSource ((richeTableau)) richeTableau; + *
    + / / the model in the Collection is the object that provides the structured data.
    + / / for rendering table +.
    + TableModel CollectionModel = table.getValue ((CollectionModel)); + *
    + / / the ADF object that implements the CollectionModel is JUCtrlHierBinding. IT +.
    + / /is wrapped by the CollectionModel API.
    + JUCtrlHierBinding adfTableBinding = tableModel.getWrappedData ((JUCtrlHierBinding)); + *
    + / / Acess the iterator ADF, binding that is used with the binding table ADF +.
    + DCIteratorBinding tableIteratorBinding = adfTableBinding.getDCIteratorBinding (); + *

    + / / the role of this method is to synchronize the table feature selection +.
    + / / with the selection of the model of the ADF +.
    + Object selectedRowData = table.getSelectedRowData (); + *
    + / / cast of JUCtrlHierNodeBinding, which is the subject of the ADF that is +.
    + / line/a +.
    + JUCtrlHierNodeBinding nodeBinding = selectedRowData (JUCtrlHierNodeBinding); + *
    + / / get the key of the node binding line and set it as the current line in the +.
    + / / iterator +.
    + Key rwKey = nodeBinding.getRowKey (); + *
    tableIteratorBinding.setCurrentRowWithKey (rwKey.toStringFormat (true)); + *

    and another way on the right is a custom like this code:

    + public void setDefaultRow (int count) {/ / call this method your method of selection custom, rom pass the line of the line to select index. count = 0, will select first row + *}

    + try {+ *}
    Object oldRowKey = tblMag.getRowKey (); *
    + try {+ *}
    This.

    .getSelectedRowKeys () .clear ();
    *
    * +} catch (System.Exception e) {+ *}
    System.out.println (e.getMessage ()); *
    +}+
    This..setRowIndex (count);
    *
    RKS RowKeySet =. getSelectedRowKeys();
    *
    (RKS). Add(. getRowKey());
    *
    RKS =. getSelectedRowKeys();
    *
    +.setRowKey (oldRowKey); +

    * +} catch (System.Exception e) {+ *}
    System.out.println ("error:" e.getMessage ()); + *
    +}+
    +}+

    Hope this helps

    Concerning
    Maryline Roussel

  • Get the line number of the selected text

    Hi all

    Please tell me how to get the row number of the selected text in a page.

    for example

    Look, here's the page with text, I want to get the number of the line of the selected one (marked in red) text

    |-------------------------|

    | XXXXXXXXXXXXXX.

    | XXXXXXXXXX |
    | XXXXXXXXXXXXXX.

    | xxxxxxxxxxxxxx |

    | XXXXXXXXXX |

    | XXXXXXXXXXXXXX.

    | XXXXXXXXXXXXXX.

    ---------------------------

    Thanks in advance

    Shiv

    Hi Shiv,

    This thread of extraction. This will give you an idea.

    Always search the forum first before creating a new.

    Shonky

Maybe you are looking for