How can I programmatically select row to edit in ADF - 11g

Hello,
I'm having a table with rowSelection="single" and editingMode="clickToEdit". Currently i'm facing two issues.
First issue: the first click on a table row makes the row selected, on second click it becomes editable. If I click on another row it gets selected, but previously selected row remains editable. I would like to change this, so when I select another row, the previously selected one to become read-only again. By now, I didn't find any solution to set programmatically the 'editable' state of a row.
The second issue might be a bug and is related to deleting an editable row. I select a row, click to edit it, and then delete it. The next row get's selected, but clicking on it to edit, has no effect unless I press the 'ESC' select another row before. Does anyone have a tip how to workaround it?
Thank you very much!
Eniko

try adding this method in the table selectionListener.
public void table1_selectionListener(SelectionEvent selectionEvent) {
    public String getCurrentRow() {
        BindingContainer bindings = getBindingsForDCB();
        RichTable table=table1; 
        DCIteratorBinding outListIter = getBindingsForDCB().findIteratorBinding("outlistOutIterator");
        RowKeySet rowSet = table.getSelectedRowKeys();
        Iterator rowKeySetIter = rowSet.iterator();
        while (rowKeySetIter.hasNext()) {
                List l = (List) rowKeySetIter.next();
                Key key = (Key)l.get(0);
                outListIter.setCurrentRowWithKey(key.toStringFormat(true));   
                Row r = outListIter.getCurrentRow();
        return null;
    }

Similar Messages

  • Spark datagrid - how can i open entire row for editing?

    Hi,
    I want to create a datagrid with add button. The user can add a row and i want all the editable columns to be opened for editing.
    I can open a single cell for editing by using startItemEditorSession, but how can i do it for multiple columns in the same time?

    redskyventures wrote:
    it seems mine has automatically done so...
    I recommend you turn off the automatic update feature -- It can really cause you a lot of trouble.
    Have you already determined that your coauthor cannot open your file?  If so, I suggest you go backwards, get a copy of the old iBA from him to put on your machine, so you both use the same version.  There's no way to convert iba files to anything, as far as I know.

  • How to Retrieve the Selected Values from selectOrderShuttle using ADF 11g

    Hi Every One,
    Does anyone has idea how to retrieve the selected Items using shuttle and Order of the items using 'SelectOrderShuttle' component ?
    Thanks

    shuttle's valuechangeevent would fire when you shuttle items back and forth.
        public void selectOrderShuttle1_valueChangeListener(ValueChangeEvent valueChangeEvent) {
            ArrayList list = new ArrayList(Arrays.asList(valueChangeEvent.getNewValue()));
            if (list != null){
                for (int i=0; i<list.size(); i++) {
                    int l = list.size()-1;
                    val = list.get(l).toString(); //returns , delimited string
                    if (val != null){
                        val = val.replaceAll("[\\[\\]]", "");
                        StringTokenizer st = new StringTokenizer (val, ",");
                        int nto = st.countTokens ();
                        for (int j = 0; j < nto; j++)
                            String token = st.nextToken ();                     
                ..........

  • How can I filter the rows displayed on an ADF Table ? pls help urgent..

    Hi All,
    I have a page with ADF readonly table, based on who is logging in I want to filter the rows to be displayed when the page is firstly loaded. This page is called from the main menu.
    I have created a custom method in the Application Module Impl :
    public void setInvoiceFilter () {
    ViewObject vo = findViewObject("BrowseInvoice1");
    ViewCriteria vc = vo.createViewCriteria();
    ViewCriteriaRow vcr1 = vc.createViewCriteriaRow();
    vcr1.setAttribute("Userid","xxxx");
    vc.add(vcr1);
    vo.applyViewCriteria(vc);
    vo.executeQuery();
    The question is : where and how should I call this method ?
    is this a correct approach ?
    Thank you very much for your help,
    xtanto

    I assume you're talking about a JSF application.
    I think you should be able to do this in the constructor of a backing bean.
    1) Add an operation binding, bound to your service method, to the page's pageDefinition.
    2) On the JSF page flow Overview tab, add a managed property to the backing bean. Call it, say, myMethod, give it type oracle.bindings.OperationBinding, and give it the value #{bindings.nameOfYourOperationBinding}
    3) Add a myMethod field of type OperationBinding, with getter and setter, to your backing bean class.
    4) In the backing bean class's constructor, add code like:
    myMethod.execute();This will execute the method every time the page is loaded.
    Now, if you want to execute the method only the first time the page is loaded, it's a bit trickier. You need to set, and use, a session variable:
    Map sessionVars = FacesContext.getCurrentInstance().getExternalContext().getSessionMap();
    if (sessionVars.get("hereBefore") == null)
      myMethod.execute();
      sessionVars.put("hereBefore", "true");
    }

  • How can I get all options under edit in iPhoto to appear and revert in red, the only option it gives me is to select multiple

    how can I get all options under edit in iPhoto on my phone to appear it has revert in red on theleft side & done on the right side, the only choice it gives me is select multiple

    The usual cause of that issue is a corrupted or missing font that Firefox replaces by another, in this case a bold, font.
    As a test you can try to disable the default font and choose a few different fonts (Arial, Verdana, Tahoma, Times New Roman) to see if you can identify the culprit.<br />
    you will have to reinstall that corrupted font.

  • Programmatically selecting row in af:table

    I have an instance of the <af:table> component that points to a value on a managed bean of type List<MyValueType>.
    I need to make the <af:table> have a preselected row, and I have the value of type MyValueType that represents the row I need selected.
    How do I programmatically select the appropriate row in the table?
    Thanks!

    Hi Rune,
    1) Expose the adf table to a managed bean property by using @binding attribute, say, requestScope. The property should be RichTable type.
    2) Create a method in java class which can find the managed bean created in step 1) by using EL expression and calling its RichTable.setRowKey(int) to set the current row. Other row currency method are also available besides setRowIndex(int).
    3) Create Data Control on the java class you created in step 2)
    4) Insert the method created in step 2) into <bindings> as methodAction in page definition file.
    5) Still in page definition file, insert an invokeAction into <executables> to invoke the method action created in step 4)
    6) Reorder the invokeAction created in step 5), place it below the table's <iterator>
    7) Set the @refresh attribute for the table <iterator> and <invokeAction> if you want, for example: "prepareModel"
    -Or-
    You can implement a custom page lifecycle to achieve the goal.
    Todd

  • How can I add a row into a JTable with JButton

    Hi all. I have the following code:
    package gui;
    import db.*;
    import javax.swing.table.AbstractTableModel;
    import java.util.ArrayList;
    public class FoundersTable extends AbstractTableModel{
        private static final int COLUMNS = 8;
        private String columnNames[] = {"��� ����", "���", "�������", "�������", "���������", "��������",
                "����� �� ����������", "������ �� ����, �����"};
        private ArrayList data;
        public FoundersTable(){
            data = new ArrayList();
        public int getRowCount() {
            return data.size();
        public int getColumnCount() {
            return columnNames.length;
        public String getColumnName(int colIndex) {
            return columnNames[colIndex];
        public Object getValueAt(int rowIndex, int columnIndex) {
            return ((ArrayList)data.get(rowIndex)).get(columnIndex);
        public void setValueAt(Object value, int rowIndex, int columnIndex) {
            ((ArrayList)data.get(rowIndex)).set(columnIndex, value);
            fireTableCellUpdated(rowIndex, columnIndex);
        public void addRow(ArrayList neueZeile) {
            data.add(neueZeile);
            int index = data.size() - 1;
            fireTableRowsInserted(index, index);
        public void removeRow(int index) {
            data.remove(index);
            fireTableRowsDeleted(index, index);
        public void removeAllRows() {
            data.clear();
            fireTableRowsDeleted(0, 0);
        public boolean isCellEditable(int rowIndex, int columnIndex) {
            return true;
    }Now in my MainJFrame class I have one button for additing and one button for removing a selected row. How can I add/remove rows with this two buttons.
    Thanks

    No my question is how can I add and remove rows WITH buttons My point was the code is the same. You use the addRow(...) method. Why did you write an addRow(...) method if you aren't going to use it?
    I don't understand your problem. Do you not know how to write an ActionListener?

  • How to get selected row data of an ADF table in HashMap?

    Hi,
    Can anyone please tell me how to selected row data of an ADF table in HashMap like :
    Object obj = pageTable.getSelectedRowData();
    JUCtrlHierNodeBinding rowData = (JUCtrlHierNodeBinding)obj;
    Now in above code I want the convert rowData in HashMap.
    Can anyone please tell me how to do that? Its urgent.
    Thanks,
    Vik

    Vik,
    No need to ask the same question 3 times...
    In [url http://forums.oracle.com/forums/message.jspa?messageID=4590586]this post, Nick showed you how to get the Row.
    If it were so urgent, you could have done a little reading of the javadocs to come up with code like this (not tested, up to you to do that)
    HashMap m = new HashMap();
    Row r = get it like Nick showed you to;
    Object values[]=r.getAttributeValues();
    String names[]=r.getAttributeNames();
    for (int i=0; i<r.getAttributeCount(); i++)
    m.put(names, values[i]);

  • How can I copy and paste my edited Photo in photoshop elements 12?

    How can I copy and paste my edited photo from photoshop elements 12 into a word document?

    In full Editor:
    Go to Select menu>all
    Go to Edit menu>copy to put it on the clipboard
    Go to your destination document>Paste
    Hope that this works for you as well.

  • How can we show selected values of a tree in a selectmanylistbox

    how can we show selected values of a tree in a selectmanylistbox??

    Hi,
    you can use a reference to a RichTree component instance and call  getSelectedRowKeys on it. The selected rowKey then allow you to look-uo the nodes in the tree. You can use a custom selection listener on the tree to be notified about each selection. There also is an API for the de-selected row keys, which you need to remove nodes from the select many list. The select many list will get its data from a managed bean in view scope (so the values survive subsequent requests)
    Frank

  • How can I add new row/column into existing jTable?

    Hi add!
    Can you help me how can I add new row/column into existing jTable?
    Tnx in adv!

    e.g
    Create two buttons inside the Table ( "Add New Row" ) and ("Add new Column")
    their handlers are:
    add new row:
    //i supose u already have
    DefaultTabelModel tablemodel = new DefaultTableModel(rowdata, columnNames);
    //and   
       JTabel jtable = new JTable(tablemodel);
    // Handler (row)
    jbtAddRow.addActionListener(new ActionListener(){
       public void actionPerformed(ActionEvent e) {
          if(jtable.getSelectedRow() >= 0 )
              tablemodel.insertRow(jtable.getSelectedRow(), new java.util.Vector());  
           else  
                tablemodel.addRow(new java.util.Vector());
        });to add new columns its the same but inside actionPerformed method:
    ask for e.g "Whats the name for the new column"
    then,
       tablemodel.addColumn(nameOfColumn, new java.util.Vector());   Joao
    Message was edited by:
    Java__Estudante

  • How can i print from adobe digital editions?

    How can i print from adobe digital editions?

    Please see FAQ: Printing a PDF file in Windows 8.
    If you are running Windows 8 on a laptop with an Intel-based processor, you can install Adobe Reader XI (desktop app with classic UI) alternatively.
    Go to your Windows 8 desktop.
    Go to http://get.adobe.com/reader/ in your browser.
    Download and install Adobe Reader XI.
    Launch Adobe Reader XI and open a PDF file.
    Select File > Print from the menu.

  • How can I display the rows into columns.

    How can I display the rows into columns. I mean
    Create table STYLE_M
    (Master varchar2(10), child varchar2(10));
    Insert itno style_m
    ('MASTER1','CHILD1');
    Insert itno style_m
    ('MASTER2','CHILD1');
    Insert itno style_m
    ('MASTER2','CHILD2');
    Insert itno style_m
    ('MASTER3','CHILD1');
    Insert itno style_m
    ('MASTER3','CHILD2');
    Insert itno style_m
    ('MASTER3','CHILD3');
    Note : The Master may have any number of childs.
    I want to display like this..
    Master child1, child2, child3, .......(dynamic)
    MASTER1 CHILD1
    MASTER2 CHILD1 CHILD2
    MASTER3 CHILD1 CHILD2 CHILD3
    Sorry for disturbing you. Please hlp me out if you have any slution.
    Thanks alot.
    Ram Dontineni

    Here's a straight SQL "non-dynamic" approach.
    This would be used if you knew the amount of children.
    SELECT
         master,
         MAX(DECODE(r, 1, child, NULL)) || ' ' || MAX(DECODE(r, 2, child, NULL)) || ' ' || MAX(DECODE(r, 3, child, NULL)) children
    FROM
         SELECT
              master,
              child,
              ROW_NUMBER() OVER(PARTITION BY master ORDER BY child) r
         FROM
              style_m
    GROUP BY
         master
    MASTER     CHILDREN                        
    MASTER1    CHILD1                          
    MASTER2    CHILD1 CHILD2                   
    MASTER3    CHILD1 CHILD2 CHILD3             Since you said that the number of children can vary, I incorporated the same logic into a dynamic query.
    SET AUTOPRINT ON
    VAR x REFCURSOR
    DECLARE
            v_sql           VARCHAR2(1000) := 'SELECT master, ';
            v_group_by      VARCHAR2(200)  := 'FROM (SELECT master, child,  ROW_NUMBER() OVER(PARTITION BY master ORDER BY child) r FROM style_m) GROUP BY master';
            v_count         PLS_INTEGER;
    BEGIN
            SELECT
                    MAX(COUNT(*))
            INTO    v_count
            FROM
                    style_m
            GROUP BY
                    master;
            FOR i IN 1..v_count
            LOOP
                    v_sql := v_sql || 'MAX(DECODE(r, ' || i || ', child, NULL))' || ' || '' '' || ';
            END LOOP;
                    v_sql := RTRIM(v_sql, ' || '' '' ||') ||' children ' || v_group_by;
                    OPEN :x FOR v_sql;
    END;
    PL/SQL procedure successfully completed.
    MASTER     CHILDREN
    MASTER1    CHILD1
    MASTER2    CHILD1 CHILD2
    MASTER3    CHILD1 CHILD2 CHILD3I'll point your other thread to this one.

  • How can I label my rows on numbers so I can keep a running count? Dave

    How can I label my rows on numbers so I can keep a running count?
    i would like to number from 1 to 150  by highlighting and use a function command
    Dave
                   Name               Address          Email
    Ex      1
              2
              3
              4
              150

    Add a column to the left of column A (it will become column A).
    Assuming you want to start with the first "name" in Row 2 (and NOT number the header row):
    Two methods:
    1.
    In cell A2, enter =ROW()-1
    Grab the Fill Handle (small circle, bottom right of the selected cell) and drag down to fil the formula into the rest of the cells in the column.
    If the formula is placed in ALL non-header row cells in the column, it will automatically fill into any rows added to the table.
    If rows are inserted or removed, numbers below the inserted/removed row will be automatically adjusted.
    2.
    In cell A2, enter a 1
    In cell A3, enter a 2
    Select both cells.
    Grab the Fill Handle and drag down to the rest of the cells in the column.
    These are fixed numbers. They will not be automatically filled into new rows added to the table, nor will they automatically update when rows are inserted into the table or removed from the table.
    To add more numbers, select the last two cells currently containing numbers, drag the Fill Handle down.
    Regards,
    Barry

  • How can I programmatically change a label?

    Hi everyone,
    I have a 2-D array that I wish to populate with different sorts of data.  Depending upon the data, the names of the rows and columns may change.  Arrays have to have identical labels and I suppose I could simply populate a string indicator, but frankly, that looks like trash.
    How can I programmatically change a label of a column or a row in a 2-D array?  Should I consider using a table?  I want it to look nice.
    Thanks,
    Jason

    Hi
    I do not think you are able to change the label programatically.
    But you might consider to use Captions instead of labels. You can hide labels and make captions visible programatically, and you can change the text of the caption and size (see enclosed vi).
    take care
    Pawel
    Attachments:
    caption.vi ‏20 KB

Maybe you are looking for

  • Why does itunes match delete all songs from my iPhone leaving me music less in the mountains! :(

    i went through a drive through the mountains recently needless to say with out radio, only sourse of music... my precious iphone. well aparently after i had subscribed to itunes match it felt the need to go behind my back and delete all the songs i h

  • FM for Cube Rows

    Hello Gurus!!! I am needing via ABAP check the quantity of LOGICAL registers in cube... something like transaction LISTCUBE performs when we check "Output number of hits" and summarize. I do not want physical registers in dimensions nor fact tables.

  • Importing Nikon RAW .nef files into iPhoto

    I am using iPhoto 8.0.3. I can import RAW .nef files from my D90 without a problem. I also scan my older slides/negs using a CoolScan V and saving those files as RAW .nef format. Problem is that iPhoto does not recognize the .nef files that are scann

  • Add header in alv

    hallow i use  alv grid from se83 and i wont to add a header . how can i do that ?. my alv is basic. did i need to change all the alv code or just to add some code to my code? thankes

  • HT4623 Iphone recovery mode

    I can't turn on my iPhone at all. Its just all black. When I try to connect it to iTunes, it says, iTunes has detected an iPhone in recovery mode. You must restore this iPhone before it can be used with iTunes. --- But how can I restore my iPhone if