|
Size: 1199
Comment:
|
← Revision 5 as of 2009-09-20 23:01:17 ⇥
Size: 1199
Comment: converted to 1.6 markup
|
| Deletions are marked like this. | Additions are marked like this. |
| Line 4: | Line 4: |
| actionFor - with this attribute, it's possible to validate and update more than one subForm at once. [[BR]] preserveSubmittedValues - if true means not keeping any entered value if submitted another subform.[[BR]] |
actionFor - with this attribute, it's possible to validate and update more than one subForm at once. <<BR>> preserveSubmittedValues - if true means not keeping any entered value if submitted another subform.<<BR>> |
| Line 10: | Line 10: |
| [[BR]] ...[[BR]] <t:subForm id="subFormId1">[[BR]] <h:inputText value="#{bean.value}" />[[BR]] <t:commandButton value="Submit subForm1"/>[[BR]] </t:subForm>[[BR]] <t:subForm id="subFormId2">[[BR]] <h:inputText value="#{anotherBean.value}" />[[BR]] <t:commandButton value="Submit subForm2"/>[[BR]] </t:subForm>[[BR]] [[BR]] <t:commandButton value="Submit subform1" actionFor="subFormId1"/>[[BR]] ...[[BR]] [[BR]] </h:form>[[BR]] [[BR]] |
<<BR>> ...<<BR>> <t:subForm id="subFormId1"><<BR>> <h:inputText value="#{bean.value}" /><<BR>> <t:commandButton value="Submit subForm1"/><<BR>> </t:subForm><<BR>> <t:subForm id="subFormId2"><<BR>> <h:inputText value="#{anotherBean.value}" /><<BR>> <t:commandButton value="Submit subForm2"/><<BR>> </t:subForm><<BR>> <<BR>> <t:commandButton value="Submit subform1" actionFor="subFormId1"/><<BR>> ...<<BR>> <<BR>> </h:form><<BR>> <<BR>> |
This tag allows partial validation and model update. Components will be validated and updated only if either a child-component of this form caused the submit of the form, or an extended commandLink or commandButton with the actionFor attribute set to the client-id of this component was used. There can be several comma-separated entries in the actionFor attribute with this, it's possible to validate and update more than one subForm at once.
Main attributes
actionFor - with this attribute, it's possible to validate and update more than one subForm at once.
preserveSubmittedValues - if true means not keeping any entered value if submitted another subform.
Sample Usage
<h:form>
...
<t:subForm id="subFormId1">
<h:inputText value="#{bean.value}" />
<t:commandButton value="Submit subForm1"/>
</t:subForm>
<t:subForm id="subFormId2">
<h:inputText value="#{anotherBean.value}" />
<t:commandButton value="Submit subForm2"/>
</t:subForm>
<t:commandButton value="Submit subform1" actionFor="subFormId1"/>
...
</h:form>