Noticed strange behaviour in SmartGWT Window. Seems to be bug. Anyone experienced the same?
At first, Window object is drawn ok. However, after it's moved and browser window is maximized and then restored, Window object is rendered in an unusual way. See also attached screenshot.
Bug?
Haven't posted bug report yet as it's best to have forum feedback.
Regards
Lars
------------------------------------------------------------
1. SmartGWT version 2.2, Browsers Firefox (3.6.8), Internet Explorer (8.0.6001.18702)
2. -
3. Developer console:
com.smartgwt.client.core.JsObject$SGWT_WARN: 14:38:23.758:WARN:Window:isc_Window_0:getPageLeft(): Called on undrawn relatively-position widget 'isc_Window_0'. The page level coordinates can not be reliably calculated until the widget has drawn - returning estimated position
4. see 3.
5. Two files, (a) Paneltest2.gwt.xml, (b) Paneltest2.java
------------------------------------------------------------
(a) Paneltest2.gwt.xml
<?xml version="1.0" encoding="UTF-8"?>
<module rename-to='paneltest2'>
<!-- Inherit the core Web Toolkit stuff. -->
<inherits name='com.google.gwt.user.User'/>
<!-- Inherit the default GWT style sheet. You can change -->
<!-- the theme of your GWT application by uncommenting -->
<!-- any one of the following lines. -->
<inherits name='com.google.gwt.user.theme.standard.Standard'/>
<!-- <inherits name='com.google.gwt.user.theme.chrome.Chrome'/> -->
<!-- <inherits name='com.google.gwt.user.theme.dark.Dark'/> -->
<!-- Other module inherits -->
<!-- SmartGWT -->
<inherits name="com.smartgwt.SmartGwt"/>
<inherits name="com.smartclient.SmartClientDefault"/>
<!-- <inherits name='com.smartclient.SmartClientNoScript'/> -->
<!-- <inherits name="com.smartgwt.SmartGwtNoTheme" /> -->
<!-- <inherits name="com.smartclient.theme.enterpriseblue.EnterpriseBlue" /> -->
<!-- Specify the app entry point class. -->
<entry-point class='com.mycompany.paneltest2.client.Paneltest2'/>
<!-- Specify the paths for translatable code -->
<source path='client'/>
<source path='shared'/>
</module>
------------------------------------------------------------
(b) Paneltest2.java
package com.mycompany.paneltest2.client;
import com.google.gwt.core.client.EntryPoint;
import com.google.gwt.user.client.ui.RootPanel;
import com.smartgwt.client.types.VerticalAlignment;
import com.smartgwt.client.widgets.Label;
/**
* Entry point classes define <code>onModuleLoad()</code>.
*/
public class Paneltest2 implements EntryPoint {
/**
* This is the entry point method.
*/
public void onModuleLoad() {
com.smartgwt.client.widgets.Window window = createWin("Normal window", false, 220, 250, 320);
RootPanel.get().add(window);
}
private com.smartgwt.client.widgets.Window createWin(String title, boolean autoSizing, int width, int height, int offsetLeft) {
Label label = new Label(
"<b>Severity 1</b> - Critical problem<br/>System is unavailable in production or is corrupting data, and the error severely impacts the user's operations.<br/><br/>"
+ "<b>Severity 2</b> - Major problem<br/>An important function of the system is not available in production, and the user's operations are restricted.<br/><br/>"
+ "<b>Severity 3</b> - Minor problem<br/>Inability to use a function of the system occurs, but it does not seriously affect the user's operations.");
label.setWidth100();
label.setHeight100();
label.setPadding(5);
label.setValign(VerticalAlignment.TOP);
com.smartgwt.client.widgets.Window window = new com.smartgwt.client.widgets.Window();
window.setAutoSize(autoSizing);
window.setTitle(title);
window.setWidth(width);
window.setHeight(height);
window.setLeft(offsetLeft);
window.setCanDragReposition(true);
window.setCanDragResize(true);
window.addItem(label);
return window;
}
}
Be sure your post includes:
1. the SmartGWT or SmartClient version and browser version(s) involved;
2. for a server-side problem, the complete logs generated during processing of the request;
3. for a client-side problem, the contents of the Developer Console (see FAQ for usage);
4. if there is a JavaScript error, the stack trace logged in the Developer Console (from Internet Explorer if possible); and
5. sample code.
Posts with incomplete information are much more likely to be ignored.
At first, Window object is drawn ok. However, after it's moved and browser window is maximized and then restored, Window object is rendered in an unusual way. See also attached screenshot.
Bug?
Haven't posted bug report yet as it's best to have forum feedback.
Regards
Lars
------------------------------------------------------------
1. SmartGWT version 2.2, Browsers Firefox (3.6.8), Internet Explorer (8.0.6001.18702)
2. -
3. Developer console:
com.smartgwt.client.core.JsObject$SGWT_WARN: 14:38:23.758:WARN:Window:isc_Window_0:getPageLeft(): Called on undrawn relatively-position widget 'isc_Window_0'. The page level coordinates can not be reliably calculated until the widget has drawn - returning estimated position
4. see 3.
5. Two files, (a) Paneltest2.gwt.xml, (b) Paneltest2.java
------------------------------------------------------------
(a) Paneltest2.gwt.xml
<?xml version="1.0" encoding="UTF-8"?>
<module rename-to='paneltest2'>
<!-- Inherit the core Web Toolkit stuff. -->
<inherits name='com.google.gwt.user.User'/>
<!-- Inherit the default GWT style sheet. You can change -->
<!-- the theme of your GWT application by uncommenting -->
<!-- any one of the following lines. -->
<inherits name='com.google.gwt.user.theme.standard.Standard'/>
<!-- <inherits name='com.google.gwt.user.theme.chrome.Chrome'/> -->
<!-- <inherits name='com.google.gwt.user.theme.dark.Dark'/> -->
<!-- Other module inherits -->
<!-- SmartGWT -->
<inherits name="com.smartgwt.SmartGwt"/>
<inherits name="com.smartclient.SmartClientDefault"/>
<!-- <inherits name='com.smartclient.SmartClientNoScript'/> -->
<!-- <inherits name="com.smartgwt.SmartGwtNoTheme" /> -->
<!-- <inherits name="com.smartclient.theme.enterpriseblue.EnterpriseBlue" /> -->
<!-- Specify the app entry point class. -->
<entry-point class='com.mycompany.paneltest2.client.Paneltest2'/>
<!-- Specify the paths for translatable code -->
<source path='client'/>
<source path='shared'/>
</module>
------------------------------------------------------------
(b) Paneltest2.java
package com.mycompany.paneltest2.client;
import com.google.gwt.core.client.EntryPoint;
import com.google.gwt.user.client.ui.RootPanel;
import com.smartgwt.client.types.VerticalAlignment;
import com.smartgwt.client.widgets.Label;
/**
* Entry point classes define <code>onModuleLoad()</code>.
*/
public class Paneltest2 implements EntryPoint {
/**
* This is the entry point method.
*/
public void onModuleLoad() {
com.smartgwt.client.widgets.Window window = createWin("Normal window", false, 220, 250, 320);
RootPanel.get().add(window);
}
private com.smartgwt.client.widgets.Window createWin(String title, boolean autoSizing, int width, int height, int offsetLeft) {
Label label = new Label(
"<b>Severity 1</b> - Critical problem<br/>System is unavailable in production or is corrupting data, and the error severely impacts the user's operations.<br/><br/>"
+ "<b>Severity 2</b> - Major problem<br/>An important function of the system is not available in production, and the user's operations are restricted.<br/><br/>"
+ "<b>Severity 3</b> - Minor problem<br/>Inability to use a function of the system occurs, but it does not seriously affect the user's operations.");
label.setWidth100();
label.setHeight100();
label.setPadding(5);
label.setValign(VerticalAlignment.TOP);
com.smartgwt.client.widgets.Window window = new com.smartgwt.client.widgets.Window();
window.setAutoSize(autoSizing);
window.setTitle(title);
window.setWidth(width);
window.setHeight(height);
window.setLeft(offsetLeft);
window.setCanDragReposition(true);
window.setCanDragResize(true);
window.addItem(label);
return window;
}
}
Be sure your post includes:
1. the SmartGWT or SmartClient version and browser version(s) involved;
2. for a server-side problem, the complete logs generated during processing of the request;
3. for a client-side problem, the contents of the Developer Console (see FAQ for usage);
4. if there is a JavaScript error, the stack trace logged in the Developer Console (from Internet Explorer if possible); and
5. sample code.
Posts with incomplete information are much more likely to be ignored.
Comment