Subversion Repository Public Repository

litesoft

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
// This Source Code is in the Public Domain per: http://unlicense.org
package org.litesoft.GWT.eventbus.client;

import org.litesoft.GWT.client.*;

public class WindowNameClientIdCodec
{
    private String mEncodedClientIdSuffix;

    public WindowNameClientIdCodec( AppNames pAppNames )
    {
        mEncodedClientIdSuffix = "_" + pAppNames.getShortAllLettersClientName() + "_";

    }

    /**
     * Window Name is the name of the new window.
     *
     * This name cannot contain spaces or special characters, but can be quite long (on the order of 2MB).
     *
     * Known good characters as US Letters (both upper & lower case), digits, and underscore ('_').
     *
     * Special / reserved Names are:
     *      _blank      Loads the linked document into a new blank window. This window is not named.
     *      _parent     Loads the linked document into the immediate parent of the document the link is in.
     *      _self       Loads the linked document into the same window the link was clicked in (the active window).
     *      _top        Loads the linked document into the topmost window.
     *      _search     Loads the linked document into the browser's search pane.
     *                      (Available in Internet Explorer 5 or later)
     */
    public String createWindowName( String pEncodedClientId )
    {
        return mEncodedClientIdSuffix + pEncodedClientId;
    }

    public String extractEncodedClientId( String pWindowName )
    {
        if ( pWindowName != null )
        {
            int at = pWindowName.indexOf( mEncodedClientIdSuffix );
            if ( at != -1 )
            {
                return pWindowName.substring( at + mEncodedClientIdSuffix.length() ).trim();
            }
        }
        return "";
    }
}

Commits for litesoft/trunk/Java/GWT/OldClient/src/org/litesoft/GWT/eventbus/client/WindowNameClientIdCodec.java

Diff revisions: vs.
Revision Author Commited Message
947 Diff Diff GeorgeS picture GeorgeS Fri 06 Jun, 2014 23:36:56 +0000

Correct Spelling of package!

49 Diff Diff GeorgeS picture GeorgeS Mon 12 Apr, 2010 02:59:10 +0000

License Text

2 GeorgeS picture GeorgeS Sun 07 Feb, 2010 12:50:58 +0000