private CharSequence getJavaScript()
    {

        final String divId = get("triStateDiv").getMarkupId(true);
        get("triStateDiv:triStateBtn").getMarkupId(true);
        final String valId = get("triStateDiv:triStateValue").getMarkupId(true);

        final StringBuilder ret = new StringBuilder()
                .append("switch (dom.byId('").append(valId).append("').value)")
                .append("{")
                .append("case 'on':")
                .append("dom.byId('").append(valId).append("').value = 'off';")
                .append("domClass.replace('").append(divId).append("', 'off', 'on');")
                .append("break;")
                .append("case 'off':")
                .append("dom.byId('").append(valId).append("').value = '';")
                .append("domClass.remove('").append(divId).append("', 'off');")
                .append("break;")
                .append("default:")
                .append("dom.byId('").append(valId).append("').value = 'on';")
                .append("domClass.add('").append(divId).append("', 'on');")
                .append("}");
        return  DojoWrapper.require(ret, DojoClasses.domClass, DojoClasses.dom, DojoClasses.on,
                        DojoClasses.query, DojoClasses.NodeListTraverse, DojoClasses.domReady);
    }
private CharSequence getJavaScript()
    {

        final String divId = get("triStateDiv").getMarkupId(true);
        get("triStateDiv:triStateBtn").getMarkupId(true);
        final String valId = get("triStateDiv:triStateValue").getMarkupId(true);

        final StringBuilder ret = new StringBuilder()
                .append("switch (dom.byId('").append(valId).append("').value)")
                .append("{")
                .append("case 'on':")
                .append("dom.byId('").append(valId).append("').value = 'off';")
                .append("domClass.replace('").append(divId).append("', 'off', 'on');")
                .append("break;")
                .append("case 'off':")
                .append("dom.byId('").append(valId).append("').value = '';")
                .append("domClass.remove('").append(divId).append("', 'off');")
                .append("break;")
                .append("default:")
                .append("dom.byId('").append(valId).append("').value = 'on';")
                .append("domClass.add('").append(divId).append("', 'on');")
                .append("}");
        return  DojoWrapper.require(ret, DojoClasses.domClass, DojoClasses.dom, DojoClasses.on,
                        DojoClasses.query, DojoClasses.NodeListTraverse, DojoClasses.domReady);
    }
private CharSequence getJavaScript ( ) { final String divId = get ( "triStateDiv" ) . getMarkupId ( true ) ; get ( "triStateDiv:triStateBtn" ) . getMarkupId ( true ) ; final String valId = get ( "triStateDiv:triStateValue" ) . getMarkupId ( true ) ; final StringBuilder ret = new StringBuilder ( ) . append ( "switch (dom.byId('" ) . append ( valId ) . append ( "').value)" ) . append ( "{" ) . append ( "case 'on':" ) . append ( "dom.byId('" ) . append ( valId ) . append ( "').value = 'off';" ) . append ( "domClass.replace('" ) . append ( divId ) . append ( "', 'off', 'on');" ) . append ( "break;" ) . append ( "case 'off':" ) . append ( "dom.byId('" ) . append ( valId ) . append ( "').value = '';" ) . append ( "domClass.remove('" ) . append ( divId ) . append ( "', 'off');" ) . append ( "break;" ) . append ( "default:" ) . append ( "dom.byId('" ) . append ( valId ) . append ( "').value = 'on';" ) . append ( "domClass.add('" ) . append ( divId ) . append ( "', 'on');" ) . append ( "}" ) ; return DojoWrapper . require ( ret , DojoClasses . domClass , DojoClasses . dom , DojoClasses . on , DojoClasses . query , DojoClasses . NodeListTraverse , DojoClasses . domReady ) ; }
Gets the java script.

@return the java script
Gets the java script .