Hi,
I have recently discovered some helpful features in the CustomLayout. I am talking about hidden iLayoutJS thingy and ability to include blocks to templates.
I now build some logic using those things and I wonder if that is something that is going to remain in the future.
I think it those could be useful features. I would even propose to open then in the API.
The use case I have at hand is about integrating existing screens written in old version of ExtJs. I have many screens and I would like to incorporate them into Vaadin UI.
I actually build application layout (top menu, navigation tree at the left and content area at the right). The navigation logic is doen in Vaadin and I only need to open ExtJs screens inside the content area. So I use CustomLayout with a bit of script to create a div and render ExtJs panel into it. Then I use iLayoutJS trick to pass layout events from vaaadin to ExtJs panel. Here is the example code
public class CuxPanel extends CustomLayout {
private static final String TEMPLATE = "<div id='cux' style='height: 100%; width: 100%;></div>\n"
+ "<script>var cuxContent = window.Ext.get('cux');"
+ "var p = new window.Ext.Panel({autoHeight: true, autoWidth: true, layout: 'fit', elements: 'body', id:'contentArea'});"
+ "cuxContent.dom.iLayoutJS = function() {p.syncSize()}; p.render(cuxContent);</script>";
public CuxPanel() {
super();
setSizeFull();
setTemplateContents(TEMPLATE);
}
}
So could anybody comment on the future of those hidden features in the CustomLayout?
Regards,
Yury.