December 11, 2013, 5:30 am
Hi,
I am testing 10.0d on my environment. i downloaded it before from this page:
http://smartclient.com/builds
But now it is not there anymore.
Can I download it from somewhere else?
gr. Martin
↧
December 11, 2013, 5:39 am
Hi,
I try to test 4.1d and I have this problem in devmode :
- Firefox 26.0
- http://www.smartclient.com/builds/SmartGWT/4.1d/LGPL/2013-12-11/smartgwt-4.1d.zip
- Gwt : gwt-2.5.1
Code:
00:01:30,123 [ERROR] Uncaught exception escaped
com.google.gwt.dev.shell.HostedModeException: Something other than an int was returned from JSNI method '@com.smartgwt.client.widgets.grid.ListGrid::getRowHeight(Lcom/smartgwt/client/widgets/grid/ListGridRecord;I)': JS value of type null, expected int
at com.google.gwt.dev.shell.JsValueGlue.getIntRange(JsValueGlue.java:266)
at com.google.gwt.dev.shell.JsValueGlue.get(JsValueGlue.java:144) at com.google.gwt.dev.shell.ModuleSpace.invokeNativeInt(ModuleSpace.java:257)
at com.google.gwt.dev.shell.JavaScriptHost.invokeNativeInt(JavaScriptHost.java:75)
at com.smartgwt.client.widgets.grid.ListGrid.getRowHeight(ListGrid.java)
at sun.reflect.GeneratedMethodAccessor66.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:601)
at com.google.gwt.dev.shell.MethodAdaptor.invoke(MethodAdaptor.java:103)
at com.google.gwt.dev.shell.MethodDispatch.invoke(MethodDispatch.java:71)
at com.google.gwt.dev.shell.OophmSessionHandler.invoke(OophmSessionHandler.java:172)
at com.google.gwt.dev.shell.BrowserChannelServer.reactToMessagesWhileWaitingForReturn(BrowserChannelServer.java:338)
at com.google.gwt.dev.shell.BrowserChannelServer.invokeJavascript(BrowserChannelServer.java:219)
at com.google.gwt.dev.shell.ModuleSpaceOOPHM.doInvoke(ModuleSpaceOOPHM.java:136)
at com.google.gwt.dev.shell.ModuleSpace.invokeNative(ModuleSpace.java:571)
at com.google.gwt.dev.shell.ModuleSpace.invokeNativeObject(ModuleSpace.java:279)
at com.google.gwt.dev.shell.JavaScriptHost.invokeNativeObject(JavaScriptHost.java:91)
at com.google.gwt.core.client.impl.Impl.apply(Impl.java)
at com.google.gwt.core.client.impl.Impl.entry0(Impl.java:242)
at sun.reflect.GeneratedMethodAccessor46.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:601)
at com.google.gwt.dev.shell.MethodAdaptor.invoke(MethodAdaptor.java:103)
at com.google.gwt.dev.shell.MethodDispatch.invoke(MethodDispatch.java:71)
at com.google.gwt.dev.shell.OophmSessionHandler.invoke(OophmSessionHandler.java:172)
at com.google.gwt.dev.shell.BrowserChannelServer.reactToMessagesWhileWaitingForReturn(BrowserChannelServer.java:338)
at com.google.gwt.dev.shell.BrowserChannelServer.invokeJavascript(BrowserChannelServer.java:219)
at com.google.gwt.dev.shell.ModuleSpaceOOPHM.doInvoke(ModuleSpaceOOPHM.java:136)
at com.google.gwt.dev.shell.ModuleSpace.invokeNative(ModuleSpace.java:571)
at com.google.gwt.dev.shell.ModuleSpace.invokeNativeVoid(ModuleSpace.java:299)
at com.google.gwt.dev.shell.JavaScriptHost.invokeNativeVoid(JavaScriptHost.java:107)
at com.smartgwt.client.widgets.grid.ListGrid.startEditingNew(ListGrid.java)
at org.rfa.sape.client.widget.bareme.BaremePicto$7.onClick(BaremePicto.java:315)
at com.smartgwt.client.widgets.menu.events.MenuItemClickEvent.dispatch(MenuItemClickEvent.java:107)
at com.smartgwt.client.widgets.menu.events.MenuItemClickEvent.dispatch(MenuItemClickEvent.java:1)
at com.google.gwt.event.shared.GwtEvent.dispatch(GwtEvent.java:1)
at com.google.web.bindery.event.shared.EventBus.dispatchEvent(EventBus.java:40)
at com.google.web.bindery.event.shared.SimpleEventBus.doFire(SimpleEventBus.java:193)
at com.google.web.bindery.event.shared.SimpleEventBus.fireEvent(SimpleEventBus.java:88)
at com.google.gwt.event.shared.HandlerManager.fireEvent(HandlerManager.java:127)
at com.smartgwt.client.core.DataClass.fireEvent(DataClass.java:487)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:601)
at com.google.gwt.dev.shell.MethodAdaptor.invoke(MethodAdaptor.java:103)
at com.google.gwt.dev.shell.MethodDispatch.invoke(MethodDispatch.java:71)
at com.google.gwt.dev.shell.OophmSessionHandler.invoke(OophmSessionHandler.java:172)
at com.google.gwt.dev.shell.BrowserChannelServer.reactToMessagesWhileWaitingForReturn(BrowserChannelServer.java:338)
at com.google.gwt.dev.shell.BrowserChannelServer.invokeJavascript(BrowserChannelServer.java:219)
at com.google.gwt.dev.shell.ModuleSpaceOOPHM.doInvoke(ModuleSpaceOOPHM.java:136)
at com.google.gwt.dev.shell.ModuleSpace.invokeNative(ModuleSpace.java:571)
at com.google.gwt.dev.shell.ModuleSpace.invokeNativeObject(ModuleSpace.java:279)
at com.google.gwt.dev.shell.JavaScriptHost.invokeNativeObject(JavaScriptHost.java:91)
at com.google.gwt.core.client.impl.Impl.apply(Impl.java)
at com.google.gwt.core.client.impl.Impl.entry0(Impl.java:242)
at sun.reflect.GeneratedMethodAccessor46.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:601)
at com.google.gwt.dev.shell.MethodAdaptor.invoke(MethodAdaptor.java:103)
at com.google.gwt.dev.shell.MethodDispatch.invoke(MethodDispatch.java:71)
at com.google.gwt.dev.shell.OophmSessionHandler.invoke(OophmSessionHandler.java:172)
at com.google.gwt.dev.shell.BrowserChannelServer.reactToMessages(BrowserChannelServer.java:293)
at com.google.gwt.dev.shell.BrowserChannelServer.processConnection(BrowserChannelServer.java:547)
at com.google.gwt.dev.shell.BrowserChannelServer.run(BrowserChannelServer.java:364)
at java.lang.Thread.run(Thread.java:722)
Best Regards,
Regis
↧
↧
December 11, 2013, 8:59 am
We are investigating upgrading from SmartGWT 3.0.
I was hoping you can you provide me some information regarding the changelogs for 3.1 and 4.0.
Among the hundreds of bug fixes listed, how many of these fixes addressed actual security vulnerabilities?
Also, what are the known security vulnerabilities in SmartGWT 3.0?
↧
December 11, 2013, 9:00 am
We are using "v9.0p_2013-07-24/PowerEdition Development Only".
When we are doing zoom-in zoom-out in our application on iPad, it is going for re-sizing.
For testing this behavior we try to open the "smartgwt showcase" on iPad but link is not working on iPad.
Thanks,
Deepak Singh
↧
December 12, 2013, 12:42 am
I have a ListGrid that i need to color theses lines, but the first column still uncolored ! until i overflew the line with the mouse
This is my code :
Code:
protected String getCellCSSText(ListGridRecord record, int rowNum,int colNum) {
BorsRecord borsRecord = (BorsRecord) record;
// Appliquer une couleur a la ligne fin
int rowCount = this.getRecords().length;
int lastRow = (rowCount - 1);
if (getFieldName(colNum).equals("code")) {
if(borsRecord.getAttribute("codeCouleur").equals(
GeneralConstants.RED_COLOR)) {
return "font-weight:bold; color:red;";
} else if (borsRecord.getAttribute("codeCouleur").equals(
GeneralConstants.GREEN_COLOR)) {
return "font-weight:bold; color:green;";
} else {
return "";
}
}
↧
↧
December 12, 2013, 2:31 am
Hi
I have found an issue with DrawLabel.setAlignment("center"). It works with FF 25, IE10, IE9 but not with IE7 and IE8. With IE7 and IE8, the label is not centered.
Builds tested:
* SmartGWT LGPL 4.0p (2013-12-11).
* SmartGWT LGPL 5.0d (2013-12-11).
Code:
public void onModuleLoad() {
DrawPane drawPane = new DrawPane();
drawPane.setHeight(450);
drawPane.setWidth(700);
drawPane.setLeft(25);
drawPane.setShowEdges(true);
drawPane.setEdgeSize(4);
drawPane.setBackgroundColor("papayawhip");
DrawLabel dl = new DrawLabel();
dl.setLeft(150);
dl.setTop(150);
dl.setContents("0123456789");
dl.setAlignment("center"); //does not work with IE8
dl.setFontFamily("Tahoma");
dl.setFontSize(24);
drawPane.addDrawItem(dl, true);
DrawOval dov = new DrawOval();
dov.setOval(150, 150, 50, 50);
drawPane.addDrawItem(dov, true);
drawPane.draw();
}
↧
December 12, 2013, 2:39 am
Hi guys,
I'm trying to track down and recreate a few formula problems for your review so you may see another post or two. And, I know I have an existing thread with some other formula issues that I need to address again with you.
But, here is a current issue I see using the 9.0 SDK from a nightly build from 12/3. I also see it with an early nightly build SDK from 10/7.
Use the customColumns sample in the Feature Explorer. My local URL is this:
http://localhost:8082/isomorphic/system/reference/SmartClient_Explorer.html#customColumns
1. Show Formula Builder > Name: New Field 1 > Formula: A > Save
2. Show Formula Builder > Name: New Field 2 > Formula: B > Save
3. Show Formula Builder > Confirm that New Field 1 and New Field 2 display as options in the Field list > Cancel
4. De-select New Field 1 and New Field 2 so they are not visible.
5. Show Formula Builder and you'll see that only one of the fields you de-selected is still available in the Field List.
6. If you show the fields again, then they will re-appear in the Formula Window field list.
So, something is wrong where the fields are not available for selection when they are hidden. I'm seeing other behavior related to using formulas that are hidden in Formula Builder. But, I can't even try to recreate those issues until this problem is fixed. And, I'm crossing fingers that the fix for this problem will also fix the other problems too.
↧
December 12, 2013, 4:51 am
SNAPSHOT_v9.1d_2013-10-06
Browsers: Chrome 31 OSX, Chrome 31 Win7; IE11
To re-create, pick a simple ListGrid e.g.
http://www.smartclient.com/#columnSize
Modify thus:
Code:
isc.ListGrid.create({
ID: "countryList",
width:500, height:224, alternateRecordStyles:true,
data: countryData,
fields:[
{name:"countryCode", title:"Flag", width:50, type:"image", imageURLPrefix:"flags/16/", imageURLSuffix:".png"},
{name:"countryName", title:"Country",
formatCellValue:function(value, record, rowNum, colNum, grid) {
return "<a href='#'>" + value + "</a>";
}
},
{name:"capital", title:"Capital"},
{name:"continent", title:"Continent"}
],
rowContextClick:function(record, rowNum, colNum) {
console.warn("Selection length " + countryList.getSelection().length);
if (!countryList.getSelection().contains(record)) {
console.warn("Did not contain record " + rowNum);
}
},
canResizeFields: true
})
Essentially this alters the country column to render as HTML links.
If you context-click on a row, anywhere apart from the pixels over the links, then you'll just see 'Selection length 1' in the console.
However, if you context-click over the pixels of the link, then you'll see the 'Did not contain record x' message. Unless you context-click on a row that you have already selected (by clicking elsewhere on that row).
Seemingly, context-clicking on the link somehow prevents the record from being selected (the normal (and expected!) behaviour).
↧
December 12, 2013, 6:46 am
I have a custom-build form item. It is a combobox that presents a dropdown list with several columns. The class is derived from the smartGWT ComboBoxItem (class CustomComboBoxItem extends ComboBoxItem).
The CustomComboBoxItem works fine in a form.
There is a problem when using the CustomComboBoxItem in the row editor of a ListGrid.
The method ComboBoxItem.getSelectedRecord() always fails with the following exception:
Exception caught: (TypeError) @com.smartgwt.client.widgets.form.fields.ComboBoxI tem::getSelectedRecord()([]): Object doesn't support property or method 'getSelectedRecord'
I have attached the full stack trace.
I created a minimal test code to reproduce the issue. It is derived from the BuildInDS sample code. Just add/replace the files attached below.
In order to trigger the exception: edit a row in the ListGrid, open the dropdown for the "Item" column and click on an item in the dropdown list.
I'm using SmartGWT Framework (SNAPSHOT_v9.1d_2013-12-03/PowerEdition). The issue is reproducible in IE9 and FF16.
I suspect that could be a bug in SmartGWT?
↧
↧
December 12, 2013, 6:55 am
SmartClient Version: v9.0p_2013-12-03/PowerEdition Deployment (built 2013-12-03)
I've just discovered that Safari in Private Browsing mode gives an error when trying to use local storage (via isc.Offline.put() method):
Code:
15:52:13.864:XRP1:WARN:Log:Error: QuotaExceededError: DOM Exception 22
Stack from error.stack:
setItem@[native code]
$788@https://srvubuntu.juventus.priv:8443/Jta/isomorphic/system/modules/ISC_DataBinding.js?isc_version=v90p_2013-12-03.js:1707:343
put@https://srvubuntu.juventus.priv:8443/Jta/isomorphic/system/modules/ISC_DataBinding.js?isc_version=v90p_2013-12-03.js:1704:156
is there available a workaround? At least, is it possible to know if the local storage is not available?
↧
December 12, 2013, 8:00 am
Hi,
I have a question about TimeItem, specifically about how it handles invalid data.
Currently, if I enter invalid time data "25:61:61" it will revert each "piece" (hours, minutes, or seconds) to the maximum valid value; so it changes the contents of the box to "23:59:59".
Is there a way to cause it to simply fail validation instead of performing this automatic behavior?
I am using version 3.1
↧
December 12, 2013, 8:53 am
Just wondering if anyone got it working?
Iframe placed in htmlpane is not loading it.
Tried with HtmlPane & HtmlFlow with evalScriptBlocks=true
and contentsType=page.
Any hints?
↧
December 12, 2013, 9:44 am
SmartGWT 4.1d LDPL 2013-11-07
This didn't work...
Code:
Public MyClass extends Layout
{
TabSet tabs = new TabSet();
TabBar tabBarForSkinning = new TabBar();
public MyClass()
{
tabBarForSkinning.setStyleName("xxxx");
tabs.setTabBarProperties(tabBarForSkinning);
}
}
But this did....
Code:
Public MyClass extends Layout
{
TabSet tabs = new TabSet();
@Override
protected void onDraw()
{
TabBar test = tabs.getTabBar();
test.setStyleName("xxxx");
}
}
By design, or a bug? :)
-B
↧
↧
December 12, 2013, 11:33 am
Hello Isomorphic team
I am using your showcase from 2013-12-11 and I noticed a little inconsistency with the scroll on Android.
Steps to reproduce:
1. go to forms
2. inputs
3. tap on the message field and the keyboard pops up
4. scroll up until you see the message field
5. then tap on the header (or anywhere for the keyboard to disappear)
when the keyboard disappears the scrolling fails to work.
see picture for reference
↧
December 12, 2013, 12:41 pm
IE9 & Chrome
smartclient v91d 2013-12-04
I've set up a sample using dynamic form where two fields, CommandLine and Message, have wrap set to true and the sample data is very long. The form cuts them off but does not wrap. What am I doing wrong?
Thanks
↧
December 12, 2013, 1:06 pm
SmartClient_v90p_2013-09-17
The code below creates a line chart that scrolls showing the heart rate at a specific period. I am displaying the min and max values as static lines, by creating data points for every period. Is there an easier way to do this other than creating three data points every time (low, actual and high)? The actual number is the only ones that changes, it would be nice to have a property on the facetchart to set these static values once for the chart.
Code:
<!DOCTYPE html>
<html>
<head>
<title >SNTQ-1785</title>
<script type="text/javascript" >
var isomorphicDir="http://localhost:8080/isomorphic/";
</script>
<script type="text/javascript" SRC="http://localhost:8080/isomorphic/system/development/ISC_Core.js"></script>
<script type="text/javascript" SRC="http://localhost:8080/isomorphic/system/development/ISC_Foundation.js"></script>
<script type="text/javascript" SRC="http://localhost:8080/isomorphic/system/development/ISC_Containers.js"></script>
<script type="text/javascript" SRC="http://localhost:8080/isomorphic/system/development/ISC_Forms.js"></script>
<script type="text/javascript" SRC="http://localhost:8080/isomorphic/system/development/ISC_DataBinding.js"></script>
<script type="text/javascript" SRC="http://localhost:8080/isomorphic/system/development/ISC_Drawing.js"></script>
<script type="text/javascript" SRC="http://localhost:8080/isomorphic/system/development/ISC_PluginBridges.js"></script>
<script type="text/javascript" SRC="http://localhost:8080/isomorphic/system/development/ISC_Charts.js"></script>
<script type="text/javascript" SRC="http://localhost:8080/isomorphic/system/development/ISC_Tools.js"></script>
<script type="text/javascript" SRC="http://localhost:8080/isomorphic/skins/EnterpriseBlue/load_skin.js"></script>
<script type="text/javascript">
var data = [];
var cnt = 0;
var maxIterations = 100; // total number of iterations before we quit
var dataPointsPerIteration = 1; // total number of data points to genrate each iteration
var timeout = 2000; // milli-seconds
var randomMax = 160;
function generateRandomData(n, it) {
for(var i=0; i < it; i++) {
// generate a random number between 0 and 160
// this will be our actual heart rate
var val = Math.floor((Math.random()*n)+1);
// we need three data points per date
//var d = new Date();
//var str = d.getYear() + "-" + d.getMonth() + "-" + d.getDate() + " " + d.getHours() + ":" + d.getMinutes() + ":" + d.getSeconds();
data.push({ type: "high", date:cnt, value:100 });
data.push({ type: "low", date:cnt, value:60 });
data.push({ type: "actual", date:cnt, value:val });
cnt++;
}
chart.setData(data.slice(0));
// do this again in 5 seconds
if(cnt < maxIterations) {
setTimeout(function() {
generateRandomData(randomMax, dataPointsPerIteration);
}, timeout );
}
}
</script>
</head>
<body>
<script>
chart = isc.FacetChart.create({
width: 508,
height: 400,
chartType: "Line",
valueTitle: "Beats Per Minute (BPM)",
facets: [
{
id: "date"
},
{
id: "type"
}
],
valueProperty: "value",
border: "1px solid black",
showTitle: false,
dataColors: ["#ff0000", "#0000ff", "#00ff00"]
});
generateRandomData(randomMax, 1);
</script>
</body>
</html>
↧
December 12, 2013, 2:00 pm
Hi,
What's the quick n easy way of deploying sample for Charts included in EE evaluation version of smartgwt
I deployed and ran the "built-in-ds" sample and then tried to copy the charts code into it but am getting below exception:
Browser is IE 10.X
And the gwt.xml has below entries:
Code:
<inherits name="com.google.gwt.user.User"/>
<inherits name="com.smartgwt.tools.SmartGwtTools"/>
<inherits name="com.smartgwtee.SmartGwtEENoScript"/>
<inherits name="com.smartgwt.Drawing"/>
<inherits name="com.smartgwt.Charts"/>
<inherits name="com.smartgwt.Analytics"/>
<inherits name="com.smartgwtee.tools.Tools"/>
<inherits name="com.smartgwtee.SmartGwtEE"/>
16:45:53.521 [ERROR] [builtinds] 16:45:53.519:WARN:ListGrid:isc_BuiltInDS_9_0:Component chartConstructor attribute set to "FacetChart" - this cannot be resolved to a valid SmartClient class. Verify that all appropriate modules are loaded and that this class exists.
com.smartgwt.client.core.JsObject$SGWT_WARN: 16:45:53.519:WARN:ListGrid:isc_BuiltInDS_9_0:Component chartConstructor attribute set to "FacetChart" - this cannot be resolved to a valid SmartClient class. Verify that all appropriate modules are loaded and that this class exists.
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
at java.lang.reflect.Constructor.newInstance(Unknown Source)
at com.google.gwt.dev.shell.MethodAdaptor.invoke(MethodAdaptor.java:105)
at com.google.gwt.dev.shell.MethodDispatch.invoke(MethodDispatch.java:71)
at com.google.gwt.dev.shell.OophmSessionHandler.invoke(OophmSessionHandler.java:172)
at com.google.gwt.dev.shell.BrowserChannelServer.reactToMessagesWhileWaitingForReturn(BrowserChannelServer.java:338)
at com.google.gwt.dev.shell.BrowserChannelServer.invokeJavascript(BrowserChannelServer.java:219)
at com.google.gwt.dev.shell.ModuleSpaceOOPHM.doInvoke(ModuleSpaceOOPHM.java:136)
at com.google.gwt.dev.shell.ModuleSpace.invokeNative(ModuleSpace.java:571)
at com.google.gwt.dev.shell.ModuleSpace.invokeNativeObject(ModuleSpace.java:279)
at com.google.gwt.dev.shell.JavaScriptHost.invokeNativeObject(JavaScriptHost.java:91)
at com.smartgwt.client.widgets.grid.ListGrid.chartData(ListGrid.java)
at com.smartgwt.sample.client.BuiltInDS.getViewPanel(BuiltInDS.java:252)
at com.smartgwt.sample.client.BuiltInDS.onModuleLoad(BuiltInDS.java:182)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at com.google.gwt.dev.shell.ModuleSpace.onLoad(ModuleSpace.java:406)
at com.google.gwt.dev.shell.OophmSessionHandler.loadModule(OophmSessionHandler.java:200)
at com.google.gwt.dev.shell.BrowserChannelServer.processConnection(BrowserChannelServer.java:526)
at com.google.gwt.dev.shell.BrowserChannelServer.run(BrowserChannelServer.java:364)
at java.lang.Thread.run(Unknown Source)
↧
↧
December 12, 2013, 2:42 pm
We are using SmartGWT 4.0 power edition. It usually takes 15 to 20 seconds to load ISC_*.js files.
Can we cache them? How?
How can we make sure cache will be invalidated when we upgrade to SmartGWT 4.1?
↧
December 12, 2013, 3:23 pm
SmartGWTPro 4.1d (build from Dec 11, 2013)
SmartGWT version 2.5.1
FireFox 25.0.1
I want to be able to resize the drawRect object. I have added the following line of code to enable resizing.
drawRect.setKnobs(KnobType.RESIZE);
However, I do not want to display the knobs. I want the cursor to change from arrow to crosshair when it is near the edges.
I tried hideKnobs(KnobType.RESIZE). However, functionality to resize went away.
public void onModuleLoad() {
DrawPane drawPane = new DrawPane();
DrawGroup drawGroup = new DrawGroup();
DrawRect drawRect = new DrawRect();
drawPane.setWidth(640);
drawPane.setHeight(480);
drawPane.setCanDrag(true);
drawPane.setBackgroundColor("#D9E4F6");
drawPane.setCursor(Cursor.AUTO);
// If group is added to drawPane before drag operation, drag operation fails
//drawPane.addDrawItem(drawGroup, true);
drawGroup.setKeepInParentRect(true);
drawGroup.setTop(0);
drawGroup.setLeft(0);
drawGroup.setWidth(50);
drawGroup.setHeight(32);
drawGroup.setCanDrag(true);
drawGroup.setUseGroupRect(true);
drawGroup.addClickHandler(new ClickHandler() {
@Override
public void onClick(ClickEvent event) {
SC.say("yahoo!");
}
});
drawGroup.addMovedHandler(new com.smartgwt.client.widgets.drawing.events.MovedHa ndler() {
public void onMoved(com.smartgwt.client.widgets.drawing.events .MovedEvent event) {
DrawGroup drawGroup = (DrawGroup)event.getSource();
//SC.say("Group moved - left = " + drawGroup.getLeft() + " top = " + drawGroup.getTop() + " width " + drawGroup.getWidth() + " height " + drawGroup.getHeight());
};
});
drawGroup.addDragMoveHandler(new com.smartgwt.client.widgets.drawing.events.DragMov eHandler(){
// public void onDragMove(com.smartgwt.client.widgets.events.Drag MoveEvent event) {
// DrawGroup group = (DrawGroup)event.getSource();
// SC.say("Group moved - left = " + drawGroup.getLeft() + " top = " + drawGroup.getTop() + " width " + drawGroup.getWidth() + " height " + drawGroup.getHeight());
// }
@Override
public void onDragMove(DragMove dragMove) {
DrawGroup drawGroup = (DrawGroup)dragMove.getSource();
SC.say("Group moved - left = " + drawGroup.getLeft() + " top = " + drawGroup.getTop() + " width " + drawGroup.getWidth() + " height " + drawGroup.getHeight());
}
});
//Drag operation works, if it is added here
drawPane.addDrawItem(drawGroup, true);
// DrawRect
drawRect.setKeepInParentRect(true);
drawRect.setFillColor("red");
// Position on top of drawGroup
drawRect.setTop(drawGroup.getTop());
drawRect.setLeft(drawGroup.getLeft());
drawRect.setWidth(drawGroup.getWidth());
drawRect.setHeight(drawGroup.getHeight());
drawRect.setKnobs(KnobType.RESIZE);
com.smartgwt.client.widgets.drawing.events.Resized Handler rh =
new com.smartgwt.client.widgets.drawing.events.Resized Handler() {
public void onResized(com.smartgwt.client.widgets.drawing.even ts.ResizedEvent re) {
// Set size of the group
DrawRect rect = (DrawRect)re.getSource();
DrawGroup dg = rect.getDrawGroup();
dg.moveBy(rect.getLeft() - dg.getLeft(), rect.getTop() - dg.getTop());
dg.setWidth(rect.getWidth());
dg.setHeight(rect.getHeight());
//SC.say("draw rect resized moved - left = " + dg.getLeft() + " top = " + dg.getTop() + " width " + dg.getWidth() + " height " + dg.getHeight() + " rect resized moved left = " + rect.getLeft() + " top = " + rect.getTop() + " width " + rect.getWidth() + " height " + rect.getHeight());
}
};
drawRect.addResizedHandler(rh);
// Add to group
drawRect.setDrawGroup(drawGroup);
drawRect.draw();
drawPane.draw();
}
↧
December 13, 2013, 4:45 am
After upgrading to SmartGWT 4.0, I am seeing a render issue with list grids and columns that use an image. When a row is added or removed, one or more rows in the list grid will have a missing image.
To re-create this issue, I have altered the Smart GWT Showcase file "GridCellWidgetsSample.java". This sample code creates a list grid with 2 columns (name and edit image/button). Below the list grid is an "add button" which inserts a new list grid row (using either "Bob" or "Joe" as the name).
To re-create the issue:
1) press the "add button" (e.g. add 3 rows to list grid). Everything is fine at this point.
2) sort the list grid in descending order by pressing on the "Name" column header
3) press the "add button" and you will see some of the new rows will have the missing image in the "edit column"
Note that this did not happen on SmartGWT 3.1. I tried SmartGWT 4.1d and the same problem occurred.
Info:
1) SmartGWT version: SmartGWT 4.0p from 12-12-13
2) Browser: Chrome 31.0.1650.63
3) Sample Code below
Code:
private int count = 0;
public Canvas getViewPanel() {
final VStack stack = new VStack(8);
stack.setWidth100();
stack.setHeight100();
final ListGrid countryGrid = new ListGrid() {
@Override
protected Canvas createRecordComponent(final ListGridRecord record, Integer colNum) {
String fieldName = this.getFieldName(colNum);
if (fieldName.equals("Edit-ID")) {
HLayout recordCanvas = new HLayout(3);
recordCanvas.setWidth(24);
recordCanvas.setHeight(24);
recordCanvas.setAlign(Alignment.CENTER);
ImgButton editImg = new ImgButton();
editImg.setShowDown(false);
editImg.setShowRollOver(false);
editImg.setLayoutAlign(Alignment.CENTER);
editImg.setSrc("US.png");
editImg.setHeight(24);
editImg.setWidth(24);
recordCanvas.addMember(editImg);
return recordCanvas;
}
else {
return null;
}
}
};
countryGrid.setShowRecordComponents(true);
countryGrid.setShowRecordComponentsByCell(true);
countryGrid.setWidth(400);
countryGrid.setHeight(300);
countryGrid.setShowAllRecords(true);
ListGridRecord[] recordList = new ListGridRecord[2];
ListGridRecord record1 = new ListGridRecord();
record1.setAttribute("Name-ID", "Bob");
record1.setAttribute("Edit-ID", "");
recordList[0] = record1;
ListGridRecord record2 = new ListGridRecord();
record2.setAttribute("Name-ID", "Joe");
record2.setAttribute("Edit-ID", "");
recordList[1] = record2;
ListGridField nameField = new ListGridField("Name-ID", "Name");
nameField.setWidth(350);
ListGridField editField = new ListGridField("Edit-ID", "Edit");
editField.setWidth(32);
countryGrid.setFields(nameField, editField);
stack.addMember(countryGrid);
IButton addButton = new IButton("Add Test");
addButton.setWidth(150);
addButton.setHeight(32);
addButton.addClickHandler(new ClickHandler() {
@Override
public void onClick(ClickEvent _event) {
ListGridRecord record = new ListGridRecord();
if (count++ % 2 == 0) {
record.setAttribute("Name-ID", "Jack");
}
else {
record.setAttribute("Name-ID", "Bob");
}
record.setAttribute("Edit-ID", "");
countryGrid.addData(record);
}
});
stack.addMember(addButton);
return stack;
}
↧