You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by Rakesh A <ia...@rediffmail.com> on 2015/12/22 13:58:13 UTC

Regarding Browser/Client info implementation

Hi,

I was trying to use WebClientInfo to get browser information on the server,
and also extend the implementation in Wicket 6.x, reasons for me to extend
Wicket's implementation are
1. Current implementation does not allow me to detect browser's touch api
support
2. Wanted to use client side implementation library to detect browser
features - like Modernizr.

On a brief look at the implementation I thought it is possible, but I ended
up copy/pasting lot of code to workaround the problems I faced.
Changing the implementation a bit might allow extension to Wicket's
implementation. As changes are more, I created a quick start to show the
changes required in Wicket's implementation. Please find the attached quick
start.
1. I've copied and changed Wicket's implementation and they can be found in
package "in.rakesh.example.wicket.page.browserinfo"
2. Extension to this implementation can be found under package
"in.rakesh.example.wicket.page"

Another problem I'd while doing these changes is regarding 'WebClientInfo'
object creation. Current implementation creates instances in multiple
places, making it difficult to have a subclass/extension to it.

Adding a method to WebSession (WebSession#createClientInfo()), and using it
to create instance gives lot of flexibility to extend it.

In the attached quick start, I've added TODOs which need to be
updated/corrected, if we've a method in WebSession.

Can you please provide your views on this change.

browserinfo.7z
<http://apache-wicket.1842946.n4.nabble.com/file/n4673024/browserinfo.7z>  

Regards,
Rakesh.A

--
View this message in context: http://apache-wicket.1842946.n4.nabble.com/Regarding-Browser-Client-info-implementation-tp4673024.html
Sent from the Users forum 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: Regarding Browser/Client info implementation

Posted by Rakesh A <ia...@rediffmail.com>.
Done - https://github.com/apache/wicket/pull/152

Mary Christmas :)

Rakesh.A

--
View this message in context: http://apache-wicket.1842946.n4.nabble.com/Regarding-Browser-Client-info-implementation-tp4673024p4673083.html
Sent from the Users forum 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: Regarding Browser/Client info implementation

Posted by Tobias Soloschenko <to...@googlemail.com>.
Please create a PR so that code lines can be discussed with inline comments.

Thanks!

Merry Christmas :-)

Am 24.12.15 um 11:00 schrieb Rakesh A:
> Can you go through this check-in
> https://github.com/iamrakesh/wicket/commit/351f084872467f0d3d0f339ab9c20afb4f79d2d1
>
> Or do you need PR?
>
> Regards,
> Rakesh.A
>
> --
> View this message in context: http://apache-wicket.1842946.n4.nabble.com/Regarding-Browser-Client-info-implementation-tp4673024p4673070.html
> Sent from the Users forum 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: Regarding Browser/Client info implementation

Posted by Rakesh A <ia...@rediffmail.com>.
I created JIRA ticket - https://issues.apache.org/jira/browse/WICKET-6056

PR links for master and wicket-6.x branches, are added at ticket comments
section.

--
View this message in context: http://apache-wicket.1842946.n4.nabble.com/Regarding-Browser-Client-info-implementation-tp4673024p4673093.html
Sent from the Users forum 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: Regarding Browser/Client info implementation

Posted by Martin Grigorov <mg...@apache.org>.
Hi,

The change looks good.
I see some minor improvements which we can make.
Please create a ticket in JIRA!
A PR will help to integrate it sooner!
Thank you!

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

On Thu, Dec 24, 2015 at 11:00 AM, Rakesh A <ia...@rediffmail.com>
wrote:

> Can you go through this check-in
>
> https://github.com/iamrakesh/wicket/commit/351f084872467f0d3d0f339ab9c20afb4f79d2d1
>
> Or do you need PR?
>
> Regards,
> Rakesh.A
>
> --
> View this message in context:
> http://apache-wicket.1842946.n4.nabble.com/Regarding-Browser-Client-info-implementation-tp4673024p4673070.html
> Sent from the Users forum 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: Regarding Browser/Client info implementation

Posted by Rakesh A <ia...@rediffmail.com>.
Can you go through this check-in
https://github.com/iamrakesh/wicket/commit/351f084872467f0d3d0f339ab9c20afb4f79d2d1

Or do you need PR?

Regards,
Rakesh.A

--
View this message in context: http://apache-wicket.1842946.n4.nabble.com/Regarding-Browser-Client-info-implementation-tp4673024p4673070.html
Sent from the Users forum 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: Regarding Browser/Client info implementation

Posted by Tobias Soloschenko <to...@googlemail.com>.
Hi,

would you be so kind and create a PR - this would make it a lot easier to comment code lines and to see changes.

To do so simply fork the wicket git repo push changes against the fork and then create the PR.

Thank you!

kind regards

Tobias

> Am 22.12.2015 um 15:52 schrieb Rakesh A <ia...@rediffmail.com>:
> 
> I tried to create a patch with the changes on Wicket sources, please find
> them attached.
> 
> Patch#1 - Without renaming HTML files
> Patch#2 - With renaming HTML files
> 
> Note: I did not test/execute these changes.
> 
> wicket6-browser-info-changes-NO-RENAME.patch
> <http://apache-wicket.1842946.n4.nabble.com/file/n4673025/wicket6-browser-info-changes-NO-RENAME.patch>  
> wicket6-browser-info-changes-WITH-RENAME.patch
> <http://apache-wicket.1842946.n4.nabble.com/file/n4673025/wicket6-browser-info-changes-WITH-RENAME.patch>  
> 
> Regards,
> Rakesh.A
> 
> --
> View this message in context: http://apache-wicket.1842946.n4.nabble.com/Regarding-Browser-Client-info-implementation-tp4673024p4673025.html
> Sent from the Users forum 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: Regarding Browser/Client info implementation

Posted by Rakesh A <ia...@rediffmail.com>.
I tried to create a patch with the changes on Wicket sources, please find
them attached.

Patch#1 - Without renaming HTML files
Patch#2 - With renaming HTML files

Note: I did not test/execute these changes.

wicket6-browser-info-changes-NO-RENAME.patch
<http://apache-wicket.1842946.n4.nabble.com/file/n4673025/wicket6-browser-info-changes-NO-RENAME.patch>  
wicket6-browser-info-changes-WITH-RENAME.patch
<http://apache-wicket.1842946.n4.nabble.com/file/n4673025/wicket6-browser-info-changes-WITH-RENAME.patch>  

Regards,
Rakesh.A

--
View this message in context: http://apache-wicket.1842946.n4.nabble.com/Regarding-Browser-Client-info-implementation-tp4673024p4673025.html
Sent from the Users forum 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