You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by durairaj t <du...@gmail.com> on 2016/07/25 13:26:37 UTC

How to get the browser height and width in wicket 1.5 ?

The below code is giving *-1* for height and width,

 ClientProperties properties =
((WebClientInfo)Session.get().getClientInfo()).getProperties();
int height =  properties.getBrowserHeight();

System.out.println("height:"+ height );

*height : -1*

Any help?

Re: How to get the browser height and width in wicket 1.5 ?

Posted by durairaj t <du...@gmail.com>.
Ok. Thank you!

On Mon, Jul 25, 2016 at 11:04 AM, Martin Grigorov <mg...@apache.org>
wrote:

> We recommend you to upgrade to Wicket 6.x or even 7.x.
> 1.5.x is no more maintained. It receives only security related patches.
>
> Martin Grigorov
> Wicket Training and Consulting
> https://twitter.com/mtgrigorov
>
> On Mon, Jul 25, 2016 at 4:57 PM, durairaj t <du...@gmail.com>
> wrote:
>
> > There is no intermediate page. I did not see anything in between the
> > current page to the targeted page.
> >
> > When I'm running my application in wicket 1.4.x with the below code it
> > gives correct width and height, also it returns true for isJavaEnabled().
> >
> > Wicket1.4.x: int width = ((WebClientInfo)
> > getRequestCycle().getClientInfo()).getProperties().getBrowserWidth();
> >
> > On Mon, Jul 25, 2016 at 10:49 AM, Martin Grigorov <mg...@apache.org>
> > wrote:
> >
> > > Do you see an intermediate page that says something like "You'll be
> > > redirected in a second" ?
> > > This page collects the client properties.
> > >
> > > Martin Grigorov
> > > Wicket Training and Consulting
> > > https://twitter.com/mtgrigorov
> > >
> > > On Mon, Jul 25, 2016 at 4:41 PM, durairaj t <du...@gmail.com>
> > > wrote:
> > >
> > > > It is already added in my app.java.
> > > >
> > > > isJavaEnabled() - returns false; I set it true, but still it is not
> > > > working.
> > > >
> > >
> > > This is not related.
> > > This property says whether Java (not JavaScript) is enabled in your
> > > browser. Usually it is disabled due to the amount of bugs in Java
> > Applets.
> > >
> > >
> > > >
> > > > On Mon, Jul 25, 2016 at 10:23 AM, ndongo yaya <nd...@gmail.com>
> > > > wrote:
> > > >
> > > > > Hello,
> > > > >
> > > > > I believe you need to add
> > > > > *getRequestCycleSettings().setGatherExtendedBrowserInfo(true)
> > > > > *to your application's init method.
> > > > > Take a look at *ClientProperties.class* for the complete javadoc.
> > > > >
> > > > > Regards,
> > > > > Yaya
> > > > >
> > > > > 2016-07-25 15:26 GMT+02:00 durairaj t <du...@gmail.com>:
> > > > >
> > > > > > The below code is giving *-1* for height and width,
> > > > > >
> > > > > >  ClientProperties properties =
> > > > > > ((WebClientInfo)Session.get().getClientInfo()).getProperties();
> > > > > > int height =  properties.getBrowserHeight();
> > > > > >
> > > > > > System.out.println("height:"+ height );
> > > > > >
> > > > > > *height : -1*
> > > > > >
> > > > > > Any help?
> > > > > >
> > > > >
> > > > >
> > > > >
> > > > > --
> > > > > Yaya NDONGO
> > > > >
> > > >
> > >
> >
>

Re: How to get the browser height and width in wicket 1.5 ?

Posted by Martin Grigorov <mg...@apache.org>.
We recommend you to upgrade to Wicket 6.x or even 7.x.
1.5.x is no more maintained. It receives only security related patches.

Martin Grigorov
Wicket Training and Consulting
https://twitter.com/mtgrigorov

On Mon, Jul 25, 2016 at 4:57 PM, durairaj t <du...@gmail.com> wrote:

