WebDynpro Popup Cursor Focus Problem

Hello WebDynpro experts,
since CE7.1 (SP6) I am observing that an input field refuses to take the cursor focus after calling a popup window for a lookup.
Only after some seconds the cursor appears again. Clicking the right mousebutton in this input field the cursor appears at once.
It only happens on Internet Explorer. It does not happen in Firefox(but again when applying IE engine in Firefox).
In some environments (different company, different IE settings) it works fine.
This did not happen in NW04S/7.0.
Does anyone know the reason, a fix or a workaround.
Has it to do with JavaScript-settings?
Thanks a lot for Your answers,
Erik

Hi
[Follow this|requestFocus() doesn't work anymore in NW CE 7.1;
Best Regards
Satish Kumar

Similar Messages

  • 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>

  • Cursor Focus Problem - 10g

    Hi,
    I have an application that was just migrated to 10g from 6i. When a user is entering data on the form and then goes to another window (Alt-TAB) ,then when he returns to the application, the cursor loses focus. The cursor is not in the item it was in before he navigated out of the application.Any ideas how to solve this?
    Regards
    ephsan

    then goes to another window (Alt-TAB) ,then when he returns to the application,Could u pls clear this ou..?
    Does then goes to another window (Alt-TAB) in the same application or he just browse to another explorer surfing the net..?
    Well,any way u could make the item u want to focus first item in ur forms design time where cursor should focus.
    If for any other reasons not possible u could use in :
    When-New-Form-instance or when-new-block-instance Trigger
    Go_item('item_name'); the built-in
    Hope this solve ur problem..
    Best Regards,
    Abdetu..

  • Focus problem since jre 1.4.2_11

    Hi,
    I have a awkward focus problem with my java applet. Everything is working fine for jre 1.4.2_10 and all older jre.
    The applet is embedded in a large DHTML application running in a shell which uses the internet explorer for rendering. The applet communicates with the sorrounding java script via LiveConnect (JSObjects). We do use the static versioning, in order to determine the adaequate vm version. The controls are all based upon the swing controls, some are a bit modified.
    Since the introduction of jre 1.5 update 6 the static versioning does no longer work properly. So, when I run my applet with 1.4.2_11 and all the predecessors a strange focus problem occurs.
    When I click outside the applet (focus lost) and the click on a jscript control to get back the focus to the applet, the keyboard input does not reach the applet. The comboboxes do not work anymore. A mouse click is recognized, but the data-list which should appear is only flickering for a moment.
    The only way to get the focus back, is to make a mouseclick on a selfmade datepicker (based on swing, implemeted like a popup-window). For sure, the large DHTML application is guilty, but definitely diffrent VM versions do behave differntly.
    Does anyone has an idea, has seen similar effects or knows what has been changed in the jre between 1.4.2_10 and 1.4.2_11 ??
    Any hint is appeciated! I am lost :-(((
    cheers thorsten

    Two things: Is there a document detailing manual removal of this JRE (and indeed others); you mention different 'builds' of the same JRE, this is the first time I have read that there are sub-versions/releases of a JRE. Where do I find out the available builds of this JRE and others and how they differ?

  • Cursor focus during a PPR event

    Hi,
    I have two messageTextInput columns (lets say text1 and text2) inside a table region. When a user enters a value in text1 and do a tab out, I fire a PPR event and set some attributes in my VO. The problem is: after it is done, the cursor focus does not move to text2, even though the user did a tab out after entering a value in text1. Cursor focus returns again to text1.
    Also, I do not want to do a page forward, so that processRequest is called again. That would be a costly operation for us. Please let me know if there is a way to regain cursor focus to the right textInput bean.
    Note: This is IE 7.
    Thanks. Much appreciate your inputs.
    Raja

    Raja see this thread, i have replied this some time back:
    Re: How to set focus on a textinput/poplist using PPR
    --Mukul                                                                                                                                                                                                                                                                                                       

  • When typing in a website after opening in a tab, the cursor focuses to the address bar and makes logging to things difficult, how do I change this?

    As stated in the question on any website I open regardless of whether it is a new tab or just a new destination, the cursor focuses on the address bar and makes logging in to sites very infuriating. Any help is much appreciated.

    Thanks for the help, it didn't help with this particular problem. I figured it out though, I had an issue with the AVG safe search. I had to just delete the file in the program files x86.

  • HELP!!!...Firefox 4...STOP cursor focus from going to Bing search box????

    I just installed Firefox 4....Now every time I open firefox the cursor will automatically jump to the bing search box.
    I want it to start and stay inside the address bar.
    A long time ago I had this same problem and searched online and found a solution. I don't remember exactly what it was, but it was something like going into about:config and switching some settings inside there. That fixed the issue and ever time I would open Firefox my cursor would START and STAY in the address bar.
    Can anyone help me figure this out again? I don't want any add ons or extensions, I want it back to the way it was this morning before I upgraded to version 4.
    Thanks in advance!

    ***SOLVED***
    I finally found the solution...
    I have a Windows 7 64bit laptop, but this should work for Vista users as well...possibly XP users too, if you switch a couple of the folders around, if you're an advanced user you shouldn't have a problem....
    add this code to your firefox '''''"prefs.js"''''' file, you can find pref.js here, just follow the steps...
    C:\Users\<you>\AppData\Roaming\Mozilla\Firefox\Profiles\f9cunhcx.default\prefs.js]]
    Now add this line to the bottom of the list. Keep in mind for changes to take effect you must have Firefox closed, otherwise it'll just over write any changes you attempt to make and nothing new will happen.
    '''user_pref("capability.policy.default.HTMLInputElement.focus", "noAccess");'''
    After adding the above line, save the pref.js file and reopen Firefox, you'll now notice your cursor won't be in the search box. You'll have to manually put the cursor to where you want it to be. I have my home page set to www.msn.com it would drive me nuts that as soon as I open the page my cursor focus would go to the bing search bar. It wouldn't be so bad if it went to the google search bar in the top right hand corner...but anyways I hope this helps someone else out. If it does please leave a comment on your experience for the next person.
    Thanks,
    James

  • ITunes "X" Clear Button in search bar loses cursor focus

    Not sure if this is just me, but for the past two or so versions of iTunes, when I hit the circle X button in the search bar to clear the search, the focus goes out of the search bar, so I have to click in it again. It used to be that when I hit the X the cursor would still be in the search for a new search. This is really annoying. Is this a known problem? Any fixes? Thanks.

    There is a search box focus problem in 8.0 and 8.0.1. Click on the "x" in the search box and unless the focus was already on the search box, it will be elsewhere. This happens if you type in the search box, change the focus to elsewhere (click on a tune, go to another iTunes window, or switch to another app), then click on the "X" in the search window. The focus won't be in the search box.
    You can "double-click" the "X" (which clears the field with the first click, then sets the focus in the box with the 2nd click), or click text (which should highlight it) and start typing. If you find that the text isn't highlighted and the focus is in the search box, the <ESC> key will clear the text.

  • 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.

  • Updated - Cursor focus in HTML text field in JEditorPane

    The last poster just save my bacon - so an update for others: Adding a JEditorPane to a JWindow will result in all the <INPUT type=text> form elements to be non focusable. Switching to JFrame does make things work again - but I would love to have a JWindow again (I don't want the title bar for a kiosk type operation).
    thanks!
    brian
    Here is the guy I do thank!!!
    ** PROBLEM
    How do I make cursor focus go into an HTML text field in a JEditorPane?
    My test appplication is a JPanel containing a JEditorPane and nothing else. The content type is text/html. The HTML text contains a form and an INPUT TYPE=TEXT tag. I use setEditable(false) because I do not want the user to edit the paragraph text, only to type in the text field.
    The text field does not get cursor focus. Tab does nothing. The user can click with the mouse to place focus in the text field, so the field is capable of receiving focus. I guess the field is in a View that stops it participating in the component hierarchy.
    Is there a way to make this work?
    ** SOLUTION! - ok, if you don't use JWindow
    It turns out that setEditable(false) is not enough. The JEditorPane still gets in the way of the focus cycle. It also needs setFocusCycleRoot(false) and setFocusable(false) to prevent it from participating in focus. Focus on the text field then works normally.
    fp

    I don't want the title bar for a kiosk type operation).You could use an undecorated frame. Read the API for more info.
    Or, maybe this posting will help:
    http://forum.java.sun.com/thread.jspa?forumID=57&threadID=675445

  • Cursor Focus

    Hi,
      I have a testedit UI field in my view  with data and edit button also there down of the textedit.now when i clicked edit button the cursor should be displayed in the textedit filed.Can anybody give me idea regarding this.
    With Regards,
    Prasad

    hello prasad,
    To set the cursor focus on the text edit on click of the button edit, do the following
    1. bind the UI element Text Edit to one context attribute (suppose it is a value attribute bound                                                                               
    directly to context root node named                                                                               
    source )
    2. create an action for the click event of the Button EDIT (suppose its name is EDIT)
        This will create an eventhandler OnActionEdit() in the implementation.
    3. Now write the code in the event handler as shown below
        //@@begin javadoc:onActionEDIT(ServerEvent)
      /** Declared validating event handler. */
      //@@end
      public void onActionEDIT(com.sap.tc.webdynpro.progmodel.api.IWDCustomEvent wdEvent )
        //@@begin onActionEDIT(ServerEvent)
        IWDAttributeInfo attrinfo = wdContext.getNodeInfo().getAttribute(IPrivateTEST_appView.IContextElement.SOURCE);
        wdThis.wdGetAPI().requestFocus(wdContext.currentContextElement(),attrinfo);
        //@@end
    4. deploy and run
    done
    Hope it is clear
    Sarbjeet Singh

  • Browser focus problem

    Hello.
    We have a problem with focus on our web forms.
    In our form we have one button. When the user clicks on the button, cursor appears in one item.
    But when the user clicks outside the form (but still inside browser) and then back on the form, cursor is not visible. And if the user then clicks on the button, cursor is still not visible. Only when the user clicks into the item manually cursor appears.
    Annoying.
    Is there any solution for this?
    Thanks.

    a known forms focusing problem is fixed with SUN JRE 1.5_12. Also try to use the latest JInitiator if you don't want to use SUN JRE (on unix clients, you don't have any other option but to use SUN JRE). I recommend using Firefox on both unix and windows clients.
    I hope this proves useful.

  • 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();

  • Calling an ABAP WebDynpro Popup from a BSP view

    I need to know if the following is possible.
    I have a requirement to call an ABAP WebDynpro Popup from a BSP view.
    When the Popup is triggered (eg via pushbutton) the BSP will pass data to the Popup, before the Popup is closed the Popup will pass data back to the BSP to be displayed in the BSP view.
    I do not want to rely on Portal Events as Portals may not be used, would really appreciate a clean simple solution.

    Hi,
    any webdynpro application has a URL behind it. Haven´t you tried to call that URL with Javascript code ??
    script language="Javascript"
          url = "test_page.htm" + "?field=" + param;
          window.open(url, "F4window", "width=400, height=400");
    /script
    You can pass data to the WD application using parameters as I show you after the "?".

  • 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

  • Directive Bundle - Shutdown workstation no longer works

    Our network has been using a directive bundle to shutdown our pc's for over a year now and it had worked quite well up until a couple of weeks ago. At that point I added an additional requirement to keep it from shutting down a pc on our network, sin

  • My iphone 5 is stuck in recovery mode after battery change?

    my iphone 5 is stuck in recovery mode after battery change, I decided to change my faulty iphone 5 battery as i was out of warrenty, I managed to chance the battery with no problems (I Think), when i put the phone back together and tried to power on

  • How do i get sound to my mixing board?

    I am doing a media presentation and need the sound from my MacBook to connect into a sound board at a church...they have Microphone and 1/4" inputs...what do I need to do to make this work?

  • As i type single letter it displays list of ids , how to overcome it ?

    when ever i type a single letter to log in to gmail or yahoo it displays a list of email ids with that letter . Is there any option to remove it so that it won't display any ids or won't remember any . == Operating system == windows xp

  • Why does my iPhone repeatedly beep when i plug it into my macbook

    My phone is repeatdly every 5 seconds making the noise that it makes when you plug your phone into a charger, my phone keeps beeping every time i try to hook it up to itunes on my macbook... has anyone else had this issue?!