GUI Command Assignment

I read the article about Java ME Guideline: GUI Command Assignment at this url:
http://developers.sun.com/mobility/reference/techart/design_guidelines/command_assignment.html
However, at solution description, it is suggested that "ad-hoc GUI library implemented on top of a standard Canvas object". I do not understand why "on top of Canvas object"? Since the problem roots from the implementation of MIDP high level UI components like Items or Screen, the ad-hoc GUI library should reside on top of the MIDPhigh level GUI components like ALert, List,Form, or Textbox, instead of low level component like Canvas object.
Please correct me if i am wrong, and thanks a lot for your help.

The problem is that the high level GUI cannot be customized to look exactly like you would want it to, and there's no way to change this.
So, in order to create an application that will look the same on many different devices, you have to write your own GUI library which will be customizable and exactly to your liking. To ensure this, you have to draw all the components yourself, using only the standard drawing methods of the Graphics class.
Unlike the high level screens, the Canvas class gives you a way to draw directly on the display, using an instance of Graphics.

Similar Messages

  • Maintenance Optimizer - Support user Frontend GUIs not assigned

    Hello!
    I am trying to patch our Solman 7.1 system from SPS08 to SPS12.
    In Maintenance Optimizer, step 2, I got the following errors:
    System <SID>: Installed Product Instance SAP SOLUTION MANAGER 7.1 Support user Frontend GUIs not assigned!
    System <SID>: Installed Product Instance SAP SOLUTION MANAGER 7.1 Business user Frontend GUIs not assigned!
    System <SID>: Installed Product Instance SAP SOLUTION MANAGER 7.1 Wily Introscope not assigned!
    System <SID>: Installed Product Instance SAP SOLUTION MANAGER 7.1 Agents for managed systems not assigned!
    In LMDB, I should mark Support user Frontend GUIs etc as relevant?
    But I do not see where I could do that.
    Thanks in advance for any pointers!
    Mingzuo

    Verification results for both of our Solman systems: green

  • Administration of Queues (GUI / command line)

    hi *,
    since i am working with JMQ now for a few weeks one thing bothers me most about the software....
    i could not find out since now if there is any administration GUI / command line interface that enables me to do very typical things in one tool:
    create / delete queues
    create / delete messages
    look into messages & properties
    etc...
    is there any or am i missing the point? how do several customers deal with this issue?
    regards chris

    First, thanks to you both for spending your time writing a response.
    We really wouldn't need this in production, this is more for testing each step of our translations.
    We actually do most of our IQmanager management through stcmsctrlutil.exe, though I do know we were looking at the management console through JCAPS as maybe an alternate solution for working with OpenMQ (it turned out to not be the case, and didn't research it any further). We weren't using the JMS API for OpenMQ to test any of the JMS functionalities.
    We haven't really thought of dumping or teeing the messages to put them back in the system (though we have had to do that before in our old SRE system in production, it was a mess). What I'm doing through scripts is pulling a message off at each JMS destination (after every translation) and storing it in a folder. I do the same for our old system (we're migrating from SRE --> JCAPS 6) and comparing the XML to make sure the translations are identical. We're a pretty small team, so we don't use any products like LISA or any testing suites, just a bunch of homegrown tools that do exactly what we need.
    It sounds like the private API will give us the needed functionality.
    When we're not on such a tight deadline for regression testing, I'll sit down and re-do all of the regression tools to work with OpenMQ, even if I have to change everything to queues, develop it using more JCAPS components (for pulling messages off and dumping them to the file system), or even use the unsupported API. Until then, we'll just do our unit testing on IQManager and our load testing on OpenMQ.
    big thanks from my team at Yum,
    --Adam                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

  • Is it possible to deactivate SAP GUI command line?

    Is it possible to deactivate SAP GUI command line using ABAP?
    What about create session button, is it also possible to be deactivated?
    THANK YOU very much ABAP Gurus..

    check this thread for hiding the command box
    Re: Hide the command box in sap gui

  • Preprocessor command, assigned the variable and then compare the variable to int. How can I get around this?

    #define ON 1
    #define OFF 0
    in seperate code
    int variable = ON;
    variable is globally define for that module.
    in seperate code
    if (variable == ON)
    the complier errors off on the if (variable==ON)
    My guess variable is variable in of type int and ON is a preprocessor command. Therefore it is a mismatch and complier doesn't like it. How can I get around this.
    thank
    Mahen

    Mahen
    What is the exact message of the compiler?
    I think the error is, that the compiler does not find the definition of ON
    and OFF. Is it in the same source file?
    If not, try to put it into an .h file and include it where you need it.
    Stephan
    "Mahen" schrieb im Newsbeitrag
    news:[email protected]..
    > Preprocessor command, assigned the variable and then compare the
    > variable to int.
    >
    > How can I get around this?
    >
    > #define ON 1
    > #define OFF 0
    > in seperate code
    >
    > int variable = ON;
    > variable is globally define for that module.
    > in seperate code
    > if (variable == ON)
    > {
    >
    >
    > }
    >
    > the complier errors off on the if (variable==ON)
    > My guess variable is variable in of type int and ON is a preprocessor
    > c
    ommand. Therefore it is a mismatch and complier doesn't like it. How
    > can I get around this.
    > thank
    > Mahen

  • Key Commands - Assignment not working?

    I'm trying to add key commands to have everything 'at hand' but they get listed and don't work.
    Example:
    I open key commands, search for 'automation', select "View Track Automation" and assign it 'Control + T'. It's in there, it is also in the arrange window's view menu. But when I type 'Control + T' nothing happens.
    Still works in the pull down menu.
    Am I missing something?

    Im having a similar problem. i assign apple space to the 'play from beginning' command but it doesnt work. im following the instructions in a the martin sitter logic pro book so i dont believe im doing it wrong.
    if it was already assigned to something else then why would it let you assign it to a different command?
    anyhow, its clearly not in my case - when i press the keys all that happens is the cursors toggles to scissors. in fact it does that when only press the apple key. So its just ignoring my assignment, is it?
    of course, i know it doesnt 'ignore' it in the irrational sense i imply - there must be a reason. i want to know what it is.

  • Commands assignment to Images

    Hi
    I have notived that in 2004s that the new Button Group web Item allows the user to assign commands. eg: Bookmark. It does however not allow the user to assign an image instead of a Button. Yes, my client wants an image rather than a button.
    It is also possible to insert an image however I have not been able to assign a command to an image. One of the configurable attributes of the Image is "onclick"
    I was wondering if it is possible to assign a command to this attribute?
    I have tried unsuccessfully to generate the code for bookmarking using the "script" menu item and then assigned this javascript to the image "onclick" attribute however this has not worked.
    If anyone has used this functionality I would appreciate your input.
    The following code is generated from the script meu item for Bookmark.
    function Bookmark(currentState, defaultCommandSequence)
    var commandSequence = new sapbi_CommandSequence();
    //Create a new object of type sapbi_Command with the command named "EXPORT"
    var commandEXPORT_1 = new sapbi_Command( "EXPORT" );
    //End command commandEXPORT_1
    //Add the command to the sequence
    commandSequence.addCommand( commandEXPORT_1 );
    //Create a new object of type sapbi_Command with the command named "SAVE_BOOKMARK"
    var commandSAVE_BOOKMARK_2 = new sapbi_Command( "SAVE_BOOKMARK" );
    //End command commandSAVE_BOOKMARK_2
    //Add the command to the sequence
    commandSequence.addCommand( commandSAVE_BOOKMARK_2 );
    //Send the command sequence to the server
    return sapbi_page.sendCommand( commandSequence );
    I have assigned the javascript function to the onclick attribute and it is not currently working?
    Does anyone have any ideas on how I can realise my clients business requirement?
    Thanks in advance!

    Fortunately I have found the solution:
    The XHTML is as follows:
    <!--
    <p >
                    <img onclick="executeJS_SAVE_BOOKMARK_XSLT120( )" alt="Bookmark" src="bwmimerep:///sap/bw/Mime/BEx/Icons/bookmark.gif" border="0" />
                </p>
                <p >
                    <bi:SCRIPT_ITEM name="SAVEBOOKMARK" designwidth="300" designheight="70" >
                        <bi:SCRIPT value="biLargeData:3OPOSR8V8QD28TPCWD4GII60G" />
                    </bi:SCRIPT_ITEM>
                </p>
            </body>
        </html>
    </bi:bisp>
    -->
    <b>Please note that the executeJS_SAVE_BOOKMARK_XSLT120( ) is taken from the javascrript generated from the script item:</b>
    The javascript from my script item is as follows:
    function executeJS_SAVE_BOOKMARK_XSLT120( currentState, defaultCommandSequence ){
         //Note: information can be extracted using the parameter 'currentState'
         //     and 'defaultCommandSequence'. In either case create your own object
         //     of type 'sapbi_CommandSequence' that will be sent to the server.
         //     To extract specific values of parameters refer to the following
         //     snippet:
         //          var key = currentState.getParameter( PARAM_KEY ).getValue();
         //          alert( "Selected key: " + key );
         //     ('PARAM_KEY' refers to any parameter's name)
         //Create a new object of type sapbi_CommandSequence
         var commandSequence = new sapbi_CommandSequence();
         //Create a new object of type sapbi_Command with the command named "SAVE_BOOKMARK"
         var commandSAVE_BOOKMARK_1 = new sapbi_Command( "SAVE_BOOKMARK" );
         //End command commandSAVE_BOOKMARK_1
         //Add the command to the sequence
         commandSequence.addCommand( commandSAVE_BOOKMARK_1 );
         //Send the command sequence to the server
        return sapbi_page.sendCommand( commandSequence );
    Message was edited by:
            Ian Carbonel
    Message was edited by:
            Ian Carbonel

  • FMLE GUI/Command

    Hello,
    I am looking for a way to load profiles in to FMLE's GUI from
    a shortcut or such... Just as one would do to run command line
    profiles but to load in the GUI. Its for an educational environment
    so the GUI is just as important as the command line feature.
    Currently I have about 11 different profiles for different
    activities and onsite and offsite connections. They are "shortcuts"
    that students just need to click on and it starts the stream. We
    were looking for the same thing but in GUI mode.
    Any Ideas?

    You can pass profile path in GUI mode as well using /p
    option. Ex.
    >FlashMediaLiveEncoder.exe /p <XML Profile Path>
    This will launch FMLE GUI with given profile. So you can
    create batch files to launch FMLE with given profile.

  • Please Help - Need Help with Buttons for GUI for assignment. URGENT!!

    Can someone please help me with the buttons on this program? I cannot figure out how to get them to work.
    Thanks!!!
    import java.awt.*;
    import java.awt.event.*;
    import java.text.NumberFormat;
    import javax.swing.*;
    import javax.swing.JButton;
    public class InventoryTAH implements ActionListener
        Maker[] proMaker;
        JTextField[] fields;
        NumberFormat nf;
        public void actionPerformed(ActionEvent e)
            int index = ((JComboBox)e.getSource()).getSelectedIndex();
            populateFields(index);
        public static void main(String[] args)
            try
                UIManager.setLookAndFeel(
                        "com.sun.java.swing.plaf.windows.WindowsLookAndFeel");
            catch (Exception e)
                System.err.println(e.getClass().getName() + ": " + e.getMessage());
            InventoryTAH test = new InventoryTAH();
            test.initMakers();
            test.showGUI();
            test.populateFields(0);
        private void initMakers() {
            proMaker = new Maker[10];
            proMaker[0] = new Maker( 1, "Pens",1.59,100,"Bic");
            proMaker[1] = new Maker( 2, "Pencils", .65, 100,"Mead");
            proMaker[2] = new Maker( 3, "Markers", 1.29, 100,"Sharpie");
            proMaker[3] = new Maker( 4, "Paperclips", 1.19, 100,"Staples");
            proMaker[4] = new Maker( 5, "Glue", .85, 100,"Elmer's");
            proMaker[5] = new Maker( 6, "Tape", .50, 100,"3m");
            proMaker[6] = new Maker( 7, "Paper", 1.85, 100,"Mead");
            proMaker[7] = new Maker( 8, "Stapler", 2.21, 100,"Swingline");
            proMaker[8] = new Maker( 9, "Folders", .50, 100,"Mead");
            proMaker[9] = new Maker( 10, "Rulers", .27, 100,"Stanley");      
          int maxNum = 10;
          int currentNum = 0;
          int currentInv = 0;
             Action firstAction = new AbstractAction("First")
              public void actionPerformed(ActionEvent evt)
                   currentInv = 0;
                   int populateFields;
          JButton firstButton = new JButton(firstAction);
          Action previousAction = new AbstractAction("Previous")
              public void actionPerformed(ActionEvent evt)
                   currentInv--;
                   if (currentInv < 0)
                        currentInv = maxNum - 1;
                   int populateFields;
          JButton previousButton = new JButton(previousAction);
          Action nextAction  = new AbstractAction("Next")
              public void actionPerformed(ActionEvent evt)
                   currentInv++;
                   if (currentInv >= currentNum)
                        currentInv = 0;
                  int populateFields;
          JButton nextButton = new JButton(nextAction);
          Action lastAction = new AbstractAction("Last")
              public void actionPerformed(ActionEvent evt)
                   currentInv = currentNum - 1;
                   int populateFields;
          JButton lastButton = new JButton(lastAction);
              JPanel buttonPanel = new JPanel( );
        private void showGUI() {
            JLabel l;
            JButton button1;
                JButton button2;
            fields = new JTextField[8];
            JFrame f = new JFrame("Inventory");
            Container cp = f.getContentPane();
            cp.setLayout(new GridBagLayout());
            cp.setBackground(UIManager.getColor(Color.BLACK));
            GridBagConstraints c = new GridBagConstraints();
            c.gridx = 0;
            c.gridy = GridBagConstraints.RELATIVE;
            c.gridwidth = 1;
            c.gridheight = 1;
            c.insets = new Insets(2, 2, 2, 2);
            c.anchor = GridBagConstraints.EAST;
            cp.add(l = new JLabel("Item Number:", SwingConstants.CENTER), c);
            l.setDisplayedMnemonic('a');
            cp.add(l = new JLabel("Item Name:", SwingConstants.CENTER), c);
            l.setDisplayedMnemonic('b');
            cp.add(l = new JLabel("Number of Units in Stock:", SwingConstants.CENTER), c);
            l.setDisplayedMnemonic('c');
            cp.add(l = new JLabel("Price per Unit: $", SwingConstants.CENTER), c);
            l.setDisplayedMnemonic('d');
            cp.add(l = new JLabel("Total cost of Item: $", SwingConstants.CENTER), c);
            l.setDisplayedMnemonic('e');
            cp.add(l = new JLabel("Total Value of Merchandise in Inventory: $", SwingConstants.CENTER), c);
            l.setDisplayedMnemonic('f');
            cp.add(l = new JLabel("Manufacturer:", SwingConstants.CENTER), c);
            l.setDisplayedMnemonic('g');
            cp.add(l = new JLabel("Restocking Fee: $", SwingConstants.CENTER), c);
            l.setDisplayedMnemonic('h');
                c.gridx = 1;
            c.gridy = 0;
            c.weightx = 1.0;
            c.fill = GridBagConstraints.HORIZONTAL;
            c.anchor = GridBagConstraints.CENTER;
            cp.add(fields[0] = new JTextField(), c);
            fields[0].setFocusAccelerator('a');
            c.gridx = 1;
            c.gridy = GridBagConstraints.RELATIVE;
            cp.add(fields[1] = new JTextField(), c);
            fields[1].setFocusAccelerator('b');
            cp.add(fields[2] = new JTextField(), c);
            fields[2].setFocusAccelerator('c');
            cp.add(fields[3] = new JTextField(), c);
            fields[3].setFocusAccelerator('d');
            cp.add(fields[4] = new JTextField(), c);
            fields[4].setFocusAccelerator('e');
            cp.add(fields[5] = new JTextField(), c);
            fields[5].setFocusAccelerator('f');
            cp.add(fields[6] = new JTextField(), c);
            fields[6].setFocusAccelerator('g');
            cp.add(fields[7] = new JTextField(), c);
            fields[7].setFocusAccelerator('h');
            c.weightx = 0.0;
            c.fill = GridBagConstraints.NONE;
              cp.add(firstButton);
              cp.add(previousButton);
              cp.add(nextButton);
              cp.add(lastButton);
                          JComboBox combo = new JComboBox();
            for(int j = 0; j < proMaker.length; j++)
                combo.addItem(proMaker[j].getName());
            combo.addActionListener(this);
                cp.add(combo);
                cp.add(button1 = new JButton("   "), c);
            f.pack();
            f.addWindowListener(new WindowAdapter()
                public void windowClosing(WindowEvent evt)
                    System.exit(0);
            f.setVisible(true);
      private void populateFields(int index) {
            Maker maker = proMaker[index];
            fields[0].setText(Long.toString(maker.getNumberCode()));
            fields[1].setText(maker.getName());
            fields[2].setText(Long.toString(maker.getUnits()));
            fields[3].setText(Double.toString(maker.getPrice()));
            fields[4].setText(Double.toString(maker.getSum()));
            fields[5].setText(Double.toString(maker.totalAllInventory(proMaker)));
            fields[6].setText(maker.getManufact());
            fields[7].setText(Double.toString(maker.getSum()*.05));       
    class Maker {
        int itemNumber;
        String name;
        int units;
        double price;
        String manufacturer;
        public Maker(int n, String name, double price, int units, String manufac) {
            itemNumber = n;
            this.name = name;
            this.price = price;
            this.units = units;
            manufacturer = manufac;
        public int getNumberCode() { return itemNumber; }
        public String getName() { return name; }
        public int getUnits() { return units; }
        public double getPrice() { return price; }
        public double getSum() { return units*price; }
        public String getManufact() { return manufacturer; }
        public double totalAllInventory(Maker[] makers) {
            double total = 0;
            for(int j = 0; j < makers.length; j++)
                total += makers[j].getSum();
            return total;
    }}

    // I have made some modifications. Please try this.
    import java.awt.*;
    import java.awt.event.*;
    import java.text.NumberFormat;
    import javax.swing.*;
    import javax.swing.JButton;
    public class InventoryTAH implements ActionListener
    Maker[] proMaker;
    JTextField[] fields;
    NumberFormat nf;
    int currentInv = 0;
    public void actionPerformed(ActionEvent e)
    currentInv= ((JComboBox)e.getSource()).getSelectedIndex();
    populateFields(currentInv);
    public static void main(String[] args)
    try
    UIManager.setLookAndFeel(
    "com.sun.java.swing.plaf.windows.WindowsLookAndFeel");
    catch (Exception e)
    System.err.println(e.getClass().getName() + ": " + e.getMessage());
    InventoryTAH test = new InventoryTAH();
    test.initMakers();
    test.showGUI();
    test.populateFields(0);
    private void initMakers() {
    proMaker = new Maker[10];
    proMaker[0] = new Maker( 1, "Pens",1.59,100,"Bic");
    proMaker[1] = new Maker( 2, "Pencils", .65, 100,"Mead");
    proMaker[2] = new Maker( 3, "Markers", 1.29, 100,"Sharpie");
    proMaker[3] = new Maker( 4, "Paperclips", 1.19, 100,"Staples");
    proMaker[4] = new Maker( 5, "Glue", .85, 100,"Elmer's");
    proMaker[5] = new Maker( 6, "Tape", .50, 100,"3m");
    proMaker[6] = new Maker( 7, "Paper", 1.85, 100,"Mead");
    proMaker[7] = new Maker( 8, "Stapler", 2.21, 100,"Swingline");
    proMaker[8] = new Maker( 9, "Folders", .50, 100,"Mead");
    proMaker[9] = new Maker( 10, "Rulers", .27, 100,"Stanley");
         int maxNum = 10;
         int currentNum = 0;
    Action firstAction = new AbstractAction("First")
              public void actionPerformed(ActionEvent evt)
                   currentInv = 0;
                   populateFields(currentInv);
         JButton firstButton = new JButton(firstAction);
         Action previousAction = new AbstractAction("Previous")
              public void actionPerformed(ActionEvent evt)
                   currentInv--;
                   if (currentInv < 0)
                        currentInv = maxNum - 1;
                   populateFields(currentInv);
         JButton previousButton = new JButton(previousAction);
         Action nextAction = new AbstractAction("Next")
              public void actionPerformed(ActionEvent evt)
                   currentInv++;
                   if (currentInv >= maxNum)
                        currentInv = 0;
              populateFields(currentInv);
         JButton nextButton = new JButton(nextAction);
         Action lastAction = new AbstractAction("Last")
              public void actionPerformed(ActionEvent evt)
                   currentInv = maxNum-1;
                   populateFields(currentInv);
         JButton lastButton = new JButton(lastAction);
              JPanel buttonPanel = new JPanel( );
    private void showGUI() {
    JLabel l;
    JButton button1;
              JButton button2;
    fields = new JTextField[8];
    JFrame f = new JFrame("Inventory");
    Container cp = f.getContentPane();
    cp.setLayout(new GridBagLayout());
    cp.setBackground(UIManager.getColor(Color.BLACK));
    GridBagConstraints c = new GridBagConstraints();
    c.gridx = 0;
    c.gridy = GridBagConstraints.RELATIVE;
    c.gridwidth = 1;
    c.gridheight = 1;
    c.insets = new Insets(2, 2, 2, 2);
    c.anchor = GridBagConstraints.EAST;
    cp.add(l = new JLabel("Item Number:", SwingConstants.CENTER), c);
    l.setDisplayedMnemonic('a');
    cp.add(l = new JLabel("Item Name:", SwingConstants.CENTER), c);
    l.setDisplayedMnemonic('b');
    cp.add(l = new JLabel("Number of Units in Stock:", SwingConstants.CENTER), c);
    l.setDisplayedMnemonic('c');
    cp.add(l = new JLabel("Price per Unit: $", SwingConstants.CENTER), c);
    l.setDisplayedMnemonic('d');
    cp.add(l = new JLabel("Total cost of Item: $", SwingConstants.CENTER), c);
    l.setDisplayedMnemonic('e');
    cp.add(l = new JLabel("Total Value of Merchandise in Inventory: $", SwingConstants.CENTER), c);
    l.setDisplayedMnemonic('f');
    cp.add(l = new JLabel("Manufacturer:", SwingConstants.CENTER), c);
    l.setDisplayedMnemonic('g');
    cp.add(l = new JLabel("Restocking Fee: $", SwingConstants.CENTER), c);
    l.setDisplayedMnemonic('h');
              c.gridx = 1;
    c.gridy = 0;
    c.weightx = 1.0;
    c.fill = GridBagConstraints.HORIZONTAL;
    c.anchor = GridBagConstraints.CENTER;
    cp.add(fields[0] = new JTextField(), c);
    fields[0].setFocusAccelerator('a');
    c.gridx = 1;
    c.gridy = GridBagConstraints.RELATIVE;
    cp.add(fields[1] = new JTextField(), c);
    fields[1].setFocusAccelerator('b');
    cp.add(fields[2] = new JTextField(), c);
    fields[2].setFocusAccelerator('c');
    cp.add(fields[3] = new JTextField(), c);
    fields[3].setFocusAccelerator('d');
    cp.add(fields[4] = new JTextField(), c);
    fields[4].setFocusAccelerator('e');
    cp.add(fields[5] = new JTextField(), c);
    fields[5].setFocusAccelerator('f');
    cp.add(fields[6] = new JTextField(), c);
    fields[6].setFocusAccelerator('g');
    cp.add(fields[7] = new JTextField(), c);
    fields[7].setFocusAccelerator('h');
    c.weightx = 0.0;
    c.fill = GridBagConstraints.NONE;
              cp.add(firstButton);
              cp.add(previousButton);
              cp.add(nextButton);
              cp.add(lastButton);
                        JComboBox combo = new JComboBox();
    for(int j = 0; j < proMaker.length; j++)
    combo.addItem(proMaker[j].getName());
    combo.addActionListener(this);
              cp.add(combo);
              cp.add(button1 = new JButton(" "), c);
    f.pack();
    f.addWindowListener(new WindowAdapter()
    public void windowClosing(WindowEvent evt)
    System.exit(0);
    f.setVisible(true);
    private void populateFields(int index) {
    Maker maker = proMaker[index];
    fields[0].setText(Long.toString(maker.getNumberCode()));
    fields[1].setText(maker.getName());
    fields[2].setText(Long.toString(maker.getUnits()));
    fields[3].setText(Double.toString(maker.getPrice()));
    fields[4].setText(Double.toString(maker.getSum()));
    fields[5].setText(Double.toString(maker.totalAllInventory(proMaker)));
    fields[6].setText(maker.getManufact());
    fields[7].setText(Double.toString(maker.getSum()*.05));
    class Maker {
    int itemNumber;
    String name;
    int units;
    double price;
    String manufacturer;
    public Maker(int n, String name, double price, int units, String manufac) {
    itemNumber = n;
    this.name = name;
    this.price = price;
    this.units = units;
    manufacturer = manufac;
    public int getNumberCode() { return itemNumber; }
    public String getName() { return name; }
    public int getUnits() { return units; }
    public double getPrice() { return price; }
    public double getSum() { return units*price; }
    public String getManufact() { return manufacturer; }
    public double totalAllInventory(Maker[] makers) {
    double total = 0;
    for(int j = 0; j < makers.length; j++)
    total += makers[j].getSum();
    return total;
    }}

  • PUZZLER: How to assign the TAB key to a key command

    For the past 11 years I've had the TAB key assigned to "record toggle". But in L8 I can't seem to make this k/command assignment occur... Even when the learn function is activated in the k/commands window, whenever I hit the TAB key to assign it to the currently highlighted key command, it simply changes the focus of the cursor, moving it from the highlighted command to the search field.
    Looking for a clue... anyone?

    do you remember losing the function keys when tiger came out?
    Yeah, I remember losing F14 and F15. They still don't work. But I've since figured out that those keys are reserved for adjusting the brightness on various Apple laptops, and I think also some other models. However, it doesn't apply to someone like, er, um, me who has a desktop-model Mac and a 3rd-party monitor which doesn't have a brightness control that responds to... you guessed it, F14 and F15. So those keys are dead, 'cept for my modifier key variants.
    I tried importing my L7 prefs and sure enough, my L7 TAB assignment worked just fine. But I quickly reverted to my saved L8 prefs cuz I didn't want to take a chance of corrupting something or other because of an "illegal" key command assignment.
    So I guess it's time to find another key for "record toggle". TAB is going to be an 11 year-old habit that's gonna die hard, I can tell...

  • High GUI time in ST03

    I found high GUI time in ST03.
    Example: In last minute's load --> workload overview -->
    Start of interval  27.10.2008  07:43:00
    End of interval    27.10.2008  07:58:00
    Time period        0   Day(s)  00:15:01
    I found 1280ms Roll wait time and 1280 GUI time. It seems too high. How can I find what cause it? how can I locate the root case?
    Please advise. Thanks so much.
    James

    Hi,
    Here are the few things to check when the GUI time is high.
    1. Check in ST03--> Transaction Profile the Tx SESSION_MANAGER may be on top id yes, the load caused by the transaction SESSION_MANAGER, combined with the high roll in + wait time could indicate that the SAP Easy Access menu might not be configured correctly and should be tuned to improve overall response times. It is also possible that your users have been assigned disproportionately large user menus. We advise you to ensure there are a reasonable number of entries (nodes) in the User Menu.
    Generally, its recommended that users should have no more than 1000 and as an absolute maximum 2000 menu nodes configured, (for comparison, the complete SAP menu contains 70,000 entries).  A high number of entries may lead to high memory consumption on the server and to long response times for the menu. Refer to SAP Notes 203617 and 203994 for details
    2. ST06 --> Detail Analysis Menu --> Lan check by Ping with more than 10 Presentation
    servers.
    See the Average and Loss coloumn and check wether is there any problem exits.
    However, review the following recommendations to identify any network issues. Given below are the response times which are thresholds for a good network performance.
    Recommendation: Characteristic response times are:
    -  In a local area network (LAN) : <20 milliseconds
    -  In a "fast" Wide Area Network (WAN) (for example, 256 or 384 KBit/sec):   < 50 milliseconds
    -  In a "slow" wide area network (WAN) (For example, 128 KBit/sec or less): < 250 milliseconds
    -  Losses of data packets ("Loss") should not occur at all.
    Review SAP Notes 203924 (under subheading 'General Performance Analysisu2019), 8963 and 578118 for further information on SAP GUI and response time components.
    In case of long response times due to performance problems in the network (in particular when using SAPGUI in WAN), you should use configuration "Low Speed Connection" in SAPLOGON. As a result, menus are only transferred on request, and the quantity of the transferred data is reduced correspondingly. This measure reduces the network load significantly. You can find this setting option under: SAPLOGON -> PROPERTIES -> ADVANCED.
    Option for a low speed connection:
    On a low speed connection (LSC) to the network, the benefits of the improved interaction design may be outweighed by increased response times due to the heavier network traffic. To counterbalance this effect, SAP has introduced the option for a low speed connection to the network in Release 4.6. A flag can be set in the options of an SAP logon connection item or on the SAP GUI command line. This action has the following effects:
    -  Menus are loaded only on demand as before
    -  Background Bitmaps are not transferred (depending on the application)
    -  The list control transfers only the lines that are visible on the screen
    -  The application can query the flag to react to the network condition individually.
    Examine the following SAP Notes and verify that the SAP recommendations contained are fully implemented:
    -  SAP Note Number 161053   Low Speed Connection is in use
    -  SAP Note Number 164102   Network load between application servers +camera front end
    -  SAP Note Number   62418   Network Load of SAPGUI Frontend Communication (Required Bandwidth).
    Please let me know if the performance improves.
    Thank you,
    Tilak

  • Feedback on use of incubator command pattern

    Hi,
    We are currently prototyping some different solutions using coherence incubator (namely command pattern) and are looking for some feedback as to the viability and potential improvements to the solution.
    h3. Summary of Prototype
    The prototype does the following (i have a nice sequence diagram for this but don't see a way to attach it :():
    + client (e.g. through coherence extend) calls local api to save a "message" for a particular account (e.g. Account id = 1234). This calls namedcache.put and inserts an entry into the cache.
    + BackingMapListener is configured for the cache into which the client indirectly inserts. In the prototype this is a spring bean that extends AbstractMultiplexingBackingMapListener - which is fully "loaded" with all the required dependencies for the processing of the message (services, etc.).
    + The listener then registers a new context (using ContextManager) using a "grouping" id based on the sequence/ordering requirements. For example, say that each message against an account needs to be processed in order. The context would get instantiated with name = "1234", so that subsequent requests for account 1234 will get queued against the context with the same name whilst the previous request(s) are still processing. Messages for other accounts would register a different context name so they will get simultaneously processed.
    NB: The functionality of this listener can be paralleled to the sample in CommandPatternExample for one submission. I am not entirely clear where command submissions typically "tie-in" but I am planning to kick them off from a backingmaplistener. I briefly explored using the 'com.oracle.coherence.common.events.dispatching.listeners.DelegatingBackingMapListener' to dispatch the commands but not entirely how this would tie in. As I understand it the delegating backingmaplistener is used within the 'liveobjects' context and dispatches entries that implement the LifecycleAwareEntry but not sure how we would create "custom-contexts" as we require (i.e. the identifier is not for the key of the cache entry but rather a subset of that -e.g. account id versus account message id).
    + A command is then created to process the account message, which is comprised of
    - the Account which needs processed (the value of the backing map listener contains the Account itself)
    - Any components that are required during processing (services, daos, etc - service might itself be injected with daos, etc.)
    + The newly instantiated command is then then submitted to the CommandSubmitter for the appropriate contextIdentifer (the one returned by 1234 in our example).
    From some basic tests, the prototype is behaving as I desire - i.e. it queues and "synchronizes" the commands for the same context and also simultaneously processes commands assigned to different contexts asynchronously. That's great.
    However, there are a number of things I am exploring for the actual implementation. I believe most of these are typical concerns so I wonder if Oracle or anyone can provide some feedback from past experience/proposed recommendations:
    h3. Questions
    h4. 1. Grid/server-side Business Logic Deployment
    One of the things that has occurred to us is that ideally we would like to store the business processing logic (i.e. the heart of the processing within the command) either inside the grid or within a coherence node (i.e. made available through the classpath of the node startup).
    In our case we have a few different "processing models", but ideally the processor/command will simply determine the appropriate control flow (i.e. within the command - or maybe the appropriate lifecycle if we end up using that) and associated business logic off the attributes of the object to be processed. I am not sure if our use case is typical, but to be clear we have a fair bit of business logic to be performed within the 'command', each in separate modules. In implementation, most modules will be interacting with the grid for lookups, etc. but ideally that will be abstracted from the Processor/Command which will only know that it is using an 'accountService' - for e.g.
    Currently the business logic is "loaded" into the listener and "passed on" to the command through composition. Ideally we ant the command would be light-weight and the various "processing models" would either:
    a) be deployed to each node and somehow "available" to the command during execution. Would need to work out how this would be come available to the execution environment; perhaps each 'Context' would wrap the processing details. However, even this is a bit too granular as likely a processing model will apply to many contexts.
    b) Perhaps the business logic/processing components are deployed to the cache itself. Then within the command attributes on the object would be consulted to determine which processing model to "apply" and a simple lookup could return the appropriate control flow/processor(s).
    c) Perhpaps the different logic/flow is embedded in a different "lifecycle" for the event processing and the appropriate lifecycle is detected by the listener and appropirately applied. Even with such a model we'd still like the various processing for each phase to be maintained in the server if possible.
    Has anyone else done something like this and/or are there any thoughts about deploying the business logic to the grid this way? I see advantages/disadvantages with the different solutions, and some of them seem better for upgrades. For example if you upgrade the processing logic whilst requests are still coming in (clearly you would attempt to avoid this) and it is embedded into each node, what would happen if one node has been upgraded and a request comes to that node. Say one of the business logic modules performs a query against the cache which needs to consult another node (e.g. assuming you're using partitioned data) and that node has not received the upgrade and there's a conflict. In that regard perhaps deploying the different processing logic to a replicated cache makes more sense because once updated it should get pushed immediately to all nodes?
    Are these known concerns? I'm new to grid-side processing concepts so just correct me if there's an obvious issue with tis.
    h4. 2. Cleanup/Management of contexts
    One thing I noticed on my prototype is that the context's that I create don't really go away. We are envisioning creating Many context per day (let's just say a few hundred million to be safe)
    so ...
    a) how do people normally remove the contexts? Does the command framework sort this out behind the scenes? I can see the 'stop' method on the CommandExecutor removing the context, but from a quick follow-through the only scenario which seems to potentially call this is if the context version number has changed. Is there some way to change the version when we submit additional commands to the same context?
    b) Is there an issue with creating this many Contexts? As per earlier mention, to reduce overhead ideally the context will not be too heavy but any thoughts on our intended usage? We could use something like a hashing scheme to "bucket" the requests to contexts to reduce the total number of Contexts if required but this is not ideal.
    h4. 3. Creation of new Command Every time.
    In our scenario, each command needs to act upon a given object (e.g. one account). As I see it, this requires us to create a new Command for each message, because I do not see a way to 'pass in' the object to the execute method. Setting it to the context does not work either because we need to queue a few requests to each given context; I played with wrapping the object with GenericContext and setting the value but in reality we're submitting the commands whilst others are currently being processed so I don't see how this could work.
    Any thoughts on this? Do you agree we'll have to create a new command for every message to be processed? We'll likely have millions of Commands per day so this will make a difference for us (although if we eliminate the logic from q#1 or the dependencies are singletons it's not a big deal)
    h4. 4. Concurrency guarantees with the commandpattern
    I also want to confirm my understanding of concurrency controls around the command pattern. Unlike an entry processor which controls updates to the entry upon which it was invoked, the command pattern only guarantees concurrency against processing occuring within the context of the currently operating command. Commands submitted to the same context will be processed synchronously but any entries which may have had a listener which spawned the command submission are in no way guarded. This latter point is pretty obvious I believe since there's no real link but I just want to make sure my assumptions are correct.
    NB: in the scenario I am describing we do NOT need to update the original cache entry into which the account message was submitted. Instead other caches will be updated with results from additional processing logic so this is not that much of an issue for us.
    h4. 5. Confirmation of concerns with "straight" entry processor
    If we were to use a "straight" entry processor (versus command pattern which uses entry processor) which gets kicked off from a threadpool on a backing map listener (for example on insert or update), is it true that if a node were to go down, we would have issues with failover? NB: The reason we would kick off the entry processor from a threadpool would be to "simulate" asynchronous processing. As I see it, if we kicked off a thread on the listener and returned back to the client, nothing would "re-submit" the request if a node goes down. Is that correct?
    ALTERNATIVELY, As I understand it, with an entry processor invoked from a client, it is the client coherence jar that receives the exception when a node goes down mid-process and the coherence jar takes care of "re-sending" the request to another node. So - if the threadpool is managed by the client and the client kicks off an invoke in one of the threads - then I believe the client WILL re-submit the entry processor requests if the node goes down - through the coherence jar/extend - not sure on the details but my point is that the client application does not have to provide any code for the "failover" but the coherence client jar performs this.
    h4. 6. Lifecycle
    I have not explored the "lifecycle" functionality available within the incubator - but as I understand it the main thing it could offer is that if we have many phases of the processing (as we do in most our use cases) - that the processing can be managed with the different lifecycles. NB: To be clear I am referring to 'live objects' with their own series of processing steps - not 100% if Lifecycle directly relates to 'live objects'. If a node goes down and is in the midst of processing 200,000 commands - the entire processing doesn't need to start over.. each request will need to go back to the previous completed phase of the lifecycle but may well avoid duplicated processing. All processing will need to be idempotent regardless, but lifecycles could avoid re-processing that was already complete.
    Is this correct?
    Other benefits?
    (e.g. configurable processing logic as alluded to in Q#1).
    Thanks very much
    Edited by: 822486 on 21-Dec-2010 16:23
    Edited by: 822486 on 21-Dec-2010 16:59

    Hi User 822486,
    When delving into a detailed prototype like the one you have below it's often useful to understand the use cases and business requirements before jumping into a solution. I think it may be best for you to reach out to the Coherence organization within oracle to further discuss these questions in detail so we can better guide you in the different ways to solve problems with Coherence and the incubator. I'll do my best to comment on your prototype and address the questions that you currently have:
    NB: The functionality of this listener can be paralleled to the sample in CommandPatternExample for one submission. I am not entirely clear where command submissions typically "tie-in" but I am planning to kick them off from a backingmaplistener. I briefly explored using the 'com.oracle.coherence.common.events.dispatching.listeners.DelegatingBackingMapListener' to dispatch the commands but not entirely how this would tie in. As I understand it the delegating backingmaplistener is used within the 'liveobjects' context and dispatches entries that implement the LifecycleAwareEntry but not sure how we would create "custom-contexts" as we require (i.e. the identifier is not for the key of the cache entry but rather a subset of that -e.g. account id versus account message id).
    Command submissions are just that, submissions to the command pattern for execution and they can be triggered from anywhere since they run asynchronously. The DelegatingBackingMapListener and the associated eventing model provides you with the foundations for building an Event Driven Architecture on top of coherence. It's used by both the Push Replication Pattern as well as the Messaging Pattern which you could use as references if you wanted to go down the path of using the eventing model as well. It really comes down to your use case (which I don't have a lot of details on at the moment). An Entry that is a LifecycleAwareEntry can basically take action when it's state is changed (an event occurs). As a completely bogus example you could have a AccountMessageDispatcher object in a cache with a DelegatingBackingMapListener configured and you could submit EntryProcessors to this dispatcher that gives it a set of messages to perform for a set of accounts. The Dispatcher could then every time it's updated submit commands for execution. In essence it's formalizing an approach to responding to events on entries - or server side event driven programming.
    h2. Grid/server-side business logic deployment
    Have you looked at the processing pattern at all? It's a framework for building compute grids on top of Coherence and may have more plumbing in place for you to achieve what you're looking for. I think it may be best for us to discuss your use case in more detail to understand the pros and cons of each approach before commenting further on a solution for you.
    h2. Cleanup and Management of contexts
    Contexts are marker interfaces so they can be incredibly lightweight which should allow you to create as many of them as you need. The biggest concern is ensuring that you have enough processing power in your grid to handle the volume of work you want to manage. This should be a simple matter of figuring out your load and sizing your cluster appropriately. The initial design of the command pattern was to have a set of well established contexts that would be used repeatedly. Given that the Command Pattern is primarily an example, you could extend the DefaultContextsManager to have an unregisterContext method.
    h2. Creation of new command every time
    I'm a little confused by your requirement here. Are you saying that you have a set of pre-defined operations that you want to apply to an account for example incrementAccountBalancyBy1? If so, I don't understand why you couldn't submit the same command instance to a context multiple times. While I wouldn't recommend using statics you could have a CommandFactory that returned the same command each time you call getCommand once it was instantiated once. Usually however we expect that you'll have some additional data unique to each message that the command must execute. This could be handled by having a setter on your command for these properties.
    h2. Concurrency Guarantees
    The Command Pattern Guaranteees that for a given context commands are processed synchronously in the order they are received. If you have multiple submitters sending commands to the same context, then the order of when the commands are processed will be based on the order in which they arrive at the node where the Context resides. A context is the control point that gives commands their ordering.
    h2. Confirmation of concerns with "straight" entry processor
    I'm not sure if I follow your question here. EntryProcessors are guaranteed to execute, even in the failure scenario (this is why they're backed up and why they must be idempotent). If you're referring to processing events based on a backing map listener rather than submitting commands, it handles your processing then it's a matter of wether you're asynchronously processing the events or not. If you are synchronously processing things and your node dies while the BML is executing you're right a node failure at that point will result in "nothing happening" and the client will re-try. If however you're asynchronously handling the events from your BML, then you could lose state. This is why we use entries the way we do in the common event layer, we persist state on an entry that we can't lose when a node fails. This allows us to asynchronously process the data after the node has been updated.
    h2. Lifecycle
    With respect to lifecycle if you're referring to LifeCycleAwareEntry - this is a way of designating that an Entry in the cache can process events when modified/mutated. This may be better discussed by phone or in person.

  • Problem with Assign reference document.

    Hi all,
    I defined transaction input parameter type Xml.
    I used Reference Document Loader to load document (structure.xml) below.
    <?xml version="1.0" encoding="UTF-8"?>
    <SO_VALIDATION>
        <L4_SO_ID/>
        <L4_SOI_NO/>
        <PPC_STATUS/>
        <PPC_INFO/>
    </SO_VALIDATION>
    I used menu command Assign Reference Document, to assign above document to transaction input.
    I tryed to use this transaction in vs.net application as a web service.
    But there is no xml structure in InputParams in web service.
    I tryed alot but i did not achieve.
    What must i do?
    Thanks.

    cml_bzl,
    I'm using version 12.04 and I have not had any problems with assigning reference documents and using .NET.
    You should not have to do anyting special to get the transaction inputs to show up in .Net. To map the output I do the following:
    1. Create an output transaction variable and assign it's type as XML
    2. Using a XML document block to create and XML document for your output transaction variable
    3. Assign the XML document as the reference for the output transaction variable.
    THis works for me every time. If you change the transaction parameters, make sure you update the web service form the .NET side.
    Glenn

  • How to use 'at selection screen on exit command'

    Hi,
    How do I use the above event in the following scenario.
    Scenario: I have a report program which has two radio buttons on the selection screen to which user command is assigned. On selection one, some fields should get disappeared on the selection screen. But one of the fields is a mandatory field, which doesn't allow to proceed unless we enter some value in that(which is redundant since anyway it will be disappearing).
    I thought 'on exit command' event works, but the user command assigned to the radio button is not of type E.
    Issuing a message at selection screen instead of making the field mandatory will work, but I don't want to do that.
    Can anyone please tell me how to handle this?
    Incorrect answers will be suitably punished.
    Thanks,
    Sumanth
    Edited by: Julius Bussche on Sep 26, 2009 12:40 PM
    Silly comment suitably modified.

    do not make that field mandatory using obligatory. so now your radio button work is done.
    now, how to make the field look like and work like mandatory field on execution:
    at selection-screen output.
    loop at screen.
       if screen-name = 'P_MAN'. " lets say this is the field which you want to make mandatory.
          screen-required = 2. "this will just  put a tick mark on the input , looks like mandatory.
       endif.
    endloop.
    now, how to check the mandatory option.
    at selection-screen.
    if p_man is initial.
      display your message to fill this.
    endif.
    hope this helps...
    and as per forum rules, kindly do not encourage people by talking about forum rules.

  • Exit Command doesn't work

    Guys, I've put a few hours researching the web for code examples on how to program the Exit button on a J2ME app. It didn't help me finding out why my Exit simply doesn't work. It must be something trivial that I'm just not aware of. I would really appreciate your help analyzing the following code.
    Regards,
    Filipe
    public class BiblioMIDlet extends MIDlet implements CommandListener {
         private Display display;
         private Form gui;
         private static Command renewCommand, exitCommand;
         public BiblioMIDlet() {
              renewCommand = new Command("Renew", Command.ITEM, 1);
              exitCommand = new Command("Exit", Command.EXIT, 1);
              gui = new Form("Biblio");
              display = Display.getDisplay(this);
         protected void startApp() throws MIDletStateChangeException {
              this.showLoginForm();
         private void showLoginForm() {
              TextField user = new TextField("User", null, 9, TextField.NUMERIC);
              TextField password = new TextField("Password", null, 4, TextField.PASSWORD | TextField.NUMERIC);
              gui.append(user);
              gui.append(password);
              gui.addCommand(renewCommand);
              gui.addCommand(exitCommand);
              display.setCurrent(gui);
         protected void pauseApp() {     }
         public void commandAction(Command c, Displayable s) {
              if (c == exitCommand) {
                   destroyApp(false);
                   notifyDestroyed();
         protected void destroyApp(boolean arg0) {      }
    }

    Hai
    I think u missed to add the commandListener in your code "gui.setCommandListener(this)"
    public class BiblioMIDlet extends MIDlet implements CommandListener {
         private Display display;
         private Form gui;
         Command renewCommand, exitCommand;
         public BiblioMIDlet() {
              renewCommand = new Command("Renew", Command.ITEM, 1);
              exitCommand = new Command("Exit", Command.EXIT, 1);
              gui = new Form("Biblio");
              display = Display.getDisplay(this);
         protected void startApp() throws MIDletStateChangeException {
              this.showLoginForm();
         private void showLoginForm() {
              TextField user = new TextField("User", null, 9, TextField.NUMERIC);
              TextField password = new TextField("Password", null, 4, TextField.PASSWORD | TextField.NUMERIC);
              gui.append(user);
              gui.append(password);
              gui.addCommand(renewCommand);
              gui.addCommand(exitCommand);
    /* u missed this line of code in your program*/
              gui.setCommandListener(this);
    /* End */
              display.setCurrent(gui);
         protected void pauseApp() {     }
         public void commandAction(Command c, Displayable s) {
              if (c == exitCommand) {
                   destroyApp(false);
    { notifyDestroyed();
         protected void destroyApp(boolean arg0)      }
    regards
    jinesh

Maybe you are looking for