0

PROBLEM WITH BROWSER RESOLUTION ,need Help..

asked 2013-01-18 07:00:08 +0800

zknl gravatar image zknl
124 2

updated 2013-01-18 07:01:15 +0800

Hello Everyone,
I need some help regarding screen/desktop resolution.
in my project currently i am dealing with two main zuls,which are working correctly just problem is its design/view in browser
i am using linux os,so when i run this project on Windows then its work fine but problem regarding width of some textboxes,intboxes componenets.

after login i used in next zul borderlayout,i shown the menus to left side and after clicking on one of menu the respected zul will be opened in
center component of layout..for that i used iframe.

so i tried to chnage ifame as well as screen/desktop resollution by referring following threads from Forum:
http://www.zkoss.org/forum/listComment/7367
i did like follwing :
used the onclientinfoevent for window (as it works only for root componenet) in that method as :


void onClientInfo(ClientInfoEvent event) 
						{ 
                                                	int dskHeight,dskWidth,scrHeight,scrWidth;
	         				
								dskHeight = event.getDesktopHeight();
								dskWidth = event.getDesktopWidth();
								
							         scrHeight = event.getScreenHeight();
								scrWidth = event.getScreenWidth();
								
								System.out.println("^^^^^^^^^  SCREEN HEIGHT IS  :  "+" "+scrHeight+"    SCREEN WIDTH IS    "+"  "+scrWidth);
							        System.out.println("*******   Desktop HEIGHT IS  :    "+" "+dskHeight+"    Desktop WIDTH IS    "+"  "+dskWidth);
								
								center_frame.setHeight(""+dskHeight);//////where center_frame is id of iframe i used to display selected zul
                                                                center_frame.setWidth(""+dskWidth);
                                                   }

when i run application on windows with above changes i got after that event desktop height and width correct
but no ant effect on widths of textboxes and intboxes,they were looking so small still
just before an hour i read some content from following thread:
http://www.zkoss.org/forum/listComment/3147
but i havn't understad anything what admin exactly did

so will anyone please help me how do i solve this issue while different browsers?
Many Thanks in advance

delete flag offensive retag edit

2 Answers

Sort by ยป oldest newest most voted
0

answered 2013-01-18 13:25:40 +0800

terrytornado gravatar image terrytornado flag of Germany
9393 3 7 16
http://www.oxitec.de/

onClientInfo(ClientInfoEvent event) works per zk documentation ONLY on a root component. In our case in the outerWindow component.

We store these sizes params in a so called UserWorkspace which is created as spring bean scope="session" for every logged in user.
If we need such sizes for calculating the high of a borderlayout or listbox we get them from this UserWorkSpace class.

It's not easy to find out what goes wrong if you cut pieces from a well running application and modify them or put it into other context.

The best way is to checkout zksample2 new into an other place and debug the things what are interesting for you.

best
Stephan

link publish delete flag offensive edit
0

answered 2013-01-18 09:59:54 +0800

zknl gravatar image zknl
124 2

updated 2013-01-18 10:05:57 +0800

Hello Sir terrytornado,

will you please tell me how you did following?
it will be better if you will provide me some detailed code please.

public void onClientInfo(Ecent event){
UserWorkspace().getInstance().setDesktopHeight( evt.getDesktopHeight() );
UserWorkspace().getInstance().setDesktopWidth( evt.getDesktopWidth() );
}

link publish delete flag offensive edit
Your answer
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: 2013-01-18 07:00:08 +0800

Seen: 63 times

Last updated: Jan 18 '13

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