org.apache.myfaces.renderkit.html.util

Class JavascriptUtils

public final class JavascriptUtils extends Object

Version: $Revision: 169655 $ $Date: 2005-05-11 18:45:06 +0200 (Wed, 11 May 2005) $

Author: Manfred Geiler (latest modification by $Author: grantsmith $) Anton Koinov

Field Summary
static StringJAVASCRIPT_DETECTED
Method Summary
static voidappendAutoScrollAssignment(StringBuffer onClickValue, String formName)
Adds the hidden form input value assignment that is necessary for the autoscroll feature to an html link or button onclick attribute.
static StringencodeString(String string)
static StringgetOldViewId(ExternalContext externalContext)
static StringgetValidJavascriptName(String s, boolean checkForReservedWord)
static booleanisJavascriptAllowed(ExternalContext externalContext)
static booleanisJavascriptDetected(ExternalContext externalContext)
static voidrenderAutoScrollFunction(FacesContext facesContext, ResponseWriter writer)
Renders the autoscroll javascript function.
static voidrenderAutoScrollHiddenInput(ResponseWriter writer)
Renders the hidden form input that is necessary for the autoscroll feature.
static voidsetJavascriptDetected(ExternalContext externalContext, boolean value)
static voidsetOldViewId(ExternalContext externalContext, String viewId)

Field Detail

JAVASCRIPT_DETECTED

public static final String JAVASCRIPT_DETECTED

Method Detail

appendAutoScrollAssignment

public static void appendAutoScrollAssignment(StringBuffer onClickValue, String formName)
Adds the hidden form input value assignment that is necessary for the autoscroll feature to an html link or button onclick attribute.

encodeString

public static String encodeString(String string)

getOldViewId

public static String getOldViewId(ExternalContext externalContext)

getValidJavascriptName

public static String getValidJavascriptName(String s, boolean checkForReservedWord)

isJavascriptAllowed

public static boolean isJavascriptAllowed(ExternalContext externalContext)

isJavascriptDetected

public static boolean isJavascriptDetected(ExternalContext externalContext)

renderAutoScrollFunction

public static void renderAutoScrollFunction(FacesContext facesContext, ResponseWriter writer)
Renders the autoscroll javascript function.

renderAutoScrollHiddenInput

public static void renderAutoScrollHiddenInput(ResponseWriter writer)
Renders the hidden form input that is necessary for the autoscroll feature.

setJavascriptDetected

public static void setJavascriptDetected(ExternalContext externalContext, boolean value)

setOldViewId

public static void setOldViewId(ExternalContext externalContext, String viewId)