> There is no intermediate page. I did not see anything in between the
> current page to the targeted page.
>
> When I'm running my application in wicket 1.4.x with the below code it
> gives correct width and height, also it returns true for isJavaEnabled().
>
> Wicket1.4.x: int width = ((WebClientInfo)
> getRequestCycle().getClientInfo()).getProperties().getBrowserWidth();
>
> On Mon, Jul 25, 2016 at 10:49 AM, Martin Grigorov <mg...@apache.org>
> wrote:
>
> > Do you see an intermediate page that says something like "You'll be
> > redirected in a second" ?
> > This page collects the client properties.
> >
> > Martin Grigorov
> > Wicket Training and Consulting
> > https://twitter.com/mtgrigorov
> >
> > On Mon, Jul 25, 2016 at 4:41 PM, durairaj t <du...@gmail.com>
> > wrote:
> >
> > > It is already added in my app.java.
> > >
> > > isJavaEnabled() - returns false; I set it true, but still it is not
> > > working.
> > >
> >
> > This is not related.
> > This property says whether Java (not JavaScript) is enabled in your
> > browser. Usually it is disabled due to the amount of bugs in Java
> Applets.
> >
> >
> > >
> > > On Mon, Jul 25, 2016 at 10:23 AM, ndongo yaya <nd...@gmail.com>
> > > wrote:
> > >
> > > > Hello,
> > > >
> > > > I believe you need to add
> > > > *getRequestCycleSettings().setGatherExtendedBrowserInfo(true)
> > > > *to your application's init method.
> > > > Take a look at *ClientProperties.class* for the complete javadoc.
> > > >
> > > > Regards,
> > > > Yaya
> > > >
> > > > 2016-07-25 15:26 GMT+02:00 durairaj t <du...@gmail.com>:
> > > >
> > > > > The below code is giving *-1* for height and width,
> > > > >
> > > > >  ClientProperties properties =
> > > > > ((WebClientInfo)Session.get().getClientInfo()).getProperties();
> > > > > int height =  properties.getBrowserHeight();
> > > > >
> > > > > System.out.println("height:"+ height );
> > > > >
> > > > > *height : -1*
> > > > >
> > > > > Any help?
> > > > >
> > > >
> > > >
> > > >
> > > > --
> > > > Yaya NDONGO
> > > >
> > >
> >
>

Re: How to get the browser height and width in wicket 1.5 ?

Posted by durairaj t <du...@gmail.com>.
There is no intermediate page. I did not see anything in between the
current page to the targeted page.

When I'm running my application in wicket 1.4.x with the below code it
gives correct width and height, also it returns true for isJavaEnabled().

Wicket1.4.x: int width = ((WebClientInfo)
getRequestCycle().getClientInfo()).getProperties().getBrowserWidth();

On Mon, Jul 25, 2016 at 10:49 AM, Martin Grigorov <mg...@apache.org>
wrote:

> Do you see an intermediate page that says something like "You'll be
> redirected in a second" ?
> This page collects the client properties.
>
> Martin Grigorov
> Wicket Training and Consulting
> https://twitter.com/mtgrigorov
>
> On Mon, Jul 25, 2016 at 4:41 PM, durairaj t <du...@gmail.com>
> wrote:
>
> > It is already added in my app.java.
> >
> > isJavaEnabled() - returns false; I set it true, but still it is not
> > working.
> >
>
> This is not related.
> This property says whether Java (not JavaScript) is enabled in your
> browser. Usually it is disabled due to the amount of bugs in Java Applets.
>
>
> >
> > On Mon, Jul 25, 2016 at 10:23 AM, ndongo yaya <nd...@gmail.com>
> > wrote:
> >
> > > Hello,
> > >
> > > I believe you need to add
> > > *getRequestCycleSettings().setGatherExtendedBrowserInfo(true)
> > > *to your application's init method.
> > > Take a look at *ClientProperties.class* for the complete javadoc.
> > >
> > > Regards,
> > > Yaya
> > >
> > > 2016-07-25 15:26 GMT+02:00 durairaj t <du...@gmail.com>:
> > >
> > > > The below code is giving *-1* for height and width,
> > > >
> > > >  ClientProperties properties =
> > > > ((WebClientInfo)Session.get().getClientInfo()).getProperties();
> > > > int height =  properties.getBrowserHeight();
> > > >
> > > > System.out.println("height:"+ height );
> > > >
> > > > *height : -1*
> > > >
> > > > Any help?
> > > >
> > >
> > >
> > >
> > > --
> > > Yaya NDONGO
> > >
> >
>

