[Logo] IT Mill Toolkit Forum
  [Search] Search   [Recent Topics] Recent Topics   [Members]  Member Listing   [Groups] Back to home page 
[Register] Register / 
[Login] Login 
ITMill 5.0.0 beta and CustomLayout problems  XML
Forum Index -> General Help Go to Page: 1, 2 Next 
Author Message
dll


[Avatar]

Joined: 15/12/2007 16:25:49
Messages: 33
Location: St.-Petersburg, Russia
Offline

For some reason, I cannot get it working, probably I've missed something, but can't figure out what exactly...

The layout is:

Code:
 <table border="1" width="100%" height="100%">
   <tr height="10%">
     <td width="10%"></td>
     <td width="80%" align="justify" valign="middle"><div location="progressIndicator" width="100%"></div></td>
     <td width="10%"></td>
   </tr>
 </table>
 




Im trying to show a progress window with a progress indicator. So, here is window initialization code:

Code:
 Window w = new Window("Progress...");
 CustomLayout layout = new CustomLayout ( "ProgressWindowLayout");
 w.setLayout(layout);
 ProgressIndicator pi = new ProgressIndicator();
 layout.addComponent ( pi, "progressIndicator");
 w.setWidth(300);
 w.setHeight(150);
 


And finally Im showing this window from main app's window:

Code:
 getApplication().getMainWindow().addWindow(w);
 


I do see new window correctly, moreover, I do see my custom layout
template there (thanks to border="1" in a table definition), but there are no progress indicator there at all. %|

Thanks in advance,
Dmitri

[WWW]
Joonas Lehtinen



Joined: 07/03/2007 17:31:51
Messages: 157
Location: Turku, Finland
Offline

dll wrote:
For some reason, I cannot get it working, probably I've missed something, but can't figure out what exactly... 


By a quick glance, I did not see any problems in your code. IMO is should work this way.

So this is probably a bug. As it might be browser specific, which browser are you using?
dll


[Avatar]

Joined: 15/12/2007 16:25:49
Messages: 33
Location: St.-Petersburg, Russia
Offline

Im using Safari 3.0.4 (523.12) on Mac OS X 10.4.11 PPC, however, the same result is with Firefox 2.0.0.11 on the same Mac.
[WWW]
Joonas Lehtinen



Joined: 07/03/2007 17:31:51
Messages: 157
Location: Turku, Finland
Offline

dll wrote:
Im using Safari 3.0.4 (523.12) on Mac OS X 10.4.11 PPC, however, the same result is with Firefox 2.0.0.11 on the same Mac. 


Hi.. Tried this out with the following test program:
Code:
 package com.itmill.test;
 
 import com.itmill.toolkit.Application;
 import com.itmill.toolkit.ui.CustomLayout;
 import com.itmill.toolkit.ui.ProgressIndicator;
 import com.itmill.toolkit.ui.Window;
 
 public class T1 extends Application {
 
 	public void init() {
 		 Window w = new Window("Progress...");
 		CustomLayout layout = new CustomLayout ( "ProgressWindowLayout");
 		 w.setLayout(layout);
 		 ProgressIndicator pi = new ProgressIndicator();
 		 layout.addComponent ( pi, "progressIndicator");
 		 w.setWidth(300);
 		 w.setHeight(150);
 			setTheme("example");
 			setMainWindow(w);
 	}
 }
 


And the result looks this (Safari 3, MacBook Pro):

Joonas Lehtinen



Joined: 07/03/2007 17:31:51
Messages: 157
Location: Turku, Finland
Offline

Oh.. I see the problem. There seems to be a bug in processing CustomLayouts in subwindows.

Code:
 package com.itmill.test;
 
 import com.itmill.toolkit.Application;
 import com.itmill.toolkit.ui.Button;
 import com.itmill.toolkit.ui.CustomLayout;
 import com.itmill.toolkit.ui.ProgressIndicator;
 import com.itmill.toolkit.ui.Window;
 
 public class T1 extends Application {
 
 	public void init() {
 		setTheme("example");
 
 		Window main = new Window("Test");
 		setMainWindow(main);
 		
 		 Window w = new Window("Progress...");
 		CustomLayout layout = new CustomLayout ( "ProgressWindowLayout");
 		 w.setLayout(layout);
 		 ProgressIndicator pi = new ProgressIndicator();
 		 layout.addComponent ( pi, "progressIndicator");
 		 w.setWidth(300);
 		 w.setHeight(150);
 		 main.addWindow(w);
 		 
 		 main.addComponent(new Button("restart",this,"close"));
 	}
 }
 
 


