1. #1
    Sencha User
    Join Date
    Jan 2008
    Posts
    154
    Vote Rating
    0
    NotChris is on a distinguished road

      0  

    Default Unanswered: Question on impllementing help system for GXT application

    Unanswered: Question on impllementing help system for GXT application


    We have an application where we would like to launch help from a menu and also be able to enter F1 to bring up context sensitive help based on the current screen or dialog. I am being given a .dna file in addition to a number of other help files. The .dna file determines which help file to call based on providing the correct context. Is GXT setup to handle this and if so, what would I need to do to have this work? I have tried to search for "help", "help content", "help file", "dna", "implementing help", etc on help in the forum and have had no luck. If there is already a topic that covers this, please point me to it.

    Thank you.

  2. #2
    Sencha User
    Join Date
    Nov 2008
    Posts
    35
    Vote Rating
    0
    mjack003 is on a distinguished road

      0  

    Default Capturing function keys and stopping default browser behavior

    Capturing function keys and stopping default browser behavior


    NotChris,

    As far as I know, GXT does not contain structure to support help systems out of the box. However, we've built our own "function" key setup to replicate the existing desktop ERP's hotkeys for the company I work for. With our help system (F1), we just use native javascript to capture the event (valid parts included below..just fill in the Keyhandler_Meta actions), use the event source to build the help context, pass that to a servlet to build the help URL, and then open a window on the UI with the returned URL. Our help documentation is written in a wiki though which makes this setup easy to use.

    Code:
       //Native JS to capture function keys
        protected native void setupFunctionKeys() /*-{
    
            $doc.onkeydown = function(e) { __handleKeys(e); }
            $doc.onkeypress = function(e) { __handleKeys(e); }
            $doc.onhelp = function() {return(false);}
            $wnd.onhelp = function() {return(false);}
    
            var nonChar = false;
            var Combo = false;
            function __handleKeys(e) {
                isScrolling = false;
                ScrollingX = false;
                ScrollingY = false;
    
                var character;
                var evt = (e) ? e : window.event;       //IE reports window.event not arg
    
                if (!evt.stopPropagation) {
                    evt.stopPropagation = function() { this.cancelBubble = true; };
                    evt.preventDefault = function() { this.returnValue = false; };
                }
    
                if (!evt.stop) {
                    evt.stop = function() {
                        this.stopPropagation();
                        this.preventDefault();
                    };
                }
    
                if (evt.ctrlKey && evt.keyCode == 9) {
                    if (evt.type == "keypress")
                        Editor.fireOnCtrlTab(evt.shiftKey);
                    evt.stop();
                    evt.returnValue = false;
                    return false;
                }
    
                if (evt.type == "keydown") {
                    character = evt.keyCode;
                    if (
                        (character >= 112 && character <= 123)    // F1 to F12
                    ) {
                        nonChar = true;
                        Keyhandler_Meta(character, evt, e);     // function to handle non Characters
                    } else {
                        nonChar = false;
                    }
                }
            }
    
            function Keyhandler_Meta(Meta, evt, e)
            {
                if (!evt.kill)
                {
                    evt.kill = function()
                    {
                        if (e == undefined) evt.keyCode = false; //Kill IE6+7
                        evt.stop();
                        evt.returnValue = false;
                    }
                }
                switch (Meta)
                {
                    case 112: //F1
                    case 113: //F2
                    case 114: //F3
                    case 115: //F4
                    case 116: //F5
                    case 117: //F6
                    case 118: //F7
                    case 119: //F8
                    case 120: //F9
                    case 121: //F10
                    case 122: //F11
                    case 123: //F12
                        evt.kill();
                    break;
                    default:
                        break;
                }
                return true;
            }
         }-*/;
    Hope that helps.

    Mjack

Thread Participants: 1

Turkiyenin en sevilen filmlerinin yer aldigi xnxx internet sitemiz olan ve porn sex tarzi bir site olan mobil porno izle sitemiz gercekten dillere destan bir durumda herkesin sevdigi bir site olarak tarihe gececege benziyor. Sitenin en belirgin ozelliklerinden birisi de Turkiyede gercekten kaliteli ve muntazam, duzenli porno izle siteleri olmamasidir. Bu yuzden iste. Ayrica en net goruntu kalitesine sahip adresinde yayinlanmaktadir. Mesela diğer sitelerimizden bahsedecek olursak, en iyi hd porno video arşivine sahip bir siteyiz. "The Best anal porn videos and slut anus, big asses movies set..." hd porno faketaxi