0

Detection and procession browser version.

asked 2010-09-10 03:04:31 +0800

mordor gravatar image mordor
42

Hi guys,

I have a question regarding ZK configuration, can I configure ZK like this code:

if (!Executions.getCurrent().isBrowser(ErrorCodes.SUPPORTED_BROWSER)) {
	Executions.sendRedirect(ErrorCodes.UNSUPPORTED_BROWSER_URL);
}

I need detect browser and redirect if this version of browser is not supported.
Should I write my own filter, or I can configure ZK for automatically detection and redirection?

delete flag offensive retag edit

4 Replies

Sort by ยป oldest newest

answered 2010-09-10 05:27:52 +0800

RyanWu gravatar image RyanWu
533 2
about.me/flyworld

In Java

Executions.getCurrent().getUserAgent()

In Javascript : JQuery Browser reference

 jq.browser 

you can detect it your self :)

link publish delete flag offensive edit

answered 2010-09-10 05:40:34 +0800

mordor gravatar image mordor
42

Thanks, but my question is: "Should I create new filter for it, or I can put some parameter in zk.xml to configure zkoss do it automatically?"

link publish delete flag offensive edit

answered 2010-09-14 22:03:37 +0800

iantsai gravatar image iantsai
2755 1

you can use ZK DesktopInit, this is an application scope Interceptor which will be called every time a desktop created(Browser send a request to your server).

link publish delete flag offensive edit

answered 2010-09-16 09:05:25 +0800

mordor gravatar image mordor
42

iantsai

Thanks a lot! I forgot about it...

link publish delete flag offensive edit
Your reply
Please start posting your answer anonymously - your answer will be saved within the current session and published after you log in or create a new account. Please try to give a substantial answer, for discussions, please use comments and please do remember to vote (after you log in)!

[hide preview]

Question tools

Follow

RSS

Stats

Asked: 2010-09-10 03:04:31 +0800

Seen: 628 times

Last updated: Sep 16 '10

Support Options
  • Email Support
  • Training
  • Consulting
  • Outsourcing
Learn More