-
Notifications
You must be signed in to change notification settings - Fork 64
Changelog1_0_x
- Fix for Issue 30. @DateTimeFormat were not recognized when the method was proxied (e.g. Spring-Security @PreAuthorize)
- Fix for Issue 29. The errors object in the response from a FORM_POST method now always contains the errors for the field in an array. This makes it possible to send more than one error back for one specific field. Old:
{"type":"rpc","tid":5,"action":"userService",
"method":"userFormPost",
"result":{"errors":{"email":"Email already taken",
"userName":"Username already taken"},"success":false}}
New:
{"type":"rpc","tid":5,"action":"userService",
"method":"userFormPost",
"result":{"errors":{"email":[already taken"]("Email),
"userName":[already taken","a second error"]("Username)},"success":false}}
- Fix for Issue 26. Regression tests failed when test machine uses native Locale. Now the test sets the default locale to Locale.US
- Fix for Issue 28. Added entryClass to the ExtDirectMethod annotation. This specifies a concrete type of a collection entry if its using an interface.
- Added timeout, maxRetries and enableBuffer to the configuration object. Description about these properties
<bean id="extDirectSpringConfiguration"
class="ch.ralscha.extdirectspring.controller.Configuration"
p:timeout="12000" p:maxRetries="10" p:enableBuffer="false"/>
-
Enhancement: Allow api requests to ask for multiple groups (separated with comma):
/controller/api.js?group=group1,group2,group3
-
Enhancement: Allow a method to be in multiple groups
ExtDirectMethod(group = "group1,group2,group3")
public String aMethod(String aParameter) {
}
-
Updated to Jackson 1.9.1
-
Fix Issue 6 : Ignore beans when getObjectType()/ctx.getType() returns null. For example a FactoryBean that returns null from getObectType()
-
STORE_MODIFY methods are now able to handle single object parameters. Additional to the handling of collection parameters.
A store modify method that handles one record. The client is only allowed to send one record. For example: Ext.data.Model.save()
@ExtDirectMethod(ExtDirectMethodType.STORE_MODIFY)
public Contact update(Contact modifiedContact) {
}
If the client is able to send one or many records you have to use a collection. For example a Store with autoSync=false and the user changes one or more record before he starts a manual sync.
@ExtDirectMethod(ExtDirectMethodType.STORE_MODIFY)
public List<Contact> update(List<Contact> modifiedContacts) {
}
- Fix: Changed scope in pom.xml of org.easytesting.fest-assert library to test. Was runtime in release 1.0.11
- Fix Issue 17 : Overriding a generic method generates a overloaded method. The library now handles this case instead of throwing an exception.
- Fix Issue 18 : Added a params property in the class ExtDirectStoreReadRequest. This property contains the parameters of extraParams.
-
Fix Issue 13 : Allow @ExtDirectMethod to be on a interface method. In previous versions the library couldn't find the names of the parameters. @RequestParam on the other hand has to be on the implementing method. Same behaviour as Spring MVC.
-
Fix: When calling store.filter('property', value) (with remoteFilter: true) the library threw an exception. Now it creates a NumericFilter, BooleanFilter or a StringFilter depending on the type of the value. ExtDirectStoreReadRequest contains the list of all the filters.
-
New archetype with Ext JS 4, Spring 3.1, Jpa, Hibernate and Spring Security.
mvn archetype:generate
-DarchetypeArtifactId=starter-archetype
-DarchetypeGroupId=ch.ralscha -DarchetypeVersion=1.0.0
-DarchetypeRepository=http://repository.rasc.ch
-DgroupId=com.mycompany -DartifactId=mynewapp -Dversion=0.0.1
- Default data format for list filter in Ext JS 4.0.2 is now a json array:
filter : [{"type":"list","value":["small","medium"],"field":"size"}]
Ext JS 4.0.1 and Ext JS 3.x use the comma separated format
filter : [{"type":"list","value":"small,medium","field":"size"}]
extdirectspring handles both formats transparently. No special configuration on the client side necessary.
- Support for @DateTimeFormat and @NumberFormat
@ExtDirectMethod
public Map<String, Object> aMethod(@DateTimeFormat(iso = ISO.DATE_TIME) Date aDate,
@NumberFormat(style = NumberFormat.Style.PERCENT) BigDecimal percent) {
...
}
-
Updated Ext JS 4 examples to version 4.0.1.
-
Reverted the change from version 1.0.4. A response of a STORE_MODIFY and STORE_READ request is no longer automatically wrapped inside an ExtDirectStoreResponse object. This simplifies proxy configuration in Ext JS 4. If you need the 1.0.4 behaviour add this configuration to the spring context file:
<bean id="extDirectSpringConfiguration"
class="ch.ralscha.extdirectspring.controller.Configuration"
p:alwaysWrapStoreResponse="true"/>
or change server method and always return an ExtDirectStoreResponse object
@ExtDirectMethod(ExtDirectMethodType.STORE_READ)
public ExtDirectStoreResponse<SomeObject> read(ExtDirectStoreReadRequest request) {
return new ExtDirectStoreResponse<SomeObject>(myCollection);
}
or change client code and remove the store config parameter root: 'records'
-
Library is now able to handle single object or array request for STORE_MODIFY methods. It's no longer necessary to specify listful or allowSingle in the DirectStore configuration.
-
Move the ObjectMapper instances from ExtDirectSpringUtil into a new Spring managed bean (ch.ralscha.extdirectspring.util.JsonHandler). Fix for Issue 11
-
Added synchronizeOnSession to the configuration object. If true execution of all methods (except FORM_POST methods) is synchronized on the session object. To serialize parallel invocations from the same client. Allows to work with session objects in a thread safe manner.
<bean id="extDirectSpringConfiguration"
class="ch.ralscha.extdirectspring.controller.Configuration"
p:synchronizeOnSession="true"/>
- Added synchronizeOnSession attribute to ExtDirectMethod annotation. If true execution of specified method is synchronized on the session object. Defaults to false. Does not work with FORM_POST methods.
@ExtDirectMethod(value = ExtDirectMethodType.STORE_READ, group = "live", synchronizeOnSession=true)
public List<SiteInfo> getSiteInfo(HttpSession session) {
...
}
- Added groups collections to the ExtDirectStoreReadRequest class. Ext JS 4 is able to send multiple group informations in a direct request. The groups collections contains an instance of GroupInfo for every sent group data. A Ext JS 3.x client only sends one group column and information is stored in the groupBy and groupDir fields. The library adds a GroupInfo instance to the groups collection in this case. It's recommended to use the groups collection, this way the Spring service works with both versions.
-
Added page field to the ExtDirectStoreReadRequest class. In paging requests Ext JS 4 sends page and limit, Ext JS 3.x sends start and limit. The library sets the start property when the client is Ext JS 4 and sets the page property when requests comes from Ext JS 3.
-
Added sorters collections to the ExtDirectStoreReadRequest class. Ext JS 4 is able to send multiple sort informations in a direct request. The sorters collections contains an instance of SortInfo for every sent sort data. A Ext JS 3.x client only sends one sort column and information is stored in the sort and dir fields. The library adds a SortInfo instance to the sorters collection in this case. It's recommended to use the sorters collection, this way the Spring service works with both versions.
-
Fix Issue 10: Changed the signature of the RouterController.router method. This way StringHttpMessageConverter is no longer processing the request. Requests and (as before) responses go through MappingJacksonHttpMessageConverter. StringHttpMessageConverter has problems with character encoding because he defaults to ISO-8859-1 if the http request header does not contain a charset parameter, but the request data is encoded with UTF-8.
-
Refactored the conversion support and fixed an if statement that was never called. Now if the source and target type are the same no conversion occures. If the Spring conversionService is able to convert the object it will convert it. In all other cases the ObjectMapper.convertValue tries to convert the value.
-
Deprected the TREE_LOADER type. Use TREE_LOAD instead.
-
Named Parameter support with the annotation @ExtDirectMethod(ExtDirectMethodType.SIMPLE_NAMED)
- No longer create a new ObjectMapper (Jackson) instance for every json serialize and deserialize call. Improves performance a bit.
- Jackson 1.7.4
- Library now tries to convert from String to primitive and enum values in case of simple @ExtDirectMethod calls.
- Demo application uses Spring 3.1.0.M1
- No longer instantiate a ConversionService in RouterControler. Instead inject the FormattingConversionService that mvc:annotation-driven is creating.
- Added a new annotation type @ExtDirectMethod(ExtDirectMethodType.TREE_LOADER). With this annotation a TreeLoader must use paramsAsHash: true instead of paramOrder. This way it's consistent with DirectStore methods. If the nodeParameter is missing the default value is 'node'.
@ExtDirectMethod(ExtDirectMethodType.TREE_LOADER)
List<Node> getTree(@RequestParam("id") String id,
@RequestParam(value = "foo", required = false, defaultValue = "defaultValue") String foo)
myTreeLoader = new Ext.tree.TreeLoader( {
directFn: treeProvider.getTree,
nodeParameter: 'id',
paramsAsHash: true,
baseAttrs : {
foo: 'empty'
}
});
- New way to configure exception messages in response json. See Configuration for a description.
- Bugfix in ApiController. Check if it's a valid form post method uses now the bean class instead of declaring class of the method. Old code didn't work in case of subclasses.
- JDK 1.5 compliance
- Jackson 1.7.1
- It's now possible to customize the message field in the response in case of a server exception. Simply add a map bean to your spring context below the line
<context:component-scan base-package="ch.ralscha.extdirectspring"/>
<util:map id="extDirectSpringExceptionToMessage" key-type="java.lang.Class" value-type="java.lang.String">
<entry key="org.springframework.security.access.AccessDeniedException" value="Access is denied"/>
</util:map>
- Bugfix for a wrong collection parameter type lookup. In case of a enhanced method (i.e. cglib) this lookup returned null and the program throws an exception. Concerns STORE_MODIFY methods.
- Jackson 1.6.4
- Spring 3.0.5
- Jackson 1.6.2
- Backward incompatible change: Response of a STORE_READ method is now always wrapped in an ExtDirectStoreResponse object. Change root: '' in DirectStore config to root: 'records'
- Fix Issue 6: ApiController does support abstract beans in the ApplicationContext
- Add new ExtDirectRawJsonStoreResponse class. You can use this class as a reponse to a DirectStore request if the data is already in json format (e.g. result of a MongoDB query).
- Support for metaData in response of a store read request.
- Backward incompatible change: Renamed ch.ralscha.extdirectspring.filter.ComparisonEnum to ch.ralscha.extdirectspring.filter.Comparison
- url property in the configuration no longer contains the full router URL. To restore old behaviour add parameter fullRouterUrl=true to the get request.
- Support for DirectStore in Ext Designer.
- value parameter of @RequestParam is no longer required. This only works if the code is compiled with debug informations. The library uses the Spring class LocalVariableTableParameterNameDiscoverer to discover the name of the method parameter. Same behaviour as in a normal Spring MVC application.
- Removed entryClass parameter of @ExtDirectMethod. The generic type of the collection is now resolved with the Spring class GenericCollectionTypeResolver.
- Support for Grid Filtering.
- Fix Issue 2: Recognize @RequestMapping on class level
- Spring 3.0.4
- Changed logging from slf4j to commons-logging to reduce dependencies.
- Added 'groupBy' and 'groupDir' properties to ExtDirectStoreReadRequest. A Ext.data.GroupingStore with 'remoteGroup: true' will send these properties.
- Initial release. Available as a download and from the central maven repository.
- Introduction
- Changelog 1.7.x
- Setup Maven
- Configuration
- Server Methods
- Model Generator
- Model Generator APT
- Development
- Links