Class AjaxDevice

  • All Implemented Interfaces:
    Device

    public class AjaxDevice
    extends GenericDevice
    Represents a Web browser with the Ajax support.
    Since:
    2.4.0
    Author:
    tomyeh
    • Constructor Detail

      • AjaxDevice

        public AjaxDevice()
    • Method Detail

      • getContentType

        public java.lang.String getContentType()
        Returns text/html
      • packageToPath

        public java.lang.String packageToPath​(java.lang.String pkg)
        Converts a package to a path that can be accessible by the class loader (classpath).

        Default: "/js/" + pkg + ".wpd";

        Specified by:
        packageToPath in interface Device
        Overrides:
        packageToPath in class GenericDevice
        Since:
        5.0.4
      • toAbsolutePath

        public java.lang.String toAbsolutePath​(java.lang.String path)
        Converts a relative path to an absolute path that can be accessible by the class loader (classpath).

        Default: "/js/" + path (if path doesn't start with '/' or '~').

        Specified by:
        toAbsolutePath in interface Device
        Overrides:
        toAbsolutePath in class GenericDevice
        Parameters:
        path - the path (never null). It is assumed to be a relative path if not starting with '/' or '~'.
        Since:
        5.0.4
      • reloadMessages

        public void reloadMessages​(java.util.Locale locale)
                            throws java.io.IOException
        Description copied from class: GenericDevice
        Reloads the client-side messages in the specified locale.

        Default: throw UnsupportedOperationException.

        Specified by:
        reloadMessages in interface Device
        Overrides:
        reloadMessages in class GenericDevice
        Parameters:
        locale - the locale. If null, Locales.getCurrent() is assumed.
        Throws:
        java.io.IOException