Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[mvc-dev] How to use multiple FormBean

Hello everyone,

I am really looking forward to Jakarta MVC being standardized in Jakarta EE 12.

I have a question regarding Krazo. 
Since I wasn't entirely sure where the best place to inquire was, I would like to use this mailing list to ask for help.

In an HTML form, I would like to specify parameter names using dot notation, such as formData.email.
https://github.com/ssetoredhat/wildfly-mvc-example/blob/main/src/main/webapp/WEB-INF/views/form.jsp#L123

While I have confirmed that I can successfully receive the parameter by explicitly specifying @FormParam("formData.email"), my goal is to capture it using @FormParam("email") inside a bean. In other words, I want to map the "formData" prefix to a @BeanParam, but I haven't been able to find a way to do this.
https://github.com/ssetoredhat/wildfly-mvc-example/blob/main/src/main/java/com/example/controller/FormData.java#L11
https://github.com/ssetoredhat/wildfly-mvc-example/blob/main/src/main/java/com/example/controller/FormController.java#L28

This is critical for my use case because I need to use multiple form beans within a single form. 
Is there any way or configuration to achieve this?

Thank you in advance for your help.

--
Satoshi Seto
mailto:megascus@xxxxxxxxx

Back to the top