Details
-
Improvement
-
Status: Open
-
Major
-
Resolution: Unresolved
-
2.0.6
-
None
-
None
Description
Currently it is only possible to specify fragments client-side, which doesn't really mesh with MVC concepts and allows the client to render other views that should not be renderable for a given resource. Web Flow allows for controlling fragment rendering server-side, but Spring JavaScript's MVC integration does not. We should add support for this with Spring MVC.
Specification:
-
A MVC Controller can return a String viewname in the format [compositeViewName]#[fragment1,fragmentN].
Example:
@RequestMapping(value="/application/info", method = RequestMethod.POST)
public String processInfoSubmission(PersonalInfo personalInfo, BindingResult errors, AjaxHandler handler, Model model) {
personalInfo.validate(errors);
if (errors.hasErrors())
contestantService.saveInfo(personalInfo);
if (handler.isAjaxRequest())
else
{ return "redirect:/application/info"; }}
The example above says render the info fragment of the application composite when there are validation errors. Render the status fragment after successful submit and it's an ajax request.
Attachments
Issue Links
- is related to
-
SWF-1281 Add support for "modal:" view prefix
-
- Open
-