Announcement
Collapse
No announcement yet.
X
-
Originally posted by Isomorphic View Post1) There's a backgroundMouseUp event which fires when the mouse is released and the cell under the mouse has changed. We've just made that public - please retest with a build of 4.1 dated March 25 or later.
Leave a comment:
-
Originally posted by Isomorphic View PostCan you show some code for point 2? Specifically, the code for whichever handler you mean in your comment "the CalendarEvent that I receive in my handler"...
Also, please clarify this comment: "I even tried to show the simplest Calendar class (from the showcase) and the behaviour is the same!"
We're not sure what you mean - can you point us at the example you mean and give steps to reproduce?
1) BuiltInDS
Code:public class BuiltInDS implements EntryPoint { /** * This is the entry point method. */ public void onModuleLoad() { DataSource eventDS = new DataSource(); DataSourceSequenceField eventIdField = new DataSourceSequenceField("eventId"); eventIdField.setPrimaryKey(true); DataSourceTextField nameField = new DataSourceTextField("name"); DataSourceTextField descField = new DataSourceTextField("description"); DataSourceDateTimeField startDateField = new DataSourceDateTimeField("startDate"); DataSourceDateTimeField endDateField = new DataSourceDateTimeField("endDate"); eventDS.setFields(eventIdField, nameField, descField, startDateField, endDateField); eventDS.setClientOnly(true); eventDS.setTestData(CalendarData.getRecords()); Calendar calendar = new Calendar(); calendar.setDataSource(eventDS); calendar.setUseAllDataSourceFields(false); calendar.setAutoFetchData(true); calendar.addBackgroundClickHandler(new BackgroundClickHandler() { @Override public void onBackgroundClick(BackgroundClickEvent event) { event.cancel(); System.out.println("event.getStartDate() = " + event.getStartDate()); System.out.println("event.getEndDate() = " + event.getEndDate()); } }); calendar.draw(); } }
3) BuiltInDS.html
Added
Code:<html> <head> <meta http-equiv="content-type" content="text/html; charset=UTF-8"> <!-- ADDED! --> <meta name="gwt:property" content="locale=hr"> .....
Added
Code:<module rename-to="builtinds"> <inherits name='com.google.gwt.user.User'/> <!-- ADDED! --> <inherits name="com.google.gwt.i18n.I18N"/> <inherits name="com.smartgwt.tools.SmartGwtTools"/> <inherits name="com.smartgwtee.tools.Tools"/> <inherits name="com.smartgwtee.SmartGwtEE"/> <!-- ADDED! --> <extend-property name="locale" values="hr"/> <!-- ADDED! --> <set-property-fallback name="locale" value="hr"/> <entry-point class='com.smartgwt.sample.client.BuiltInDS'/> </module>
Leave a comment:
-
Originally posted by Isomorphic View PostCan you show some code for point 2? Specifically, the code for whichever handler you mean in your comment "the CalendarEvent that I receive in my handler"...
Also, please clarify this comment: "I even tried to show the simplest Calendar class (from the showcase) and the behaviour is the same!"
We're not sure what you mean - can you point us at the example you mean and give steps to reproduce?
Leave a comment:
-
Can you show some code for point 2? Specifically, the code for whichever handler you mean in your comment "the CalendarEvent that I receive in my handler"...
Also, please clarify this comment: "I even tried to show the simplest Calendar class (from the showcase) and the behaviour is the same!"
We're not sure what you mean - can you point us at the example you mean and give steps to reproduce?
Leave a comment:
-
Originally posted by Isomorphic View Post1) There's a backgroundMouseUp event which fires when the mouse is released and the cell under the mouse has changed. We've just made that public - please retest with a build of 4.1 dated March 25 or later.
2) This sounds like there is a mismatch between rowHeight and eventSnapGap - make sure the latter is either the same as the former, or some sensible percentage of it
2) My values were: rowHeight = 40, eventSnapGap = 15.
I've set both of them to 20, but the strange behaviour remained.
Leave a comment:
-
1) There's a backgroundMouseUp event which fires when the mouse is released and the cell under the mouse has changed. We've just made that public - please retest with a build of 4.1 dated March 25 or later.
2) This sounds like there is a mismatch between rowHeight and eventSnapGap - make sure the latter is either the same as the former, or some sensible percentage of it
Leave a comment:
-
Strange Calendar behaviour in SmartGWT 4.1
Hi!
I'm trying to migrate from SmartGWT 3.0 to 4.1. I migrated my code to 4.1, and found a strange behaviour in Calendar widget. I'd like to emphasize that my 3.0 code is in production and working normally, and I didn't change anything, just made a new project with 4.1 and deployed to the same environment.
1) Handling background click
I have a custom handler and a custom DynamicForm for adding new event.
Code:addBackgroundClickHandler(new BackgroundClickHandler() { @Override public void onBackgroundClick(BackgroundClickEvent event) { event.cancel(); // show DynamicForm ... } });
How I can catch dragging in 4.1?
2) Wrong times in startDate and endDate
When I drag events or try to add/edit events, the CalendarEvent that I receive in my handler has wrong startDate and endDate!
The dates I get have the right date and the wrong time: sometimes 1:00 a.m., sometimes 1:11 a.m., sometimes 1:22 a.m., but without any rule when specific value appears! Those datetimes totally confused me. I even tried to show the simplest Calendar class (from the showcase) and the behaviour is the same!
Environment: SmartGWT 4.1 (v9.1p_2014-03-23/EVAL Deployment), GWT 2.3.0, Firefox 26, Ubuntu 12.04 64-bitTags: None
Leave a comment: