You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@click.apache.org by sa...@apache.org on 2009/10/22 10:25:27 UTC
svn commit: r828357 - in /incubator/click/trunk/click:
documentation/docs/roadmap-changes.html
extras/src/org/apache/click/extras/hibernate/HibernateForm.java
Author: sabob
Date: Thu Oct 22 08:25:26 2009
New Revision: 828357
URL: http://svn.apache.org/viewvc?rev=828357&view=rev
Log:
fixed HibernateForm to apply required field constraints
Modified:
incubator/click/trunk/click/documentation/docs/roadmap-changes.html
incubator/click/trunk/click/extras/src/org/apache/click/extras/hibernate/HibernateForm.java
Modified: incubator/click/trunk/click/documentation/docs/roadmap-changes.html
URL: http://svn.apache.org/viewvc/incubator/click/trunk/click/documentation/docs/roadmap-changes.html?rev=828357&r1=828356&r2=828357&view=diff
==============================================================================
--- incubator/click/trunk/click/documentation/docs/roadmap-changes.html (original)
+++ incubator/click/trunk/click/documentation/docs/roadmap-changes.html Thu Oct 22 08:25:26 2009
@@ -66,12 +66,12 @@
<h1>Road Map and Changes</h1>
<h2>Road Map</h2>
-The next scheduled Click release will be version 2.1.0 final in early August 2009.
+The next scheduled Click release will be version 2.1.0 final in November 2009.
<p/>
-New Click releases will be released every quarter with the next version Click 2.2.0
-scheduled for the end of September 2009. Tentative features for the next release
-include @Bindable support for Page getters/setters, improved project generation,
-documentation and examples.
+New Click releases will be released every quarter with the next version Click 2.2.0
+scheduled for the end of December 2009. Tentative features for the next release
+include @Bindable support for Page getters/setters, improved Menu control,
+improved project generation, documentation and examples.
<p> </p>
@@ -79,7 +79,7 @@
<dl>
<dt><a name="2.1.0"></a>
- <div class="release-header">Latest Stable Release - Version 2.1.0 - ??? August 2009</div>
+ <div class="release-header">Latest Stable Release - Version 2.1.0 - ??? November 2009</div>
</dt>
<dd>
<div style="margin-left:-2em;margin-bottom:1em;">
@@ -430,13 +430,17 @@
[<a target='_blank' href="https://issues.apache.org/jira/browse/CLK-575">575</a>].
</li>
<li class="change">
- Update Velocity library to version 1.6.2.
+ Fixed bug in HibernateForm that did not apply required field constraints.
+ [<a target='_blank' href="https://issues.apache.org/jira/browse/CLK-583">583</a>].
</li>
<li class="change">
- Update Cayenne library to version 3.0M6.
+ Updated Velocity library to version 1.6.2.
</li>
<li class="change">
- Update Prototype.js library to version 1.6.1.
+ Updated Cayenne library to version 3.0M6.
+ </li>
+ <li class="change">
+ Updated Prototype.js library to version 1.6.1.
</li>
</ul>
</dd>
Modified: incubator/click/trunk/click/extras/src/org/apache/click/extras/hibernate/HibernateForm.java
URL: http://svn.apache.org/viewvc/incubator/click/trunk/click/extras/src/org/apache/click/extras/hibernate/HibernateForm.java?rev=828357&r1=828356&r2=828357&view=diff
==============================================================================
--- incubator/click/trunk/click/extras/src/org/apache/click/extras/hibernate/HibernateForm.java (original)
+++ incubator/click/trunk/click/extras/src/org/apache/click/extras/hibernate/HibernateForm.java Thu Oct 22 08:25:26 2009
@@ -20,6 +20,7 @@
import java.io.Serializable;
+import org.apache.click.control.Checkbox;
import org.apache.click.control.Field;
import org.apache.click.control.Form;
import org.apache.click.control.HiddenField;
@@ -399,7 +400,12 @@
for (int i = 0; i < propertyNames.length; i++) {
Field field = getField(propertyNames[i]);
if (field != null) {
- field.setRequired(propertyNullability[i]);
+ boolean isMandatory = !propertyNullability[i];
+ if(!field.isRequired() && isMandatory) {
+ if (!(field instanceof Checkbox)) {
+ field.setRequired(true);
+ }
+ }
}
}