Author: antonio Date: Tue Mar 29 11:02:17 2005 New Revision: 159413 URL: http://svn.apache.org/viewcvs?view=rev&rev=159413 Log: Add a Boolean attribute for testing
Modified: cocoon/branches/BRANCH_2_1_X/src/blocks/forms/samples/flow/binding_example.js cocoon/branches/BRANCH_2_1_X/src/blocks/forms/samples/flow/bindings.js cocoon/branches/BRANCH_2_1_X/src/blocks/forms/samples/forms/form2_bind_bean.xml cocoon/branches/BRANCH_2_1_X/src/blocks/forms/samples/forms/form2_jx.xml cocoon/branches/BRANCH_2_1_X/src/blocks/forms/samples/forms/form2_model.xml Modified: cocoon/branches/BRANCH_2_1_X/src/blocks/forms/samples/flow/binding_example.js URL: http://svn.apache.org/viewcvs/cocoon/branches/BRANCH_2_1_X/src/blocks/forms/samples/flow/binding_example.js?view=diff&r1=159412&r2=159413 ============================================================================== --- cocoon/branches/BRANCH_2_1_X/src/blocks/forms/samples/flow/binding_example.js (original) +++ cocoon/branches/BRANCH_2_1_X/src/blocks/forms/samples/flow/binding_example.js Tue Mar 29 11:02:17 2005 @@ -76,6 +76,7 @@ bean.setPhoneNumber("123456"); bean.setBirthday(new java.util.Date()); bean.setSex(Packages.org.apache.cocoon.forms.samples.Sex.FEMALE); + //bean.setEnable(java.lang.Boolean.FALSE); var contact = new Packages.org.apache.cocoon.forms.samples.Contact(); contact.setId("1"); contact.setFirstName("Hermann"); Modified: cocoon/branches/BRANCH_2_1_X/src/blocks/forms/samples/flow/bindings.js URL: http://svn.apache.org/viewcvs/cocoon/branches/BRANCH_2_1_X/src/blocks/forms/samples/flow/bindings.js?view=diff&r1=159412&r2=159413 ============================================================================== --- cocoon/branches/BRANCH_2_1_X/src/blocks/forms/samples/flow/bindings.js (original) +++ cocoon/branches/BRANCH_2_1_X/src/blocks/forms/samples/flow/bindings.js Tue Mar 29 11:02:17 2005 @@ -280,7 +280,8 @@ function createJSBeanFor05custom() { var bean = {"jswrap-value": "--wrapped value--", "custom-value": "**custom value**", - "config-value": "[[config value]]"}; + "config-value": "[[config value]]", + "test-value" : ""}; return bean; } @@ -292,5 +293,6 @@ bean.put("jswrap-value", "--wrapped value--"); bean.put("custom-value", "**custom value**"); bean.put("config-value", "[[config value]]"); + bean.put("test-value", ""); return bean; } Modified: cocoon/branches/BRANCH_2_1_X/src/blocks/forms/samples/forms/form2_bind_bean.xml URL: http://svn.apache.org/viewcvs/cocoon/branches/BRANCH_2_1_X/src/blocks/forms/samples/forms/form2_bind_bean.xml?view=diff&r1=159412&r2=159413 ============================================================================== --- cocoon/branches/BRANCH_2_1_X/src/blocks/forms/samples/forms/form2_bind_bean.xml (original) +++ cocoon/branches/BRANCH_2_1_X/src/blocks/forms/samples/forms/form2_bind_bean.xml Tue Mar 29 11:02:17 2005 @@ -36,6 +36,15 @@ <fb:value id="number" path="aNumber"/> <fb:value id="choose" path="choose"/> <fb:value id="sex" path="sex"/> + <!--<fb:value id="enable" path="enable" direction="load"/>--> + <fb:javascript id="enable" path="enable" direction="save"> + <!--<fb:load-form> + widget.setValue(java.lang.Boolean.FALSE); + </fb:load-form>--> + <fb:save-form> + jxpathPointer.setValue(java.lang.Boolean.TRUE); + </fb:save-form> + </fb:javascript> <!-- - An aggregatefield is a special kind of widget that lets Modified: cocoon/branches/BRANCH_2_1_X/src/blocks/forms/samples/forms/form2_jx.xml URL: http://svn.apache.org/viewcvs/cocoon/branches/BRANCH_2_1_X/src/blocks/forms/samples/forms/form2_jx.xml?view=diff&r1=159412&r2=159413 ============================================================================== --- cocoon/branches/BRANCH_2_1_X/src/blocks/forms/samples/forms/form2_jx.xml (original) +++ cocoon/branches/BRANCH_2_1_X/src/blocks/forms/samples/forms/form2_jx.xml Tue Mar 29 11:02:17 2005 @@ -28,6 +28,8 @@ <br/> I choose: ${form2bean.choose} <br/> + Enable: ${form2bean.enable} + <br/> Sex: <i18n:text xmlns:i18n="http://apache.org/cocoon/i18n/2.1">${form2bean.sex}</i18n:text> <table border="1"> Modified: cocoon/branches/BRANCH_2_1_X/src/blocks/forms/samples/forms/form2_model.xml URL: http://svn.apache.org/viewcvs/cocoon/branches/BRANCH_2_1_X/src/blocks/forms/samples/forms/form2_model.xml?view=diff&r1=159412&r2=159413 ============================================================================== --- cocoon/branches/BRANCH_2_1_X/src/blocks/forms/samples/forms/form2_model.xml (original) +++ cocoon/branches/BRANCH_2_1_X/src/blocks/forms/samples/forms/form2_model.xml Tue Mar 29 11:02:17 2005 @@ -103,6 +103,10 @@ </fd:datatype> <fd:selection-list type="enum" class="org.apache.cocoon.forms.samples.Sex"/> </fd:field> + + <fd:booleanfield id="enable"> + <fd:label>Register Enable</fd:label> + </fd:booleanfield> <fd:multivaluefield id="drinks"> <fd:label>Indicate which 2 of the following drinks you'd like to receive:</fd:label>