src/main/java/org/efaps/ui/wicket/behaviors/PreviousValueBehavior.java
protected CharSequence getJavaScript(final String _markupId)
    {
        final StringBuilder ret = new StringBuilder()
            .append("if (\"SELECT\" == dom.byId('").append(_markupId).append("').tagName) {")
            .append("on(dom.byId('").append(_markupId).append("'), \"focus\", function(){")
            .append("if (!dojo.byId('").append(_markupId).append("_previous')) {")
            .append("domConstruct.place(\"<input name='\" + domAttr.get('")
                .append(_markupId).append("', 'name') + \"_eFapsPrevious' type='hidden' id='")
                .append(_markupId).append("_previous'>\", '").append(_markupId).append("'); ")
            .append("}")
            .append(" dojo.byId('").append(_markupId).append("_previous').value = this.value;")
            .append("});")
            .append("}")
            .append("});");
        return DojoWrapper.require(ret, DojoClasses.on, DojoClasses.dom, DojoClasses.domConstruct, DojoClasses.domAttr);
    }
protected CharSequence getJavaScript(final String _markupId)
    {
        final StringBuilder ret = new StringBuilder()
            .append("if (\"SELECT\" == dom.byId('").append(_markupId).append("').tagName) {")
            .append("on(dom.byId('").append(_markupId).append("'), \"focus\", function(){")
            .append("if (!dojo.byId('").append(_markupId).append("_previous')) {")
            .append("domConstruct.place(\"<input name='\" + domAttr.get('")
                .append(_markupId).append("', 'name') + \"_eFapsPrevious' type='hidden' id='")
                .append(_markupId).append("_previous'>\", '").append(_markupId).append("'); ")
            .append("}")
            .append(" dojo.byId('").append(_markupId).append("_previous').value = this.value;")
            .append("});")
            .append("}")
            .append("});");
        return DojoWrapper.require(ret, DojoClasses.on, DojoClasses.dom, DojoClasses.domConstruct, DojoClasses.domAttr);
    }
protected CharSequence getJavaScript ( final String _markupId ) { final StringBuilder ret = new StringBuilder ( ) . append ( "if (\"SELECT\" == dom.byId('" ) . append ( _markupId ) . append ( "').tagName) {" ) . append ( "on(dom.byId('" ) . append ( _markupId ) . append ( "'), \"focus\", function(){" ) . append ( "if (!dojo.byId('" ) . append ( _markupId ) . append ( "_previous')) {" ) . append ( "domConstruct.place(\"<input name='\" + domAttr.get('" ) . append ( _markupId ) . append ( "', 'name') + \"_eFapsPrevious' type='hidden' id='" ) . append ( _markupId ) . append ( "_previous'>\", '" ) . append ( _markupId ) . append ( "'); " ) . append ( "}" ) . append ( " dojo.byId('" ) . append ( _markupId ) . append ( "_previous').value = this.value;" ) . append ( "});" ) . append ( "}" ) . append ( "});" ) ; return DojoWrapper . require ( ret , DojoClasses . on , DojoClasses . dom , DojoClasses . domConstruct , DojoClasses . domAttr ) ; }
Gets the java script.

@param _markupId the markup id
@return the java script
Gets the java script .