|
Project Wonder 2.0 | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object er.extensions.ERXBrowser
ERXBrowser is an abstract class that defines browser object.
A browser object represents the web browser that the current
request-response loop is dealing with. It holds the information
retrieved from HTTP request's "user-agent" header, and such
information includes web browser's name, version, Mozilla
compatible version and platform (OS). Also, a browser object
can answer boolean questions such as isIE
,
isOmniWeb
, isVersion5
and
isMozilla40Compatible
.
ERXBrowser is immutable and shared by different sessions and
direct actions.
The shared instances are managed by ERXBrowserFactory which
is also responsible to parse "user-agent" header in a WORequest
object and to get an appropriate browser object.
One concrete browser, ERXBasicBrowser, is defined in the
ERExtensions framework. It not only implements the basic
questions defined by ERXBrowser, but also more specific
questions like isIFrameSupported
and
willRenderNestedTablesFast
.
You can extend ERXBrowser or its concrete subclass
ERXBasicBrowser to implement more specific questions for
your application. One good example will be to have a question
isSupportedBrowser
that checks if the client
is using one of the supported browsers for your application.
ERXSession holds a browser object that represent the web
browser for that session and browser
method
returns the object.
To access ERXBrowser's boolean questions from WOConditionals
on a web component, set the key path like "session.brower.isIFrameSupported"
to their condition bindings.
ERXDirectAction also holds a browser object for the current request.
Use its browser
method to access the object from a
session-less direct action.
Nested Class Summary |
Field Summary | |
static String |
ICAB
|
static String |
IE
|
static String |
LINUX
|
static String |
MACOS
|
static String |
MOZILLA
|
static String |
NETSCAPE
|
static String |
NO_GECKO
|
static String |
OMNIWEB
|
static String |
OPERA
|
static String |
POWER_PC
|
static String |
SAFARI
|
static String |
UNKNOWN_BROWSER
|
static String |
UNKNOWN_CPU
|
static String |
UNKNOWN_PLATFORM
|
static String |
UNKNOWN_VERSION
|
static String |
WINDOWS
|
Fields inherited from interface com.webobjects.foundation.NSKeyValueCoding |
_CLASS, NullValue |
Constructor Summary | |
ERXBrowser()
|
Method Summary | |
abstract String |
browserName()
Browser name string |
String |
formValueEncoding()
If using ERXRequest objects allows one to override on a per browser basis what form value encoding to use. |
abstract String |
geckoRevision()
The revision of the gecko rendering engine. 1.0.2 and up support xslt. |
abstract boolean |
isICab()
Browser is iCab? |
abstract boolean |
isIE()
Browser is Ineternet Explorer? |
abstract boolean |
isLinux()
|
abstract boolean |
isMacOS()
|
abstract boolean |
isMozilla40Compatible()
|
abstract boolean |
isMozilla45Compatible()
|
abstract boolean |
isMozilla50Compatible()
|
abstract boolean |
isNetscape()
Browser is Netscape? |
abstract boolean |
isNotNetscape()
Browser is not Netscape? |
abstract boolean |
isOmniWeb()
Browser is OmniWeb? |
abstract boolean |
isOpera()
Browser is Opera? |
abstract boolean |
isSafari()
Browser is Safari? |
abstract boolean |
isUnknownBrowser()
|
abstract boolean |
isUnknownPlatform()
|
abstract boolean |
isVersion2()
|
abstract boolean |
isVersion3()
|
abstract boolean |
isVersion4()
|
abstract boolean |
isVersion40()
|
abstract boolean |
isVersion41()
|
abstract boolean |
isVersion45()
|
abstract boolean |
isVersion5()
|
abstract boolean |
isVersion51()
|
abstract boolean |
isVersion6()
|
abstract boolean |
isVersion7()
|
abstract boolean |
isWindows()
|
ERXMessageEncoding |
messageEncodingForLanguage(String language)
Gets the message encoding for a given language. |
ERXMessageEncoding |
messageEncodingForLanguages(NSArray languages)
Gets the message encoding for a given array of languages. |
ERXMessageEncoding |
messageEncodingForRequest(WORequest request)
Gets the message encoding for a given request. |
abstract String |
mozillaVersion()
MozillaVersion string |
abstract String |
platform()
Platform string |
void |
takeValueForKey(Object value,
String key)
|
String |
toString()
|
abstract NSDictionary |
userInfo()
UserInfo dictionary |
Object |
valueForKey(String key)
|
abstract String |
version()
Version string |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
public static final String UNKNOWN_BROWSER
public static final String ICAB
public static final String IE
public static final String NETSCAPE
public static final String OMNIWEB
public static final String OPERA
public static final String SAFARI
public static final String MOZILLA
public static final String UNKNOWN_VERSION
public static final String UNKNOWN_PLATFORM
public static final String MACOS
public static final String WINDOWS
public static final String LINUX
public static final String POWER_PC
public static final String UNKNOWN_CPU
public static final String NO_GECKO
Constructor Detail |
public ERXBrowser()
Method Detail |
public abstract String browserName()
public abstract String version()
public abstract String mozillaVersion()
public abstract String geckoRevision()
public abstract String platform()
public abstract NSDictionary userInfo()
public abstract boolean isUnknownBrowser()
public abstract boolean isICab()
public abstract boolean isIE()
public abstract boolean isNetscape()
public abstract boolean isNotNetscape()
public abstract boolean isOmniWeb()
public abstract boolean isOpera()
public abstract boolean isSafari()
public abstract boolean isMozilla50Compatible()
public abstract boolean isMozilla45Compatible()
public abstract boolean isMozilla40Compatible()
public abstract boolean isVersion7()
public abstract boolean isVersion6()
public abstract boolean isVersion5()
public abstract boolean isVersion51()
public abstract boolean isVersion45()
public abstract boolean isVersion41()
public abstract boolean isVersion40()
public abstract boolean isVersion4()
public abstract boolean isVersion3()
public abstract boolean isVersion2()
public abstract boolean isUnknownPlatform()
public abstract boolean isMacOS()
public abstract boolean isWindows()
public abstract boolean isLinux()
public ERXMessageEncoding messageEncodingForRequest(WORequest request)
request
- to get the message encoding for
public ERXMessageEncoding messageEncodingForLanguages(NSArray languages)
languages
- array to get the correct encoding for
public ERXMessageEncoding messageEncodingForLanguage(String language)
language
- to get the encoding for
public String formValueEncoding()
public Object valueForKey(String key)
valueForKey
in interface NSKeyValueCoding
public void takeValueForKey(Object value, String key)
takeValueForKey
in interface NSKeyValueCoding
public String toString()
|
Last updated: Do, Dez 9, 2004 12:46 PM CET | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |