Skip to content
İlhan Subaşı edited this page Nov 26, 2019 · 4 revisions

1.3.9 - November 30, 2013

1.3.8 - October 31, 2013

  • Issue #113
    Added a new attribute disablePagingParameters to the @Model annotation. When set to true the generator adds code to the proxy config that disables all the paging parameters.
Ext.define("ExampleModel",
{
  extend : "Ext.data.Model",
  fields : [ { ... } ],
  proxy : {
    type : "direct",
    pageParam : undefined,
    startParam : undefined,
    limitParam : undefined
  }
});

By default this attribute is set to false.

  • Issue #96
    Introduced a new ExtDirectMethodType FORM_POST_JSON. This method supports form posting with json. See the issue and the Sencha documentation for more information.

1.3.7 - September 30, 2013

  • Issue #108
    Added fullRouterUrl query parameter to the cache key for api.js.

  • Issue #109
    Support Frame Access for Cross-Domain File Uploads

1.3.6 - August 31, 2013

  • Issue #95
    Fix for a problem with generics. See a detailed description in the issue.

  • Issue #97
    In version 1.2.1 we renamed the class ExtDirectStoreResponse to ExtDirectStoreReadResult. But that was wrong because this class can also be a return type for a STORE_MODIFY method. We therefore changed the name to ExtDirectStoreResult and made it more subclass friendly by allowing access to the success property. Additionally the setter methods are now chainable.

return new ExtDirectStoreResult<Row>().setTotal(totalSize).setRecords(rows).setSuccess(true);
  • Issue #98
    Support for Jackson's @JsonView feature. See the wiki page for more information.

  • Issue #99
    As a last resort the ParametersResolver now tries to resolve parameters with the help of WebArgumentResolver.

  • Issue #101
    Change to make the exception handling customizable. Introduced a new interface RouterExceptionHandler If a program needs to handle exceptions in a special way it can implement this interface and configure the class as a spring bean.

@Component
public class AppExceptionHandler implements RouterExceptionHandler {
	@Override
	public Object handleException(MethodInfo methodInfo, BaseResponse response, Exception e, HttpServletRequest request) {
		response.setType("exception");
		response.setMessage("Houston, we have a problem");
		response.setWhere("Space");
		return null;
	}
}

If the application does not implement their own RouterExceptionHandler the library uses a default exception handler (DefaultRouterExceptionHandler).

  • Issue #102
    Added a new attribute messageProperty to the annotation @Model. If this attribute is set the model generator creates a reader config with the messageProperty property set.
proxy : {
    type : "direct",
    directFn : read,
    reader : {
      messageProperty : "theMessageProperty"
    }
  }

See also the description about the the messageProperty config option on the Ext JS documentation page:

1.3.5 - July 31, 2013

  • Issue #90
    Change in model generator. Adds now uses config option instead of requires for associations classes.

1.3.4 - July 31, 2013

  • Issue #82
    Fix a problem when both createBaseAndSubclass and useSingleQuotes are set to true in the Model Generator APT configuration. The old versions don't generate the base class correctly.

  • Issue #84
    Add two new convenient methods for adding errors to ExtDirectFormPostResult. public void addError(String field, String error) {} and public void addErrors(String field, List errors) {}

  • Issue #85
    Add 'requires' config option to every model that has associations.

