KeyEvent processing

Hello everybody!
Is there anyway to prevent a component from process KeyEvents ?
I could create a subclass with a new boolean bound property called keyEventsDisabled.
I know there is a method named processComponentKeyEvent( KeyEvent e ).
Then I could override this method and consume all key events:
protected void processComponentKeyEvent(KeyEvent e) {
if ( keyEventDisabled ) {
e.cosume();
But I will be forced to make this adjustment for every component.(that meaning I should create a new sublclass for every component, which is a unhandy task)
Is there a simple way ? Can u suggest me anything else ?
thx

I assume you want to disable KeyEvents to all components at the same time. I have never tried it, but I have read some posts on using a glass pane. The code would be something like:
Component glassPane = frame.getGlassPane();
glassPane.addMouseListener( new MouseAdapter() {} );
glassPane.addKeyListener( new KeyAdapter()
     public void keyPressed(KeyEvent e)
          e.consume();
glassPane.setVisible(true);
glassPane.requestFocus();The glass pane is an invisible component that sits over the entire frame and should therefore intercept all KeyStrokes and Mouse events. When you are ready to accept input again use glassPane.setVisible(false). Hope it works.
If it doesn't work you could add the KeyListener to each component. A little more work but better than subclassing each component.
This section from the Swing tutorial may give you a little more information on Glass Panes:
http://java.sun.com/docs/books/tutorial/uiswing/components/rootpane.html

Similar Messages

  • How can I change the default process of VK_ENTER in JTable

    Now I have met a requirment to process the "enter" key event in JTable. But it is found that the JTable has a default process on the ENTER key press, and it will select the next row. Even the worse, the default process is invoked before the KeyListener I registered.
    How can I remove that?
    I have tried the follow ways: 1.remove several keys, such as "selectNextRow","selectNextRowExtendSelection", from the actionMap,
    2.invoke processKeyBinding() in the constructor of my subclass of JTable.
    But both lead to failure.
    And I can't find the default process to the VK_ENTER in the java source code. I need help on this.
    BTW, does anyone know how to eliminate the focus traversal between cells. When I press left arrow or right arrow, the focus traverses in the scope of the selected row.

    thanks
    i also found solution for my poblem:
    i have this code:
    jMenuItem jMnItEdit;
    jMnItEdit.setAccelerator( KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_ENTER, 0));
    also i had ActionListener bounded to this JMenuItem
    but Ialso had in form JTable and it always grabbed my VK_ENTER event and that menu item wasn't working at all
    but when i overrode that input map for JTable and set
    tableInputMap.put(KeyStroke.getKeyStroke(KeyEvent.VK_ENTER, 0, false), "none");
    everything started to work perfectly,
    thanks a lot

  • KeyEvent.consume() problem for BACKSPACE

    Hi!
    I have the following problem - I want to disable the BACKSPACE key input for a JTextArea. I�ve done it like this:
    private class MyKeyAdapter extends KeyAdapter {
    public void keyPressed (KeyEvent e) {
    if (e.getKeyCode()==KeyEvent.VK_BACK_SPACE) e.consume();
    This method works for other keys but why not for BACKSPACE? Checking if the event has been consumed with KeyEvent.isConsumed() returns "true" like it should, but the event still gets processed in JTextArea.
    Thanx in advance,
    bbruno

    Here, try the following with a document filter that filters out VK_DELETE and VK_BACK_SPACE:
    import javax.swing.*;
    import javax.swing.text.*;
    import java.awt.event.*;
    public class TxtDemo extends JFrame {
       public static void main(String[] args) {
          JFrame F=new TxtDemo("Test Window");
          F.pack();
          F.setVisible(true);
          F.addWindowListener(new WindowAdapter() {
             public void windowClosing(WindowEvent e) {
                System.exit(0);
       TxtDemo(String title) {
          super(title);
          JTextArea textArea = new JTextArea(5, 20);
          DocumentFilter filter = new DocumentFilter() {
             public void insertString(DocumentFilter.FilterBypass fb,int offset, String string, AttributeSet attr) throws BadLocationException {
                super.insertString(fb,offset,string,attr);
             public void remove(DocumentFilter.FilterBypass fb, int offset, int length) {  
                // do nothing
             public void replace(DocumentFilter.FilterBypass fb, int offset, int length, String text, AttributeSet attrs) throws BadLocationException {
                super.replace(fb,offset,length,text,attrs);
          ((AbstractDocument) textArea.getDocument()).setDocumentFilter(filter);
          getContentPane().add(textArea);
    }Here is the same version that can be cut-n-paste:
    import javax.swing.*;
    import javax.swing.text.*;
    import java.awt.event.*;
    public class TxtDemo extends JFrame {
    public static void main(String[] args) {
    JFrame F=new TxtDemo("Test Window");
    F.pack();
    F.setVisible(true);
    F.addWindowListener(new WindowAdapter() {
    public void windowClosing(WindowEvent e) {
    System.exit(0);
    TxtDemo(String title) {
    super(title);
    JTextArea textArea = new JTextArea(5, 20);
    DocumentFilter filter = new DocumentFilter() {
    public void insertString(DocumentFilter.FilterBypass fb,int offset, String string, AttributeSet attr) throws BadLocationException {
    super.insertString(fb,offset,string,attr);
    public void remove(DocumentFilter.FilterBypass fb, int offset, int length) {  
    // do nothing
    public void replace(DocumentFilter.FilterBypass fb, int offset, int length, String text, AttributeSet attrs) throws BadLocationException {
    super.replace(fb,offset,length,text,attrs);
    ((AbstractDocument) textArea.getDocument()).setDocumentFilter(filter);
    getContentPane().add(textArea);
    ;o)
    V.V.

  • How to pass a KeyEvent to a JTextPane?

    Hi,
    I have a JTextPane and I display a JPopupMenu on top of it. The menu implements a MenuKeyListener to catch typed text and filters the menu content based on the typed text.
    I also need to insert the typed characters into the document in the underlying JTextPane. So, I have a KeyEvent (MenuKeyEvent actually) and I need to make the JTextPane to process it as if it was produced by the user, i.e. match it against the action map and do the document edit for me.
    I tried to call the JTextPane.processKeyEvent(e) method but it doesn't work. Any hints?
    Thanks a lot!
    Robert

    Well, I'm wondering if it isn't working because the event is already consumed?
    Perhaps you can construct a duplicate KeyEvent and pass that along instead?
    If you need further help then you need to create a [url http://homepage1.nifty.com/algafield/sscce.html]Short, Self Contained,
    Compilable and Executable, Example Program that demonstrates the
    incorrect behaviour, because I can't guess exactly what you are doing
    based on the information provided.
    And don't forget to use the [url http://forum.java.sun.com/help.jspa?sec=formatting]Code Formatting Tags so the code retains its
    original formatting.

  • How can I change the default process priority for plugin-container?

    I'm on Windows XP and using Firefox 16.0.2.
    While browsing the web I often listen to pandora, but the music playback is always choppy or jerky. It especially occurs when scrolling pages up/down on other tabs. I saw on another question - https://support.mozilla.org/en-US/questions/930496 - that one solution is to change the plugin-container.exe priority to AboveNormal. I've done this several times and it works really well!!
    I also tried changing the firefox.exe priority up and down, but this is ineffective (choppy playback problem still occurs). It is very much related to the plugin-container priority.
    Please could you provide an about:config option to set the default process priority for the plugin-container. It would make a big difference for those users who have the problem. Thanks!

    thanks
    i also found solution for my poblem:
    i have this code:
    jMenuItem jMnItEdit;
    jMnItEdit.setAccelerator( KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_ENTER, 0));
    also i had ActionListener bounded to this JMenuItem
    but Ialso had in form JTable and it always grabbed my VK_ENTER event and that menu item wasn't working at all
    but when i overrode that input map for JTable and set
    tableInputMap.put(KeyStroke.getKeyStroke(KeyEvent.VK_ENTER, 0, false), "none");
    everything started to work perfectly,
    thanks a lot

  • Creating native processes

    Hi,
    Runing SuSE Linux 8.0, java 1.4.0
    I'm trying to create a native shell (I/O dumped into a JTextArea) woith java, the problem is that once I have invoked bash, it somehow manages to work out that its not running in a real console and behaves as if my input was a script. I managed to get bash working properly with command line args, but now when I want to start other interpreters on top of it they too seem to detect they are not in a proper tty.
    Is there a way to make native processes behave as if they were run from, say, an xterm?
    my code follows:
    file tests/ConsoleOnSteroids.java
    /* File:    ConsoleOnSteroids.java
    * created: 10/07/03
    * author:  dsm
    package tests;
    import java.io.BufferedReader;
    import java.io.IOException;
    import java.io.PrintStream;
    import javax.swing.JFrame;
    import javax.swing.JScrollPane;
    import javax.swing.JTextArea;
    *  Defines a console that handles a native process
    * @author    dsm
    public class ConsoleOnSteroids extends JFrame {
        private ThreadedStreamReader out;
        private ThreadedStreamReader err;
        private PrintStream inp;
        private String processName;
        private JTextArea jta;
        private IOControl ioc;
        private JScrollPane jsp;
         *  Constructor for the ConsoleOnSteroids object
         * @param  name         The name of the frame
         * @param  processName  The name of the process to execute (like /bin/bash in UN*X systems)
        public ConsoleOnSteroids(String name, String processName) {
            super(name);
            this.processName = processName;
            this.jsp = new JScrollPane();
            this.jta = new JTextArea();
            try {
                this.ioc = new IOControl(Runtime.getRuntime().exec(this.processName));
                this.out = new ThreadedStreamReader(this.ioc.getStdout(), this.jta,
                    this.processName + ":stdout");
                this.err = new ThreadedStreamReader(this.ioc.getStderr(), this.jta,
                    this.processName + ":stderr");
                this.inp = this.ioc.getStdin();
            } catch(IOException ioe) {
                System.err.println("The process " + this.processName
                     + "could not be started due to an IOException:");
                ioe.printStackTrace();
                System.exit(1);
            this.jta.setEditable(false);
            this.jsp.setViewportView(jta);
            this.addListeners();
            this.getContentPane().add(jsp);
            //this.pack();
            this.setSize(600, 500);
            this.setLocation(100, 100);
            this.setVisible(true);
            this.out.start();
            this.err.start();
            //this.inp.println("ps -A");
            //this.inp.flush();
         *  The main program for the ConsoleOnSteroids class
         * @param  args  The command line arguments
        public static void main(String[] args) {
            ConsoleOnSteroids cos  = new ConsoleOnSteroids("Bash", "/bin/bash --login --noediting -i");
         *  Adds necessary Listeners to the ConsoleOnSteroids object
        private void addListeners() {
            /* Window Listener... what happens when the window is closed */
            this.addWindowListener(
                new java.awt.event.WindowAdapter() {
                    public void windowClosing(java.awt.event.WindowEvent evt) {
                        System.exit(0);
            this.jta.addKeyListener(
                new java.awt.event.KeyAdapter() {
                    public void keyTyped(java.awt.event.KeyEvent evt) {
                        textBoxKeyTyped(evt);
         *  Handles the typing of stuff in the text area
         * @param  evt  Description of Parameter
        private void textBoxKeyTyped(java.awt.event.KeyEvent evt) {
            jta.append(new String(new char[]{evt.getKeyChar()}));
            inp.print(evt.getKeyChar());
            inp.flush();
         *  This private class takes a BufferedReader and a JEditorPane as parameters for the
         *  constructor, and every time a line is avaliable on the reader, it appends it to the pane.
         * @author    dsm
        private class ThreadedStreamReader extends Thread {
            private BufferedReader reader;
            private JTextArea pane;
             *  Constructor for the ThreadedStreamReader object
             * @param  reader  The reader to take input from
             * @param  pane    The pane to dump the input in
             * @param  name    The name of the thread
            public ThreadedStreamReader(BufferedReader reader, JTextArea pane, String name) {
                this.reader = reader;
                this.pane = pane;
                this.setName(name);
             *  Main processing method for the ThreadedStreamReader object
            public void run() {
                while(ioc.isAlive()) {
                    try {
                        char c;
                        int i;
                        if((i = reader.read()) != -1) {
                            c = (char) i;
                            pane.append("" + c);
                    } catch(IOException ioe) {
                        System.err.println("Cannot read from " + this.getName() +
                            " because of an IOException:");
                        ioe.printStackTrace();
                        System.exit(2);
                System.exit(0);
    }file tests/IOControl.java
    /* File:    IOControl.java
    * created: 10/07/03
    * author:  dsm
    package tests;
    import java.io.BufferedReader;
    import java.io.InputStream;
    import java.io.InputStreamReader;
    import java.io.OutputStream;
    import java.io.PrintStream;
    *  Controls the I/O for a process. When using the std[in|out|err] streams, they must all be put on
    *  different threads to avoid blocking!
    * @author    dsm
    public class IOControl extends Object {
        private Process process;
        private BufferedReader stdout;
        private BufferedReader stderr;
        private PrintStream stdin;
        private boolean alive;
         *  Constructor for the IOControl object
         * @param  process  The process to control I/O for
        public IOControl(Process process) {
            this.process = process;
            final Process p  = process;
            new Thread(
                new Runnable() {
                    public void run() {
                        alive = true;  // set the adequate flag for the process
                        try {
                            p.waitFor();  // wait for process to end interfacethis thread
                        } catch(InterruptedException ie) {
                            System.err.println("An error ocurred during the execution of the process");
                            ie.printStackTrace();
                        } finally {
                            alive = false;  // the process has ended
                }).start();
            this.stdin = new PrintStream(process.getOutputStream());
            this.stdout = new BufferedReader(new InputStreamReader(process.getInputStream()));
            this.stderr = new BufferedReader(new InputStreamReader(process.getErrorStream()));
         *  Gets the stdin attribute of the IOControl object
         * @return    The stdin value
        public PrintStream getStdin() {
            return this.stdin;
         *  Gets the stdout attribute of the IOControl object
         * @return    The stdout value
        public BufferedReader getStdout() {
            return this.stdout;
         *  Gets the stderr attribute of the IOControl object
         * @return    The stderr value
        public BufferedReader getStderr() {
            return this.stderr;
         *  Gets the process attribute of the IOControl object
         * @return    The process value
        public Process getProcess() {
            return this.process;
         *  Gets the alive attribute of the IOControl object
         * @return    The alive value
        public boolean isAlive() {
            return alive;
    }thanks,
    dave.

    anyone?

  • KeyEvent.consume() not consumed...

    Hi,
    If I attach a KeyEventListener to a TextField and that I consume the KeyEvents in the keyPressed() and keyReleased() methods, should the keys typed appear in the field or not?
    TextField f = new TextField();
    f.addKeyEventListener(this);
    public void keyPressed(KeyEvent e)
      e.consume();
    }I think they should not appear, as described in http://java.sun.com/j2se/1.3/docs/guide/awt/designspec/events.html:
    There are cases where programs need to prevent certain types of events from being processed normally by a component (i.e. a builder wants to use mouse events to enable a user to graphically move a button around and it wants to prevent the mouse press from 'pushing' the button).
    But testing it on Win2K with Sun JDK1.4.1 or IBM JDK1.3 shows the characters typed in the text field.
    On the other hand, testing the same code on a PDA width Personal Java does not show the keys types in the text field.
    Which one is correct?

    Hi,
    After been puzzled by this one for a few days, I found the answer. You have to consume all key events, even if KEY_TYPED is a high-level event and the javadoc for consume() says that it works only with low-level events!

  • How to stop some keyevent listening ?

    Hi,
    I have a number of JTextPane organized as cells of a table and I would like to go from one to another with the enter/tab key; but when I do that, in addition to jump from a cell to another, their is a enter/tab keyevent send to the JTextPane that had the focus. Is it possible to configure the JTextPane to ignore enter and tab key ?
    Thanks a lot

    ok, I'v just implemented it, it woks!
    I didn't know that the component send envents before processing it itself, I've learn a really useful thing.
    In fact it is explicitly writed in the API of the InputEvent class:
    Thanks a lot

  • How to process key Events in a JTextArea?

    does anybody of you know how i can process KeyEvents in a JTextArea object? i know i can use the processKeyEvent-method but i don't want to process the Event on the current Caret-position - it would be cool to process this keyEvent at a given position anywhere in the text... it works if i set the CaretPosition to this special position, do the processKeyEvent-method and restore the Caret to it's original position but i want the user to be able to type at the same time as the KeyEvent on another place in the text is processed...
    sorry for my bad english (if it's that bad - i don't know :-) )
    greets and thanks,
    zeroconf

    I think i know one:-)
    Try to override insertString() method of your document.
    In fact create your subclass of the document.
    the insertString method has parameter offset. It's place in the document where changes should be done. All key type events are converted into the insertString() calls.
    So you can do like that
    class MyDocument extends DefaultStyledDocument {(or extends PlainDocument for JtextArea. it depends which component you use)
    public void insertString(int offset,String str,AttributeSet a) {
      int newOffset=getNewOffset(); //get real offset where you want to insert/remove content
      super.insertString(newOffset,str,a);
    JTextArea ta=new JtextArea();
    tc.setDocument(new MyDocuemnt()); //replace default document
    regards
    Stas

  • How to consume some keyEvent?

    Why can't I disable the key A but keeping other key?
    Here is my code.
    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.*;
    public class myDropZone extends JTextPane {
    public myDropZone(){
    super();
    this.setMargin(new Insets(0,0,0,0));
    public void processKeyEvent(KeyEvent e){  
    if (e.getKeyCode()== java.awt.event.KeyEvent.VK_A){
    e.consume();
    else{
    super.processKeyEvent( e );
    Please give me your valuable advice.
    Ivan

    ok, I'v just implemented it, it woks!
    I didn't know that the component send envents before processing it itself, I've learn a really useful thing.
    In fact it is explicitly writed in the API of the InputEvent class:
    Thanks a lot

  • Need help regarding  keyevent

    i would like to invoke a method once enter has been pressed below is my code but i when i press enter nothing happens any ideas why ?
    public void keyPressed(KeyEvent event)
      int thekey = event.getKeyCode();
         if(thekey ==  KeyEvent.VK_ENTER){
               System.out.println("ENTER IS PRESSED");
               Search();
    }     

    Taken from the JTextField API docs:
    How the text field consumes VK_ENTER events depends on whether the text field has any action listeners. If so, then VK_ENTER results in the listeners getting an ActionEvent, and the VK_ENTER event is consumed. This is compatible with how AWT text fields handle VK_ENTER events. If the text field has no action listeners, then as of v 1.3 the VK_ENTER event is not consumed. Instead, the bindings of ancestor components are processed, which enables the default button feature of JFC/Swing to work.
    I don't understand this last statement. Does this mean that the VK_ENTER is passed up to the text field's parent?

  • Error while invoking a process

    Hi Team,
    I get the following error while invoking a process.
    ALC-DSC-125-000: com.adobe.idp.dsc.registry.EndpointNotEnabledException: SOAP endpoint is not enabled for: ExtractingXML/ReadResource
    at com.adobe.idp.dsc.provider.impl.base.AbstractMessageReceiver.validateEndpoint(AbstractMes sageReceiver.java:258)
    at com.adobe.idp.dsc.provider.impl.soap.axis.sdk.SoapSdkEndpoint.invokeCall(SoapSdkEndpoint. java:136)
    at com.adobe.idp.dsc.provider.impl.soap.axis.sdk.SoapSdkEndpoint.invoke(SoapSdkEndpoint.java :81)
    at sun.reflect.GeneratedMethodAccessor755.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at org.apache.axis.providers.java.RPCProvider.invokeMethod(RPCProvider.java:397)
    at org.apache.axis.providers.java.RPCProvider.processMessage(RPCProvider.java:186)
    at org.apache.axis.providers.java.JavaProvider.invoke(JavaProvider.java:323)
    at org.apache.axis.strategies.InvocationStrategy.visit(InvocationStrategy.java:32)
    at org.apache.axis.SimpleChain.doVisiting(SimpleChain.java:118)
    at org.apache.axis.SimpleChain.invoke(SimpleChain.java:83)
    at org.apache.axis.handlers.soap.SOAPService.invoke(SOAPService.java:454)
    at org.apache.axis.server.AxisServer.invoke(AxisServer.java:281)
    at org.apache.axis.transport.http.AxisServlet.doPost(AxisServlet.java:699)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:727)
    at org.apache.axis.transport.http.AxisServletBase.service(AxisServletBase.java:327)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
    at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper. java:227)
    at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:125)
    at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:292)
    at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:26)
    at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:42)
    at com.adobe.idp.dsc.provider.impl.soap.axis.InvocationFilter.doFilter(InvocationFilter.java :43)
    at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:42)
    at com.adobe.idp.um.auth.filter.CSRFFilter.doFilter(CSRFFilter.java:41)
    at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:42)
    at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletC ontext.java:3496)
    at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
    at weblogic.security.service.SecurityManager.runAs(Unknown Source)
    at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2 180)
    at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2086)
    at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1406)
    at weblogic.work.ExecuteThread.execute(ExecuteThread.java:201)
    at weblogic.work.ExecuteThread.run(ExecuteThread.java:173)
    Can anyone please help me with this error.

    I checked my server (which has all the default Adobe services) and the only service I have that comes close is:
    the Repository service's "Read Resource Content" operation.  In the list that comes up as RepositoryService. 
    The Barcode's Extract to XML service.  In the list that comes up as                BarcodedFormsService
    Neither of these is an exact match to the error. Is your process calling a sub process you built?  Does that service actually exist on the server?  If you do a record/playback (in workbench) on which step does the process fail?
    If you look through the entire list of SOAP services (in Adminui) are any of them disabled?

  • Logical GR in Third Party Process

    Hi Friends
    There is logical GR involved in third party process. What if we do not want to trigger it?

    very useful thraed for your Qn-
    [stock not updating after doing MIGO (gr) for third party sales |stock not updating after doing MIGO (gr) for third party sales;
    BR
    Raj

  • EH&S WWI for GLM print request processing

    Hi all,
    we installed EH&S WWI for GLM print request processing scenario, following the note:"1394553", but when we try to print we receive this error from WWI:
    Start Function 'WWI_PRINTREQUEST_CREATE'
      Initializing parameters
      Receiving data from client
       calling RfcGetData returned 0
        receiving data lasted: 0.0 sec.
        Retrieving print request data from RFC interface
        Using Temp Directory E:\WWI\TEMP\BSV100000000000062
       Delete files in E:\WWI\TEMP\BSV100000000000062
        Creating text file E:\WWI\TEMP\BSV100000000000062\r000000000062.val
        Writing data to text file 39 lines, 1009 characters
        Updating print request status from 0 to 1
        [DB time] Writing print request lasted 9 ms
      Start processing command 'Create print request' in synchronous mode
      Creating print request 000000000062
    WwiSapDms::retrieveDocument: RFC error when calling ABAP function moduleRFC connection is not Unicode
    WwiSapDms::retrieveDocument: RFC error when calling ABAP function module
    key     : RFC_ERROR_SYSTEM_FAILURE
    message : See RFC trace file or SAP system log for more details
    Reading SBV document IB0120510 from Cache failed
        WwiCacheRead resulted with -1
        Updating print request status from 1 to 5
        [DB time] Writing print request lasted 4 ms
      ##### Command 'Create print request' finished with status E #####
        Storing ERR file E:\WWI\TEMP\BSV100000000000062\l000000000062.err into DMS succeeded
        22 lines
      Sending data to client
       calling RfcSendData returned 0
        sending data lasted: 0.0 sec.
    Elapsed time : 0.1 sec.
    We don't understand what kind of RFC or what part of customizing we have to check, could you please help us?
    Thanks,
    Christian

    Dear Pugal
    we are not using GLM + and I am not sure about the technqiue used there to handle load balancing. Regarding general WWI setup I assume you know this Note: EH&S: Availability and performance of WWI and Expert servers
    On the top there is a further SAP Note abvailable which might be of interest. This is referenced here:
    http://de.scribd.com/doc/191576739/011000358700000861002013-e
    May be check OSS note: 1958655; OSS Note 1155294 is more related to normal WWI stuff; but may be check it as well. May be 1934253 might help better
    May be this might help.
    C.B.
    PS: may be check as well: consolut - EHS_MD_140_01 - EH&S-Management-Server einrichten
    The load balancing of synchron WWi servers is donein the "RFC" layer, therefore you have no inffluence here, for asynchron WWI servers you can do a lot to manage the WWI load balancing by using "exits" etc.

  • If-statement in application-process

    Hi,
    First I will tell you which APEX I am using: 3.0.1
    Ok, I have got a form where there are 4 fields:
    P13_ACCTNO (Popup LOV (fetches first rowset)),
    P13_LOCATION_NAME(Text Field (Disabled, saves state)),
    P13_COMP_ACCTNO( Popup LOV (fetches first rowset)),
    P13_LOCATION(Text Field (Disabled, saves state))
    In my table, the company is always filled in, no null values (but it is not the PK, this is the acctno). But location may be null.
    When I select a location (popup will only show fields which are filled in), then the other fields are filled in as well. So the Location (number) and the acctno is the same.
    Now, when I select a comp_acctno, the rest of the fields are filled in automatically. But the Location (number) will remain from the first select, although no location might be there.
    So I have got 2 javascript codes on the page and 2 applicationprocesses and 1 application item.
    I would like to have an if-statement in my application-process (instead of " HTP.prn ('<item id="P13_LOCATION">' || v_null || '</item>');", something like:
    if :p13_location_name is null then
    :p13_location = ' ';
    end if;
    But I don't know how to put this into the following code, because it is a mixture, which I don't understand completely.
    DECLARE
    v_acctno primemines.acctno%type;
    v_company primemines.company%type;
    v_mineloc primemines.mineloc%type;
    v_commodity primemines.commodity1%type;
    v_null varchar2(5);
    CURSOR cur_c
    IS
    SELECT acctno, mineloc, company, commodity1
    FROM primemines
    WHERE acctno = TO_NUMBER (:temporary_application_item);
    BEGIN
    FOR c IN cur_c
    LOOP
    v_acctno := c.acctno;
    v_company := c.company;
    v_mineloc := c.mineloc;
    v_commodity :=c.commodity1;
    END LOOP;
    v_null := '';
    OWA_UTIL.mime_header ('text/xml', FALSE);
    HTP.p ('Cache-Control: no-cache');
    HTP.p ('Pragma: no-cache');
    OWA_UTIL.http_header_close;
    HTP.prn ('<body>');
    HTP.prn ('<desc>this xml genericly sets multiple items</desc>');
    HTP.prn ('<item id="P13_ACCTNO">' || v_company || '</item>');
    HTP.prn ('<item id="P13_LOCATION_NAME">' || v_MINELOC || '</item>');
    HTP.prn ('<item id="P13_COMMODITY">' || v_commodity || '</item>');
    HTP.prn ('<item id="P13_LOCATION">' || v_null || '</item>');
    HTP.prn ('</body>');
    and also I have discovered that the automatically filling of the fields is only working sometimes (i don't know whether it depends on the company I select). Any ideas, why this is happening?
    could somebody help me with the code please?
    Thanks,
    regards,
    Denise

    Hi,
    @Chad: thanks for the code, I think it works (UPDATE: no, it does not work :-( )
    now i am just left with the other problem that it works only sometimes
    @user512746: yes, i guess you have understood correctly. I have changed the items P13_ACCTNO source used to "always replace" and taken out the default value, which I had set to &P13_ACCTNO.
    But it still only works partly, I don't know why?
    any other ideas?
    Thanks so much for your help so far, both of you.
    Regards,
    Denise

Maybe you are looking for

  • Home Sharing on Apple TV - Stupid Fix.

    Here is the stupidest fix I have ever come accross. I have two MacBook Pro 13" i5s, a 17" i5, a Mac Mini Server i5, and a 27" iMac i5. I use the Mac Mini and iMac for my iTunes Home Sharing. I have three Apple TVs version 2 running 6.1.1 @ 720P and t

  • Ipod wont connect to computer and constantly says ok to disconnect

    Hey, please help!! my ipod nano wont connect with my computer and when i plug it in the 'ok to disconnect' screen comes up with a black tick. I've tried eveything the website says and the trouble is because it can't connect to the computer i cant res

  • Problem in Scheduling agreement in MM

    Hi Guys, I was trying to create Sch. agreement in the MM side. Step1. Created S.Agreement with the transaction code ME31L. Step 2. Maintained S.Agreement schedule lines using transaction code ME38. Then when open up Me38 and see,  there is a open  ta

  • Qosmio X305 will only boot in safe mode or when the graphics card disabled

    Hi All I am having a very concerning issue with my laptop (Toshiba Qosmio X305). It will only boot in safe mode or if I disable the graphics card. Awhile back I upgraded the drivers for the nVidia 9800M GTX from the nVidia website, it worked fine for

  • My iphone4 wont connect to my wi fi

    I have a iphone 4s. its almost full wont update but also wont connect to my wifi. I have had issues with wifi connection since phone lost presumed stolen turned off then Found returned and turned back on hadnt been able to bluetooth or wifi connect s