Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[CLOSED] Improve Javadoc for the Spring DatatablesCriteriasResolver #181

Closed
tduchateau opened this issue Jan 28, 2014 · 3 comments
Closed
Milestone

Comments

@tduchateau
Copy link
Member

Issue by tduchateau from Friday Jul 26, 2013 at 17:09 GMT


Originally posted in #150 by @gorder

Here is a stab at the java doc for it (Your website is pretty good already but I expect it would say much the same). It might not hurt to put example usage on the java doc for the DatatablesParams annotation either. I would have this show that the object type being annotated should be a DatatablesParams object. It would also reference the java doc below for 'how to enable', and probably show the alternative way (getting it off the HttpServletRequest)

The only doc issue I have run into this far is around the dom element for the datatable. I am still determining if its just tymeleaf/datatables noobness on my part or maybe the doc can be improved slightly for that. If I have time maybe I will open a separate ticket for that. Hope that helps :)

 * Resolves a method argument of type {@code DatatablesCriterias} annotated with
 * {@code DatatablesParams}.
 * 
 * <p>
 * Datatable attributes are obtained from the {@code HttpServletRequest}, and mapped to the
 * annotated {@code DatatablesCriterias} object.
 * 
 * This HandlerMethodArgumentResolver can be enabled in Spring 3.1 and greater using either Java or
 * XML configuration as shown below:
 * 
 * <pre>
 * &lt;mvc:annotation-driven&gt;
 *    &lt;mvc:argument-resolvers&gt;
 *       &lt;bean class="com.github.dandelion.datatables.extras.spring3.ajax.DatatablesCriteriasResolver" /&gt;
 *    &lt;/mvc:argument-resolvers&gt;
 * &lt;/mvc:annotation-driven&gt;
 * </pre>
 * 
 * <pre>
 * &#064;Configuration
 * &#064;EnableWebMvc
 * public class MyWebConfig extends WebMvcConfigurerAdapter
 * {
 *     &#064;Override
 *     public void addArgumentResolvers(List&lt;HandlerMethodArgumentResolver&gt; argumentResolvers)
 *     {
 *         argumentResolvers.add(new DatatablesCriteriasMethodArgumentResolver());
 *     }
 * }
 * </pre>
 * 
 * @author xxx
 * @since xx
 * @see DatatablesParams
 * @see DatatablesCriterias
@tduchateau
Copy link
Member Author

Comment by tduchateau from Friday Jul 26, 2013 at 19:59 GMT

Fixed in 8f53af4

@tduchateau
Copy link
Member Author

Comment by gorder from Sunday Jul 28, 2013 at 00:39 GMT

tduchateau,

Looks good I added some commit comments on the older (deprecated version). Have a look at them. The main points are

  1. Java Config cannot be used with the old version so should be removed.
  2. I made some other slight suggestions as well.

@tduchateau
Copy link
Member Author

Comment by tduchateau from Sunday Jul 28, 2013 at 19:44 GMT

Thanks Bill! :-)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant