What's the best way to get client screen attributes to my backing bean? I'd like to work out some dynamic sizing and popup positioning. The application is built with ICEfaces/JSF2.0.
I'开发者_JS百科m thinking of having a javascript function assigning the client attributes to the value attribute of a hidden input and then grabbing it from there, but I was hoping for something less cumbersome.
Any ideas?
You may have to use filters to determine the screen size and redirect to the specific url to display
I solved this myself by writing a Java Servlet and a JavaScript function that obtains the window size and makes a HTTP request to pass this information to the servlet. Both the servlet and JSF Managed Beans have access to the HTTP Session ID so I know which web client the HTTP request has come from.
精彩评论