click-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Bob Schellink (JIRA)" <j...@apache.org>
Subject [jira] Created: (CLK-638) Support Dynamic Forms
Date Fri, 05 Mar 2010 02:41:27 GMT
Support Dynamic Forms
---------------------

                 Key: CLK-638
                 URL: https://issues.apache.org/jira/browse/CLK-638
             Project: Click
          Issue Type: New Feature
          Components: core
            Reporter: Bob Schellink
            Assignee: Bob Schellink


One area where Click can improve is supporting dynamic forms. Typical example is registering
JavaScript events on Fields to submit the Form and then add more Fields as the user navigates
the Form.

Couple of reasons make this problematic. Form automatically validates its fields. One can
switch off this validation but need to keep in mind to switch validation back on for non JS
submissions.

The other area which is tricky is that all dynamic fields must be added in the Page onInit
event in order to be processed properly. One can invoke field.bindRequestValue to query the
field's value, but bindRequestValue doesn't properly check whether or not its parent Form
was submitted.

I propose we add a couple of helper methods to Form and Field to make this process smoother
eg:

void field.bind();
boolean field.bindAndValidate(); <- will return true if the field is valid, false otherwise



form.bindFields();
boolean form.bindAndValidateFields(); <- will return true if *all* fields are valid, false
otherwise

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message