Button event causes sort on grid column

This is an unwanted behavior. I have a data grid with buttons in the column header. When clicked a pop-up is initiated but at the same time that column is sorted. How can I disable the sorting, just during the buttonclick event?
This is the line of code that enables the pop-up:
column.addEventListener(ButtonHeaderEvent.BUTTON_C LICK, openSliderPanel);

That is correct.  Here are more specifics:
import flash.events.Event;
public class ButtonHeaderEvent extends Event {
    public static const BUTTON_CLICK:String = "buttonClick";
    public var eventX:Number;
    public var eventY:Number;
    public function ButtonHeaderEvent(type:String, x:Number, y:Number) {
        super(type);
        eventX = x;
        eventY = y;

Similar Messages

  • Sorting on Grid column

    Hello Experts,
    I have an UDF with a grid that I have to sort by one column.
    I'm manually filling the grid not using an sql query with DataTable, so I can't use the "order by" clause for sorting.
    Can anyone help me ?
    Thanks for your time in advance.
    Best regards
    Andrea

    Andrea,
    If i well understood I insert the new values in the grid already ordered using the row index parameter in method myGrid.DataTable.Rows.Add()
    Yes, that's correct.
    So why I'd need to catch the TitleObject double click event and re-order the grid's values ?
    You only need to do this in order to emulate B1 Grid's sort functionality. With it, if a user double clicks a column, the grid will sort it self.
    How can I find the right row index for the alphanumeric grid column ?
    What do you mean by "the right row index"?
    If you fill the grid, or more correctly, the Grid's DataTable row by row, just use myGrid.DataTable.Rows.Count -1 as the index.
    Regards,
    Vítor Vieira

  • How to disable sorting for some columns in a ALV GRID?

    Hi i have requirement where I have to disable sorting for some columns in a ALV GRID. i am using REUSE_ALV_GRID_DISPLAY function module.
    Can anybody help me. how to acieve this? Any code snippets will really be appreciated.

    Hi,
    I have tried this but not completely successful. I think this can be done using the OOPS method.
      DATA: it_event_exit TYPE  slis_t_event_exit.
      DATA: w_exit TYPE slis_event_exit.
      w_exit-ucomm = '&ODN'.
      w_exit-before = 'X'.
      CLEAR w_exit-after.
      APPEND w_exit TO it_event_exit.
      w_exit-ucomm = '&OUP'.
      w_exit-before = 'X'.
      CLEAR w_exit-after.
      APPEND w_exit TO it_event_exit.
      CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
        EXPORTING
          i_callback_program          = w_repid
          i_callback_top_of_page      = 'ALV_TOP_OF_PAGE'
          i_callback_html_top_of_page = 'ALV_HTML_TOP_OF_PAGE'
          i_callback_user_command     = 'USER_COMMAND'  <- User command form
          is_layout                   = wm_layout
          it_fieldcat                 = wt_fieldcat
          it_events                   = i_events
          it_event_exit               = it_event_exit    <- Need to fill
          it_sort                     = wt_sort
          i_default                   = 'X'
    Now you can capture this events in the user command
    FORM user_command  USING r_ucomm LIKE sy-ucomm
                             rs_selfield TYPE slis_selfield.
      IF r_ucomm = '&OUP' and rs_selfield-SEL_TAB_FIELD = 'Your field name'.
      ENDIF.
    ENDFORM.                    "user_command
    In this form you will get the function code in 'r_ucomm' and the field selected for sorting in 'rs_selfield-SEL_TAB_FIELD'. But reseting 'r_ucomm' will not work.
    May be somebody else can give some help on this.
    But this will work if you follow the oop method.
    Please see this document for more info.
    http://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/webas/abap/an easy reference for alv grid control.pdf
    Thanks
    Vinod

  • Link button in grid column to UDO

    Hi,
    I read through the posts regarding linking to user-defined objects, but I found it very confusing.  Some posts say that it is not possible to create a link button to a UDO; others say you need to use the extended-object property. 
    Does anyone have code that I could use to designate a grid column as a link to a UDO?
    The code I'm using is:
    oGrid.Columns.Item(1).Type = SAPbouiCOM.BoGridColumnType.gct_EditText
    txtColumn = oGrid.Columns.Item(1)
    txtColumn.Width = 83
    txtColumn.LinkedObjectType = ???
    I need to fill in the "???".
    If I designate an SAP B1 object type it works.
    Thanks,
    Mike

    Rasmus,
    Thanks for taking the time to provide a detailed explanation.  I think though that SAP needs to solve these kinds of problems.  It is my understanding that the main design goal of Business One is to provide an infrastructure that would reliably enable customization around it.  There is no such thing as accounting software that does not need some kind of adaptation to make it work for specific kinds of business models.  So a design that makes customization easier makes a great deal of sense. 
    If it is necessary to improvise in order to do what you need, then this design goal has not been met.  It also means that Business One is not what is managing the process because you are effectively going around it.  This in my view is actually worse than if Business One made these links work.  By forcing us to go around it, we effectively loose the data protection that Business One should be providing.  This is my take on it anyway.
    We solved the problem by opening the appropriate form with the appropriate data in it by using the double-click event.  The reason we have to do it this way is because the SDK will not even display the link button in a grid if its target is a UDO.  This brings up another reason for the SDK to be more cooperative with these efforts.  SAP has provided a detailed document describing the need to not deviate from Business One’s look and feel.  Perhaps SAP needs also to provide an SDK that more reliably and easily enables that caveat.
    If Business One had been designed from the ground up using SOA, its original design goal would be a lot easier to meet.  Maybe this is the real problem.
    Thanks,
    Mike

  • Loading Flash Paper swf causes all other button events to fail

    Hi Everyone,
    I have created a project with Flash which I am using Zinc to publish as a projector for both Macs and Pcs. Now, in this app I am loading a pdf document converted to a Flash Paper swf. The moment I load this swf file into my project, it appears as though all other button events fail. If I remove the code which loads in the flash paper swf, all buttons function as expected.
    Can anyone please help me with a reason / solution for this?
    Any help is greatly appreciated!
    Cheers!

    Did that and there were no errors shown at any point, such as when publishing the .apk file.
    I found a solution. I was under the impression I needed to use touch events for it to work on a tablet, and changing those to normal mouse events solved the problem. Still not sure why it wouldn't work the other way, but for now it works as needed.
    Thanks!

  • Link Button to UDO in my Grid

    hi,
    is ther a way to implement a link button im my Grid Column and bind it to an existing UDO ?
    I'm using SBO 2007A SP00 PL37.
    the following code, shows the link button and links to an item
    oGrid.Columns.Item(0).Type = SAPbouiCOM.BoGridColumnType.gct_EditText
            oCol = oGrid.Columns.Item(0)
            oCol.LinkedObjectType = 4
    i tried to link to my udo by the following but without success:
    oGrid.Columns.Item(0).Type = SAPbouiCOM.BoGridColumnType.gct_EditText
            oCol = oGrid.Columns.Item(0)
            oCol.LinkedObjectType = "UDO_VM_CONTRACT"
    I'm looking for a way of direct linking. Now i try to do the following workaround, but maybe there is a better way to solve this problem:
    Case SAPbouiCOM.BoEventTypes.et_MATRIX_LINK_PRESSED
                            If pVal.BeforeAction = False Then
                                BubbleEvent = False
                                moSboApplication.ActivateMenuItem("VmContract")
                            End If
    best regards
    Markus
    Edited by: Markus Rewak on Jul 10, 2008 11:11 PM
    Edited by: Markus Rewak on Jul 10, 2008 11:12 PM

    Hi Madhu,
    the udo object type is not working. To get the drill down functionality you have to use the item-object (4) and catch the matrix link pressed event and search the udo by your own logic.
    ' Add a link button to a column
            oGrid.Columns.Item(0).Type = SAPbouiCOM.BoGridColumnType.gct_EditText
            oCol = oGrid.Columns.Item(0)
            oCol.LinkedObjectType = 4
    Case SAPbouiCOM.BoEventTypes.et_MATRIX_LINK_PRESSED
                                If pVal.ColUID = "Vnr" And pVal.BeforeAction = True Then
                                    BubbleEvent = False
                                Dim sLink As String
                                Dim oGrid As SAPbouiCOM.Grid
                                oGrid = oForm.Items.Item("Gcont").Specific
                                oGrid.DataTable = oForm.DataSources.DataTables.Item("DTcont")
                                sLink = oGrid.DataTable.GetValue(0, pVal.Row)
                                moSboApplication.ActivateMenuItem("VMarkus")
                                moSboApplication.Forms.ActiveForm.Mode = SAPbouiCOM.BoFormMode.fm_FIND_MODE
                                moSboApplication.Forms.ActiveForm.ActiveItem = "txtdocnum"
                                moSboApplication.Forms.ActiveForm.Items.Item("txtdocnum").Specific.value = sLink
                                moSboApplication.Forms.ActiveForm.Items.Item("1").Click(SAPbouiCOM.BoCellClickType.ct_Regular)
                                End If
                    End Select
    This works very well.
    have fun
    Markus

  • Sorting on time column is giving error in 3.1 endeca

    Hi All,
    When I am doing sorting on event time column I am getting below error:
    An error occurred while executing query: exception encountered while executing external function 'internal:navigation-query', caused by error endeca-err:MDEX0001 : Invalid input : Error in EQL Query: - In statement "_$Records_1385576435829": In ORDER BY clause: ORDER BY clauses may refer only to attributes defined in the same statement; "EVENT_TIMEYEAR" is not
    I am not sure what this error is.What should be done to remove this or should I remove sorting on this column?
    Thanks,
    Amrit

    Amrit, it is possibly the changed treamment of ARB.
    What kind of error are you getting for those columns that are erroring?
    Please see this topic from the Endeca Server 7.6.x Migration Guide which highlights the differences in EQL (Endeca Query Language), that took place in this release:
    http://docs.oracle.com/cd/E40521_01/server.760/es_migration/toc.htm#Endeca%20Query%20Language%20changes
    You will see the following: (quoting from the linked documentation):
    For EQL 7.6.x, the ARB,COUNT, andCOUNTDISTINCT functions have been updated to work with multi-assign attributes.You will also see that "In 7.6, an implicit ARB is no longer added. That is, a SELECT of non-aggregate attributes is no longer allowed".
    Also, see the following doc, about the ARB function: http://docs.oracle.com/cd/E40521_01/server.760/es_eql/toc.htm#ARB
    In this doc, it is stated:
    ARB works as follows:
    For a single-assign attribute,ARBfirst discards all NULL values and then selects an arbitrary but consistent value from the remaining non-NULL values. If the attribute has no non-NULL values, then NULL is returned.
    For a multi-assign attribute,ARBlooks at all of the rows in the group (including those with empty sets) and selects the set value from one of the rows. In other words, empty sets and non-empty sets are treated equally. This means that because the selection is arbitrary, the returned set value could be an empty set. TheARBreturn type is the same as its argument type: if attribute x is anmdex:long-set, then so is ARB(x). If the attribute has no non-NULL values, then the empty set is returned.

  • Not able to sort any grid after Tools upgrade from 8.49.10 to 8.50.07

    Not able to sort any grid after Tools upgrade from 8.49.10 to 8.50.07, also when I click on any prompt button the prompt values are displaying in a separate screen rather than displaying in a model window.

    I have resolved it by applying stylesheets and clearing the cache.
    Thanks,
    Jayaprakash Tedla

  • Htp.p doesn't work from the custom button event handler ...

    Hi,
    I am trying to pop up an alert from the custom button event handler. I created a button and put the following code.
    htp.p('<script language='JavaScript1.3">
    alert ("Test Message");
    </script>;
    But alter doesn't show up after clicking the button.
    Thanks

    OK i've attached them and copy/pasted the relevent parts. The parent window is the SFLB file.
    -----------------------------------------here's the code in the parent window
    private function editServerPool():
    void
    serverPoolPUW = PopUpManager.createPopUp(
    this,popups.ServerPoolPopup,true);PopUpManager.centerPopUp(serverPoolPUW
    as IFlexDisplayObject); 
    if (newServerPool.SecondarySPAlgorithm != null){
    serverPoolPUW.enableSSCheckBox.selected =true;serverPoolPUW.DisplaySecondaryServerPool();
    serverPoolPUW.bigResize.play();// serverPoolPUW.height = 602; //yes...i know i need to move thisserverPoolPUW.switchoverPolicyCB.selectedItem = newServerPool.SwitchOverPolicy;
    serverPoolPUW.switchoverThresholdTI.text = newServerPool.SwitchOverThreshold;
    ----------------------here's the code in teh popup window (popups.ServerPoolPopup.mxml)
    <mx:Resize id = "bigResize" heightFrom="506" heightTo="602" target="{this}" /> 
    <mx:Resize id = "littleResize" heightFrom="602" heightTo="506" target="{this}"/>
     public function DisplaySecondaryServerPool():void{
    //make the screen large if the secondary server checkbox is selected; otherwise small.  
    if (enableSSCheckBox.selected){
    //display secondary server pool tab, expand the screen 
    //note that we cannot attach a data provider to the data grid until the grid creation is  
    //completed. This is done in an event handler.secondaryPanel.enabled =
    true; switchoverPolicyCB.visible =
    true;switchoverThresholdTI.visible =
    true;thresholdFI.visible =
    true;policyFI.visible =
    true;bigResize.play();
    else
     <mx:CheckBox label="Enable a Secondary Server Pool" width="264" fontWeight="bold" click="DisplaySecondaryServerPool()" id="
    enableSSCheckBox" fontSize="12" x="83" y="40"/>

  • How can I sort alphabetically three columns?

    Hi to everybody!
    I've got some problems sorting alphabetically three columns. If I try to sort one column it changes also the others. I want three independent columns and each of them must be sorted out alphabetically.
    In Excel it's so easy: I just have to select the column and push the button "sort the column alphabetically". Why is that so difficult in numbers?
    Check it out: http://yfrog.com/j6screenshot01tj

    l,
    What is the nature of the content in the three columns? If the content is just data, and not calculations or the input to calculations, you can easily accomplish a single column sort in Numbers.
    I see from your screen shot that you are still in the Excel mindset. You have a large table with more rows and columns empty than occupied. To work most effectively in Numbers we usually use only as many rows and columns as necessary, and if we have data that is of another set and not related, we begin a new table.
    So, if your data meets the requirements of the first paragraph and you have trimmed away the excess rows and columns we can do the following: Click once on the label of the column you wish to independently sort. Then click again on this label and drag it up and away from the table to a blank area of the canvas. Perform the sort on the separated column. Then grab the sorted column in the same way as before and move it over the original table, watching the borders between columns highlight as you move over them. The double line between columns identifies the insertion point. When you have your sorted column in the right place, drop it back into the original table.
    Jerry

  • Af:selectBooleanCheckbox get unchecked when do sorting on that column

    Hi,
    I am facing issue with af:selectBooleanCheckbox, this is inside a popup, table
    <af:popup childCreation="deferred" autoCancel="disabled" id="p21" contentDelivery="lazyUncached">
                      <af:dialog id="p31" title="#{penfaxviewcontrollerBundle.SELECT_MESSAGE_RECEIPIENTS}"
                                 closeIconVisible="false" dialogListener="#{pageFlowScope.composeMessage.selectMessage}">
    <af:panelGroupLayout id="pgl2" layout="horizontal" valign="top">
                          <af:outputLabel value="#{penfaxviewcontrollerBundle.EXTERNAL_USERS}" id="ol2"/>
                          <af:table value="#{bindings.PExternalUserVO1.collectionModel}" var="row"
                                    rows="#{bindings.PExternalUserVO1.rangeSize}"
                                    emptyText="#{bindings.PExternalUserVO1.viewable ? 'No data to display.' : 'Access Denied.'}"
                                    fetchSize="#{bindings.PExternalUserVO1.rangeSize}" rowBandingInterval="0"
                                    selectedRowKeys="#{bindings.PExternalUserVO1.collectionModel.selectedRow}"
                                    selectionListener="#{bindings.PExternalUserVO1.collectionModel.makeCurrent}"
                                    rowSelection="single" id="t1" contentDelivery="immediate" columnStretching="column:c2">
                            <af:column sortProperty="#{bindings.PExternalUserVO1.hints.SelectUser.name}" sortable="true"
                                       id="c1" align="center" width="30">
                              <af:selectBooleanCheckbox value="#{row.bindings.SelectUser.inputValue}"
                                                        label="#{bindings.PExternalUserVO1.hints.SelectUser.label}"
                                                        required="#{bindings.PExternalUserVO1.hints.SelectUser.mandatory}"
                                                        autoSubmit="true"
                                                        shortDesc="#{bindings.PExternalUserVO1.hints.SelectUser.tooltip}"
                                                        id="it4">
                                <f:validator binding="#{row.bindings.SelectUser.validator}"/>
                              </af:selectBooleanCheckbox>
                            </af:column>
    facing two issue
    1: When this popup appears and in table I have say 5 rows. If i check any of the rows checkbox other then first row it shows checked but again shows that checkbox unchecked. But if I check again any row that remain checked.
    2. Now if i click to sort this checkbox column all checkbox become unchecked.
    So please suggest wht may be the cause. I am using Studio Edition Version 11.1.2.4.0
    Also I want to know how we can apply caseInsensitive sorting on table.
    Thanks

    The framework implements table sorting by re-executing VO's query with added ORDER BY clause (i.e. the sorting is not performed in-memory but through re-execution of the query). I suppose that the SelectUser attribute is a transient one. When the query is re-executed you lose the values of the transient attributes. This behavior is by design, it is not a bug.
    Dimitar

  • Table Sorting based on Column Selection

    Dear All,
    I am using an AbstractTableModel. I would like to implement the sorting based on Column selection. Could anyone help me in this please.
    Thanks in advance,
    Regards
    Irfaan

    check this
    import javax.swing.JButton;
    import javax.swing.JFrame;
    import javax.swing.JPanel;
    import javax.swing.JScrollPane;
    import javax.swing.JTable;
    import javax.swing.UIManager;
    import javax.swing.table.AbstractTableModel;
    import javax.swing.table.TableCellRenderer;
    import javax.swing.table.TableColumnModel;
    import java.awt.Component;
    import java.awt.GridLayout;
    import java.awt.Insets;
    import java.awt.event.MouseAdapter;
    import java.awt.event.MouseEvent;
    import java.util.Hashtable;
    public class TableSorter extends JPanel
        private boolean             DEBUG       = false;
        private Object[]            columnNames = { "First Name", "Last Name", "Sport", "# of Years",
                                                    "Vegetarian"};
        private Object[][]          data        = { { "Mary", "Campione", "Snowboarding", 1, 2 },
                { "Alison", "Huml", "Rowing", 3, 4 }, { "Kathy", "Walrath", "Knitting", 5, 9 },
                { "Sharon", "Zakhour", "Speed reading", 6, 10 }, { "Philip", "Milne", "Pool", 7, 11 },
                { "Isaac", "Rabinovitch", "Nitpicking", 8, 12 }, };
        private SortFilterModel     m_modSortFilterModel;
        private TableColumnModel    m_modColumnModel;
        private TableHeaderRenderer m_btnSorterRenderer;
        protected boolean           m_bAbCOC    = true;
        JTable                      table       = new JTable();
        public TableSorter()
            super(new GridLayout(1, 0));
            m_modSortFilterModel = new SortFilterModel();
            m_modSortFilterModel.addMouseListener(table);
            table.setModel(m_modSortFilterModel);
            m_btnSorterRenderer = new TableHeaderRenderer();
            m_modColumnModel = table.getColumnModel();
            for (int i = 0; i < columnNames.length; i++)
                m_modColumnModel.getColumn(i).setHeaderRenderer(m_btnSorterRenderer);
            JScrollPane scrollPane = new JScrollPane(table);
            add(scrollPane);
        private class SortFilterModel extends AbstractTableModel
            int[]           indexes;
            ATSTableSorter  sorter;
            public String[] tableHeadersArray;
            boolean         isAscent = true;
            public void addMouseListener(final JTable table)
                table.getTableHeader().addMouseListener(new MouseAdapter()
                    public void mouseClicked(MouseEvent event)
                        int tableColumn = table.columnAtPoint(event.getPoint());
                        m_btnSorterRenderer.setPressedColumn(tableColumn);
                        m_btnSorterRenderer.setSelectedColumn(tableColumn);
                        if (TableHeaderRenderer.DOWN == m_btnSorterRenderer.getState(tableColumn))
                            isAscent = true;
                        else
                            isAscent = false;
                        // translate to table model index and sort
                        int modelColumn = table.convertColumnIndexToModel(tableColumn);
                        sortByColumn(modelColumn, isAscent);
            public Object getValueAt(int row, int col)
                int rowIndex = row;
                if (indexes != null)
                    rowIndex = indexes[row];
                return data[rowIndex][col];
            public void setValueAt(Object value, int row, int col)
                int rowIndex = row;
                if (indexes != null)
                    rowIndex = indexes[row];
                super.setValueAt(value, rowIndex, col);
            public void sortByColumn(int column, boolean isAscent)
                if (sorter == null)
                    sorter = new ATSTableSorter(this);
                sorter.sort(column, isAscent);
                fireTableDataChanged();
            public int[] getIndexes()
                int n = getRowCount();
                if (indexes != null)
                    if (indexes.length == n)
                        return indexes;
                indexes = new int[n];
                for (int i = 0; i < n; i++)
                    indexes[i] = i;
                return indexes;
            public int getRowCount()
                return data.length;
            public String getColumnName(int c)
                return columnNames[c].toString();
            public int getColumnCount()
                return columnNames.length;
            public Class getColumnClass(int col)
                switch (col)
                case 0:
                    return String.class;
                case 1:
                    return String.class;
                case 2:
                    return String.class;
                case 3:
                    return Integer.class;
                case 4:
                    return Integer.class;
                          default:
                    return Object.class;
        class ATSTableSorter
            SortFilterModel model;
            public ATSTableSorter(SortFilterModel model)
                this.model = model;
            public void sort(int column, boolean isAscent)
                int n = model.getRowCount();
                int[] indexes = model.getIndexes();
                for (int i = 0; i < n - 1; i++)
                    int k = i;
                    for (int j = i + 1; j < n; j++)
                        if (isAscent)
                            if (compare(column, j, k) < 0)
                                k = j;
                        else
                            if (compare(column, j, k) > 0)
                                k = j;
                    int tmp = indexes;
    indexes[i] = indexes[k];
    indexes[k] = tmp;
    public int compare(int column, int row1, int row2)
    Object o1 = model.getValueAt(row1, column);
    Object o2 = model.getValueAt(row2, column);
    if (o1 == null && o2 == null)
    return 0;
    else if (o1 == null)
    return -1;
    else if (o2 == null)
    return 1;
    else
    Class type = model.getColumnClass(column);
    if (type.getSuperclass() == Number.class)
    return compare((Number) o1, (Number) o2);
    else if (type == String.class)
    return ((String) o1).compareTo((String) o2);
    else
    return ((String) o1).compareTo((String) o2);
    public int compare(Number o1, Number o2)
    double n1 = o1.doubleValue();
    double n2 = o2.doubleValue();
    if (n1 < n2)
    return -1;
    else if (n1 > n2)
    return 1;
    else
    return 0;
    class TableHeaderRenderer extends JButton implements TableCellRenderer
    public static final int NONE = 0;
    public static final int DOWN = 1;
    public static final int UP = 2;
    int pushedColumn;
    Hashtable state;
    public TableHeaderRenderer()
    pushedColumn = -1;
    state = new Hashtable();
    setMargin(new Insets(0, 0, 0, 0));
    setHorizontalTextPosition(LEFT);
    public Component getTableCellRendererComponent(JTable table, Object value,
    boolean isSelected, boolean hasFocus,
    int row, int column)
    setText((value == null) ? "" : value.toString());
    setBorder(UIManager.getBorder("TableHeader.cellBorder"));
    boolean isPressed = (column == pushedColumn);
    getModel().setPressed(isPressed);
    getModel().setArmed(isPressed);
    return this;
    public void setPressedColumn(int col)
    pushedColumn = col;
    public void setSelectedColumn(int col)
    if (col < 0)
    return;
    Integer value = null;
    Object obj = state.get(new Integer(col));
    if (obj == null)
    value = new Integer(DOWN);
    else
    if (((Integer) obj).intValue() == DOWN)
    value = new Integer(UP);
    else
    value = new Integer(DOWN);
    state.clear();
    state.put(new Integer(col), value);
    public int getState(int col)
    int retValue;
    Object obj = state.get(new Integer(col));
    if (obj == null)
    retValue = NONE;
    else
    if (((Integer) obj).intValue() == DOWN)
    retValue = DOWN;
    else
    retValue = UP;
    return retValue;
    private static void createAndShowGUI()
    JFrame frame = new JFrame("TableDemo");
    frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
    TableSorter newContentPane = new TableSorter();
    newContentPane.setOpaque(true); // content panes must be opaque
    frame.setContentPane(newContentPane);
    frame.pack();
    frame.setVisible(true);
    public static void main(String[] args)
    javax.swing.SwingUtilities.invokeLater(new Runnable()
    public void run()
    createAndShowGUI();

  • Smartform - Event on Sort End

    Hi frnds,
    i am sending the internal table of PO's list from driver prog to smartforms. here smartform is displaying all the PO's in one lay out. i need each PO should come separately. means....when new PO start it should start in new page(first). for this i am trying to use EVENT ON SORT END in main window -> tables Node -> Data tab -> sort criteria. when clicked this check box one event is coming with EBELN event on sort end. here i am not able to create COMMAND under this.
    pls suggest me where i did wrong.
    Regards,
    Balu

    Hi..,
    U use table in the Main loop right !!..
    there in DATA tab, below u can find the  <b>SORT CRITERIA</b>.  there u give VBELN field name and select the radio button <b>EVENT ON SORT END</b>(the second radiobutton). then u will get a node after table <b>Main area node</b>..
    Right click on that node and select <b>Create> flow logic> Command</b>..
    In this way u can create a command !!
    regards,
    sai ramesh

  • Spark button event record.

    Hi,
    I've the issue about record event in automation framework. A mouse events (double click, click, mouseDown) do not recording method which listen the event, i.e. automationManager.addEventListener(AutomationRecordEvent.RECORD, recordHandler, false, 0, true) but events from keyboard such as SPACE or ENTER is successfull recorded.
    This is snippet of xml environment files with event for spark button:
    <ClassInfo Name="SparkButton" Extends="SparkButtonBase" SupportsTabularData="false">
            <Implementation class="spark.components::Button"/>
            <Events>
                <Event Name="Click"   >
                <Implementation class="flash.events::MouseEvent" Type="click"/>
                    <Property Name="triggerEvent"  DefaultValue="1">
                        <PropertyType Type="Enumeration" Codec="event"/>                  
                    </Property>
                    <Property Name="ctrlKey"  DefaultValue="false">
                      <PropertyType Type="Boolean"/>
                    </Property>
                    <Property Name="altKey"  DefaultValue="false">
                      <PropertyType Type="Boolean"/>
                    </Property>
                    <Property Name="shiftKey"  DefaultValue="false">
                      <PropertyType Type="Boolean"/>
                    </Property>
                </Event>
                <Event Name="TypeSpark" >
                    <Implementation class="flash.events::KeyboardEvent" Type="keyPress"/>
                    <Property Name="keyCode" >
                        <PropertyType Type="String" Codec="keyCode" DefaultValue="ENTER"/>               
                    </Property>  
                </Event>
          </Events>
    </ClassInfo>
    In what may be the cause?
    Thanks.

    The Spark button in this case is not itself toggleable.  You will need to use a ToggleButton.  Spark controls are not the swiss army knives that Flex 3 components were (in order to keep things a bit lighter).
    The new Spark skinnable components control their own state internally and the components themselves in turn set the currentState of their associated skin at runtime.  The current state of the component is not (in general) directly controllable via 'currentState'.
    Regards,
    Corey

  • InputListofValue PopUp window CANCEL button event capture ?

    HI All ,
    Jdeveloper version 11.X.6.
    i have explained the outline of issue below:
    User enter some data on InpuLIstOfValue text field and click on the maginfied Glass, the pop opens and selects some data and click 'OK' ,it will display appropriately on below fields.
    but if user enters the wrong data on InpuLIstOfValue text field and clicks on maginfier Glass,no results found on the popup window, so upon click of "CANCEL" button on popup window ,
    is there any way to remove the old data on InpuLIstOfValue Filed ?
    Basicaly i am looking for the capturing the CANCEL button event on the popUpwindow ,based on event status .
    PLase let us know if any hints ?
    Thanks

    Step by step:
    1. Create the converter class:
    package view.converters;
    import java.util.Collection;
    import java.util.Collections;
    import javax.faces.component.UIComponent;
    import javax.faces.context.FacesContext;
    import javax.faces.convert.Converter;
    import org.apache.myfaces.trinidad.convert.ClientConverter;
    import org.apache.commons.lang.StringUtils;
    public class LOVConverter implements Converter, ClientConverter {
      public Object getAsObject(FacesContext facesContext, UIComponent uiComponent, String value) {
        if (StringUtils.isBlank(value)) {
          // cancel event was triggered, so do something
        return value; // if value is not an instance of String you need to convert it to its primary type (Number, Date, String, etc)
      public String getAsString(FacesContext facesContext, UIComponent uiComponent, Object value)
        if (value == null || /* value is empty in its primary type */) {
          // cancel event was triggered, so do something
        return value.toString();
      public String getClientLibrarySource(FacesContext facesContext)
        return null;
      public Collection<String> getClientImportNames()
        return Collections.emptySet();
      public String getClientScript(FacesContext facesContext, UIComponent uiComponent)
        return null;
      public String getClientConversion(FacesContext facesContext, UIComponent uiComponent)
        return null;
    }2. Declare the converter in faces-config.xml:
    <converter>
      <converter-id>LOVConverter</converter-id>
      <converter-class>view.converters.LOVConverter</converter-class>
    </converter>3. Your inputListOfValues should look like this (see the property converter="LOVConverter"):
    <af:inputListOfValues popupTitle="Search"
                          value="#{row.bindings.DepartmentId.inputValue}"
                          model="#{row.bindings.DepartmentId.listOfValuesModel}"
                          required="#{bindings.EmployeesView1.hints.DepartmentId.mandatory}"
                          columns="#{bindings.EmployeesView1.hints.DepartmentId.displayWidth}"
                          shortDesc="#{bindings.EmployeesView1.hints.DepartmentId.tooltip}"
                          converter="LOVConverter"
                          id="ilov1">After that, when the user clicks the Cancel button, both methods (getAsObject and getAsString) should be invoked, and then you would be able to reset the component value (using uiComponent parameter).
    AP

Maybe you are looking for

  • Want to run an archive and install, but can't empty trash to free space

    I don't know where to begin... at some point recently something caused problems with several applications, so after trying to repair permissions and repair disk with no luck, I decided to archive & install. Now I want the old problems back: Word/Exce

  • How do I delete an empty icon page on my iPhone

    I have somehow inserted an empty icon page ahead of my normal first page of icons on my iPhone 5. iTunes shows the page at the end of the others, but even after syncing, the empty page is at the beginning, ahead of my search page. Does anyone know ho

  • No information in Shared Calendar but can see in Scheduling Assistant

    I have always been able to see a co-worker's calendar under my "Shared Calendars" list (full details).  However, now when I select that calendar, nothing appears.  But, if I try to schedule a meeting with him, I can see his free/busy information in S

  • Is it possible to scale a text box by % but also transform the contents?

    Is it possible to scale a text box by % but also transform the contents? Object > Transform > Scale only transforms the box. Grabbing and dragging a corner while holding shift/ctrl is not accurate enough. Thanks

  • CS4 crashes on almost every close

    I'm using Premiere CS4 on Mac OS X 10.6.2 with a Macbook.  Everytime I close Premiere after doing an export, I get a message that it has crashed.  The message is from Premiere and not Mac OS X.  It doesn't seem to affect anything. Do other Mac users