Small issue with custom table cell editor and unwanted table row selection

I'm using a custom table cell editor to display a JTree. Thing i notice is that when i select a value in the tree pop-up, the pop-up closes (as it should) but then every table row, from the editing row to the row behind the pop-up when i selected the value becomes highlighted. I'm thinking this is a focus issue, but it thought i took care of that. To clairfy, look at this: Before . Notice how the "Straightening" tree item is roughly above the "Stock Thickness" table row? When i select Straightening, this is what happens to my table: After .
My TreeComboBox component:
public class TreeComboBox extends JPanel implements MouseListener {
    private JTextField itemField;
    private TreeModel treeModel;
    private ArrayList<ActionListener> actionListeners = new ArrayList<ActionListener>();
    private Object selectedItem;
     * Creates a new <code>TreeComboBox</code> instance.
     * @param treeModel the tree model to be used in the drop-down selector.
    public TreeComboBox(TreeModel treeModel) {
        this(treeModel, null);
     * Creates a new <code>TreeComboBox</code> instance.
     * @param treeModel the tree model to be used in the drop-down selector.
     * @param selectedItem tree will expand and highlight this item.
    public TreeComboBox(TreeModel treeModel, Object selectedItem) {
        this.treeModel = treeModel;
        this.selectedItem = selectedItem;
        initComponents();
     * Returns the current drop-down tree model.
     * @return the current <code>TreeModel</code> instance.
    public TreeModel getTreeModel() {
        return treeModel;
     * Sets the tree model.
     * @param treeModel a <code>TreeModel</code> instance.
    public void setTreeModel(TreeModel treeModel) {
        this.treeModel = treeModel;
     * Returns the selected item from the drop-down selector.
     * @return the selected tree object.
    public Object getSelectedItem() {
        return selectedItem;
     * Sets the selected item in the drop-down selector.
     * @param selectedItem tree will expand and highlight this item.
    public void setSelectedItem(Object selectedItem) {
        this.selectedItem = selectedItem;
        String text = selectedItem != null ? selectedItem.toString() : "";
        itemField.setText(text);
        setToolTipText(text);
     * Overridden to enable/disable all child components.
     * @param enabled flat to enable or disable this component.
    public void setEnabled(boolean enabled) {
        itemField.setEnabled(enabled);
        super.setEnabled(enabled);
    public void addActionListener(ActionListener listener) {
        actionListeners.add(listener);
    public void removeActionListener(ActionListener listener) {
        actionListeners.remove(listener);
    // MouseListener implementation
    public void mouseClicked(MouseEvent e) {
    public void mouseEntered(MouseEvent e) {
    public void mouseExited(MouseEvent e) {
    public void mousePressed(MouseEvent e) {
    public void mouseReleased(MouseEvent e) {
        showPopup();
    private void initComponents() {
        setLayout(new GridBagLayout());
        itemField = new JTextField();
        itemField.setEditable(false);
        itemField.setText(selectedItem != null ? selectedItem.toString() : "");
        itemField.addMouseListener(this);
        add(itemField, new GridBagConstraints(0, 0, 1, 1, 1.0, 0.0,
                GridBagConstraints.WEST, GridBagConstraints.HORIZONTAL, new Insets(0, 0, 0, 0), 0, 0));
    private void showPopup() {
        final TreePopup popup = new TreePopup();
        final TreeComboBox tcb = this;
        final int x = itemField.getX();
        final int y = itemField.getY() + itemField.getHeight();
        int width = itemField.getWidth() + popupButton.getWidth();
        Dimension prefSize = popup.getPreferredSize();
        prefSize.width = width;
        popup.setPreferredSize(prefSize);
        SwingUtilities.invokeLater(new Runnable() {
            public void run() {
                popup.show(tcb, x, y);
                popup.requestFocusInWindow();
    private void fireActionPerformed() {
        ActionEvent e = new ActionEvent(this, ActionEvent.ACTION_PERFORMED, "TreeComboBoxSelection");
        for (ActionListener listener : actionListeners) {
            listener.actionPerformed(e);
    private class TreePopup extends JPopupMenu {
        private JTree tree;
        private JScrollPane scrollPane;
        public TreePopup() {
            initComponents();
            initData();
        private void initData() {
            if (treeModel != null) {
                tree.setModel(treeModel);
        private void initComponents() {
            setFocusable(true);
            setFocusCycleRoot(true);
            tree = new JTree();
            tree.setRootVisible(false);
            tree.setShowsRootHandles(true);
            tree.setFocusable(true);
            tree.setFocusCycleRoot(true);
            tree.addTreeSelectionListener(new TreeSelectionListener() {
                public void valueChanged(TreeSelectionEvent e) {
                    tree_valueChanged(e);
            scrollPane = new JScrollPane(tree);
            add(scrollPane);
        private void tree_valueChanged(TreeSelectionEvent e) {
            DefaultMutableTreeNode node = (DefaultMutableTreeNode) tree.getLastSelectedPathComponent();
            setSelectedItem(node.getUserObject());
            fireActionPerformed();
            this.setVisible(false);
}My TreeComboBoxTableCellEditor:
public class TreeComboBoxTableCellEditor extends AbstractCellEditor implements TableCellEditor, ActionListener {
    protected TreeComboBox treeComboBox;
    protected ArrayList<CellEditorListener> cellEditorListeners = new ArrayList<CellEditorListener>();
    public TreeComboBoxTableCellEditor(TreeComboBox treeComboBox) {
        this.treeComboBox = treeComboBox;
        treeComboBox.addActionListener(this);
    public Object getCellEditorValue() {
        return treeComboBox.getSelectedItem();
    public Component getTableCellEditorComponent(JTable table, Object value, boolean isSelected, int row, int column) {
        treeComboBox.setSelectedItem(value);
        return treeComboBox;
    public void actionPerformed(ActionEvent e) {
        stopCellEditing();
}Any thoughts?
Edited by: MiseryMachine on Apr 3, 2008 1:21 PM
Edited by: MiseryMachine on Apr 3, 2008 1:27 PM

As I said, you have to have empty context elements before additional rows will be open for input.
For instance if you want to start with 5 rows available for input do the following to your internal table that you will bind:
data itab type standard table of sflight.
do 5 times.
  append initial line to itab.
enddo.
context_node->bind_table( itab ).
The other option if you need n number of rows is to add a button to the table toolbar for adding more rows. When this button is pressed, you add a new context element to the node - thereby creating a new empty row in the table.

Similar Messages

  • Custom JTable cell editors and persistence

    I have a JTable with an underlying data model (an extension of AbstractTableModel) that uses custom cell editors in the last column. The cell editor in that column, for a given row, depends on the value selected in another column of the same row. The cell editors include text, date, list, and tree editors (the last one in a separate dialogue). The number of rows is changeable.
    I have need to persist the data for a populated table from time to time, for restoration later on. I've achieved that, such that the data model is recreated, the table appears correct, and the appropriate cell editors activated (by creating new instances of the editors' classes).
    However, my problem is that the (custom) cell editors do not reflect the data in the model when editing mode is begun the first time after restoration. Eg. the text editor is always empty, the list editor shows the first item, and no node is selected in the tree editor.
    If I've restored the model correctly, should the editors properly reflect the underlying data when they are set to editing mode?
    I suspected not, and thus tried to explicitly 'set' the correct values immediately after each editor is recreated ... but to no avail.
    Does anyone have any thoughts, or experience with something similar? I'm happy to supply code.

    You can use html tags within Swing, so I think you can do the following:
    * MyRenderer.java
    * Created on 26 April 2007, 10:27
    * To change this template, choose Tools | Template Manager
    * and open the template in the editor.
    package newpackage;
    import java.awt.Component;
    import javax.swing.JLabel;
    import javax.swing.JTable;
    import javax.swing.SwingConstants;
    import javax.swing.table.TableCellRenderer;
    * @author CS781RJ
    public class MyRenderer extends JLabel implements TableCellRenderer
        public MyRenderer()
            setHorizontalTextPosition(SwingConstants.RIGHT);
            setIconTextGap(3);
            setOpaque(true);
        public Component getTableCellRendererComponent(JTable table, Object value, boolean isSelected, boolean cellHasFocus, int row, int column)
            if (isSelected)
                setBackground(table.getSelectionBackground());
                setForeground(table.getSelectionForeground());
            else
                setBackground(table.getBackground());
                setForeground(table.getForeground());
            if (value instanceof String)
                if ((value != null) && (value.toString().length() > 0))
                    System.out.println("Value: " + value.toString());
                    setFont(new java.awt.Font("Tahoma", 0, 11));
                    setText("<html>" + value.toString().replaceAll("\n", "<br>") + "</html>");
            return this;
    }In the class that has the JTable, use the code AFTER declaring the values, columns, etc:
    jTable1.getColumnModel().getColumn(0).setCellRenderer(new MyRenderer());
    jTable1.setValueAt("Riz\nJavaid", 0, 0);One thing I haven't done is to resize the cell heights, make sure this is done.
    Hope this helps
    Riz

  • Authorization Issue with Custom Pending Value Object and Anonymous Users

    Hi,
    I am just converting my demo from version 7.1 to 7.2. I am not doing upgrade. The demo uses a custom pending value object USER_REQUEST. The idea is that new employee goes to Java AS as anonymous user and enters her details and store where she will work. After submitting request there is an approval process using custom entry type USER_REQUEST. If the request is approved then IdM converts USER_REQUEST into MX_PERSON entry. This works nice in 7.1 but I am having problems with replicating this in 7.2. I created new UI task accessible by anonymous that creates new USER_REQUEST entry. I also assigned role idm.anonymous with UME action idm_anonymous to UME built in group Anonymous users.
    My problem is with the field STORE. This field is a reference field to another custom entry type STORE (this entry type will be used in context based assignment). Every new employee must selects a store where she will work. The problem is when user clicks on button "Select". Web dynpro terminates and returns authorization error. I also tested this with entry type MX_ROLE. I added attribute MXREF_MX_ROLE and same issue. So it seems that just assigning UME action idm_anonymous is not enough to list objects from identity store. I found a workaround for this issue. When I assign also UME action idm_authenticated to Anonymous users then it does not dump and I get a pop up window where I can search for store. It does not seem right to assign idm_authenticated to anonymous users.
    Another issue is with display task for entry type USER_REQUEST. I assigned a display task to entry STORE and I set that Anonymous have access to this task in Access control tab. I assigned default value to the field store. So when a user opens page she can see a hyper link to display already assigned store. When user clicks on this hyper link it opens a new pop up window and user must authenticate against Java AS. After successful authentication the display task for entry STORE is displayed. I would assume that anonymous user can display it without authentication.
    So to me it seems like authorization checks have been changed in 7.2 versions and are more strict for anonymous tasks. Hence my question is how can I implement my scenario. Am I missing some configuration or what's the proper solution to my two issues? I don't count assigning idm_authenticated to Anonymous users as a solution. This workaround does not solve my second issue.
    Thanks

    Some of the folks from Trondheim labs check, but rather infrequently.  There's another person who I guess is in consulting that also checks from time to time.
    Sorry I can't help you with your main question...
    Matt

  • Custom JTable cell editor problem

    I have a custom JTable cell editor which is a JPanel with 2 JtextFields, One for a name, the other for a data value. My problem lies in when the the cell is selected and then the user start typing. The JTextfield outline shows up, but there is no carat. I can only edit the cell when I click the mouse in it again. I have my isCellEditable method set to only allow editing on 2 mouse clicks, but I did try it with just returning true and had the same problem. Please help.
    Code:
    class cellValue {
    String name;
    String data;
    Color nameColor;
    Color dataColor;
    Font font;
    public cellValue(String n, String d, Color nC, Color dC, Font ff){
    name = n;
    data = d;
    nameColor = nC;
    dataColor = dC;
    font = ff;
    } //end class
    public class TextFieldCellEditor extends JPanel implements TableCellRenderer, TableCellEditor{
    private EventListenerList listenerList = new EventListenerList();
    private ChangeEvent event = new ChangeEvent(this);
    private cellValue s;
    private int e_row=0;
    private int e_col=0;
    private JTextField ta;
    private JTextField tb;
    public TextFieldCellEditor() {
    setLayout(new GridBagLayout());
    ta = new JTextField();
    tb = new JTextField();
    tb.setHorizontalAlignment(SwingConstants.RIGHT);
    add(ta, new GridBagConstraints(0,0,1,1,0.6,0.0,java.awt.GridBagConstraints.WEST,java.awt.GridBagConstraints.BOTH,new Insets(0,1,0,0),0,0));
    add(new JLabel(" "),new GridBagConstraints(1,0,1,1,0.1,0.0,java.awt.GridBagConstraints.WEST,java.awt.GridBagConstraints.BOTH,new Insets(0,1,0,0),0,0));
    add(tb, new GridBagConstraints(2,0,1,1,0.3,0.0,java.awt.GridBagConstraints.EAST,java.awt.GridBagConstraints.BOTH,new Insets(0,1,0,0),0,0));
    } //end init
    public Component getTableCellRendererComponent(JTable table, Object value,boolean isSelected,
    boolean hasFocus,int row, int column) {
    s = (cellValue)value;
    e_row = row;
    e_col = column;
    ta.setText(s.name);
    tb.setText(s.data);
    ta.setFont(s.font);
    tb.setFont(s.font);
    ta.setForeground(s.nameColor);
    tb.setForeground(s.dataColor);
    setForeground(table.getForeground());
    setBackground(table.getBackground());
    ta.setBackground(table.getBackground());
    tb.setBackground(table.getBackground());
    ta.setCaretColor(Color.WHITE);
    tb.setCaretColor(Color.WHITE);
    return (JComponent)(this);
    public Component getTableCellEditorComponent(JTable table, Object value, boolean isSelected, int row, int column) {
    return (getTableCellRendererComponent(table, value,isSelected, true, row, column));
    public boolean isCellEditable(EventObject e) {
    if (e instanceof MouseEvent) {
    return ((MouseEvent)e).getClickCount() >= 2;
    } return true;
    // return true;
    public boolean shouldSelectCell(EventObject anEvent) {
    return (true);
    public void cancelCellEditing() {
    public boolean stopCellEditing() {
    fireEditingStopped();
    return (true);
    public Object getCellEditorValue() {
    return (ta.getText());
    public void addCellEditorListener(CellEditorListener l){
    try {
    SwingUtilities.invokeLater(
    new Runnable() {
    public void run() {requestFocus();}
    } catch (Exception e) {};
    listenerList.add(CellEditorListener.class, l);
    public void removeCellEditorListener(CellEditorListener l) {
    listenerList.remove(CellEditorListener.class, l);
    protected void fireEditingStopped(){
    Object[] listeners = listenerList.getListenerList();
    for (int i = listeners.length - 2; i >= 0; i -= 2)
    ((CellEditorListener)listeners[i+1]).editingStopped(event);
    protected void fireEditingCanceled() {
    Object[] listeners = listenerList.getListenerList();
    for (int i = listeners.length - 2; i >= 0; i -= 2)
    ((CellEditorListener)listeners[i+1]).editingCanceled(event);
    } //end class

    Thanks again for the repley.
    I tried removing the celleditorlistener and using the setSurrenderFocusOnKeystroke, but it did not work. The textfield is editable;
    I did change:
    public void addCellEditorListener(CellEditorListener l){
    try {
    SwingUtilities.invokeLater(
    new Runnable() {
    public void run() {ta.requestFocus();}
    } catch (Exception e) {};
    listenerList.add(CellEditorListener.class, l);
    }This allows the first textfield to request focus and this seems to work. But when I highlight a cell, then start typing, the first character I type puts me into the editor, but it is lost. Example:
    I type hello
    and get ello in the cell. Then when I press enter the input is excepted and the selection goes to the next cell, but I cannot move the Highlight cursor at all, seems locked. The only way I can continue to the next cell is to use the mouse.
    You said you had a cell editor working. Would you care to share as an example. This is killing me to get this to work properly.
    Thanks again
    Dave

  • JTable cell editor and row selection

    I have a JTable with 8 columns and the last column is editable and has a custom table cell editor. The user can edit cells in that column or select a row and use buttons above the table to do such things as delete the row. So far so good. However if the user selects a row by clicking on a cell in the editable column and tries to delete the last row(for example) the row disappears except for the cell in the last column which is left hanging with the cursor in it.
    I do a table.clearSelection(). Do I need to set the focus elsewhere in the table?
    Help! and thanks.

    Before you delete the row, cancel the in-process editing:
    if( _table.isEditing() ) {
        _table.getCellEditor().cancelCellEditing();
    // Delete the row in the model

  • Issue with "read by other session" and a parallel MERGE query

    Hi everyone,
    we have run into an issue with a batch process updating a large table (12 million rows / a few GB, so it's not that large). The process is quite simple - load the 'increment' from a file into a working table (INCREMENT_TABLE) and apply it to the main table using a MERGE. The increment is rather small (usually less than 10k rows), but the MERGE runs for hours (literally) although the execution plan seems quite reasonable (can post it tomorrow, if needed).
    The first thing we've checked is AWR report, and we've noticed this:
    Top 5 Timed Foreground Events
    Event     Waits     Time(s)     Avg wait (ms)     % DB time     Wait Class
    DB CPU           10,086           43.82     
    read by other session     3,968,673     9,179     2     39.88     User I/O
    db file scattered read     1,058,889     2,307     2     10.02     User I/O
    db file sequential read     408,499     600     1     2.61     User I/O
    direct path read     132,430     459     3     1.99     User I/OSo obviously most of the time was consumed by "read by other session" wait event. There were no other queries running at the server, so in this case "other session" actually means "parallel processes" used to execute the same query. The main table (the one that's updated by the batch process) has "PARALLEL DEGREE 4" so Oracle spawns 4 processes.
    I'm not sure how to fix this. I've read a lot of details about "read by other session" but I'm not sure it's the root cause - in the end, when two processes read the same block, it's quite natural that only one does the physical I/O while the other waits. What really seems suspicious is the number of waits - 4 million waits means 4 million blocks, 8kB each. That's about 32GB - the table has about 4GB, and there are less than 10k rows updated. So 32 GB is a bit overkill (OK, there are indexes etc. but still, that's 8x the size of the table).
    So I'm thinking that the buffer cache is too small - one process reads the data into cache, then it's removed and read again. And again ...
    One of the recommendations I've read was to increase the PCTFREE, to eliminate 'hot blocks' - but wouldn't that make the problem even worse (more blocks to read and keep in the cache)? Or am I completely wrong?
    The database is 11gR2, the buffer cache is about 4GB. The storage is a SAN (but I don't think this is the bottleneck - according to the iostat results it performs much better in case of other batch jobs).

    OK, so a bit more details - we've managed to significantly decrease the estimated cost and runtime. All we had to do was a small change in the SQL - instead of
    MERGE /*+ parallel(D DEFAULT)*/ INTO T_NOTUNIFIED_CLIENT D /*+ append */
      USING (SELECT
          FROM TMP_SODW_BB) S
      ON (D.NCLIENT_KEY = S.NCLIENT_KEY AND D.CURRENT_RECORD = 'Y' AND S.DIFF_FLAG IN ('U', 'D'))
      ...(which is the query listed above) we have done this
    MERGE /*+ parallel(D DEFAULT)*/ INTO T_NOTUNIFIED_CLIENT D /*+ append */
      USING (SELECT
          FROM TMP_SODW_BB AND DIFF_FLAG IN ('U', 'D')) S
      ON (D.NCLIENT_KEY = S.NCLIENT_KEY AND D.CURRENT_RECORD = 'Y')
      ...i.e. we have moved the condition from the MERGE ON clause to the SELECT. And suddenly, the execution plan is this
    OPERATION                           OBJECT_NAME             OPTIONS             COST
    MERGE STATEMENT                                                                 239
      MERGE                             T_NOTUNIFIED_CLIENT
        PX COORDINATOR
          PX SEND                       :TQ10000                QC (RANDOM)         239
            VIEW
              NESTED LOOPS                                      OUTER               239
                PX BLOCK                                        ITERATOR
                  TABLE ACCESS          TMP_SODW_BB             FULL                2
                    Filter Predicates
                      OR
                        DIFF_FLAG='D'
                        DIFF_FLAG='U'
                  TABLE ACCESS          T_NOTUNIFIED_CLIENT       BY INDEX ROWID    3
                    INDEX               AK_UQ_NOTUNIF_T_NOTUNI    RANGE SCAN        2
                      Access Predicates
                        AND
                          D.NCLIENT_KEY(+)=NCLIENT_KEY
                          D.CURRENT_RECORD(+)='Y'
                      Filter Predicates
                        D.CURRENT_RECORD(+)='Y' Yes, I know the queries are not exactly the same - but we can fix that. The point is that the TMP_SODW_BB table contains 1639 rows in total, and 284 of them match the moved 'IN' condition. Even if we remove the condition altogether (i.e. 1639 rows have to be merged), the execution plan does not change (the cost increases to about 1300, which is proportional to the number of rows).
    But with the original IN condition (that turns into an OR combination of predicates) in the MERGE ON clausule, the cost suddenly skyrockets to 990.000 and it's damn slow. It seems like a problem with cost estimation, because once we remove one of the values (so there's only one value in the IN clausule), it works fine again. So I guess it's a planner/estimator issue ...

  • Table Cell Editor which allows to input multiple lines of text...

    Hi there
    Does anyone know how to write a table cell editor which allows users to input multiple lines of text? please provide some sample if possible...
    Thanks
    Ken

    I'm assuming you also want the renderer to display multiple lines? if so, make a class that extends JTextArea and that implements the TableCellEditor and TableCellRenderer interfaces, then set instances of this as the editor and renderer for the TableColumn in question. The implementation of most of the methods in these interfaces is trivial, often just this.setBackground() based on the table.getSelectionBackground() or table.getBackground(), a this.setText() based on the value passed in, then just a 'return this'.
    You might want to make an abstract class which implements these interfaces for you, and which delegates to a simple abstract method that you override to return the renderer/editor component.
    Note that you must use two instances of the class you make, one for the renderer and one for the editor, since it must be able to be able to render the remainder of the table's cells without interfering with the JTextArea performing the editing. (alternatively you could make two classes that extend JTextArea, each just implementing one of the interfaces, but this is more effort I think.) Also note that you must increase the table's row height to get more than one row visible.

  • Problem in table cell editor

    Hai,
    I inserted as a dropdownkey in table, Parent node ABc is bind to table , the child node DEf bind to coloumn dropdownbyindex. i set child node singleton as false, but its giving null pointer exception.
    IXXXView.IABCNode iu=wdContext.nodeABC();
    IXXXView.IDEFElement c=iu.nodeDEF().createDEFElement();
    How to Solve this.
    Hope  Anil and Piyush will help me they already know about this problem.
    regards,

    Hai Bharadwaj,
          happy to see you again, I think I am in wrong with creating table cell editor.
    i will say my requirement please help me to do:
    in the table the first coloumn is number, second one is name, third one is *** ,this coloumn contains two standard Strings male and female, the can select from dropdown index.
    what i did is I created context node parent ABC
    in that attributes name , age and another node DEF having attribute S.
    I created a table and bind the node ABC(its not allow me to check DEF node).
    i deleted table cell editor of column *** and created new editor dropdownindex. and binded texts is node DEF
    DEF is set to singleton false.
    Give me the suggetion.
    regrds,

  • Setting Visibility to Table cell editor

    Hi
    I created a table and added a colomn to the table in view layout. Cell editor of that colomn contains an image. Based on some conditions , I need to make image invisible in table cell editor of custom colomn.
    How can I do it.

    Example:
    Context:
    Rows (model node)
    -- Name (attribute, string)
    -- Additional (value node, card=1:1, selection=1:1, singleton=false)
    ---- EditorVisibility (attribute, type=Visibility)
    Data binding:
    LinkToAction.visible -> Rows.Additional.EditorVisibility
    Make editor in row at index 4 visible if name is not empty:
    IRowsElement row = wdContext.nodeRows().getRowsElementAt(4);
    row.currentAdditionalElement().setEditorVisibility(row.getName() != null && row.getName().length() > 0
      ? WDVisibility.VISIBLE
      : WDVisibility.NONE);
    Ok?
    Armin

  • How to create a context menu in ALV table cell editor(Webdynpro abap )

    Hello Experts,
    I am having a problem in creating a context menu in a table cell editor in the ALV table output.I have assigned a 'lta' as the cell editor.But befor assigning the lta as cell editor I have assigned the menu to the lta.But when the view is rendered I can see the lta with the actioned assigned to it.But I cannot see the context menu.
    The code snippet below:
      "Create menu for each coloumn
      create OBJECT lo_menu_actions type CL_SALV_WD_VE_MENU EXPORTING
          id = 'MITM_ACTIONS'.
      lo_menu_actions->set_visible( value = abap_true ). 
      lo_menu_actions->set_visible_fieldname( value = 'ACTIONS' ).
      "ADd menu items
      CREATE OBJECT lo_menu_item_create type CL_SALV_WD_VE_MENU
      exporting
        id = 'MITM_CREATE_EXPRESSION'.
      lo_menu_item_create->set_visible( value = abap_true ).
      lo_menu_item_create->set_visible_fieldname( value = 'Create' ).
      "Add item 1
      lo_menu_actions->ADD_ITEM( VALUE = lo_menu_item_create ). 
      "  Set the cell editor for each column cell(link to an action)
      LOOP AT lt_node_dec_tab_cols INTO ls_node_dec_tab_cols .
        lv_column_name = ls_node_dec_tab_cols-object_name.
        lr_column = lr_column_settings->get_column( lv_column_name ).
       "Create 'lta' Ui item
        CREATE OBJECT lo_lta TYPE cl_salv_wd_uie_link_to_action.
        lo_lta->set_menu( value = lo_menu_actions ).
        lo_lta->set_text_fieldname( lv_column_name ).
        lr_column->set_cell_editor( lo_lta ).
        IF ls_node_dec_tab_cols-is_result EQ abap_true.
          lr_column->set_cell_design( value =
                      cl_wd_table_column=>e_cell_design-key_medium ).
        ENDIF.
      ENDLOOP.

    Hi Prakash,
    I have not come across this requirement till now to have context menu in a cell editor of alv.
    Unfortunately  the implementation of method SET_MENU of alv ui elements ( ex: cl_salv_wd_uie_text_view ) is not updating alv configurable table, instead it just stores in a global attribute as string. Hence has no effect on context menu.
    If your user is very particular about this requirement of having context menu in cell editor, you can go for a normal table. Because, normal table's cell editor has the property to set the menuID as we do it for other ui elements.
    Regards,
    Rama

  • Table cell editor enabled property

    Hi,
    I am using NWDS 7.1 EHP1. I have actually created a table and assigned boolean type of context to the table cell editors. Though i make the context value true, the table cells are disabled. Please help me.
    Thanks,
    Prasanthi.

    Hi,
    To which property of the table cell editor have u binded the boolean attribute- enabled or read-only? coz read-only true always makes the field deiabled.
    After u have binded the boolean attribute, have u set the value in ur code? if not the fields remain disabled
    Regards,
    Poojith MV

  • How to change the colour of the table cell editor on some condition?

    Hi all,
    I have a requirment acco which i need to make the colour of the tableceleditor ias RED and font color white when the data in that is < 0.please tell me how is this possible and its urgent..
    regards
    Sharan

    If you are using release NW04 and have a TextView as table cell editor, you can do this:
    Add a calculated attribute "Color" of DDIC type "com.sap.ide.webdynpro.uielementdefinitions.TextViewSemanticColor" under the data source node of the table.
    Bind the "semanticColor" of the cell editor to this context attribute.
    Implement the get-method for the calc. attribute like this
    WDTextViewSemanticColor get<DataSourceNode>Color(I<DataSourceNode>Element element)
      return element.getValue() < 0 ? WDTextViewSemanticColor.NEGATIVE : WDTextViewSemanticColor.STANDARD;
    Armin

  • Dropdowns as table cell editors

    Hi
    Does anyone know how to use dropdowns as table cell editors.  I need to create a table where some of the columns have dropdowns as the editor and some don't. 
    I can create the dropdown(by index) by binding a node to the table(the DD list) and binding a subnode-attribute as the text val but that gives me the same list in all rows.  As this is bound to the table and not the column all drop downs would have the same data in the DD list

    Here is what we do for dropdowns that need different values according to the selected row.
    1. Use a DropDownByKey as the table cell editor.
    2. Use the getModifiableSimpleValueSet() API call to modify the values attached to the dropdown on every row selection event.
    We don't have the case where you wouldn't actually have an editor, but you can disable the dropdown if the list is empty, which accomplishes the same effect.
    Beware that if your keys and values are different, the keys not in the current dropdown will not show up correctly on the other rows.

  • Issues with Custom Chart

    Hi,
    I am facing some issues with custom charts.
    1. X Axis value is getting cut off. Given date as x axis parameter and last 2 digits of date is getting cut off. (format like 19-Apr-2011T00:00:00). And this value cut of happening only for custom chart.
    2. On right click of the custom chart, when i am selecting Preview, it opens a new pop up window with and error as Error: "Application error occurred during the request processing.". No preview is being generated.
    3. In Server Scaling, i checked Use global auto scaling, and many times it is showing improper y axis or mutiple y axis values with the same value or it is displaying improper global range
    kindly help
    Regards
    Muzammil

    Muzammil,
    Without seeing your data and your chart configuration, it is difficult to understand exactly the issues you are encountering.  I have the same JRE and the same version and build of MII as you.  I have no difficulty with the scaling or with Global Range, but problems displaying the date in my tests.
    I would suggest the you enter a ticket into the SAP Support System, and enclose a  copy of your data (run the query, use Browser with Content Type = text/xml) and export a copy of you display template.
    Lastly, what type of query are you using - sql, tag?
    Kind Regards,
    Diana Hoppe

  • Issues with Custom Settings

    Is anyone else having issues with custom settings on 10.8.2?
    I am trying to configure basic office 2011 settings based on the keys located at http://afp548.com/mediawiki/index.php/Office_2011_Settings using a device group.
    However, when I log into an authenticated user's machine and load pref setter I can see that the customizations are not found on the newly managed machine.  I know the push updates are working, but for custom settings I seem to be getting nothing.
    My questions:
    - Am I just flat our doing it wrong? (meaing, should the plist files be copied over)
    - Are there common issues to look out for?
    - Can anyone share basic custom settings they have that work?
    Thanks!

    Thats a bad idea. Office dos not react well to having it's prefences copied from one machine.
    Check out: http://www.officeformachelp.com/office/administration/mcx/
    It's a good guide for MS Office prefs.

Maybe you are looking for

  • BPEL Server classpath has priority over a BPEL Process classpath

    Hi all I developed a BPEL process which uses org.apache.commons.io.FileUtils class (latest version 1.3.1) through a <bpel exec> activity. However, when I deploy it to a BPEL 10.1.3 server it throws an exception warning me that the method doens´t exis

  • Way to trim precomp to current layer time?

    I've got an animation pretty much done as far as timing goes and everything. Now I'm going back and editing some things that require adding a few layers to add some things to the current layer that already is trimmed appropriately to the correct time

  • How to login as DBA in oracle 9i from sql plus .

    how to login as DBA in oracle 9i from sql plus . ???

  • Problem synching aperture photos with iPad/iPhone ios8

    Updated to Yosemite. Attempting to sync select photos (Aperture) with iPad Air (ios8) or iPhone 6 (iOS 8.1) with iTunes. When I click Photos in the left-hand column of iTuns I get is an endless loading loop icon in the middle of the screen. No option

  • Problems installing iLife09

    Hi I am having problems installing iLife09. When I click install, there is an error message that says : *Install Failed* *Unable to Install.* *The Installer could not install the software because there was no software found to install.* Can someone p