Help, why keyRepeated doesn't work

Hello,
I created a class to extend GameCanvas in midp2.0. In this class, I overwrote "keyPressed ()","keyReleased()","keyRepeated()" three methods.
"keyPressed ()","keyReleased()" both work very well to capture the key.
But keyRepeated doesn't work. It looks it hasn't been called back by system.
I used wtk2.0 DefaultColorPhone to test the code. Does the emulator not support KeyRepeated() ?
Can anybody help me this?
Thanks in advance.
henry

i not using wtk 2.0 but u can try hasRepeatEvents method to check the availability of repeat actions

Similar Messages

  • One reason why commandLink doesn't work in dataTable

    Ok, so I think I've got an explanation why commandLink doesn't work in dataTable when the model bean is request scoped. Maybe somebody can tell me if I'm wrong.
    I have a model bean that generates table rows based on some input criteria (request parameters).
    So, we validate the inputs, apply them to the bean and render the page. Once the inputs have been applied to the bean, a request for table rows returns rows, no problem.
    However, we put a commandLink in each row, so we can expand the details. Maybe we even get smart and repeat the input row-generating criteria as a hidden field in the page.
    Unfortunately, when the user hits the commandLink, the list page simply refreshes, maybe even w/out table rows. The user doesn't get the details page as expected.
    Why not?
    Because: in the DECODE phase (even before validation and before "immediate" values have had their valueChangeListeners called), we ask the model bean for the table rows, so we can decode the commandLinks. Unfortunately, in "decode" phase, the request-scoped model bean has not had its row-generating criteria updated (that happens in the "update model" normally, or at the END of the decode phase if we got cute by (1) setting the "immediate" attribute on the row-generating criteria to "true" AND (2) set a valueChangeListener to allow us to update the model bean early. The END of the decode phase isn't good enough -- in the middle of that phase, when we're attempting to deocde commandLinks, the model bean has no citeria, so there's no row data. No row data means no iteration over commandLinks to decode them and queue ActionEvents. So, we march through the rest of the phases, process no events, and return to the screen of origin (the list screen) with no errors.
    So, what's the solution?
    One solution is to make the model bean session-scoped. Fine, maybe we can store a tiny bit of data in it (the search criteria), so it's not such a memory drag to have it live in the session forever. How do we get that data in? A managed property in faces-config.xml with value #{param.PARENT_KEY} won't work because it's assigning request-scoped data to a session-scoped holder. JBoss balks, and rightly so. Do we write code in the model bean that pulls the request parameter out of thin air? (FacesContext.getExternalContext()....) I don't really like to code the name of a specific http request parameter into the bean, I think it's the job of the JSP or faces-config.xml to achieve that binding (request parameter to model propery). Plus, I'd be sad to introduce a dependency on Faces in what was previously just a bean.
    Is there a better way?
    In my particular situation, we're grafting some Faces pages onto an already-existing non-Faces application. I don't get the luxury of presenting the user an input field and binding it to a bean. All I've got to work with is a request parameter.
    Hmm, I guess I just answered my own question. if all I've got to work with is a request parameter, some ugliness is inevitable, I guess.
    I guess the best fix is to cheat and have the bean constructor look for a request parameter. If it finds it, it initializes the criteria field (which, in my case, is the key of an object that has a bunch of associated objects (the rows data), but could be more-general d/b search criteria).
    (I looked at the "repeater" example code in the RI, but it basically statically-generates its data and then uses 100% Faces (of course) to manage the paging (where "page number" is essentially the "criteria").
    Comments? Did I miss something obvious?
    John.

    ...or I could just break down and do the thing I was hoping to avoid (outputLink instead of commandLink):
    <h:outputLink value="/faces/Detail.jsp">
      <f:param name="PARENT_KEY" value="#{bean.parentKey}"/>
      <h:outputText value="#{bean.label}"/>
    </h:outputLink>It's still a "hardcoded" parameter name, but at least the binding is in the JSP and faces-config.xml, not the bean Java code.

  • Ipad screen turns grey powering on and no apple logo appears! Help!  Reboot doesn't work.

    Help!  Reboot doesn't work.  Tried holding in the Sleep and Home buttons together for 10-15 secs to no avail!  I'm stuck in grey zone!

    The Basic Troubleshooting Steps are:
    Restart... Reset... Restore from Backup...  Restore as New...
    Restart / Reset   >  http://support.apple.com/kb/ht1430
    Restoring  >  http://support.apple.com/kb/HT1414
    If you try all these steps and you still have issues... Then a Visit to an Apple Store or AASP (Authorized Apple Service Provider) is the Next Step...
    Be sure to make an appointment first...

  • Confused as to why this doesn't work...

    I wrote this code correctly, but it doesn't seem to work. I'm not sure if I'm leaving something out or not using something correctly. If anyone can tell me why this doesn't work, it would be greatly appreciated!
    P.S. in the actionPerformed method, I want to put the window to close once someone clicks an "ok" button. How is this done? I've tried using setDefaultCloseOperation(3), but it doesn't seem to work.
    peace,
    Mark
    //?2002 Copyright. MJA Technologies.  All Rights Reserved.
    import javax.swing.*;
    import java.awt.*;
    import java.awt.event.*;
    public class About extends JFrame implements ActionListener
        JTextArea textarea;
        JPanel panel1;
        JButton okbutton;
        String output;
        public About()
            super("Pages");
            Container container = getContentPane();
            textarea = new JTextArea();
            textarea.setText("Pages 1.0 beta 0\n?2002 MJA Technologies.\nAll Rights Reserved.");
            container.add(textarea);
            setDefaultCloseOperation( 3);
            setVisible(true);
            setSize(400, 300);
        public void actionPerformed(ActionEvent event)
            if(event.getSource() == okbutton)

    Oh see, you said this:
    "P.S. in the actionPerformed method, I want to put the window to close once someone clicks an "ok" button. How is this done? I've tried using setDefaultCloseOperation(3), but it doesn't seem to work."
    so I said this:
    "setVisible(false)"
    NOOOOOOOOOOOW you say the TextArea doesn't show up...that's a whole other problem.
    Jeeeeeeeeeeeeeeeez.
    So what layout manager are you using in the container? (hint hint)

  • The inbox for Mac Mail lists every incoming message twice. When I delete a message it deleted both entries. I have tried the solution in "help" and it doesn't work. Any suggestions?

    The inbox for Mac Mail lists every incoming message twice. When I delete a message it deleted both entries. I have tried the solution in "help" and it doesn't work. Any suggestions?

    I am wondering if anyone is seeing my question? This is my first time and I am not sure if I am communicating correctly. If you are seeing the question above regading deleted messages reappearing please reply so I will at least know I am getting the message out.
    Thank you.

  • Why FaceTime doesn't work in Saudi Arabia ?

    why FaceTime doesn't work in Saudi Arabia ?

    we have stores sell apple products some of them sell with faetime at a high rate,
    and some other sell apple products without facetime at a normal price.
    finaly we need apple stores in Saudi Arabia to prevent this fraud.
    thank you
    what you're saying here is that some people parallel import apple products around the normal channels and they are from other countries so they havent got facetime blocked
    and others normally import apple products and they are blocked
    and then you go on believing that if apple had a store in saudi things would be better rest asured that if they did they would sell products with facetime blocked

  • I cannot sync Ical on my iMac with my professional calendar (outlook web access). and I don't understand why it doesn't work since I have already made it with my iPhone. Help

    Hello,
    I bought an iMac few days ago. I would like to sync ical on my iMac with my professional calendar I use in my company (from outlook web access).
    I was easy to manage it on my iPhone (I just add a new "exchange" mail account and ask for a calendar sync only) and it worked very quickly.
    But I cannot do it with the iMac, and I don't undersatnd why?
    the domain is is used for my iPhone is the following :
    owa.companyname.com
    I tried all the solutions I found in this forum but it doesn't work.
    Many thanks in advancefor your help.
    Matt

    Does it have to be an applet?
    If you want the same behaviour as in the code with traffic lights, change
    class MortgageApplet extends JApplet implements ActionListener {
    to
    class MortgageApplet extends JFrame implements ActionListener {
    and change
    public void init() {
    to
    public MortgageApplet() {                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

  • HELP, My SWF doesn´t work in latest versions of IE and Safari

    I have a swf made in Flash CS4. It works fine in firefox and older versions of flash player in IE, but it doesn't work in recent versions of IE and Safari In this case just I can hear the music.
    Could help me please, my URL is:
    http://www.quecolor.com.mx/UAT/

    Hi,
    Did you try embedding swf using SWFObject via JavaScript ? Here is more information on how to embed swf using swfobject. http://code.google.com/p/swfobject/wiki/documentation
    Thanks,
    Karthikeyan R.

  • Help, My iPad Doesn't Work On iOs7

    I have neever been so unhappy with an upgrade as I am with iOs7. What a mess they made of everything. Why dod theyt have to re-invent the wheel? My Youtube doesn't work and surfing the internet went to a crawl. Can someone give me some advice on how to get the old software back?

    Hi David
    To be honest I am not sure what I updated from in my OS X All I do is agree to install when the automatic update says there is an update available for my Mac. I'm curious when we pay thousands of dollars to Apple for the best computer why we have to keep shelling out the clams to keep it running. What does the new update do that we have to pay for? I appreciate you telling me about it and I guess I need to know whaat it does. I'll try and find some reading on it.
    FIREFOX - I'm trying to decide what to run for a browser now. The reason I switched to Firefox is because it was said to be faster than Safari. I noticed also that when I view Youtube videos with Safari, we are bombarded with friggin commercials to no end.
    CHROME - I have been contemplating discarding my Google account because it seems Google wants to force us to go through them to access all my other accounts, and now they are getting to the point that when I try to open an account like Netflix or Facebook or other accounts, they try to force me to sign in with my Google account and they don't give me any other options. I am very upset as are many others with this communist turn Google has done. I don't want to change my email, but I may have no choice. I went into my Google account settings and chose to disconnect my other accounts from Google, but they still Hi-Jack my other accounts even when I choose not to connect them.
    Now this morning I noticed my Spell Check isn't working. I have it set to check spelling automatically in Language and Text.
    I have been trying to figure out how to check my version of Adobe Flash. Where can I find it to check it? It's not in my Applications folder like it's supposed to be. You're a little over my head with installing a control panel to install updates. I'll try going to Adobe.com/flashplayer andd try to update.
    I have power cycled my modem several times with no change. I am using Centurylink for my internet which is the worst I have ever seen for reliability. There aren't a lot of choices where I live. Every time I have trouble ith them and make the dreaded phone call to 611, they say there are no problems and want me to go through a barage of their stupid tests that never work because the problem is on their end. I think they over sell the service and at peak usage times the bandwidth is sucked dry.

  • Help - "Put" command  doesn't work

    I've had problems with the "put" command not working for several years (different computers, OS, and Dreamweaver versions). I click the put option and it doesnt' do anything.
    I can usually get it to work by creating a new site from site manager - or putting the entire site. But even those options don't always work.
    I've found similar posts, but not a solution.
    Can someone please explain why Dreamweaver doesn't always like to put and how to get it to work?

    I've never personally had any issue with Put commands in DW (CS3 and CS4).
    Is there a process you can duplicate do that causes it to fail each time?

  • XML SQL Utility:Why it doesn't work?

    I am trying to use the XML SQL Utility
    by modifying the given example samp1.java
    for the JDBC-ODBC driver but errors emerged.
    Is there any thing wrong? Thanks.
    (The classpath setting is ok, I think)
    ***** Here is the error message:
    D:\OracleXSU\sample>java Sample
    Exception in thread "main" java.lang.NoClassDefFoundError: oracle/sql/Datum
    at oracle.xml.sql.query.OracleXMLQuery.<init>(OracleXMLQuery.java:127)
    at Sample.main(Sample.java:42)
    D:\OracleXSU\sample>
    ***** Here is the source code:
    /** Simple example on using Oracle XMLSQL API; this class queries the database with "select * from emp" in scott/tiger schema; then from the results of query it generates an XML document */
    import java.sql.*;
    import java.math.*;
    import oracle.xml.sql.query.*;
    // import oracle.jdbc.*;
    // import oracle.jdbc.driver.*;
    public class Sample
    //========================================
    // main() - public static void
    public static void main(String args[]) throws SQLException
    String tabName = "sbook";
    String user = "scott/tiger";
    try {
    Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
    } catch(java.lang.ClassNotFoundException e) {
    System.err.print("ClassNotFoundException: ");
    System.err.println(e.getMessage());
    // DriverManager.registerDriver(new oracle.jdbc.driver.OracleDriver());
    //init a JDBC connection
    // Connection conn =
    // DriverManager.getConnection("jdbc:oracle:oci8:"+user+"@");
    Connection conn = DriverManager.getConnection("jdbc:odbc:SQLUtil");
    // create statement and execute it to get the ResultSet
    Statement stmt = conn.createStatement();
    ResultSet rset = stmt.executeQuery("select * from "+tabName );
    if(rset!=null)
    // init the OracleXMLQuery; note we could have passed the sql query string
    // instead of the ResultSet
    OracleXMLQuery qry = new OracleXMLQuery(conn,rset);
    // get the XML document is the string format
    String xmlString = qry.getXMLString();
    // print out the result
    System.out.println(" OUPUT IS:\n"+xmlString);
    null

    Firstly I think it is because the XML SQL Utility does not work with JDBC-ODBC driver.
    So I try it again with Oracle driver.
    But it still doesn't work? Why?
    ***** Here is the source code:
    /** Simple example on using Oracle XMLSQL API; this class queries the database with "select * from emp" in scott/tiger schema; then from the results of query it generates an XML document */
    import java.sql.*;
    import java.math.*;
    import oracle.xml.sql.query.*;
    import oracle.jdbc.*;
    import oracle.jdbc.driver.*;
    public class Sample2
    //========================================
    // main() - public static void
    public static void main(String args[]) throws SQLException
    String tabName = "emp";
    String user = "scott/tiger";
    DriverManager.registerDriver(new oracle.jdbc.driver.OracleDriver());
    //init a JDBC connection
    // Connection conn =
    // DriverManager.getConnection("jdbc:oracle:oci8:"+user+"@");
    //init a JDBC connection
    Connection conn = DriverManager.getConnection ("...Connection information...");
    // create statement and execute it to get the ResultSet
    Statement stmt = conn.createStatement();
    // ResultSet rset = stmt.executeQuery("select * from "+tabName );
    ResultSet rset = stmt.executeQuery("select * from COFFEES" );
    // Test if connection is sucessful -- it works!
    int i=0;
    while(rset.next())
    i++;
    System.out.println("Total rows="+i);
    // init the OracleXMLQuery; note we could have passed the sql query string
    // instead of the ResultSet
    OracleXMLQuery qry = new OracleXMLQuery(conn,rset);
    // get the XML document is the string format
    String xmlString = qry.getXMLString();
    // print out the result
    System.out.println(" OUPUT IS:\n"+xmlString);
    null

  • Why EL doesn't work with custom tags ?!

    I don't know why expression lang. doesn't work with me.
    here's an example, and please tell me why :
    --- the jsp page with EL ==> doesn't work :
    <%-- In the name of ALLAH most gacious most merciful --%>
    <%@ page language="java" %>
    <%@ taglib uri="/cartlib" prefix="cart" %>
    <html>
    <jsp:useBean id="product" class="ch16.cart.ProductCatalog" scope="application" />
    <cart:showCatalog productCatalog="${product}" addToShoppingCartUri="<%= response.encodeURL("AddToShoppingCart.jsp") %>" />
    </html>
    when using expressions instead, the page works .
    the new page is :
    <%-- In the name of ALLAH most gacious most merciful --%>
    <%@ page language="java" %>
    <%@ taglib uri="/cartlib" prefix="cart" %>
    <html>
    <jsp:useBean id="product" class="ch16.cart.ProductCatalog" scope="application" />
    <cart:showCatalog productCatalog="<%= product %>"
    addToShoppingCartUri="<%=
    response.encodeURL("AddToShoppingCart.jsp") %>" />
    </html>
    The error was :
    HTTP Status 500 -
    type Exception report
    message
    description The server encountered an internal error () that prevented it from fulfilling this request.
    exception
    org.apache.jasper.JasperException: jsp.error.beans.property.conversion
    org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper
    .java:512)
    org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:377)
    org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
    org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
    javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
    root cause
    org.apache.jasper.JasperException: jsp.error.beans.property.conversion
    org.apache.jasper.runtime.JspRuntimeLibrary.getValueFromPropertyEditorManager(Js
    pRuntimeLibrary.java:885)
    org.apache.jsp.ShowProductCatalog_jsp._jspService(ShowProductCatalog_jsp.java:77
    org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97)
    javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
    org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:334)
    org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
    org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
    javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
    note The full stack trace of the root cause is available in the Apache Tomcat/5.5.20 logs.

    Regarding setup, see this post reply #6
    http://forum.java.sun.com/thread.jspa?threadID=629437&tstart=0
    Other potential things to check: make sure you are getting the right value passed in
    productCatalog="${applicationScope.product}"
    ${product} by preference would take a pageContext, request or session attribute before the application level one (it uses pageContext.findAttribute).
    What do you get if you just print out ${product} on the screen?
    It should call a toString() on it for rendering purposes.

  • Help! isight doesn't work in the morning, but work in the afternoon...

    Hi everyone, I am almost mad with my isight.....I found when I start the laptop in the morning, it doesn't work, it shows"there is no connected camera". But I keep using the laptop for several hours until the afternoon, then I open the isight, it turns out working as normal.....as long as I restarted, it doesn't work again, until waiting for several hours.....I tested these for several days....so strange.
    I tried all the ways mentioned in the "troublesome isight", none of them work. Should I reinstalled the systems or send it to the technical support?
    Thank you so much in advance for you replying!

    xiqing wrote:
    Hi everyone, I am almost mad with my isight.....I found when I start the laptop in the morning, it doesn't work, it shows"there is no connected camera". But I keep using the laptop for several hours until the afternoon, then I open the isight, it turns out working as normal.....as long as I restarted, it doesn't work again, until waiting for several hours.....I tested these for several days....so strange.
    I tried all the ways mentioned in the "troublesome isight", none of them work. Should I reinstalled the systems or send it to the technical support?
    Thank you so much in advance for you replying!
    Welcome to Discussions, xiqing
    I understand that you have tried all relevant suggestions from http://support.apple.com/kb/HT2090
    Restart your Mac and try the PMU/SMC reset one more time. If properly resetting your SMC does not resolve your problem, I think your problem you describe is a hardware one that will require professional service by your Apple-Authorized Service Provider.
    You could try reinstalling Snow Leopard and applying the 10.6.4 Combo Update, but I do not believe that either could resolve the problem you describe.
    *Be sure to backup all your important data files immediately before sending or taking your Mac for service*. When you retrieve your Mac after the work is complete, ask the AASP to show you that the camera is working before you leave the store.
    EZ Jim
    Mac Pro Quad Core (Early 2009) 2.93Ghz w/Mac OS X (10.6.4)  MacBook Pro (13 inch, Mid 2009) 2.26GHz (10.6.4)
    LED Cinema Display  G4 PowerBook  1.67GHz (10.4.11)  iBookSE 366MHz (10.3.9)  External iSight

  • Why Earpods doesn't work on Ipod Shuffle 3G?

    I just got my new earpods because I have an ipod shuffle that I didnt use for a couple months because I lost the earphones, but it seems this new ones dont work, I cant turn volume up/down or anything I can just ear the music with the default volume,,, in the manual it says it is suppose to work on iPod shufle 3rd generation or later... I think it is a lie.. or somebody found a way to make them work yet?

    Only Apple would know the answer to why they won't work with the 3G.
    B-rock

  • Help: Force quit doesn't work

    Some error happens on my program and it freeze. So I force quit the program. It turned off. But when I reopen the program, error keep happens. I try restart, shut down, and reinstall program but it doesn't work. It happens to my firefox but somehow it works again. Now my flash program has this error and I can't fix this problem.. Anyone know what to do with this?

    no but I am getting similar problems with iTunes just started recently. IDK if it might have something to do with the latest update or something about using my external to play off of.

Maybe you are looking for