Ext.define('My.Model', {
  requires: ['My.AssociatedModel']
  ...
  associations: [{
    type: 'hasOne',
    model: 'My.AssociatedModel',
    ...
  }] 
}
  • Issue #86
    The default value used by the generator for the foreignKey attribute is now a camel cased version of the property name no longer of the class name. E.g. foreignKey: 'associatedClass_id'

  • Issue #87
    Add instanceName String property to the @ModelAssociation annotation.

  • Issue #89
    Fix for model generator. Wrote wrong root property when framework is Touch and paging is true. The property is called rootProperty and not root in Sencha Touch. root is still the correct property name for Ext JS.

//Wrong for Sencha Touch. Correct for Ext JS
reader : {
  root : "records"
}
//Correct for Sencha Touch
reader: {
  rootProperty: 'records'
}
  • Issue #90
    Fix for #85. Do not add requires when the association is a reference to the same class.

1.3.3 - May 31, 2013

  • Issue #76
    New field and getter/setter in the Configuration class to set the ConversionService. If it's not set the library tries to find one. If no ConversionService exists in the applicationcontext it creates one (DefaultFormattingConversionService). If there is exactly one ConversionService it selects that. If there is more than one ConversionService in the application context the library tries to choose one. First it looks for one with the name mvcConversionService, next it looks for one with the type FormattingConversionService and last it simply selects the first ConversionService that the method getBeansOfType(..) returns.

  • Issue #77
    Add support for the characters <,<=,=,>=,>,!= in the Comparison class.

  • Issue #78
    Fix a bug when creating a filter with null value

1.3.2 - March 23, 2013

  • Issue #59
    Added a new option createBaseAndSubclass to the ModelAnnotationProcessor. If true the processor creates the two files (base and subclass). It does not overwrite the subclass file if it exists.
<options>
   ...
   <createBaseAndSubclass>true</createBaseAndSubclass>
</options>

Example of a base and subclass

/* ModelBase.js */
Ext.define('MyApp.model.ModelBase', {
extend: 'Ext.data.Model',
fields: [ ... ]
});

/* Model.js */
Ext.define('MyApp.model.Model', {
extend: 'MyApp.model.ModelBase
});
  • Issue #60
    Fix for the model generator. The generator wrote javascript code that does not work with Ext JS 4.2. This happens when the model does not specify every crud method. See the issue for a detailed description

  • Issue #61
    Added two new options useSingleQuotes and surroundApiWithQuotes to the ModelAnnotationProcessor. If useSingleQuotes is true the values in the javascript code are surrounded with single quotes instead of double quotes (default).

<options>
   ...
   <useSingleQuotes>true</useSingleQuotes>
</options>

If surroundApiWithQuotes is true the values of the api config object are surrounded with quotes. Default value for surroundApiWithQuotes is false.

<options>
   ...
   <surroundApiWithQuotes>true</surroundApiWithQuotes>
</options>
/controller/api.js?baseRouterUrl=myrouterurl

//Output
Ext.app.REMOTING_API = {
  "url" : "myrouterurl/router",
  ...
}

1.3.1 - February 28, 2013

  • Fix for Issue #57: Support for empty group in api.js. <script src="api.js?group"> or <script src="api.js?group="> will now return every remote method that does not have a group attribute or does have a group attribute with an empty value

  • Fix for Issue #56: Calling setSorters, setGroups, setParams and setFilters method from the class ExtDirectStoreReadRequest with an null parameter sets the property to an empty list. This prevents throwing a NullPointerException when calling the corresponding get method.

  • Add annotation processor (apt) that generates Javascript code for model classes

<plugin>
  <groupId>com.mysema.maven</groupId>
  <artifactId>apt-maven-plugin</artifactId>
  <version>1.0.8</version>
  <executions>					
    <execution>
      <id>modelgen</id>
      <goals>
        <goal>process</goal>
      </goals>
      <configuration>
        <processor>ch.ralscha.extdirectspring.generator.ModelAnnotationProcessor</processor>
        <outputDirectory>src/main/webapp/app</outputDirectory>
        <options>
          <!-- <debug>true</debug>  --> <!-- DEFAULT -->
          <!-- <debug>false</debug> -->
          <!-- <outputFormat>touch2</outputFormat> -->
          <!-- <outputFormat>extjs4</outputFormat> --> <!-- DEFAULT -->
          <!-- <includeValidation>none</includeValidation> --> <!-- DEFAULT -->
          <!-- <includeValidation>all</includeValidation>  -->
          <!-- <includeValidation>builtin</includeValidation> -->
        </options>
      </configuration>
    </execution>					
  </executions>			
</plugin>

1.3.0 - January 31, 2013

  • New minimal requirements for this release are: Java 1.6, Spring 3.2.0 (from 3.1.x), Jackson 2.1.2 (from 2.0.x) and Servlet 2.4

  • MethodRegistrar now implements the Ordered interface and returns Ordered.LOWEST_PRECEDENCE-1000.

  • Support for writing server sent events in a streaming fashion. Add SSEWriter as a parameter to the SSE method and write events with the write method.

 @ExtDirectMethod(ExtDirectMethodType.SSE)
 public void sse(SSEWriter sseWriter) {
   SSEvent event = new SSEvent();
   event.set....	    
   sseWriter.write(event);
   //do something else or wait for something or ...
   sseWriter.write(2);
   //...
 }
  • Add additional setData method to the class SSEvent that takes an Object as a parameter. The value will be converted to a String by calling the object's toString method.

  • Allowing for @ExtDirectMethod to be part of a meta-annotation. For example:

@ExtDirectMethod(value = ExtDirectMethodType.SIMPLE_NAMED, group = "named")
@Target({ ElementType.METHOD })
@Retention(RetentionPolicy.RUNTIME)
public @interface NamedEdsMethod { 
}


@NamedEdsMethod
public String aMethod(String s) {
	...
}

Clone this wiki locally