3.x WAD TAB Focus problem

I am desiging a web template(in 3.x) which comprises of other web templates using TABs. I have used the standard javascript for the TABs but the issue is when I run it first time the TABs don't work, all the 3 web templates show. but when I click on one tab then they show up under each TAB. Not sure where I am wrong?
I wasn't able to paste the code. I will try again.

Thanks KK, for some reason can't paste the code here. do u know why?
Basically I have 3 reports to diaplay on one screen. Each report has either a table or chart and its corresponding navigation web item. I thought best way would be to create a Main web template with TABs and then embed 3 web templates which will have the 3 reports. In the main web temp I have the javascript code, the first web template is visible others are hidden, I guess after the inital run the javascript should manage the reports when I click on the TABs. Any ideas if I am doing something wrong?

Similar Messages

  • Onload and Tabbing focus problem

    I was asked by some of my users to set focus to the username
    field on the login page when it loads. I began by adding to the
    body tag and cfform tags OnLoad function. This allowed the page to
    load and set up the user to just start typing without clicking in
    the field. The problem is with trying to tab to the next field. The
    only way I can even start tabbing to other fields is to click in
    one and then depress the tab key. However, this only tabs over to
    the other two fields while leaving out one of the fields.
    I would like the page to load so that the user can start
    typing and then by pressing tab he can move on to the next field. I
    don't know why this code doesn't work. It is kind of frustrating.
    Does anybody know of a fix to this problem?
    Thank you for your time!

    Use a tabindex attribute in your form fields:
    http://www.htmlgoodies.com/tutorials/forms/article.php/3479201
    Tom Muck
    co-author Dreamweaver MX 2004: The Complete Reference
    http://www.tom-muck.com/
    Cartweaver Development Team
    http://www.cartweaver.com
    Extending Knowledge Daily
    http://www.communitymx.com/
    "jedale" <[email protected]> wrote in
    message
    news:[email protected]...
    I was asked by some of my users to set focus to the username
    field on the
    login
    page when it loads. I began by adding to the body tag and
    cfform tags
    OnLoad
    function. This allowed the page to load and set up the user
    to just start
    typing without clicking in the field. The problem is with
    trying to tab to
    the
    next field. The only way I can even start tabbing to other
    fields is to
    click
    in one and then depress the tab key. However, this only tabs
    over to the
    other
    two fields while leaving out one of the fields.
    I would like the page to load so that the user can start
    typing and then by
    pressing tab he can move on to the next field. I don't know
    why this code
    doesn't work. It is kind of frustrating. Does anybody know of
    a fix to this
    problem?
    Thank you for your time!
    <body onLoad="self.focus();document.login.focus()"
    bgcolor="#F2F9FF">
    <center>
    <cfform format="flash" name="login" action="login.cfm"
    method="post"
    width="100%" height="100%" preservedata="true"
    preloader="yes"
    timeout="3600"
    wmode="transparent" style="font-size:12px; font-weight:bold;
    background-color:##F2F9FF; themeColor:##003366"
    onload="name.setFocus();">
    <cfformitem type="script">
    function Tabit(){
    if(Key.getCode() == Key.TAB){
    password.setFocus()
    </cfformitem>
    <cfformgroup type="vbox"
    style="horizontalAlign:'center';" id="mainbox">
    <cfformgroup type="panel" id="loginPanel"
    style="headerHeight:0;panelBorderStyle:'roundCorners';
    shadowDistance:1;
    background-color:##80A8D5; marginTop:0;" width="320"
    height="80">
    <cfformitem type="spacer" height="2" />
    <cfinput width="200" maxlength="30" type="text"
    name="name" label="Name"
    style="font:Arial, Helvetica, sans-serif; font-size:12px;
    font-weight:normal"
    onKeyDown="Tabit();">
    <cfinput width="200" maxlength="30" type="password"
    name="password"
    label="Password" style="font:Arial, Helvetica, sans-serif;
    font-size:12px;font-weight:normal" >
    </cfformgroup>
    <cfformgroup type="vbox">
    <cfformgroup type="horizontal"
    style="horizontalAlign:'center';">
    <cfinput type="button" name="logInButton" value="Log In"
    onClick="alert('Submitted form');">
    </cfformgroup>
    </cfformgroup>
    </cfformgroup>
    </cfform>
    </center>
    </body>

  • TitleWindow PopUp Tab/Focus problem

    Hi
    I am wondering if anyone can help me. There is a titleWindow popup created. A login form is loaded into it. With 2 text input fields: Username and Password and one Button, OK.
    The problem I am having is that I cannot get tabbing to work inside the new titleWindow. When I click on the user input field and then press tab, the cursor disappears. I have searched the net and there are numerous instances of this happening, but no actual solution that I can see.
    The Login Component is of type VBox.
    The weird thing is, if I enter the wrong details or no details and click ok. Then The tabbing wors the second time around. It is just when it is initially loaded. I have no idea why this could be?
    Can anyone help as it is driving nuts.
    Thanks

    Here is the MXML for the title windoew to be popped up
    private function popupLogOnDlg(evt:Event=null):void
                                            stwLogOn = new StwLogOn();
                                            stwLogOn.addEventListener("clickOK", handleCloseLogOnDlg);
                                            titleWindow= TitleWindow.show(stwLogOn, "Log On", 0, true, null, handleCloseLogOnDlg);
                                            titleWindow.isResizable=false;
    And here is the MXML for the Login Component
    <mx:VBox xmlns:mx="http://www.adobe.com/2006/mxml"
                          width="280" height="115" defaultButton = "{okBtn}">
              <mx:Script>
                        <![CDATA[
                                  private function handleClickOK():void
                                            dispatchEvent(new Event("clickOK"))
                        ]]>
              </mx:Script>
              <mx:Form width="100%">
                        <mx:FormItem width="100%" label="User name:" horizontalAlign="right">
                            <mx:TextInput width="100%" restrict="A-Za-z0-9_." id="nameTextInput"/>
                        </mx:FormItem>
                        <mx:FormItem width="100%" label="Password:" horizontalAlign="right">
                            <mx:TextInput width="100%" id="keywordTextInput" displayAsPassword="true"/>
                        </mx:FormItem>
              </mx:Form>
              <mx:HBox horizontalAlign="right" width="100%">
                        <mx:Button label="Log On" id="okBtn" click="handleClickOK()"/>
                        <mx:Spacer width="10"/>
              </mx:HBox>
    </mx:VBox>

  • Problem with tabbed focusing

    I have a question that I'm guessing has a ridiculously simple answer for you gurus, but I still can't figure this out:
    For some reason, I've had a couple of instances where the OS will go into a "tab focusing" mode, where hitting the tab will switch to each item and put a blue highlight around it, whether it's in a dialog box or the bookmarks bar in Safari. The highlight doesn't always function as something I can activate with the enter key or arrows, though (as in the Shut Down dialog box). The first instance of this (I believe) went away on its own, after performing an OS update. In either case, I'm pretty sure I haven't accidentally turned on something in the system preferences.
    Anyone have a quick and dirty explanation (or better yet, a fix!) for this?

    Hi Chris
    it may be that you un-wittingly hit Shift-F7 which toggles Tabbing between "text boxes & lists only" and "All controls"
    I know I've done this a few times
    iMac G5 rev B   (OSX 10.4.7)  2GB 250GB

  • How do I prevent tab focus from changing when I scroll tabs with the mouse wheel? [SOLVED]

    Whenever I scroll my tabs with the mouse scroll wheel the tab focus changes from the page I'm currently on to the tab being scrolled to. I usually have a large list of tabs open and I depend on being able to scroll tabs without changing page focus to keep myself organized.
    Also, I'd like to disable tab scroll wrapping; Once I've scrolled my tabs to the end I'd like it to stop scrolling, not wrap around to the start of my tabs.
    Is there a way to disable these features and revert to the tab scrolling behaviour of a previous version of Firefox?

    This is not a standard feature and can be caused by an extension.
    Start Firefox in [[Safe Mode]] to check if one of the add-ons is causing the problem (switch to the DEFAULT theme: Tools > Add-ons > Themes).
    * Don't make any changes on the Safe mode start window.
    See:
    * [[Troubleshooting extensions and themes]]
    * [[Troubleshooting plugins]]

  • Tab Focus Proble.

    Hi All,
    I am having problem on focusing the subTab.
    My Requirement is based on the LOV value ,that is at header level the some Detail Sub Tab get disabled & the focus should be on Enabled Tab.
    It is working fine for Disabling Tab. But the problem arise when user click on one Enabled Tab and then Changed the LOV value. Then the Tab Get Disabled but focus remain on the disabled tab. I have to click manually on the Enabled tab to get the focus. This focus problem only happen when user click on the Tab, else if LOV value change and user doesnt click on Tab Disabling and Focus is right.... CAN YOU PLEASE HELP!!!! WHY THIS DOUBLE STANDARD BEHAVIOUR HAPPENING??????????????????
    OASubTabLayoutBean OASubTabLayoutBeanVar =
    (OASubTabLayoutBean)webBean.findChildRecursive("SubTabRN");
    if(headerLovFieldValue.equals("XYZ")
    OASubTabLayoutBeanVar.setSelectedIndex(pageContext,
    "Tab1");
    }else
    OASubTabLayoutBeanVar.setSelectedIndex(pageContext,
    "Tab2");
    }

    This is a bug in ADF Framework. Filed a bug with ADF Framework and they have accepted this as a bug.
    I'll update this post once I get the resolution from ADF team.

  • Tab focus issue with 2 popups open

    Hi!
    I've just got a nasty problem with 2 popups and a tab focus.
    First poup automatically opens second popup and if you press TAB
    key focus goes to the first popup window - underneath the top one.
    As a matter of fact - if you open the second popup by
    clicking on the button in the first window - no problem. It happens
    only if the first window opens second via AS.
    I've found on the internet the following
    article:
    But my joy was premature - this piece code:
    quote:
    SystemManager.activate( popup );
    is simply uncompilable. I tried other methods, like:
    this.systemManager.activate(this);
    without any luck.
    Does anybody know the solution to this problem?
    Thanks in advance!
    Cheers,
    Dmitri.

    Manfred,
    Thanks for your reply. I tried requestFocus() and it gives the same results. Also Sun's 1.4.0 API (http://java.sun.com/j2se/1.4/docs/api/) mentions the following with respect to the requestFocus() method in the JComponent class:
    Because the focus behavior of this method is platform-dependent, developers are strongly encouraged to use requestFocusInWindow when possible.
    That is why I used requestFocusInWindow.
    S.L.

  • TAB focus lost to browser

    Hey Folks.  Have an AS2 file that keeps TAB focus/order properly when using Firefox or Safari but NOT when using IE.  It's fine at first but when I TAB to and select a button the next TAB goes to IE's address bar. This does NOT happen in Firefox or Safari.  Can someone please point me to some info on how to avoid this?

    hi,
    maybe when you reactivate the browser, you reactivate the site(!) and not the applet.
    The applet is only a part of the site and has to be activated, too.
    I guess this is the problem.
    but i got no idea how to fix this.
    sorry.
    cu Errraddicator

  • Changing tab focus with the keyboard

    I've read about changing the tab focus from one page to another programmatically; however, I would like to have shortcut keys to change tabs (like many programs that use CTRL+Tab to change windows within the program).
    I could use an event structure to capture keyboard button presses and then change the value of the tab control, but is there a more straightforward approach?
    Thanks!
    mlloyd

    You can set all other controls not to be tabbed through and the tab control to have its pages tabbed through. That way, when you use tab, only the tab control's pages will be on the tabbing list. This, however, is probably less straightforward.
    I'm not sure what's the problem with the method you outlined. In most cases, if you want something to happen, you will have to code it. This appeares to be one of those cases. You can make a subVI to do the tabbing for you, if you don't want to have to code all of it in your VI. Pass the reference of the tab control into the VI after you detect the event and use that to decide whether to increase or decrease the tab value. Be sure to cycle the number back to the first page when it reaches the end.
    Try to take over the world!

  • Reader X - Firefox focus problem

    Since I first started using Adobe Reader X, I have had an intermittent keyboard focus problem with Firefox (mostly recently 3.6.14, on Windows 7). If I open a PDF document in a browser tab, sometimes keyboard focus is not returned to Firefox iteself. For instance, I may try to type something into the Firefox search box or URL box, but cannot get keyboard focus there: I cannot get a blinking cursor, though I can select the text there.
    I have not been able to duplicate this problem consistently.
    The workaround is to go to another application entirely, click to move focus there, and then return to Firefox.

    I don't know that "focus" is the right term to use, but I have the same exact problem. Do you have a scroll mouse? I've also noticed that when I scroll within an instance of Adobe Reader that's opened in Firefox using the scroll button on my mouse that the scroll bar does not register the change until I move my cursor over it, then the bar will jump to where it's supposed to be. This is really annoying because I can't quickly judge how far along I am in a .pdf.

  • How to Handled Shift +Tab(Focus) click in radion button?

    Hi,
    I am using Jdeveloper 11.1.2.0.
    My scenario is one radio button having three items(Left,Right,Center). Now my radio button focus is first radio(Left). Now I click the the tab sequence. It will go to the next field, whether it is input field.
    Suppose Now I am come to back ward like shift+Tab it is come to the radio button. Here what is happening mean the focus is going to the Last radio button item(Center), what I want is which radio Item I select Initially ,the Same Place cursor want to go. How to proceed to this. Please give some suggestion to proceed.
    Regards,
    Ragu

    Hi,
    so what you are saying is that the tab focus navigation bypasses the other radio buttons whereas tab back focus navigation doesn't. If this is the case, and due to missing information in your question, try this
    set autosubmit="true" on the radio group so the radio button selection is saved.
    If this doesn't help, please provide information about the implementation of how you created the radio group and which data they are bound to. Chances are that this indeed needs to be filed as a bug but also that it is a problem in your model
    Frank

  • JavaFX focus problem

    Hi,
    I have focus problem in JavaFX application. When I start the application main component has focus.
    But if I switch between application by Ctrl + TAB and back to JavaFX application the component never gets focus again.
    I tried to get focus on that component by TAB taster but it did not help.
    Application code is very huge so I did send it to the post.
    Thanks
    Zlaja

    "+How can I know which component has focus after main componet has lost it? +"
    Perhaps loop on the components and check the 'focused' variable? Not very practical, I admit.
    Note: Stage as a 'containsFocus' variable, too. It is false when another window is selected and true it is selected itself.
    In my test, I request focus for a component. When the stage losts the focus, then regains it, the component regains the focus as well.

  • Focus Problem on Solaris with jdk 1.3.1

    Hi all,
    We are having a focus problem on Solaris. The same code works fine on Windows without any problem.
    I am sending the test code and run steps below which you can compile and repeat the problem.
    NOTE: When we put a comment on the line "f1.requestFocus();" in TestFocus.java it works OK.
    Run Steps :
    1. Run TestFocus.class
    2. A JFrame appears with 2 text field and a button
    3. Try to write something on the text fields. It works OK.
    4. Click the button to open a new JFrame
    5. A new JFrame opens with a single text field and a button.
    6. Click the button to close the second frame
    7. You are now on the main JFrame
    8. Try to write something on the text fields. It works OK.
    9. Repeat the steps 4-7
    10. Try to write something on the text fields. You are able to focus and write on the first field. BUT you cannot select or write the second Field!
    JAVA SOURCE FILES :
    PenHesapListener.java :
    public interface PenHesapListener extends java.util.EventListener {
    void tamam_actionPerformed(java.util.EventObject newEvent);
    void iptal_actionPerformed(java.util.EventObject newEvent);
    ------PenHesapLisEventMulticaster.java----------------------------------
    public class PenHesapLisEventMulticaster extends java.awt.AWTEventMulticaster implements PenHesapListener {
    * Constructor to support multicast events.
    * @param a java.util.EventListener
    * @param b java.util.EventListener
    protected PenHesapLisEventMulticaster(java.util.EventListener a, java.util.EventListener b) {
         super(a, b);
    * Add new listener to support multicast events.
    * @return muhasebe.HesappenListener
    * @param a muhasebe.HesappenListener
    * @param b muhasebe.HesappenListener
    public static PenHesapListener add(PenHesapListener a, PenHesapListener b) {
         return (PenHesapListener)addInternal(a, b);
    * Add new listener to support multicast events.
    * @return java.util.EventListener
    * @param a java.util.EventListener
    * @param b java.util.EventListener
    protected static java.util.EventListener addInternal(java.util.EventListener a, java.util.EventListener b) {
         if (a == null) return b;
         if (b == null) return a;
         return new PenHesapLisEventMulticaster(a, b);
    * @return java.util.EventListener
    * @param oldl muhasebe.HesappenListener
    protected java.util.EventListener remove(PenHesapListener oldl) {
         if (oldl == a) return b;
         if (oldl == b) return a;
         java.util.EventListener a2 = removeInternal(a, oldl);
         java.util.EventListener b2 = removeInternal(b, oldl);
         if (a2 == a && b2 == b)
              return this;
         return addInternal(a2, b2);
    * Remove listener to support multicast events.
    * @return muhasebe.HesappenListener
    * @param l muhasebe.HesappenListener
    * @param oldl muhasebe.HesappenListener
    public static PenHesapListener remove(PenHesapListener l, PenHesapListener oldl) {
         if (l == oldl || l == null)
              return null;
         if(l instanceof PenHesapLisEventMulticaster)
              return (PenHesapListener)((PenHesapLisEventMulticaster) l).remove(oldl);
         return l;
    public void tamam_actionPerformed(java.util.EventObject newEvent) {
         ((PenHesapListener)a).tamam_actionPerformed(newEvent);
         ((PenHesapListener)b).tamam_actionPerformed(newEvent);
    public void iptal_actionPerformed(java.util.EventObject newEvent) {
         ((PenHesapListener)a).iptal_actionPerformed(newEvent);
         ((PenHesapListener)b).iptal_actionPerformed(newEvent);
    ---------TestFocus2.java-----------------------------------------
    import javax.swing.*;
    import javax.swing.JOptionPane;
    import java.awt.event.WindowAdapter;
    import java.awt.event.KeyListener;
    import java.awt.event.KeyAdapter;
    import java.awt.event.KeyEvent;
    import java.awt.event.ActionEvent;
    import java.awt.event.WindowEvent;
    import java.awt.event.ActionListener;
    import java.util.ArrayList;
    import java.util.StringTokenizer;
    import java.text.SimpleDateFormat;
    import java.awt.Dimension;
    import java.awt.Toolkit;
    import java.awt.Color;
    import java.util.Locale;
    import java.util.ResourceBundle;
    public class TestFocus2 extends JFrame implements ActionListener
         protected transient PenHesapListener PenhListener = null ;
         JTextField f10 = null;
         JButton b10= null ;
         JTextField f1 = new JTextField() ;
         JButton b1 = new JButton() ;
         JFrame f20 = null;
         public TestFocus2()
              getContentPane().setLayout(new BoxLayout(getContentPane(), BoxLayout.Y_AXIS));
              getContentPane().add(f1);
              getContentPane().add(b1);
              pack();
              setVisible(true);
              b1.addActionListener(this);
         public void actionPerformed(ActionEvent e)
              if(e.getSource() == b1)
                   fireTamam_actionPerformed(e);
         public void addPenHesapListener(PenHesapListener newListener)
              PenhListener = PenHesapLisEventMulticaster.add(PenhListener, newListener);
              return;
         protected void fireTamam_actionPerformed(java.util.EventObject newEvent) {
              PenhListener.tamam_actionPerformed(newEvent);
              this.setVisible(false);
         protected void fireiptal_actionPerformed(java.util.EventObject newEvent) {
              PenhListener.iptal_actionPerformed(newEvent);
         public static void main(String x[])
              TestFocus2 gen01 = new TestFocus2();
    --------TestFocus.java-----------------------------------
    import javax.swing.*;
    import javax.swing.JOptionPane;
    import java.awt.event.WindowAdapter;
    import java.awt.event.KeyListener;
    import java.awt.event.KeyAdapter;
    import java.awt.event.KeyEvent;
    import java.awt.event.ActionEvent;
    import java.awt.event.WindowEvent;
    import java.awt.event.ActionListener;
    import java.util.ArrayList;
    import java.util.StringTokenizer;
    import java.text.SimpleDateFormat;
    import java.awt.Dimension;
    import java.awt.Toolkit;
    import java.awt.Color;
    import java.util.Locale;
    import java.util.ResourceBundle;
    import java.awt.Container;
    public class TestFocus extends JFrame implements ActionListener
         PenKreKart aPenKreKart = null ;      
         Container ctn = null;
         JTextField f10 = null;
         JButton b10= null ;
         JTextField f1 = new JTextField() ;
         JTextField f2 = new JTextField() ;
         JButton b1 = new JButton() ;
         JFrame f20 = null;
         public TestFocus()
              //aPenKreKart = new PenKreKart(true);
              //aPenKreKart.aTemelPencere.setVisible(false);
              getContentPane().setLayout(new BoxLayout(getContentPane(), BoxLayout.Y_AXIS));
              getContentPane().add(f1);
              getContentPane().add(f2);
              getContentPane().add(b1);
              pack();
              setVisible(true);
              b1.addActionListener(this);
         public void actionPerformed(ActionEvent e)
              if(e.getSource() == b1)
                   pencere_islemi();
         // pencere koyma k?sm? .. begin                               
         public void pencere_islemi() {     
              ctn = this;
              ctn.setEnabled(false);
              TestFocus2 fpen = new TestFocus2();
              //aPenKreKart.aTemelPencere.setVisible(true); //buras?          
              //aPenKreKart.aTemelPencere.addPenHesapListener(new PenHesapListener() {
              fpen.addPenHesapListener(new PenHesapListener() {
                        // metod      tamam_actionPerformed begin...          
                        public void tamam_actionPerformed(java.util.EventObject newEvent) {
                             ctn.setEnabled(true);
                             ctn.requestFocus();
                             // Problem is when we comment the below line it works .....
                             f1.requestFocus();
                             System.out.println("tamam");
                        // metod      tamam_actionPerformed end...          
                        // metod      iptal_actionPerformed begin...          
                        public void iptal_actionPerformed(java.util.EventObject newEvent) {
                             ctn.setEnabled(true);
                             ctn.requestFocus();
                             System.out.println("iptal");
                        // metod      iptal_actionPerformed begin...          
         // pencere koyma k?sm? .. end                               
         public static void main(String x[])
              TestFocus gen01 = new TestFocus();

    Hi all,
    We are having a focus problem on Solaris. The same code works fine on Windows without any problem.
    I am sending the test code and run steps below which you can compile and repeat the problem.
    NOTE: When we put a comment on the line "f1.requestFocus();" in TestFocus.java it works OK.
    Run Steps :
    1. Run TestFocus.class
    2. A JFrame appears with 2 text field and a button
    3. Try to write something on the text fields. It works OK.
    4. Click the button to open a new JFrame
    5. A new JFrame opens with a single text field and a button.
    6. Click the button to close the second frame
    7. You are now on the main JFrame
    8. Try to write something on the text fields. It works OK.
    9. Repeat the steps 4-7
    10. Try to write something on the text fields. You are able to focus and write on the first field. BUT you cannot select or write the second Field!
    JAVA SOURCE FILES :
    PenHesapListener.java :
    public interface PenHesapListener extends java.util.EventListener {
    void tamam_actionPerformed(java.util.EventObject newEvent);
    void iptal_actionPerformed(java.util.EventObject newEvent);
    ------PenHesapLisEventMulticaster.java----------------------------------
    public class PenHesapLisEventMulticaster extends java.awt.AWTEventMulticaster implements PenHesapListener {
    * Constructor to support multicast events.
    * @param a java.util.EventListener
    * @param b java.util.EventListener
    protected PenHesapLisEventMulticaster(java.util.EventListener a, java.util.EventListener b) {
         super(a, b);
    * Add new listener to support multicast events.
    * @return muhasebe.HesappenListener
    * @param a muhasebe.HesappenListener
    * @param b muhasebe.HesappenListener
    public static PenHesapListener add(PenHesapListener a, PenHesapListener b) {
         return (PenHesapListener)addInternal(a, b);
    * Add new listener to support multicast events.
    * @return java.util.EventListener
    * @param a java.util.EventListener
    * @param b java.util.EventListener
    protected static java.util.EventListener addInternal(java.util.EventListener a, java.util.EventListener b) {
         if (a == null) return b;
         if (b == null) return a;
         return new PenHesapLisEventMulticaster(a, b);
    * @return java.util.EventListener
    * @param oldl muhasebe.HesappenListener
    protected java.util.EventListener remove(PenHesapListener oldl) {
         if (oldl == a) return b;
         if (oldl == b) return a;
         java.util.EventListener a2 = removeInternal(a, oldl);
         java.util.EventListener b2 = removeInternal(b, oldl);
         if (a2 == a && b2 == b)
              return this;
         return addInternal(a2, b2);
    * Remove listener to support multicast events.
    * @return muhasebe.HesappenListener
    * @param l muhasebe.HesappenListener
    * @param oldl muhasebe.HesappenListener
    public static PenHesapListener remove(PenHesapListener l, PenHesapListener oldl) {
         if (l == oldl || l == null)
              return null;
         if(l instanceof PenHesapLisEventMulticaster)
              return (PenHesapListener)((PenHesapLisEventMulticaster) l).remove(oldl);
         return l;
    public void tamam_actionPerformed(java.util.EventObject newEvent) {
         ((PenHesapListener)a).tamam_actionPerformed(newEvent);
         ((PenHesapListener)b).tamam_actionPerformed(newEvent);
    public void iptal_actionPerformed(java.util.EventObject newEvent) {
         ((PenHesapListener)a).iptal_actionPerformed(newEvent);
         ((PenHesapListener)b).iptal_actionPerformed(newEvent);
    ---------TestFocus2.java-----------------------------------------
    import javax.swing.*;
    import javax.swing.JOptionPane;
    import java.awt.event.WindowAdapter;
    import java.awt.event.KeyListener;
    import java.awt.event.KeyAdapter;
    import java.awt.event.KeyEvent;
    import java.awt.event.ActionEvent;
    import java.awt.event.WindowEvent;
    import java.awt.event.ActionListener;
    import java.util.ArrayList;
    import java.util.StringTokenizer;
    import java.text.SimpleDateFormat;
    import java.awt.Dimension;
    import java.awt.Toolkit;
    import java.awt.Color;
    import java.util.Locale;
    import java.util.ResourceBundle;
    public class TestFocus2 extends JFrame implements ActionListener
         protected transient PenHesapListener PenhListener = null ;
         JTextField f10 = null;
         JButton b10= null ;
         JTextField f1 = new JTextField() ;
         JButton b1 = new JButton() ;
         JFrame f20 = null;
         public TestFocus2()
              getContentPane().setLayout(new BoxLayout(getContentPane(), BoxLayout.Y_AXIS));
              getContentPane().add(f1);
              getContentPane().add(b1);
              pack();
              setVisible(true);
              b1.addActionListener(this);
         public void actionPerformed(ActionEvent e)
              if(e.getSource() == b1)
                   fireTamam_actionPerformed(e);
         public void addPenHesapListener(PenHesapListener newListener)
              PenhListener = PenHesapLisEventMulticaster.add(PenhListener, newListener);
              return;
         protected void fireTamam_actionPerformed(java.util.EventObject newEvent) {
              PenhListener.tamam_actionPerformed(newEvent);
              this.setVisible(false);
         protected void fireiptal_actionPerformed(java.util.EventObject newEvent) {
              PenhListener.iptal_actionPerformed(newEvent);
         public static void main(String x[])
              TestFocus2 gen01 = new TestFocus2();
    --------TestFocus.java-----------------------------------
    import javax.swing.*;
    import javax.swing.JOptionPane;
    import java.awt.event.WindowAdapter;
    import java.awt.event.KeyListener;
    import java.awt.event.KeyAdapter;
    import java.awt.event.KeyEvent;
    import java.awt.event.ActionEvent;
    import java.awt.event.WindowEvent;
    import java.awt.event.ActionListener;
    import java.util.ArrayList;
    import java.util.StringTokenizer;
    import java.text.SimpleDateFormat;
    import java.awt.Dimension;
    import java.awt.Toolkit;
    import java.awt.Color;
    import java.util.Locale;
    import java.util.ResourceBundle;
    import java.awt.Container;
    public class TestFocus extends JFrame implements ActionListener
         PenKreKart aPenKreKart = null ;      
         Container ctn = null;
         JTextField f10 = null;
         JButton b10= null ;
         JTextField f1 = new JTextField() ;
         JTextField f2 = new JTextField() ;
         JButton b1 = new JButton() ;
         JFrame f20 = null;
         public TestFocus()
              //aPenKreKart = new PenKreKart(true);
              //aPenKreKart.aTemelPencere.setVisible(false);
              getContentPane().setLayout(new BoxLayout(getContentPane(), BoxLayout.Y_AXIS));
              getContentPane().add(f1);
              getContentPane().add(f2);
              getContentPane().add(b1);
              pack();
              setVisible(true);
              b1.addActionListener(this);
         public void actionPerformed(ActionEvent e)
              if(e.getSource() == b1)
                   pencere_islemi();
         // pencere koyma k?sm? .. begin                               
         public void pencere_islemi() {     
              ctn = this;
              ctn.setEnabled(false);
              TestFocus2 fpen = new TestFocus2();
              //aPenKreKart.aTemelPencere.setVisible(true); //buras?          
              //aPenKreKart.aTemelPencere.addPenHesapListener(new PenHesapListener() {
              fpen.addPenHesapListener(new PenHesapListener() {
                        // metod      tamam_actionPerformed begin...          
                        public void tamam_actionPerformed(java.util.EventObject newEvent) {
                             ctn.setEnabled(true);
                             ctn.requestFocus();
                             // Problem is when we comment the below line it works .....
                             f1.requestFocus();
                             System.out.println("tamam");
                        // metod      tamam_actionPerformed end...          
                        // metod      iptal_actionPerformed begin...          
                        public void iptal_actionPerformed(java.util.EventObject newEvent) {
                             ctn.setEnabled(true);
                             ctn.requestFocus();
                             System.out.println("iptal");
                        // metod      iptal_actionPerformed begin...          
         // pencere koyma k?sm? .. end                               
         public static void main(String x[])
              TestFocus gen01 = new TestFocus();

  • How do I stop Yahoo mail's popup dialog box from changing the tab focus?

    Hi,
    When I have a tab opened to Yahoo mail and I open a Yahoo email on my other computer or Blackberry, there's a time delay and at some point, Yahoo shifts my browser focus to display a pop-up dialog box that says "You have been disconnected from chat because you have signed into Yahoo! Messenger from another computer." I can't even switch back to the tab I was on without dismissing the popup.
    I'd love it if I could turn off the pop-up, - don't care about the disconnection - but in the meantime, is there some way to prevent Yahoo from changing my tab focus?
    Thanks!

    Hi Douglass,
    You will need to navigate to the following folder.
    /Users/yourusername/Library/Mail/V2/MailData
    and backup the following file... MessageRules.plist
    Open the file in BBedit to confirm your rules are infact inside that particular plist file as Mail will also create backups occasionally.
    Once you reinstall, do a compare/replace with the newly created MessageRules.plist and you should be able to bring your "old" rules into your fresh install.
    as for mailboxes, those are contained within this folder
    /Users/yourusername/Library/Mail/V2/Mailboxes
    and it will be up to you to backup those files and File/Import Mailboxes them into the new install.

  • Calling1.4.1 signed applet from Javascript causes keyboard/focus problems

    Pretty sure there's a JRE bug here, but I'm posting to forums before I open one in case I'm missing something obvious :-)
    This issue may be specific to IE, I haven't tested elsewhere yet. Our web application is centered around a signed applet that is initialized with XML data via Javascript. We first noticed the problem when our users started upgrading from the 1.3.x plug-in to the 1.4.x plug-in. The major symptom was that shortcut keys stopped working. I debugged the problem off and on for about a month before I boiled it down to a very simple program that demonstrates the issue (included below). Basically, the program has a function that adds a JButton to a JPanel and registers a keyboard listener (using the new DefaultKeyboardFocusManager class) that prints a message to the console. This function is called by the applet's init() method, as well as by a public method that can be called from Javascript (called callMeFromJavascript()). I also included a very simple HTML file that provides a button that calls the callMeFromJavascript() method. You can test this out yourself: To recreate, compile the class below, JAR it up, sign the JAR, and put in the same dir with the HTML file. Load the HTML file in IE 5.0 or greater, and bring the console up in a window right next to it. Now click the button that says init--you should see the small box appear inside the button that indicates it has the focus. Now press some keys on your keyboard. You should see "KEY PRESSED!!!" appearing in the console. This is proper behavior. Now click the Init Applet from Javascript button. It has removed the button called init, and added one called "javascript". Press this button. Notice there is no focus occurring. Now press your keyboard. No keyboard events are registered.
    Where is gets interesting is that if you go back and make this an unsigned applet, and try it again, everything works fine. This bug only occurs if the applet is signed.
    Furthermore, if you try it in 1.3, signed or unsigned, it also works. So this is almost certainly a 1.4 bug.
    Anyone disagree? Better yet, anyone have a workaround? I've tried everything I could think of, including launching a thread from the init() method that sets up the components, and then just waits for the data to be set by Javascript. But it seems that ANY communication between the method called by Javascript and the code originating in init() corrupts something and we don't get keyboard events. This bug is killing my users who are very reliant on their shortcut keys for productivity, and we have a somewhat unique user interface that relies on Javascript for initialization. Any help or suggestions are appreciated.
    ================================================================
    Java Applet (Put it in a signed JAR called mainapplet.jar)
    ================================================================
    import javax.swing.*;
    import java.awt.*;
    import java.awt.event.*;
    public class MainApplet extends JApplet implements KeyEventDispatcher
        JPanel test;
        public void init()
            System.out.println("init called");
            setUp("init");
        public void callMeFromJavascript()
            System.out.println("callMeFromJavascript called");
            setUp("javascript");
        private void setUp(String label)
            getContentPane().removeAll();
            test = new JPanel();
            getContentPane().add( test );
            JButton button = new JButton(label);
            test.add( button );
            test.updateUI();
            DefaultKeyboardFocusManager.getCurrentKeyboardFocusManager().addKeyEventDispatcher(this);
        public boolean dispatchKeyEvent(KeyEvent e)
            System.out.println("== KEY PRESSED!!! ==");
            return false;
    }================================================================
    HTML
    ================================================================
    <form>
    <APPLET code="MainApplet" archive="mainapplet.jar" align="baseline" id="blah"
         width="200" height="400">
         No Java 2 SDK, Standard Edition v 1.4.1 support for APPLET!!
    </APPLET>
    <p>
    <input type="button" onClick="document.blah.callMeFromJavascript();" value="Init Applet via Javascript">
    </form>

    I tried adding the requestFocus() line you suggested... Same behavior.
    A good thought, but as I mention in my description, the applet has no trouble gaining the focus initially (when init() is called). From what I have seen, it is only when the call stack has been touched by Javascript that I see problems. This is strange though: Your post gave me the idea of popping the whole panel into a JFrame... I tried it, and the keyboard/focus problem went away! It seems to happen only when the component hierarchy is descended from the JApplet's content pane. So that adds yet another variable: JRE 1.4 + Signed + Javascript + components descended from JApplet content pane.
    And yes, signed or unsigned DOES seem to make a difference. Don't ask me to explain why, but I have run this little applet through quite a few single variable tests (change one variable and see what happens). The same JAR that can't receive keyboard events when signed, works just fine unsigned. Trust me, I'm just as baffled as you are.

Maybe you are looking for