Skip to content

Have @Form on method imply a bean is a "form bean" (not require @Form on method param) #8

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
rbygrave opened this issue May 30, 2019 · 0 comments
Assignees
Labels
bug Something isn't working
Milestone

Comments

@rbygrave
Copy link
Contributor

Doing this because we can and this is likely that people do this a lot.
That is:

Treat FooForm method parameter as if was annotated with @Form (because it can't be anything else).

  @Post("other") @Form
  void postFormOther(FooForm fooForm, Context ctx) {
    ...
  }

The syntax implied by similarity to JAX-RS @BeanParam ... is to annotate the method parameter explicitly like below (which is what we support).

... but actually FooForm can't be anything but a "form bean" (it is not Java Context and not one of our known scalar types - String, Long, LocalDate ... etc).

  @Post("other") 
  void postFormOther(@Form FooForm fooForm, Context ctx) {
    ...
  }
@rbygrave rbygrave added the bug Something isn't working label May 30, 2019
@rbygrave rbygrave added this to the 1.6 milestone May 30, 2019
@rbygrave rbygrave self-assigned this May 30, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant