StopCellEditing () removes focus from table

Hi,
i have created a custom cellEditor, when the user presses enter a popupwindow is shown which shows a list of possible values.
When the popup closes i call stopCellEditing (), in a DefaultCellEditor the focus then remains on the table...but in this case the focus just disappears...
Anybody with the same focusproblems?
Nick

Hi,
i have created a custom cellEditor, when the user presses enter a popupwindow is shown which shows a list of possible values.
When the popup closes i call stopCellEditing (), in a DefaultCellEditor the focus then remains on the table...but in this case the focus just disappears...
Anybody with the same focusproblems?
Nick

Similar Messages

  • [Flex 4.5.1] How to remove focus from TextInput on mouse click outside of it?

    For me clicking outside of a TextInput should always remove focus from it, only only if you click on another TextInput or Button.
    I don't see any simple event like MouseEvent.MOUSE_CLICK_OUTSIDE - which would definitely simplify things.. I wonder why there isn't such event. Well anyway I can't find any other similar event and I can't figure out an easy way to do this. I also wonder why I couldn't find a solution to this on the web easily... Well anyway...
    Does someone know how to do that in a convenient way?
    Thanks!

    ok I understand why is that. For example I have a TextInput now where the user enters number through buttons which have mouseFocusEnabled = false, so the TextInput doesn't lose focus. But on a TabBar I had to set mouseFocusEnabled = true or when I switched between tabs -> switches between states, I could still type in the TextInput in the previous tab cause it didn't lose focus. Maybe TabBar's default value of that property is wrongly set to false.
    Anyway, not losing focus when clicking outside is still weird. Take for example this forum, if I click outside of the box I am currently writing this, I lose focus. It's how things usually work. And flex focus is designed to work backwards to what people are used to, no matter as I already pointed out I understand there are cases it comes in handly. I hope I don't sound bad but take it just as a suggestion please that maybe if it is redesigned like this: clicking on component gets focus, clicking outside loses focus. But if you click on a button for example and you want to keep the focus on a TextInput cause you add some text, you should be able to set a property on the Button like maintainCurrentFocus = true (false by default), which would make clicking on the Button not shift the focus to it or set it to null if the component is a group that has some rect background for example, but maintain the focus on the TextInput.
    I could be missing something about the current design of how the focus works in flex, but from my point of view at the moment, the design I describe to use is just like how I am usually used to be working with focus as a user, not as developer.
    Maybe you could agree or maybe you know some reason by which things are how they are at the moment that I don't see. But if you think I make sense please let me know, maybe I could fill a minor enhancement request for that ?

  • How to remove focus from a Ring Control in a PDA application?

    Hello,
        In a PDA application, i have observed that when we select a pull-down Ring control, the focus is retained in the control and the text of the control appears highlighted. The only way out is to tap an empty portion of the PDA application screen to remove focus from the control. Is there any way to avoid this? Is there a method to remove focus from the control programatically?
    Note: Version of LabVIEW that we are using: LabVIEW 8.5 Professional Development System for Windows Vista/XP/2000 and LabVIEW 8.5 PDA Module for Windows Mobile.
    Thanks & Regards,
    Subhashini

    Hi Vsh,
        Thanks for ur response. Setting the key focus property node of the ring control to false removed the focus from the control. I guess it was a silly question (have started LabVIEW devp. recently).
    Thanks & Regards,
    Subhashini

  • Remove focus from JButton?

    I am starting a new thread related to my previous thread.
    I came to realize that when I call a game object from the GUI menu by clicking on "New Game" button, the focus is set to the button. I found it by using the method, if(newButton.hasFocus()).
    However, my problem is not yet finished. I tried game.requestFocus(); also.
    But still, the focus is not removed.
    Can n e one pls let me know if there is a way to remove focus from the damn button?
    Thanks.                         

    button.setFocusable( false );Will pevent the button from maintaining focus.

  • Pages 5.0 removing images from tables.

    After upgrading to Pages 5.0 I now receive a message when opening any file with a table that has images in the cells.  Basically Pages is removing all images from table cells.  Anyone having this problem and is there an easy fix?

    DrBrian, this is what I did to resolve this issue.  I found out that we may still have Pages 09 installed on our systems! Go into Finder - Applications.  If you have a folder titled iWork 09 click it and you may find Pages 09 there.  Double click to open Pages version 09 where you will be able to open all of your files just as they should be. 
    I will not be using the new Pages upgrade.  I have too much time invested in creating documents and templates for my business and I am not willing to re-learn a new package which has much less functionality.  Hope this helps you.

  • Problem when removing elements from table after apply sort

    Hi,
    I have big problem with <af:table> and sorting.
    When I removed objects from a table without sorting, there is no problem but when I removed
    items from the table after sorting, the remain items are not correct.
    For example, i have in my table these items :
    Item AA
    Item CC
    Item ZZ
    Item BB
    Item AA
    Item BB
    Item CC
    Item ZZ
    I sort the table and i select the following Items : Item BB a Item CC
    The remains item is only Item AA, Item ZZ disappear.
    If i resort the table, the missing Item zz appear again in the table.
    Here is my jspx :
    <af:table var="row" rowBandingInterval="1" width="1050" rows="5"
    rowSelection="multiple"
    value="#{pageFlowScope.editNotificationBackingBean.ingredients}"
    binding="#{pageFlowScope.editNotificationBackingBean.ingredientsTable}"
    autoHeightRows="10" id="t2">
    <af:clientListener method="goEditRow" type="dblClick"/>
    <af:serverListener type="doubleClickOnRow" method="#{pageFlowScope.editNotificationBackingBean.handleRequestIngredientsSelectBtn_action}"/>
    <af:column headerText="#{bundle.col_fr_name}" width="240"
    sortable="true" sortProperty="name.FR_Description" id="c1">
    <af:outputText value="#{row.name.texts['fr'].value}" id="ot1"/>
    </af:column>
    In my backing bean i call this method to remove selected elements :
    public void unselectBtn_action(ActionEvent actionEvent) {
    RowKeySet rowKeySet = selectIngredientsTable.getSelectedRowKeys();
    int i = 0;
    Iterator it = rowKeySet.iterator();
    while (it.hasNext()) {
         Integer index = (Integer)it.next() - i;
    selectIngredientsTable.setRowKey(index);
    CompositionIngredient compositionIngredient =
    (CompositionIngredient)selectIngredientsTable.getRowData();
    notification.getProductDetail().getCompositionIngredients().remove(compositionIngredient);
    i++;
    selectIngredientsTable.getSelectedRowKeys().clear();
    AdfFacesContext.getCurrentInstance().addPartialTarget(selectIngredientsTable);
    Thanks in advance.

    I have made a mistake, i don't paste the right <af:table> from my jspx.
    Here is the correct one :
    <af:table var="row" rowBandingInterval="1" width="1050"
    rowSelection="multiple" id="tableSelectedIngredients"
    value="#{pageFlowScope.editNotificationBackingBean.notification.productDetail.compositionIngredients}"
    binding="#{pageFlowScope.editNotificationBackingBean.selectIngredientsTable}"
    partialTriggers="::tab_ingredients_list_expressed_per">
    <af:column sortable="true" headerText="#{bundle.col_name}" id="c5" width="180"
    sortProperty="ingredient.name.FR_Description">
    <af:outputText value="#{row.ingredient.name.texts['fr'].value}"
    id="ot18"/>
    </af:column>
    ...

  • Removing Index from Table in SAP level

    Hi All,
    I want to remove the Index from SAP level as in Oracle level Index is already remove / not there.
    Please provide the solution how it can be removed.
    Waiting for reply ....
    Regards
    Punit

    Hi Punit,
    Use the transaction SE14 to do this.
    Put the table name for which you need to remove the index at the input box (obj. name) ->select the radio button "Table"-> click on EDIT button->in the next screen->click on the "index" button->a screen will pop-up with all the available indexes for the table->select one(double click)-> in the next screen, you will have the "Delete database index" button, click this and the index will be deleted.
    Note: You can't delete the indexes which are not defined as DB index in the ABAP Dictionary.
    Regards,
    Srihari

  • Remove fields from table key

    I define a customize table (maintenance only by cust., not SAP import).
    5 of the fields are the table keys.
    When I remove 2 fields from the key and adjust the table I get the following errors
    “Primary key change not permitted for value table ZT7IL60”
    “Activation of Table ZT7IL60 not possible (please check)”
    Any clue why and how to remove some fields from the key?

    hi there,
    the reason for  this error can be any....
    may be you are using that field in the foreign key reference of another table. thats y it is not allowing the change option as it will affect other table's values.
    another thing can be the one suggested in the above post.
    do reply if any of the methods mentioned helps.
    Do reward if helpful./

  • Remove row from table when adding values to another table

    hi am adding value programticaly how can i remove the row i just  add from the table
    this is how am adding value
    public void addMember(javax.faces.event.ActionEvent actionEvent) {
    List<String> tempTable = new ArrayList<String>();
    //Code to get the bindings for TargetVO :
    RowKeySet selectedEmps = getEmpTable().getSelectedRowKeys(); 
    Iterator selectedEmpIter = selectedEmps.iterator();
    DCBindingContainer bindings =
    (DCBindingContainer)BindingContext.getCurrent().getCurrentBindingsEntry();
    DCIteratorBinding empIter = bindings.findIteratorBinding("UserDetailsViewVO1Iterator");
    RowSetIterator empRSIter = empIter.getRowSetIterator();
    while(selectedEmpIter.hasNext()){
    Key key = (Key)((List)selectedEmpIter.next()).get(0);
    Row currentRow = empRSIter.getRow(key);
    onRowCreate(currentRow);
    boolean b = selectedEmps.remove(currentRow);
            i what to clear the row i just selected from the table
    AdfFacesContext.getCurrentInstance().addPartialTarget(empTable);
    // empTable
    public void onRowCreate( Row currentRow ) {
    BindingContainer bindings = BindingContext.getCurrent().getCurrentBindingsEntry();
    //access the name of the iterator the table is bound to.
    DCIteratorBinding dciter = (DCIteratorBinding) bindings.get("addmemberBeanIterator");
    //access the underlying RowSetIterator
    RowSetIterator rsi = dciter.getRowSetIterator();
    //get handle to the last row
    Row lastRow = rsi.last();
    //obtain the index of the last row
    int lastRowIndex = rsi.getRangeIndexOf(lastRow);
    /*check if the user is added already*/
    /*OperationBinding oper2 = (OperationBinding) bindings.get("check if user exists method binding");
    oper2.getParamsMap().put("attributeName1", uniqueUserAttributeValue);
    Object ret = oper2.execute();*/
    //create a new row
    Row newRow = rsi.createRow();
    String f = (String)currentRow.getAttribute("Firstname");
    String s = (String)currentRow.getAttribute("Surname");
    String u = (String)currentRow.getAttribute("Username");
    String n = (String)currentRow.getAttribute("Emailaddress");
    // String orgid = (String)currentRow.getAttribute("Organisationid");
    newRow.setAttribute("firstname", f);
    newRow.setAttribute("surname", s);
    newRow.setAttribute("name", u);
    newRow.setAttribute("emailaddress", n);
    // newRow.setAttribute("Organisationid1",orgid);
    //initialize the row
    newRow.setNewRowState(Row.STATUS_INITIALIZED);
    //add row to last index + 1 so it becomes last in the range set
    rsi.insertRowAtRangeIndex(lastRowIndex +1,  newRow);
    //make row the current row so it is displayed correctly
    rsi.setCurrentRow(newRow); 
    System.out.println("Username " + u);
    System.out.println("firstname " + f);
    System.out.println("surname " + s);
    System.out.println("email " + n);
    // refereshpage();
    // return null;
    am in jdevloper 11.1.1.6.0
    my table is
    public void onRowCreate( Row currentRow ) {
    BindingContainer bindings = BindingContext.getCurrent().getCurrentBindingsEntry();
    //access the name of the iterator the table is bound to.
    DCIteratorBinding dciter = (DCIteratorBinding) bindings.get("addmemberBeanIterator");
    //access the underlying RowSetIterator
    RowSetIterator rsi = dciter.getRowSetIterator();
    //get handle to the last row
    Row lastRow = rsi.last();
    //obtain the index of the last row
    int lastRowIndex = rsi.getRangeIndexOf(lastRow);
    /*check if the user is added already*/
    /*OperationBinding oper2 = (OperationBinding) bindings.get("check if user exists method binding");
    oper2.getParamsMap().put("attributeName1", uniqueUserAttributeValue);
    Object ret = oper2.execute();*/
    //create a new row
    Row newRow = rsi.createRow();
    String f = (String)currentRow.getAttribute("Firstname");
    String s = (String)currentRow.getAttribute("Surname");
    String u = (String)currentRow.getAttribute("Username");
    String n = (String)currentRow.getAttribute("Emailaddress");
    // String orgid = (String)currentRow.getAttribute("Organisationid");
    newRow.setAttribute("firstname", f);
    newRow.setAttribute("surname", s);
    newRow.setAttribute("name", u);
    newRow.setAttribute("emailaddress", n);
    // newRow.setAttribute("Organisationid1",orgid);
    //initialize the row
    newRow.setNewRowState(Row.STATUS_INITIALIZED);
    //add row to last index + 1 so it becomes last in the range set
    rsi.insertRowAtRangeIndex(lastRowIndex +1,  newRow);
    //make row the current row so it is displayed correctly
    rsi.setCurrentRow(newRow);  
    System.out.println("Username " + u);
    System.out.println("firstname " + f);
    System.out.println("surname " + s);
    System.out.println("email " + n);
    // refereshpage();
    // return null;

    hi,
    make the table selection single and use this links 4 ur task.
    http://www.baigzeeshan.com/2010/06/deleting-multi-selected-rows-from-adf.html
    http://deepakcs.blogspot.com/2013/01/ejb-dc-deleting-multi-selected-rows.html
    https://forums.oracle.com/thread/2534813
    https://blogs.oracle.com/jdevotnharvest/entry/iterating_selected_rows_in_an
    txs

  • Remove focus from combobox

    Hi,
    Iam working with SAP B1 2007 .
    A combobox is populated with items.After the user selects the item in it,the focus must be removed from that combobox control to next textbox control.Can anyone suggest me what can I do for this.
    Thanks In Advance

    Hi ,
    Catch the event combo select and then emulate a click on the text control
    using
    oform.Items.Item("textControl").Click
    regards
    Edy

  • REMOVE Enrty from Table IDXIDOCINB

    Hi Guys,
    I found from help that i can use a report "IDX_SELECT_IDOCTYP_WITHOUT_IS"
    where i can specify that idoc which need not pass IS for generating XML.
    well i run the report selecting the IDOC  now those IDOCs came into exception table
    DXIDOCINB
    That table is not allowing me to delete the entries is there any way to delete those entries
    Regards
    srini

    Hi,
    You can use report IDX_DELETE_IDOCTYP_WITHOUT_IS to delete the records.
    Cheers!
    Juan Insuasti

  • Removing focus from a node

    I have a frame in which a scrollpane hold a jtree.
    I picked up the following code from the forum for making sure that only when the right click is on a node, the popupmenu is displayed.
    public void mouseReleased(MouseEvent e) {
                if (e.getButton() == MouseEvent.BUTTON3) {
                    TreePath closestTreePath = tree.getClosestPathForLocation(e.getPoint(), e.getPoint());
                    if (closestTreePath != null) {
                        tree.setSelectionPath(closestTreePath);
                         // select the row in the tree for the path
                        selectedRow = tree.getRowForPath(closestTreePath);
                        YourNode node = (YourNode) closestTreePath.getLastPathComponent();
                       // assuming your popup menu is already created somewhere else
                       popupMenu.show(deviceTree, pt.x, pt.y);
                        selectedRow = -1;
    }by codecraig
    But now the problem is that whenever i do right click anywhere on the tree a node gets selected and the popupmenu is displyed. i want to display the right click is on the node.
    here is my code
    import javax.swing.*;
    import javax.swing.tree.*;
    import java.awt.event.*;
    public class tree_right_click
         //JPopupMenu popupmenu = new JPopupMenu();
         JTree mytree;
         SysPopupListener s = new SysPopupListener();
         public tree_right_click()
              DefaultMutableTreeNode root = new DefaultMutableTreeNode("root");
              DefaultMutableTreeNode l1 = new DefaultMutableTreeNode("level1");
              DefaultMutableTreeNode l2 = new DefaultMutableTreeNode("level2");
              mytree=new JTree(root);
              mytree.addMouseListener(s);
              root.add(l1);
              l1.add(l2);
              JScrollPane treeview = new JScrollPane(mytree);
              JFrame fr = new JFrame("My Frame");
              fr.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
              fr.getContentPane().add(treeview);
              fr.setSize(300,300);
              fr.setVisible(true);
              public static void main(String args[])
              new tree_right_click();
    class SysPopupListener extends MouseAdapter
         JPopupMenu popupmenu = new JPopupMenu();
         SysPopupListener()
              JMenuItem part = new JMenuItem("Add detail 1");
              JMenuItem part2 = new JMenuItem("Add detail 2");
              part.addMouseListener(this);
              part2.addMouseListener(this);
              popupmenu.add(part);
              popupmenu.add(part2);
         public void mousePressed(MouseEvent e)
              maybeshowpopup(e);
         public void mouseReleased(MouseEvent e)
              maybeshowpopup(e);
         void maybeshowpopup(MouseEvent e)
              if(e.isPopupTrigger())
                   JTree t = (JTree)e.getComponent();
                   TreePath closestTreePath = t.getClosestPathForLocation(e.getX(), e.getY());
                if (closestTreePath != null) {
                    t.setSelectionPath(closestTreePath);
                     // select the row in the tree for the path
                    int selectedRow = t.getRowForPath(closestTreePath);
                    DefaultMutableTreeNode n = (DefaultMutableTreeNode) closestTreePath.getLastPathComponent();
                    System.out.print(n);
                   // assuming your popup menu is already created somewhere else
                    popupmenu.show(e.getComponent(),e.getX(),e.getY());
                    selectedRow = -1;
    }Please help,
    thanks in advance,
    Puneet

    I made some changes to your code and seems to be working like this:
              if(e.isPopupTrigger()) {
                   JTree t = (JTree)e.getComponent();
                   TreePath closestTreePath = t.getClosestPathForLocation(e.getX(), e.getY());
                   if (closestTreePath != null) {
                        t.setSelectionPath(closestTreePath);
                        // select the row in the tree for the path
                        int selectedRow = t.getRowForPath(closestTreePath);
                        DefaultMutableTreeNode n = (DefaultMutableTreeNode) closestTreePath.getLastPathComponent();
                        System.out.print(n);
                        // assuming your popup menu is already created somewhere else
                        popupmenu.show(e.getComponent(),e.getX(),e.getY());
                        selectedRow = -1;
                   JTree t = (JTree)e.getComponent();
                   TreePath path = t.getPathForLocation(e.getX(), e.getY());
                   if (path != null) {
                        popupmenu.show(e.getComponent(),e.getX(),e.getY());
              }

  • Remove Focus from Main Frame after Jinternal Frame is opened.

    Hi,
    I want to restrict the user to change any thing on main frame once the JInternalFrame is opened (you can see same effect when we execute JOptionPane where focus on main is not retain untill you close the JOptionPane).
    I have written following code to listen the JInternalFrame event
    conn_prop.addInternalFrameListener(new InternalFrameListener(){
    @Override
    public void internalFrameActivated(InternalFrameEvent e) {
    // TODO Auto-generated method stub
    @Override
    public void internalFrameClosed(InternalFrameEvent e) {
    // TODO Auto-generated method stub
    @Override
    public void internalFrameClosing(InternalFrameEvent e) {
    // TODO Auto-generated method stub
    @Override
    public void internalFrameDeactivated(InternalFrameEvent e) {
    // TODO Auto-generated method stub
    @Override
    public void internalFrameDeiconified(InternalFrameEvent e) {
    // TODO Auto-generated method stub
    @Override
    public void internalFrameIconified(InternalFrameEvent e) {
    // TODO Auto-generated method stub
    @Override
    public void internalFrameOpened(InternalFrameEvent e) {
    // TODO Auto-generated method stub
    }}); I tried setEnabled(false) but this is paralyzing entire application
    what piece of code should i write to do that........
    thanks in advance.

    That is not how a JInternalFrame is meant to be used. Read the Swing tutorial on "Using Internal Frames".
    Use a modal JDialog.

  • Reg:-How to delete PO from Table

    Hi,
        I need to know how to delete PO from the table.I know for item deletion.
    Edited by: Venkadesh on May 22, 2009 2:53 PM

    Hi
    PO's cannot be deleted from the table, we can only archive them from the data base being used.
    Deletion flag in the PO will not remove data from table.
    Thanks & Regards
    Kishore

  • White patch after removing row from JTable

    I am working with JTable and removing item from table on clicking on button but after removing row there is white Patch on that row. I don�t want to show this white patch.
    I did repaint table but that is also not working.
    Any thoughts !!!!!!!

    javax.swing.SwingUtilities.invokeLater(new Runnable(){
                public void run(){
                  museTable.setBackground(Color.black);//your color here
              });

Maybe you are looking for