Re: How to get the browser height and width in wicket 1.5 ?

Posted by Martin Grigorov <mg...@apache.org>.
Do you see an intermediate page that says something like "You'll be
redirected in a second" ?
This page collects the client properties.

Martin Grigorov
Wicket Training and Consulting
https://twitter.com/mtgrigorov

On Mon, Jul 25, 2016 at 4:41 PM, durairaj t <du...@gmail.com> wrote:

> It is already added in my app.java.
>
> isJavaEnabled() - returns false; I set it true, but still it is not
> working.
>

This is not related.
This property says whether Java (not JavaScript) is enabled in your
browser. Usually it is disabled due to the amount of bugs in Java Applets.


>
> On Mon, Jul 25, 2016 at 10:23 AM, ndongo yaya <nd...@gmail.com>
> wrote:
>
> > Hello,
> >
> > I believe you need to add
> > *getRequestCycleSettings().setGatherExtendedBrowserInfo(true)
> > *to your application's init method.
> > Take a look at *ClientProperties.class* for the complete javadoc.
> >
> > Regards,
> > Yaya
> >
> > 2016-07-25 15:26 GMT+02:00 durairaj t <du...@gmail.com>:
> >
> > > The below code is giving *-1* for height and width,
> > >
> > >  ClientProperties properties =
> > > ((WebClientInfo)Session.get().getClientInfo()).getProperties();
> > > int height =  properties.getBrowserHeight();
> > >
> > > System.out.println("height:"+ height );
> > >
> > > *height : -1*
> > >
> > > Any help?
> > >
> >
> >
> >
> > --
> > Yaya NDONGO
> >
>

Re: How to get the browser height and width in wicket 1.5 ?

Posted by durairaj t <du...@gmail.com>.
It is already added in my app.java.

isJavaEnabled() - returns false; I set it true, but still it is not working.

On Mon, Jul 25, 2016 at 10:23 AM, ndongo yaya <nd...@gmail.com> wrote:

> Hello,
>
> I believe you need to add
> *getRequestCycleSettings().setGatherExtendedBrowserInfo(true)
> *to your application's init method.
> Take a look at *ClientProperties.class* for the complete javadoc.
>
> Regards,
> Yaya
>
> 2016-07-25 15:26 GMT+02:00 durairaj t <du...@gmail.com>:
>
> > The below code is giving *-1* for height and width,
> >
> >  ClientProperties properties =
> > ((WebClientInfo)Session.get().getClientInfo()).getProperties();
> > int height =  properties.getBrowserHeight();
> >
> > System.out.println("height:"+ height );
> >
> > *height : -1*
> >
> > Any help?
> >
>
>
>
> --
> Yaya NDONGO
>

Re: How to get the browser height and width in wicket 1.5 ?

Posted by ndongo yaya <nd...@gmail.com>.
Hello,

I believe you need to add
*getRequestCycleSettings().setGatherExtendedBrowserInfo(true)
*to your application's init method.
Take a look at *ClientProperties.class* for the complete javadoc.

Regards,
Yaya

2016-07-25 15:26 GMT+02:00 durairaj t <du...@gmail.com>:

> The below code is giving *-1* for height and width,
>
>  ClientProperties properties =
> ((WebClientInfo)Session.get().getClientInfo()).getProperties();
> int height =  properties.getBrowserHeight();
>
> System.out.println("height:"+ height );
>
> *height : -1*
>
> Any help?
>



-- 
Yaya NDONGO