Hi Cedric, Sorry to add to your list but we usually handle this by incorporating Spring Web MVC using the Magnolia Blossom module.
Tom On Mar 16, 2015, at 11:09 AM, Cedric Reichenbach (via Magnolia Forums) <[email protected]> wrote: > > Hi, > > We're working on form that should be dynamically validated while the user is > filling it out. For this, we use AJAX requests to the server. > > The question is how to handle those requests on server side. We can think of > three possible options: > > [b]1.[/b] > Create a page under [code]/modules/<mymodule>/pages[/code] with a class > extending [code]PageMVCHandler[/code]. Though that's probably the cleanest > way to go, it's still a bit worrying, since [code]PageMVCHandler[/code] has > been deprecated since Magnolia 5.0. > > [b]2.[/b] > Use an extension-based variation for a page template. This variation, e.g. > for the ending ".json", features a custom modelClass that handles those > requests and a template that creates JSON. However, this conceptually makes > no sense, since the Handler doesn't reflect a variation of the page's > content. Furthermore, a page of said type needs to exist and its path be > known in the client-side code in order for the requests to work. > > [b]3.[/b] > Create an additional filter that cherry-picks AJAX requests from the rest and > handles them accordingly. This seems a bit inappropriate, since the filter > chain seems unnecessarily low level for such a feature, bringing up the > danger of breaking Magnolia. > > What do you think would be the best way to go from here? > > Cheers, > Cedric > > -- > Context is everything: > http://forum.magnolia-cms.com/forum/thread.html?threadId=cf9da97a-a688-448b-8209-20f467979f04 > > > ---------------------------------------------------------------- > Alternatively, use our forums: http://forum.magnolia-cms.com/ > To unsubscribe, E-mail to: <[email protected]> > ---------------------------------------------------------------- > Tom Duffey Technical Director | Partner P:414.431.0800 F:414.751.1388 131 W Seeboth St. Suite #301 Milwaukee, WI 53204 ---------------------------------------------------------------- Alternatively, use our forums: http://forum.magnolia-cms.com/ To unsubscribe, E-mail to: <[email protected]> ----------------------------------------------------------------
