-
Notifications
You must be signed in to change notification settings - Fork 472
Support for form creation #38
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
Closed
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…a target controller added ControllerLinkBuilder.linksToResources method which collects all resources on a controller and provides link templates for them, as preparation for automatic creation of xhtml forms for resources with request params.
…d request result resource
Started work on HtmlFormMessageConverter
working on support for JaxRs
Conflicts: pom.xml Resolved conflicts in pom, removed httpclient
Reordered ControllerLinkBuilder.java, removed unused code
Conflicts: pom.xml template.mf
Conflicts: src/main/java/org/springframework/hateoas/jaxrs/JaxRsLinkBuilder.java src/main/java/org/springframework/hateoas/mvc/ControllerLinkBuilder.java src/main/java/org/springframework/hateoas/mvc/ControllerLinkBuilderFactory.java src/test/java/org/springframework/hateoas/mvc/ControllerLinkBuilderUnitTest.java
Support for default field values based on methodOn invocation Introduced MethodParameterValue as container for invocation parameter info Moved form creation stuff from ControllerLinkBuilder to new ControllerFormBuilder
added test for ControllerFormBuilder
…a type level request mapping and a method level request mapping with template variables. Bumped up Spring version to 3.2.0.RELEASE in order to get spring-test-mvc support. Streamlined the form descriptor attribute names after removal of LinkTemplate Added SamplePersonController and related classes for demonstration of ControllerFormBuilder.java in ControllerFormBuilderMvcTest Finalized support for form input default values, see ControllerFormBuilderMvcTest
moved forms stuff to hateoas.action package. The term action is used both by Siren and Html forms, therefore the package name
renamed invocation value in MethodParameterValue to callValue to avoid confusion with linkTo(methodOn), where methodOn is called invocationValue
…ved in the actionLink property. Using RequestMethod as parameter type for the request method. Changed method name changePerson to editPerson in SamplePersonController.java
…, reflecting its potential purpose to create a Html representation of a resource with or without forms. Actions are just an optional facility of a resource.
Streamlined terminology: using action instead of form
…erter.java brushed up javadoc to reflect name change
pull request for #34 |
Added support for html5 form input types. By default we distinguish number and text, the Input annotation can be used to specify a more exact type, incl. hidden. The Input annotation gives clients information about expected types, self-describing the necessary input parameter, and it allows the server to control which data should be entered into the form and which data should be submitted as-is.
Conflicts: pom.xml src/main/java/org/springframework/hateoas/core/LinkBuilderSupport.java src/main/java/org/springframework/hateoas/mvc/ControllerLinkBuilder.java src/main/java/org/springframework/hateoas/mvc/ResourceAssemblerSupport.java src/test/java/org/springframework/hateoas/mvc/ControllerLinkBuilderUnitTest.java
Closed, the pull request contains too many changes at once |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Quite a pull request, I know, but focused to form creation :-)
Added support for form creation. The general idea is: Configure a HtmlResourceMessageConverter and point to a form handler method like this:
Bumped up Spring version to get support for mvc tests -> see HtmlResourceMessageConverterTest with HtmlResourceMessageConverterTest-context.xml and SamplePersonController for usage of form creation.
Fixed an issue in ControllerLinkBuilder with handler methods having both path variables and request params
Added a method getBoundMethodParameterValues to AnnotatedParametersParameterAccessor which allows me to get the full info about the recorded method invocation parameters, not just the value. This is needed during form creation, e.g. to support hidden fields and input types.