You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by Dirk Forchel <di...@exedio.com> on 2010/07/29 14:30:44 UTC

BrowserInfoPage and HelloBrowser on Firefox

Hello,
according to this post
(http://apache-wicket.1842946.n4.nabble.com/Overloaded-ClientProperties-isJavaEnabled-and-JavaScript-support-detection-td1889053.html#a1889053)
I'm wondering whether somebody got some problems with the "java-enabled"
property of his browser too. Using IE8 the HelloBrowser page returns the
correct result. But using Firefox, the page returns 'false' even if
JavaScript support is enabled, what seems to be not correct.
Does anybody has the same problem? I assume there should be a
"JavaScript-enabled" property as well. Diving into the code of the
BrowserInfoPage class I found the following snippet ...

public BrowserInfoPage(PageParameters parameters)
{
	String to = Strings.toString(parameters.get("cto"));
	if (to == null)
	{
		throw new IllegalArgumentException("parameter cto must be provided!");
	}
	setContinueTo(to);
	initComps();
	WebRequestCycle requestCycle = (WebRequestCycle)getRequestCycle();
	WebSession session = (WebSession)getSession();
	ClientInfo clientInfo = session.getClientInfo();
	if (clientInfo == null)
	{
		clientInfo = new WebClientInfo(requestCycle);
		getSession().setClientInfo(clientInfo);
	}
	else if (clientInfo instanceof WebClientInfo)
	{
		WebClientInfo info = (WebClientInfo)clientInfo;
		ClientProperties properties = info.getProperties();
		properties.setJavaEnabled(false);
	}
	else
	{
		warnNotUsingWebClientInfo(clientInfo);
	}
	continueToPrevious();
}

Can someone explain why the "JavaEnabled" property is set to false although
JavaScript support is enabled.
Is there another way to detect whether the browser supports JavaScript?
Thanks,
  Dirk
-- 
View this message in context: http://apache-wicket.1842946.n4.nabble.com/BrowserInfoPage-and-HelloBrowser-on-Firefox-tp2306399p2306399.html
Sent from the Wicket - User mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Re: BrowserInfoPage and HelloBrowser on Firefox

Posted by Igor Vaynberg <ig...@gmail.com>.
javaEnabled=true

for me with firefox on wicketstuff.org/wicket14

-igor

On Tue, Aug 17, 2010 at 7:18 AM, Dirk Forchel <di...@exedio.com> wrote:
>
> I still got no solution for the problem mentioned above.
>
> I assume the detection of JavaScript with the following line of code does
> not work for Firefox even if JavaScript support is enabled:
>
> ((WebClientInfo)Session.get().getClientInfo()).getProperties().isJavaEnabled();
>
> This works for IE but not for Firefox!
> --
> View this message in context: http://apache-wicket.1842946.n4.nabble.com/BrowserInfoPage-and-HelloBrowser-on-Firefox-tp2306399p2328440.html
> Sent from the Wicket - User mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Re: BrowserInfoPage and HelloBrowser on Firefox

Posted by Dirk Forchel <di...@exedio.com>.
I still got no solution for the problem mentioned above.

I assume the detection of JavaScript with the following line of code does
not work for Firefox even if JavaScript support is enabled:

((WebClientInfo)Session.get().getClientInfo()).getProperties().isJavaEnabled();

This works for IE but not for Firefox!
-- 
View this message in context: http://apache-wicket.1842946.n4.nabble.com/BrowserInfoPage-and-HelloBrowser-on-Firefox-tp2306399p2328440.html
Sent from the Wicket - User mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org