Is there a Form Builder for Java/Spring web apps? -
Is there a Form Builder for Java/Spring web apps? -
i'm migrating php
java
, spring
. noticed spring
, if it's great framework, misses things bundled in other frameworks on other platforms. 1 miss ability build form using dedicated builders, without writing single line of html
.
let's take symfony2
illustration (click here total article):
/** * controller class */ public function newaction(request $request) { // create task , give dummy info illustration $task = new task(); $task->settask('write blog post'); $task->setduedate(new \datetime('tomorrow')); $form = $this->createformbuilder($task) ->add('task', 'text') ->add('duedate', 'date') ->add('save', 'submit', array('label' => 'create post')) ->getform(); homecoming $this->render('acmetaskbundle:default:new.html.twig', array( 'form' => $form->createview(), )); }
having code, have phone call form
(in fact form's tostring()
method, appropriate twig
plugin handles that) in view. html generated , filled on fly:
{{ form(form) }}
validation done on entity (single field , complex validators), can attach validators form itself.
is there way accomplish functionality in spring
?
there frameworks effort provide tool create things easily. problem these tends easier is, more of mess creates. doesn't matter simple projects, using code generating tools risky production grade software.
spring provide rad (rapid application development) tool called roo, helps frontend creation well. don't know of popular form builders java, , considering amount of different view technologies available, tied type (jsf, tapestry, etc.).
java spring forms spring-mvc
Comments
Post a Comment