Shows as




I'll forward this to dev-team...
Joonas Lehtinen



Joined: 07/03/2007 17:31:51
Messages: 157
Location: Turku, Finland
Offline

BTW: As a debugging tip, you can add &debug=1 to your application url and a debug window appears and shows changes server actually sends to client. In this case you can see that the progress indicator is properly sent to client and thus the bug is in ICustomLayout widget.



Anyways, Matti promised to resolve this asap.
dll


[Avatar]

Joined: 15/12/2007 16:25:49
Messages: 33
Location: St.-Petersburg, Russia
Offline

Ah, so that's fine, minus another issue for release
Thanks !

[WWW]
Matti Tahvonen



Joined: 27/03/2007 15:25:53
Messages: 32
Offline

Hi!

Issue is resolved in our SVN repository. I hope we can release a next version soon.

cheers,
matti
Joonas Lehtinen



Joined: 07/03/2007 17:31:51
Messages: 157
Location: Turku, Finland
Offline

Matti Tahvonen wrote:
Hi!

Issue is resolved in our SVN repository. I hope we can release a next version soon.

cheers,
matti 


I hope that we'll have nightly builds available in the future to make propagation of this kind of fixes faster.
Jani Laakso



Joined: 05/03/2007 16:44:17
Messages: 109
Location: Finland
Offline

Joonas Lehtinen wrote:

Matti Tahvonen wrote:
Hi!

Issue is resolved in our SVN repository. I hope we can release a next version soon.

cheers,
matti 


I hope that we'll have nightly builds available in the future to make propagation of this kind of fixes faster. 


Good idea, I'll ask Marko to set this up. We already have internal setup for this.

--
Jani Laakso, Toolkit Developer, IT Mill Ltd
[WWW]
Jani Laakso



Joined: 05/03/2007 16:44:17
Messages: 109
Location: Finland
Offline

Here it goes..
http://forum.itmill.com/posts/list/351.page

--
Jani Laakso, Toolkit Developer, IT Mill Ltd
[WWW]
dll


[Avatar]

Joined: 15/12/2007 16:25:49
Messages: 33
Location: St.-Petersburg, Russia
Offline

Thanks guys, for your responses and for debug option, it's useful one even for itmill-built applications as well.

Regards,
Dmitri

[WWW]
Marko Grönroos



Joined: 23/07/2007 15:34:05
Messages: 100
Offline

dll wrote:
Im trying to show a progress window with a progress indicator. 

It should be possible to do the proper layout with layout components too, such as ExpandLayout, and probably easier than with CustomLayout, but the layout alignments do not work very well yet.

Looks like there's also a problem that the ProgressIndicator can become zero width inside some layouts.
dll


[Avatar]

Joined: 15/12/2007 16:25:49
Messages: 33
Location: St.-Petersburg, Russia
Offline

Marko Grönroos wrote:

dll wrote:
Im trying to show a progress window with a progress indicator. 

It should be possible to do the proper layout with layout components too, such as ExpandLayout, and probably easier than with CustomLayout, but the layout alignments do not work very well yet.

Looks like there's also a problem that the ProgressIndicator can become zero width inside some layouts. 


yep, I just wanted to try custom layout and as well to solve such problem that I was unable to place progress indicator and button in the center of the window, regardless of it's size with standard layout managers. Eg I was able to center progress and button horizontally, but was not able to center vertically.
[WWW]
dll


[Avatar]

Joined: 15/12/2007 16:25:49
Messages: 33
Location: St.-Petersburg, Russia
Offline

Just downloaded the first nightly build ;)

And just a question - I noticed, there are no more setSizeFull mehtod in layouts as well as Sizeable interface is deprecated. Any new methodology is planned for controlling component sizes ?

Regards,
Dmitri

[WWW]
 
Forum Index -> General Help Go to Page: 1, 2 Next 
Go to:   
Powered by JForum 2.1.7 © JForum Team