|
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 er.extensions.ERXBasicBrowser
ERXBasicBrowser
is a concrete subclass of ERXBrowser
that defines browser object. A browser object represents the web browser
that the current request-response cycle 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()
, and even more
specific questions like isIFrameSupported()
and
willRenderNestedTablesFast()
.
ERXBasicBrowser
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.
You can extends ERXBasicBrowser
or its abstract parent ERXBrowser
to implement more specific questions for your application. One potencial
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 ERXBasicBrowser
's boolean questions from WOConditionals
on a web component, set the key path like "session.brower.isNetscape"
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.
Some browser user-agents:
IE 5.17 OS 9:
user-agent = (Mozilla/4.0 (compatible; MSIE 5.17; Mac_PowerPC)); ua-os = (MacOS); ua-cpu = (PPC);
IE 5.0 OS 9: user-agent = (Mozilla/4.0 (compatible; MSIE 5.0; Mac_PowerPC));
ua-os = (MacOS); ua-cpu = (PPC);
FireFox OS X 10.3.3:
user-agent = (Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; en-US; rv:1.6) Gecko/20040206 Firefox/0.8);
IE 5.2 MacOS X:
user-agent = (Mozilla/4.0 (compatible; MSIE 5.23; Mac_PowerPC)); ua-os = (MacOS); ua-cpu = (PPC);
Safari:
user-agent = ("Mozilla/5.0 (Macintosh; U; PPC Mac OS X; en-us) AppleWebKit/124 (KHTML, like Gecko) Safari/125.1");
IE WIndows 6.02:
user-agent = (Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0));
Nested Class Summary |
Field Summary | |
static ERXLogger |
log
logging support |
Fields inherited from class er.extensions.ERXBrowser |
ICAB, IE, LINUX, MACOS, MOZILLA, NETSCAPE, NO_GECKO, OMNIWEB, OPERA, POWER_PC, SAFARI, UNKNOWN_BROWSER, UNKNOWN_CPU, UNKNOWN_PLATFORM, UNKNOWN_VERSION, WINDOWS |
Fields inherited from interface com.webobjects.foundation.NSKeyValueCoding |
_CLASS, NullValue |
Constructor Summary | |
ERXBasicBrowser(String browserName,
String version,
String mozillaVersion,
String platform,
NSDictionary userInfo)
|
Method Summary | |
String |
browserName()
Browser name string |
String |
cpu()
CPU string |
String |
geckoRevision()
Returns the gecko revision of the browser or ERXBrowser.NO_GECKO . |
boolean |
isICab()
Browser is iCab? |
boolean |
isIE()
Browser is Ineternet Explorer? |
boolean |
isIFrameSupported()
Does the browser support IFrames? |
boolean |
isJavaScriptOnImageButtonSupported()
|
boolean |
isLinux()
|
boolean |
isMacOS()
|
boolean |
isMozilla()
|
boolean |
isMozilla40Compatible()
|
boolean |
isMozilla45Compatible()
|
boolean |
isMozilla50Compatible()
|
boolean |
isNetscape()
Browser is Netscape? |
boolean |
isNotNetscape()
Browser is not Netscape? |
boolean |
isOmniWeb()
Browser is OmniWeb? |
boolean |
isOpera()
Browser is Opera? |
boolean |
isSafari()
Browser is Safari? |
boolean |
isUnknownBrowser()
|
boolean |
isUnknownPlatform()
|
boolean |
isVersion2()
|
boolean |
isVersion3()
|
boolean |
isVersion4()
|
boolean |
isVersion40()
|
boolean |
isVersion41()
|
boolean |
isVersion45()
|
boolean |
isVersion5()
|
boolean |
isVersion51()
|
boolean |
isVersion6()
|
boolean |
isVersion7()
|
boolean |
isWindows()
|
String |
mozillaVersion()
MozillaVersion string |
String |
platform()
Platform string |
NSDictionary |
userInfo()
UserInfo dictionary |
String |
version()
Version string |
boolean |
willRenderNestedTablesFast()
Browser is not netscape or is a version 5 browser. |
Methods inherited from class er.extensions.ERXBrowser |
formValueEncoding, messageEncodingForLanguage, messageEncodingForLanguages, messageEncodingForRequest, takeValueForKey, toString, valueForKey |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
public static final ERXLogger log
Constructor Detail |
public ERXBasicBrowser(String browserName, String version, String mozillaVersion, String platform, NSDictionary userInfo)
Method Detail |
public String browserName()
ERXBrowser
browserName
in class ERXBrowser
public String version()
ERXBrowser
version
in class ERXBrowser
public String mozillaVersion()
ERXBrowser
mozillaVersion
in class ERXBrowser
public String platform()
ERXBrowser
platform
in class ERXBrowser
public String cpu()
public NSDictionary userInfo()
ERXBrowser
userInfo
in class ERXBrowser
public boolean isUnknownBrowser()
isUnknownBrowser
in class ERXBrowser
public boolean isICab()
ERXBrowser
isICab
in class ERXBrowser
public boolean isIE()
ERXBrowser
isIE
in class ERXBrowser
public boolean isNetscape()
ERXBrowser
isNetscape
in class ERXBrowser
public boolean isNotNetscape()
ERXBrowser
isNotNetscape
in class ERXBrowser
public boolean isOmniWeb()
ERXBrowser
isOmniWeb
in class ERXBrowser
public boolean isOpera()
ERXBrowser
isOpera
in class ERXBrowser
public boolean isSafari()
ERXBrowser
isSafari
in class ERXBrowser
public boolean isMozilla()
public boolean isMozilla50Compatible()
isMozilla50Compatible
in class ERXBrowser
public boolean isMozilla45Compatible()
isMozilla45Compatible
in class ERXBrowser
public boolean isMozilla40Compatible()
isMozilla40Compatible
in class ERXBrowser
public boolean isVersion7()
isVersion7
in class ERXBrowser
public boolean isVersion6()
isVersion6
in class ERXBrowser
public boolean isVersion5()
isVersion5
in class ERXBrowser
public boolean isVersion51()
isVersion51
in class ERXBrowser
public boolean isVersion45()
isVersion45
in class ERXBrowser
public boolean isVersion41()
isVersion41
in class ERXBrowser
public boolean isVersion40()
isVersion40
in class ERXBrowser
public boolean isVersion4()
isVersion4
in class ERXBrowser
public boolean isVersion3()
isVersion3
in class ERXBrowser
public boolean isVersion2()
isVersion2
in class ERXBrowser
public boolean isUnknownPlatform()
isUnknownPlatform
in class ERXBrowser
public boolean isMacOS()
isMacOS
in class ERXBrowser
public boolean isWindows()
isWindows
in class ERXBrowser
public boolean isLinux()
isLinux
in class ERXBrowser
public String geckoRevision()
ERXBrowser.NO_GECKO
.
geckoRevision
in class ERXBrowser
ERXBrowser.NO_GECKO
.public boolean isIFrameSupported()
public boolean willRenderNestedTablesFast()
public boolean isJavaScriptOnImageButtonSupported()
|
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 |