MIDets and their classes

Hi,
I'll say from the outset I'm not expecting a detailed answer, just some reasurence that what i ask is possible. I'm trying to write a program that uses a combination of form and canvas classes inparticular where the canvas classes are not embedded 'inner' classes but seperate. Also with the use of commands it may possible to navigate between them. I have seen a simmilar example to this except the canvas class was an 'inner' class which to my way of thinking gives rise to very long complicated code. Surely one reason for having ditinct classes is that it allows for 'the separation of concerns'. If this is possible or even normal practice I'd like to know
Regards
James

Using distinct classes is possible and it is normal practice. BTW using inner classes is normal too. In other words, feel free to use any way which feels better to you, which makes your code easier to understand.
I think you can find plenty examples of both distinct and inner classes in source code of ME SDK / WTK demo applications.

Similar Messages

  • List of variables and their classes from working script?

    I have a working script that has many variables containing finder references and file path descriptions as strings or Unicode text. It is not easy to remember what these variables refer to. Is it possible to get a listing of all of a scripts variables and their respective class?

    The only way I've seen to do this is with Script Debugger, an alternative script editor that has significant debugging tools such as breakpoints, stepping, variable inspection and more.

  • Moving buttons and their listeners to separate classes

    Hi
    I am trying to move out buttons and their listeners to separate classes, but when I do so, the program stops working. When I click on the button they dont react, probably the listeners doesent listens as the action performe prints out testprints.
    In other words, I have huge troubles with do my gui object oriented. I doesent seem to be able to move out relevant listener methods and their components to separate classes.
    Here is the code for one add button that I have tried to write in a separate class:
    import java.awt.event.ActionEvent;
    import java.awt.event.ActionListener;
    import java.sql.SQLException;
    import java.util.regex.Matcher;
    import java.util.regex.Pattern;
    import javax.swing.JButton;
    import javax.swing.JOptionPane;
    import javax.swing.JPanel;
    import se.cs.DB.DBMovie;
    import se.cs.inputvalidation.PatternsMovie;
    import se.cs.main.Main;
    import se.cs.main.MessageArea;
    public class ButtonAddMovie {
         private DBMovie init = new DBMovie();
         private ComboBoxesMovie comboBoxesMovie = new ComboBoxesMovie();
         private TextFieldsMovie textFieldsMovie = new TextFieldsMovie();
         private PatternsMovie patternsMovie = new PatternsMovie();
         private MessageArea messageArea = new MessageArea();
         private Pattern patternYear;
         private Pattern patternSection;
         private Pattern patternExFields;
         private Matcher matcherYear;
         private Matcher matcherSection;
         private Matcher matcherTotalEx;
         private Matcher matcherExIn;
         private Matcher matcherExOut;
         private String genreString;
         // Initializes the button components
         private JButton addButton = new JButton("Add");
         public ButtonAddMovie() {
              listener();
         public void listener() {
              addButton.addActionListener(new ActionListener() {
                   public void actionPerformed(ActionEvent e) {
                        addButton(e);
         public void addButton(ActionEvent e) {
              genreString = comboBoxesMovie.convertGenreIndex();
              regex();
         public void regex() {
              patternYear = Pattern.compile(patternsMovie.getYEAR_FIELD());
              patternSection = Pattern.compile(patternsMovie.getSECTION_FIELD());
              patternExFields = Pattern.compile(patternsMovie.getExFields());
              matcherYear = patternYear.matcher(textFieldsMovie.getTextYear());
              matcherSection = patternSection.matcher(textFieldsMovie.getTextYear());
              matcherTotalEx = patternExFields.matcher(textFieldsMovie
                        .getTextTotalEx());
              matcherExIn = patternExFields.matcher(textFieldsMovie.getTextExIn());
              matcherExOut = patternExFields.matcher(textFieldsMovie.getTextExOut());
              if (matcherYear.matches() && matcherSection.matches()
                        && matcherTotalEx.matches() && matcherExIn.matches()
                        && matcherExOut.matches()) {
                   messageArea.getMessageArea().setText("");
                   callInsertStatement();
                   JOptionPane.showMessageDialog(null, this.messageDialog(),
                             "Movie added", JOptionPane.INFORMATION_MESSAGE);
              else if (!matcherYear.matches()) {
                   messageArea.getMessageArea().setText(
                             "The input for year field does not match.\n"
                                       + "You have to enter 4 digits.");
              else if (!matcherSection.matches()) {
                   messageArea.getMessageArea().setText(
                             "The input for section field does not match.\n"
                                       + "You have to enter 1-4 digits.");
              else if (!matcherTotalEx.matches()) {
                   messageArea.getMessageArea().setText(
                             "The input for total ex field does not match.\n"
                                       + "You have to enter 1.");
              else if (!matcherExIn.matches()) {
                   messageArea.getMessageArea().setText(
                             "The input for ex in does not match.\n"
                                       + "You have to enter 1 digit.");
              else if (!matcherExOut.matches()) {
                   messageArea.getMessageArea().setText(
                             "The input  for ex out does not match.\n"
                                       + "You have to enter 1 digits.");
         public void callInsertStatement() {
              try {
                   init.insertStatement(textFieldsMovie.getTextTitle(),
                             textFieldsMovie.getTextYear(), genreString, comboBoxesMovie
                                       .convertGradeIndex(), textFieldsMovie
                                       .getTextSection(),
                             textFieldsMovie.getTextTotalEx(), textFieldsMovie
                                       .getTextExIn(), textFieldsMovie.getTextExOut());
              } catch (SQLException ex) {
                   ex.printStackTrace();
         public String messageDialog() {
              int grade = comboBoxesMovie.getGradeBox().getSelectedIndex() + 1;
              String title = textFieldsMovie.getTitleField().getText();
              String year = textFieldsMovie.getYearField().getText();
              String section = textFieldsMovie.getSectionField().getText();
              String totalEx = textFieldsMovie.getTotalExField().getText();
              String exIn = textFieldsMovie.getExInField().getText();
              String exOut = textFieldsMovie.getExOutField().getText();
              return "\n" + "Title: " + title + "\n" + "Year: " + year + "\n"
                        + "Genre: " + comboBoxesMovie.convertGenreIndex() + "\n"
                        + "Grade: " + grade + "\n" + "Section: " + section + "\n"
                        + "Total ex.: " + totalEx + "\n" + "Ex. in: " + exIn + "\n"
                        + "Ex. out: " + exOut + "\n";
          * Gets the addButton
          * @return addButton
         public JButton getAddButton() {
              return addButton;
         }

    I said "don't" cross-post and that the discussion has already been started in the "New To Java" forum.
    If you have two discussions going on then people waste time answering because they don't know what has already been suggested.

  • Getting list of all users and their group memberships from Active Directory

    Hi,
    I want to retrieve a list of all the users and their group memberships through JNDI from Active Directory. I am using the following code to achieve this:
    ==================
    import javax.naming.*;
    import java.util.Hashtable;
    import javax.naming.directory.*;
    public class GetUsersGroups{
         public static void main(String[] args){
              String[] attributeNames = {"memberOf"};
              //create an initial directory context
              Hashtable env = new Hashtable();
              env.put(Context.INITIAL_CONTEXT_FACTORY, "com.sun.jndi.ldap.LdapCtxFactory");
              env.put(Context.PROVIDER_URL, "ldap://172.19.1.32:389/");
              env.put(Context.SECURITY_AUTHENTICATION, "simple");
              env.put(Context.SECURITY_PRINCIPAL, "[email protected]");
              env.put(Context.SECURITY_CREDENTIALS, "p8admin");
              try {
                   // Create the initial directory context
                   DirContext ctx = new InitialDirContext(env);     
                   //get all the users list and their group memberships
                   NamingEnumeration contentsEnum = ctx.list("CN=Users,DC=filenetp8,DC=com");
                   while (contentsEnum.hasMore()){
                        NameClassPair ncp = (NameClassPair) contentsEnum.next();
                        String userName = ncp.getName();
                        System.out.println("User: "+userName);
                        try{
                             System.out.println("am here....1");
                             Attributes attrs = ctx.getAttributes(userName, attributeNames); // only asked for one attribute so only one should be returned
                             System.out.println("am here....2");
                             Attribute groupsAttribute = attrs.get(attributeNames[0]); // memberOf
                             System.out.println("-----"+groupsAttribute.size());
                             if (groupsAttribute != null){
                                  // memberOf is a multi valued attribute
                                  for (int i=0; i<groupsAttribute.size(); i++){
                                  // print out each group that user belongs to
                                  System.out.println("MemberOf: "+groupsAttribute.get(i));
                        }catch(NamingException ne){
                        // ignore for now
                   System.err.println("Problem encountered....0000:" + ne);
                   //get all the groups list
              } catch (NamingException e) {
              System.err.println("Problem encountered 1111:" + e);
    =================
    The following exception gets thrown at every user entry:
    User: CN=Administrator
    am here....1
    Problem encountered....0000:javax.naming.NamingException: [LDAP: error code 1 -
    000020D6: SvcErr: DSID-03100690, problem 5012 (DIR_ERROR), data 0
    ]; remaining name 'CN=Administrator'
    I think it gets thrown at this line in the code:
    Attributes attrs = ctx.getAttributes(userName, attributeNames);
    Any idea how to overcome this and where am I wrong?
    Thanks in advance,
    Regards.

    In this sentence:
    Attributes attrs = ctx.getAttributes(userName, attributeNames); // only asked for one attribute so only one should
    It seems Ok when I add "CN=Users,DC=filenetp8,DC=com" after userName, just as
    userName + ",CN=Users,DC=filenetp8,DC=com"
    But I still have some problem with it.
    Hope it will be useful for you.

  • Lcdui and midlet classes

    hi-
    it seems that after i downloaded and installed midp4palm and j2me_cldc 1.0.2 the lcdui and midlet classes are both missing. i browsed to the cldc folder on my computer and checked in all the subfolders there. in the javax/microedition/ folder, only io is there, not lcdui and midlet also. did i miss something in downloading?
    help?
    thanks
    brandon

    Midp4palm is midp ... hum... for Palm !
    If you want the midp's API, you need to download a
    reference implementation for your desktop at :
    http://java.sun.com/products/midp/
    otherwise, you can download the J2ME wireless toolkit
    wich come with a midpapi zip file.Ok. I'm starting to catch on, what I've been looking for and can't seem to find is the documentation for ALL of the classes that are included / available in the MIDP. It seems to me that Sun is making this more confusing than it should be. I understand their desire to modularize (is that a word?) such that you pick the parts that are appropriate for you particular mobile device, but they need to do a better job of packaging. IMHO.

  • Change material type and valuation class

    hi
    my client want to change material type and valuation class in their production system. but the material no. and some transaction had done by this material. anything i need to concern? especially, in FI part. thank

    Hey Changing of Material Type is one step
    Changing of valuation class is other
    and underneth that changing of account is another attached to the valuation class.
    The basic requiremnt will be that client want to change the G/L code attached to the valuation class.
    If you have already done some transaction it is not fininacialy right to move valuation classes.
    Tell in detail what is the requiremnt.

  • Help on structures and their components

    Folks
    I am trying to know if there is any single point stop for help on all SAP related structures, classes and their respective components and methods in SDN or any other place.
    In specific I am looking for calls made by Function modules to Class Interface - /SAPAPO/CL_PRJ_MAINT_SINGLE so that I can debug the same
    Any ideas on how to check the calss made to a particular Class Interface for keeping a break point ?
    Thanks
    Edited by: COOL GUY on Sep 25, 2008 8:56 PM

    go to se24 , key in class :/SAPAPO/CL_PRJ_MAINT_SINGLE
    than in menu you can see where used list icon -> click on it -> select object in which you want to see where this class is used .
    and enter.
    will list all object in which this class is used.

  • JSF 2.0: Composite Components and their ID

    I'm using Composite Components with JSF 2.0.
    Template:
    <composite:interface />
    <composite:implementation>
        <h:inputText id="text" />
    </composite:implementation>Template Client:
    <h:form id="form">
        <components:myComponent />
    </h:form>In the rendered result, the h:inputText's id will be "form:j_id1060595728_4b62ee3:text".
    How can I override that default ID?
    I tried to set an id attribute on composite:interface and composite:implementation, however, that doesn't have any effect.
    Using ui:debug, I found that the component with ID "j_id1060595728_4b62ee3" is a UINamingContainer.
    When using my own UINamingContainer implementation, i.e., ...
    <composite:interface componentType="util.jsf.UINamingContainerWithID" />
    @FacesComponent("util.jsf.UINamingContainerWithID")
    public class UINamingContainerWithID extends UINamingContainer {
         private String id = "foo";
         @Override
         public String getId() {
              return id;
         @Override
         public void setId(String id) {
              // this.id = id;
         public void setFooID(String id) {
              this.id = id;
    }... I can prevent the id from being set in setId(String), and h:inputText's id will be "form:foo:text".
    (I have tried to debug but the source code is slightly out of sync.)
    I also tried to add an attribute fooID to composite:interface and composite:implementation, with no effect.
    How do you work with Composite Components and their IDs?
    Thanks

    All composite components are NamingContainers. This is necessary to prevent ID collisions.
    In order to avoid a generated ID on a particulare composite component, specify an ID in the component
    within the using page:
    <h:form id="form">
        <components:myComponent id="c" />
    </h:form>So the client ID of the text component would be: form:c:text.

  • Thru OEM get list of queries and their schemas that accessed my objects

    Hi,
    I have a list of objects on my schema and i need to track the list of sql queries by different users that accessed by object during this time period.
    i haven't enabled any auditing yet.
    is there any way i can get that list of queries and their schemas that accessed those particular objects during a particular time period through OEM.
    Can someone guide me please.
    Thanks in advance.
    Philip.

    create a name property in your class and assign a name property to your instances (either in the contructor) and/or using getters/setters.  (you'll need a getter anyway.)

  • Exception in super and sub class

    when super class method throws an exception then sub class overridden method can throws child exception but when we talk about constructor why we throws parent class exception in derived class constructor????

    tcbhardwaj wrote:
         C() throws Throwable // why here parent of Exception class
         void ok() throws ArithmeticException // why here child of RunTimeException classFirst, you never need to declare a throws clause for unchecked exceptions--RuntimeException, Error, and their descendants.
    However, there are a couple of general rules for checked exceptions (such as IOException, SQLException, etc.). As you're studying these, keep in mind that a throws clause is a contract that promises what the method will not do. In particular, it doesn't promise that the method will throw those exceptions. It promises that it will not throw any other checked exceptions not covered by that throws clause.
    1. A child method that overrides a parent method cannot throw any checked exception outside what's covered by the parent's throws clause. So if the parent method declared throws IOException, the child cannot declare throws Exception, or throws SQLException, because both of those are outside the IOException "sub-hierarchy."
    2. A child method that overrides a parent method can declare to throw less than the parent throws. This is because, if the parent promises not to throw outside of some set, and the child promises not throw outside of a subset of that set, then clearly he's also not throwing outside of the parent's set. If the parent method declares throws SQLException, IOException, then the child can declare no exceptions at all, or just SQLException, or just IOException, or any combination of any of the subclasses of SQLE and IOE.
    Rules 1 and 2 do not apply in the case of constructors, because no constructor can ever override another constructor.
    3. When any method or constructor, A, invokes any other method or constructor, B, then any checked exception declared to be thrown by B must be either caught or declared to be thrown by A. If A catches or throws a parent of an exception thrown by B, then he's also implicitly catching or throwing the one that B mentions.

  • [svn:fx-trunk] 4959: Removed the undocumented TextBlockComposer and TextFlowComposer classes.

    Revision: 4959
    Author: [email protected]
    Date: 2009-02-13 17:10:57 -0800 (Fri, 13 Feb 2009)
    Log Message:
    Removed the undocumented TextBlockComposer and TextFlowComposer classes. These were helper classes for TextBox and TextGraphic, respectively. Their functionality has been rolled into TextBox, TextGraphic, and TextGraphicElement. This should improve both memory and speed since the helper objects no longer have to be created. It also allows more code to be shared in TextGraphicElement.
    QE Notes: None
    Doc Notes: None
    Bugs: None
    Reviewer: Carol
    Modified Paths:
    flex/sdk/trunk/frameworks/projects/flex4/src/mx/graphics/TextBox.as
    flex/sdk/trunk/frameworks/projects/flex4/src/mx/graphics/TextGraphic.as
    flex/sdk/trunk/frameworks/projects/flex4/src/mx/graphics/baseClasses/TextGraphicElement.a s
    Removed Paths:
    flex/sdk/trunk/frameworks/projects/flex4/src/mx/graphics/baseClasses/TextBlockComposer.as
    flex/sdk/trunk/frameworks/projects/flex4/src/mx/graphics/baseClasses/TextFlowComposer.as

  • Sy-msgno - What are the possible numbers and their meanings?

    I am wondering what the possible numbers are for the field sy-msgno and their meanings.  I am trying to determine what some code is doing but there isn't any documentation.  The code is looking for, and setting, specific values in the field sy-msgno so knowing what these numbers mean will help me out.
    Thanks,
    Davis

    It is the system provided Message Number.
    Suppose you wants to display the error message provided by some SAP standard code (Ex: returned by functional module) then this is used along with sy-msgid to get the error message.
    suppose i called a FM say 'OIB_QCI_READ_CONV_PARAMETERS'and it returned sy-subrc NE 0. now at that condition i want to display the system generated error message. Then i will use sy-msngo along with system id sy-msgid.
    CALL FUNCTION 'OIB_QCI_READ_CONV_PARAMETERS'
                  EXPORTING
                    i_charg                  = lv_charg
                    i_datum                  = lw_proxy_tab-zpicdate
                    i_lgort                  = lv_lgort
                    i_matnr                  = lw_proxy_tab-matnr
                    i_werks                  = lw_proxy_tab-werks
                    i_time                   = lw_proxy_tab-zpictime
                  IMPORTING
                    e_oib_a04                = lw_oib_a04_def
                  EXCEPTIONS
                    datum_not_passed         = 1
                    matnr_not_passed         = 2
                    not_found                = 3
                    werks_not_passed         = 4
                    conversion_error         = 5
                    inconsistent_data        = 6
                    calculation_failure      = 7
                    inconsistent_customizing = 8
                    OTHERS                   = 9.
                IF sy-subrc NE 0.
                  lv_msg_id = sy-msgid.
                  lv_msg_no = sy-msgno.
                  CLEAR: lv_error_data.
                  PERFORM fill_error_message TABLES pt_t_mailmsg
                                              USING  lv_msg_no
                                                     lv_msg_id
                                                     lv_error_data.
                  CLEAR: lv_msg_id, lv_msg_no, lv_error_data.
                  lv_error = gc_x.
               ENDIF.
    FORM fill_error_message TABLES pt_pt_t_mailmsg STRUCTURE solisti1
                            USING p_lv_msg_num TYPE char3
                                  p_gc_mssg_class TYPE char8
                                  p_lv_error_data TYPE char300.
      DATA: lv_text(250),
            lw_msg LIKE LINE OF pt_pt_t_mailmsg,
            lv_error_data(18) TYPE c.
    * Reading the error message from the message class
      CALL FUNCTION 'MESSAGE_TEXT_BUILD'
        EXPORTING
          msgid               = p_gc_mssg_class
          msgnr               = p_lv_msg_num
          msgv1               = p_lv_error_data
          msgv2               = ' '
          msgv3               = ' '
          msgv4               = ' '
        IMPORTING
          message_text_output = lv_text.
    * Append error message to error table
      lw_msg = lv_text.
      APPEND lw_msg TO pt_pt_t_mailmsg.
      CLEAR: lw_msg, lv_text.
    ENDFORM.                    "fill_error_message]

  • *Hi, I need to know Standard PM Reports and their Tcodes*

    I need to know Standard PM Reports and their Tcodes

    HI
    T.code          Description
    MCI1     PMIS: Object Class Analysis
    MCI2     PMIS: Manufacturer Analysis
    MCI3     PMIS: Location Analysis
    MCI4     PMIS: Planner Group Analysis
    MCI5     PMIS: Object Damage Analysis
    MCI6     PMIS: Obj.Statistic.Analysis
    MCI7     PMIS: Breakdown Analysis
    MCI8     PMIS: Cost Evaluation
    MCIZ     PMIS: Vehicle Consumption Analysis
    MCJB     MTTR/MTBR for Equipment
    MCJC     FunctLoc: Mean Time Between Repair

  • [svn] 3787: Added FxTextArea, FxTextInput, and TextView class-level examples to the Component Explorer.

    Revision: 3787
    Author: [email protected]
    Date: 2008-10-21 12:16:28 -0700 (Tue, 21 Oct 2008)
    Log Message:
    Added FxTextArea, FxTextInput, and TextView class-level examples to the Component Explorer.
    Modified Paths:
    flex/sdk/trunk/samples/explorer/explorer.xml

    One workaround is to turn off automation:
    File-->Options, Advanced tab, General Section, uncheck "Enable Automation Events"
    However, you will loose the ability to configure callouts, and all of the commands in the Process Engineering tab.
    Another workaround is to change the loop number of the shape you are editing before changing its type. Then change the loop number back to the correct loop number.
    This is another example of the pernicious philosophy of trying to help the user do what the programmers think the user is trying to do that started in Excel 2000 (where you can no longer tell excel that you want a scatter plot - it will force the plot
    to be a line plot under certain circumstances).
    I suppose another option would be to modify the master and swap the text and subtype shapes in the indicator to use the subtype property for the loop number and then use the text for the instrument type. I guess this is what MS was trying to implement, but
    didn't explain it well enough to their programmers.

  • Finding enabled locales/dimensions and their respective ids for a site

    Hi,
    I am trying to find all the locales/dimensions which are enabled for a particular site, and their respective ids.
    I have tried using this code:
    webResource = webResource.path("/userlocales");
                   Builder builder = webResource.accept(MediaType.APPLICATION_XML);
                   UserLocalesBean enabledAssets = (UserLocalesBean) builder.get(UserLocalesBean.class);
                   List<UserLocale> userLocList=enabledAssets.getUserLocales();
    But this gives a list of all the locales in the entire system and not per site basis.
    Currently I am accessing the DIMENSION table directly to find out the enabled dimensions and their respective ids, but this is just a temporary solution.
    Can anyone pointout how to use the API to find the enabled locales and their respective ids for a particular site ?

    Sites uses jsp for its templates to render a page. Basically an element is a jsp that contains logic using jsp tag libraries and/or java scriplets. Please do take a look at the documentation that is available on the oracle website: http://docs.oracle.com/cd/E29495_01/index.htm
    The documentation that might be useful to you is the developers guide. Also look at the Developers tool guide that shows you how to setup your developer environment.
    Hope this will help you.
    Regards,
    Rodney

Maybe you are looking for

  • Why won't the 10.3 Flash Player work on my Mac 10.5.8?

    I actually posted this as part of a discussion under the thread "Flash 10.3 unable to be recognized", but nobody seemed to pay any attention to it there, so I am reposting my question as a new thread, but that is the problem I am having. When I downl

  • Magic Mouse - three finger double tap dictionary - not working

    A three finger, double tap on my Magic Mouse will not activate a dictionary definition in any app. All other mouse gestures work fine. The keyboard combination for that feature works fine too. How can I get that three finger gesture to work?

  • Extracting an element of html stored in db

    Hi All, I am storing HTML document in database (11g) as a clob. I want to implement Full text searching, so I have created an index on this table and I am able to search the document with this index. Now i want to extract a particular element from th

  • MIGO: determination of storage location for empties

    Hello SD experts, Case: plant A delivers materials to plant B (interplant delivery). This delivery is posted GR through TC MIGO (based on delivery). Now, the issue is that SAP is not able to automatically determine the storage location for the emptie

  • Heavy DB growth. ECC

    Hi team, I am going in critical situatiion as my database is growing heavily as my top ten tables occuping nearly 2 GB per day. SYS_LOB0000106157C00006$$     491.567 ACCTIT                                             119.3 FAGLFLEXA