I'm analysing a problem I have with current IE11/Win8.1 and current SmartGWT 5.0p.
Therefore I'm browsing the samples in the showcases.
When opening the Developer Console in both tabs (LGPL and EE showcases), sometimes they do not completely reload, even if the URL of the Developer Console changes.
I tested with an empty cache and the online showcases. Just open and close or open and open other Developer Console, until you get a picture like the attached one. This does not happen in FF26 for me until now.
I noticed a severe bug with ComboBoxItem in IE11 (Win8.1) only in Simplicity Skin. Unfortunately I can't present a quick way to it, as you removed Simplicity from the showcases examples. I can't produce it in current on-line Showcases with IE11 in Enterprise skin nor in my application with GC42/FF26 in Simplicity skin.
I'm using v10.0p_2015-04-10.
Steps I do:
Open a ComboBoxItem that scrolles its data vertically (I open it by using the mouse and the arrow next to the text field)
Click the scrollbar, the popup closes
If you reopen the popup, it is one scrollbar-width shifted to the right and has the same defect
The shifting only happens once
This is my ComboBoxItem setup, if this helps:
Code:
public class ComboBoxItemCampaign extends ComboBoxItem {
final private DataSource campaignDS = DataSource.get(DatasourceEnum.T_CAMPAIGN.getValue());
public ComboBoxItemCampaign(String name, boolean withOtherLECampaigns, boolean defaultToFirstOption) {
super(name);
setOptionDataSource(campaignDS);
if (withOtherLECampaigns) {
setOptionOperationId("fetchOwnAndOtherLECampaigns");
} else {
setOptionOperationId("fetchOwnLECampaigns");
setOptionCriteria(new AdvancedCriteria(OperatorId.AND, new Criterion[] {
new Criterion("STARTDATE", OperatorId.LESS_OR_EQUAL, new Date()),
new AdvancedCriteria(OperatorId.OR, new Criterion[] { new Criterion("ENDDATE", OperatorId.GREATER_OR_EQUAL, new Date()),
new Criterion("ENDDATE", OperatorId.IS_NULL) }) }));
}
setValueField(campaignDS.getPrimaryKeyFieldName());
setFetchMissingValues(true);
could you re-enable Simplicity Skin in online LGPL/EE showcases (at least one, best both)?
My skin is based on Simplicity and in this bug report, having the simplicity skin in the online showcase would have made it easier to supply a test case.
We upgraded our application from 4.0p (NIGHTLY 2014-02-12) to 5.0p (NIGHTLY-2015-04-15) and we have an issue with reset old value on a field.
If you run the example and you edit field "Country" and press tab to navigate to the next field, you have the following behaviour:
if the old value is 'Italy' and the entered value is 'France' after the code in the fieldEditorExit that resets old value to 'Italy' the log 'Edit value is ' shows 'France', and not 'Italy'.
In field's editorExit we want to reset the old value, due to an application use case that interacts with server (to simulate that we use a timer);
ListGridField nameField = new ListGridField("countryName", "Country");
nameField.addEditorExitHandler(new EditorExitHandler() {
@Override
public void onEditorExit(final EditorExitEvent event) {
Timer timer = new Timer() {
@Override
public void run() {
String field = "countryName";
int recordIndex = event.getRowNum();
ListGrid grid = event.getGrid();
ListGridRecord record = grid.getRecord(recordIndex);
String value = record.getAttributeAsString(field);
GWT.log("Restore old value is " + value);
grid.setEditValue(recordIndex, field, value);
GWT.log("Edit value is " + grid.getEditValues(recordIndex).get(field));
}
};
timer.schedule(500);
}
});
ListGridField continentField = new ListGridField("continent", "Continent");
ListGridField memberG8Field = new ListGridField("member_g8", "Member G8");
ListGridField populationField = new ListGridField("population", "Population");
populationField.setType(ListGridFieldType.INTEGER);
ListGridField independenceField = new ListGridField("independence", "Independence");
return new ListGridField[]{countryCodeField, nameField, continentField, memberG8Field, populationField, independenceField};
}
private class CustomListGrid extends ListGrid {
/**
* {@inheritDoc}
*/
@Override
public boolean canEditCell(int rowNum, int colNum) {
Record editedRecord = getEditedRecord(rowNum);
String attributeAsString = editedRecord.getAttributeAsString("country");
GWT.log(attributeAsString);
return true;
}
}
For your help we have noticed:
- if you remove timer from fieldEditorExit the log shows the correct value ('Italy');
- override method canEditCell and call to method getEditedRecord inside this method produce the issue;
- override method canEditCell without call the method getEditedRecord inside canEditCell it doesn't produce the issue (also with the timer).
How can I override the canEditCell method calling also the getEditedRecord method and reset value on the fieldEditorExit?
Using SmartClient Version: v10.0p_2015-03-13/PowerEdition Deployment (built 2015-03-13) with Firefox 26
I have a listgrid where i type in UTF-8 character and then when i try to save it to my database the data is saved as ?????????. I have put
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
in my html file. In the developer Console when I look into the RPC tab. I see the DSREquest is being sent in UTF-8 format but in the DSResponse and in my db I get this ??????.
In my database table I have defined the col type as nvarchar which is the requirement for saving utf-8. but the problem is smartgwt is not sending the text in proper format into the db. can somebody help me to get this correct.
In the console I see everything correct
=== 2015-04-22 12:45:25,929 [9-27] INFO PoolManager - [builtinApplication.importExcelDS_add] SmartClient pooling started for 'SQLServer' objects
=== 2015-04-22 12:45:25,929 [9-27] DEBUG PoolableSQLConnectionFactory - [builtinApplication.importExcelDS_add] Initializing SQL config for 'SQLServer' from system config - using DriverManager: net.sourceforge.jtds.jdbc.Driver
=== 2015-04-22 12:45:25,929 [9-27] DEBUG PoolableSQLConnectionFactory - [builtinApplication.importExcelDS_add] net.sourceforge.jtds.jdbc.Driver lookup successful
=== 2015-04-22 12:45:25,929 [9-27] DEBUG PoolableSQLConnectionFactory - [builtinApplication.importExcelDS_add] DriverManager fetching connection for SQLServer via jdbc url jdbc:jtds:sqlserver://localhost:1433;DatabaseName=dbilling;useUnicode=true;characterEncoding=UTF-8;sendStringAsUnicode=true;User=teoit;Password=seop
=== 2015-04-22 12:45:25,929 [9-27] DEBUG PoolableSQLConnectionFactory - [builtinApplication.importExcelDS_add] Passing JDBC URL only to getConnection
=== 2015-04-22 12:45:25,999 [9-27] INFO SQLDriver - [builtinApplication.importExcelDS_add] Executing SQL update on 'SQLServer': INSERT INTO sales (available, productMth, productName, productYr) VALUES (NULL, NULL, 'به آسا اماکن ۸ ٪ - ۴ لیتر - محلول ضد عفونی کننده', NULL)
The only thing that is missing is the N which should have been there before the utf-8 string. like so
INSERT INTO sales (available, productMth, productName, productYr) VALUES (NULL, NULL, N'به آسا اماکن ۸ ٪ - ۴ لیتر - محلول ضد عفونی کننده', NULL)
- Click on UploadItem then choose file "image.jpg"
- The onChanged(...) method is executed
- Click again on UploadItem then choose same file "image.jpg"
- The onChanged(...) method is NOT executed
My 2nd scenario :
In two different directories I have two images with same file name but different binary data
- filePath1/image.jpg -> the picture of a dog
- filePath2/image.jpg -> the picture of a cat
- Click on UploadItem then choose file "image.jpg" (dog image)
- The onChanged(...) method is executed
- Click again on UploadItem then choose "image.jpg" (cat image)
- The onChanged(...) method is NOT executed
I did the same with multiple files chosen in the file chooser, results are the same if file(s) name(s) are the same no matter on binary content.
It seems FormItem's detect value has been changed only looking on file name which is problematic for me.
I would like it systematic even if same file (same binary content) is beeing chosen several times.
Isomorphic, can you confirm me please that this is a bug ?
GWT Version : 2.6.1
SmartGWT Version : 5.0-p20141210
Firefox version : 24
I did the test with Firefox 36 also and the results are the same.
I have created a DynamicForm having an item with type select and attribute multiple true.
Its listing all the values in checkbox format, Can we programmatically select the checkbox items?
1. The goal is to enter a single FormRow at a time. Each FormRow gets
added to a FormRowListForm.
2. This FormRowListForm can be reordered by dragging with a mouse.
3. Rows can be removed by clicking on the "Remove Row"
button.
4. The FormRowListForm can be commited to database by
clicking "Commit Form Rows to Database"
I upgraded our application from 4.0p (NIGHTLY 2014-02-12) to 5.0p (NIGHTLY-2015-04-15) and during the test of the application I have the following error in console:
Maximum call stack size exceeded.
Running the code below you can repeat the issue:
Code:
public void onModuleLoad() {
DynamicForm pageLayout = new DynamicForm();
pageLayout.setNumCols(1);
pageLayout.setFields(getCanvasItem());
pageLayout.setColWidths("*");
pageLayout.setShowEdges(false);
I wish to implement business logic during data source operations. My data sources are configured with serverType="hibernate". In the data source XML configurations, I know I can specify a class name for the "serverConstructor" attribute, and within the class I can implement the various methods (executeAdd, executeFetch, executeRemove, etc). Within those methods, I can manipulate the data values passed as Maps via the DSRequest.
But what I'd prefer to do is invoke bean methods on the underlying Hibernate-mapped classes, and also obtain a Hibernate session for conducting any further queries necessary to support the custom business logic. So, basically, I want to intercept the operation, run some business logic that operates upon Hibernate-mapped classes, and then let Hibernate complete its persistence operation.
What is the "best practices" way of doing this within the SmartGWT framework? I am running SmartClient Version: v8.3p_2013-08-06/Pro Deployment (built 2013-08-06)
I've looked into using Hibernate interceptors but I am unsure how to configure them to work with SmartGWT, since I am relying on SmartGWT to detect the hibernate.cfg.xml configuration in the classpath to initialize the session factory.
Working with the paged tree-databinding i have discovered three more issues.
Because they are different to the last few bugs(http://forums.smartclient.com/showthread.php?t=32566,http://forums.smartclient.com/showthread.php?t=32651) i post them into a this thread insted of "reopening" the old.
1. If you open the example below you can see, that the datasource returns open folders. This is important for this example.
At the beginning it's clear that the treegrid has to load the children of the root-node. After that the Treegrid has to load the childs of the of the "root-x" nodes. At this point i'm wondering, why the end-parameter is counting down, even if i have set the dataFetchSize to 50.
Sure i can ignore the given end-parameter at the server-side and could return all children instead, but i think this should be set right at the request.
2. Maybe you have already noticed the newly-added delay parameter to my extended exampe of the other posts ;-). The paged databinding of the tree makes imho only sense with large trees. Therefore it is possible that the latency of the server are not the same as localhost. So i have set a "delay" parameter to simulate server-workload. In the example below i have set it to 50 ms.
The result of a slight delay on the server is that after the call of all "root-x" nodes there comes a second bunch of load to the backend.
I wasn't able to reproduce this properly, but at testing this out it was reproducable in 1 of 5 times. Often there is no additional request, sometimes only 1 additional request and sometimes there are - like in the code-block - 5 additional requests. edit: It is also reproducable without the delay-parameter.
3. In our TreeGrid we have a few cells which needs to be in two lines. So we have set "fixedRecordHeights: false". It's clear to me that working with this attribute and DataBindings can result in struggeling while jumping in the Grid (for example scrollToRow in ListGrids). In the ListGrid there is no problem if you have set "fixedRecordHeights: false", but only work with records which have only 1 line in each field.
In the TreeGrid there seems to be a scrolling issue, if you set the "fixedRecordHeights: false" and begin to scroll with the mouse-wheel. If you start scrolling, the nodes at the bottom will get rendered, but at the top you can see the nodes are jumping up again. The same thing happens if you are at the bottom and scroll upwards. Image may be NSFW. Clik here to view..
Note to this gif: I was only scrolling down with the mouse-wheel. The jumping back up again is the issue described here.
All three issues are reproducable with the latest nightly from SmartClient_v100p_2015-04-22_Pro.
Issue 1 and 3 i could reproduce in all current versions from Chrome, Firefox and IE.
Issue 2 i could reproduce in Chrome and IE, maybe Firefox, but it was too bring to click F5 dozen of times.
This is the code, with which i could reproduce all 3 issues:
1. SmartClient Version: v10.0p_2015-04-22/LGPL Development Only (built 2015-04-22)
2. Firefox 24.8.0 on gentoo linux
Hi,
This is striped down test case with basic ListGrid displaying summary row, but summary record is requested from DataSource via lg.setSummaryRowDataSource(ds);
Running this example shows two requests/responses on the RPC tab: one for fetching grid's data and the second one fetching summary row. So far so good.
Now, pressing test button, which only resets viewState of the grid:
lg.setViewState(lg.getViewState());
shows identical 3 new requests/responses on RPC tab, each fetching summary record again and again.
Could it be corrected, as it stresses server in a real application (aggregation is sql costly).
Thanks,
MichalG
I select all rows and I filter the data afterwards.
When I remove the filter all the selected rows that were not filtered are now unchecked. Is this the expected behaviour? Is there any option for the non filtered rows to remain selected?
Thanks
P.S Screenshots demonstrating the issue attached.
SmartGwt Version:5.0-p20150422 Browser: Chrome:42.0.2311.90 m
I have a TextItem in my form. My SmartGwt application is in iframe of other SmartGwt application.
In IE8 and IE9 there is problem with cursor position in TextItem: cursor periodically moves to the start of TextItem during typing.
When I turn on IE compatibility mode, the problem goes away but it leads to other visual bugs.
If I render my app directly outside of an iFrame, the problem goes away also.
I found similar topic: http://forums.smartclient.com/showthread.php?t=24409 but it didn't help.
For
- smartGWT 5.1p - v10.0p_2014-10-07/LGPL Development Only (built 2014-10-07)
- FF 31.5.0 (didn't test on other browsers)
Problem
When I'm resizing an Image by mouse drag, the new dimensions of the image are wrong when releasing the mouse button.
Description
To show what happens I created a class which adds an Image with two handlers that I need in my real code (DragResizeStop and Resized - in both these I will need to run some logic in my actual code). After DragResizeStop fires the Resized is fired and new values (different from what I would expect) for Width/Height are automatically applied to the object. To force the correct dimensions to be applied I set the Width/Height in the DragResizeStop with the values I take from the "event" object but they are overwritten automatically when the Resized triggers. The visual appearance of the Image is not modified but it's dimensions in pixels are wrong.
To exemplify I created the class below:
- Local image
- both handlers (DragResizeStop and Resized)
- added some logs
- in DragResizeStop I set the new Width and new Height from the "event" object to the Image and I print them in the logs
- when entering the Resized I just print the values from the Image object and they are different from the above ones.
What I would expect is that the Image's width/height are updated with the correct values when I release the mouse button - event.getNewWidth() and event.getNewHeight().
It seems that when the Resized is fired, some old (intermediate) values for W/H are applied and not the ones corresponding to the position where the mouse button was released.
Any thoughts? Have I misunderstand they way this works?
Thanks in advance!
P.S: same goes for DrawRect (I haven't tested for other draw items)
Running the code below, after a resize by mouse this is what I see in the logs:
final DrawImage image = new DrawImage();
image.setSrc("cow.jpg");
image.setTop(50);
image.setLeft(50);
image.setWidth(200);
image.setHeight(200);
image.showAllKnobs();
image.setDrawPane(shapesPane);
image.setCanDrag(true);
image.setShowResizeOutline(true);
image.addDragResizeStopHandler(new DragResizeStopHandler() {
@Override
public void onDragResizeStop(DragResizeStopEvent event) {
image.setWidth(event.getNewWidth());
image.setHeight(event.getNewHeight());
// here the correct values are applied on the Image
SC.logInfo("+++++DragResizeStop (image): WxH - " + image.getWidth() + "x" + image.getHeight());
SC.logInfo("+++++DragResizeStop (event): WxH - " + event.getNewWidth() + "x" + event.getNewHeight());
}
});
image.addResizedHandler(new ResizedHandler() {
@Override
public void onResized(ResizedEvent event) {
// here some other values are present (old or intermediate ones)
SC.logInfo("*****Resized (image): WxH - " + image.getWidth() + "x" + image.getHeight());
}
});
I just read the ServerSummaries docs because I wanted to apply a "DISTINCT" to a field I am counting.
I noticed this part:
Quote:
Fields with customSelectExpression
Fields with customSelectExpression can be used with server summaries as both groupBy fields or fields with summaryFunction. In case of summaryFunction requested on field with customSelectExpression we will wrap SQL function around the expression, which may or may not be correct.
which solves the problem for me with customSelectExpression="DISTINCT x" (thanks again for the framework, impressive!).
But this only works as I'm never using this DataSource in a non-aggregating manner.
Therefore, an enhancement for the SummaryFunctionType enum would be the following values: COUNTDISTINCT (and SUMDISTINCT, AVGDISTINCT), which would allow a normal use of the DSField as well.
Best regards
Blama
PS: Regarding the SummaryFunctionType-docs: In the "Enum Constant Summary"-table, for some values details are given, for some not. Below in "Enum Constant Detail" everything becomes clear (e.g. MULTIPLIER handling in server).
SmartClient Version: v10.0p_2015-01-20/LGPL Development Only (built 2015-01-20)
The bug has been seen in the following browsers:
1. Internet Explorer 11
2. Chrome (Latest)
We don't believe this is browser specific.
Moving the cursor of a SpinnerItem with the Left, Right, Home and End keys is broken if the SpinnerItem is an item of a new Window
In the sample I've provided, the main spinner works fine. The spinner that is launched with a new window is broken.
1. Click the Spinner Item to move focus to it
2. Press the Left, Right, Home and End keys and note that the cursor moves accordingly
3. Now click the button titled 'Launch Window...'. A new Window will appear that contains another Spinner Item
4. Click the Spinner Item in the new Window to move focus to it
5. Press the Left, Right, Home and End keys
Expected: The cursor should move accordingly with the key presses
Actual: No movement occurs when the keys are pressed