META-INF.maven-faces-plugin.components.trinidad.Subform.xml Maven / Gradle / Ivy
<?xml version="1.0" encoding="utf-8"?> <!-- Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. --> <faces-config version="2.0" xmlns="http://java.sun.com/xml/ns/javaee" xmlns:tr="http://myfaces.apache.org/trinidad" xmlns:xi="http://www.w3.org/2001/XInclude" xmlns:mfp="http://myfaces.apache.org/maven-faces-plugin" xmlns:fmd="http://java.sun.com/xml/ns/javaee/faces/design-time-metadata"> <component> <icon> <!-- small-icon>/org/apache/myfaces/trinidadinternal/metadata/icons/baseSubform.png</small-icon --> </icon> <component-type>org.apache.myfaces.trinidad.Subform</component-type> <component-class>org.apache.myfaces.trinidad.component.UIXSubform</component-class> <property> <description><![CDATA[whether the subform should assume it has been submitted. When set to "true", "submitted" will be considered true if no other subform has been submitted.]]> </description> <property-name>default</property-name> <property-class>boolean</property-class> <default-value>false</default-value> <property-extension> <fmd:property-metadata> <fmd:value-expression>PROHIBITED</fmd:value-expression> </fmd:property-metadata> </property-extension> </property> <component-extension> <mfp:component-family>org.apache.myfaces.trinidad.Subform</mfp:component-family> <mfp:component-supertype>org.apache.myfaces.trinidad.ComponentBase</mfp:component-supertype> <mfp:renderer-type>org.apache.myfaces.trinidad.Subform</mfp:renderer-type> <mfp:tag-class>org.apache.myfaces.trinidadinternal.taglib.UIXSubformTag</mfp:tag-class> <mfp:long-description><![CDATA[UIXSubform is the base abstraction for an independently submittable region of a page. The contents of a subform will only be validated (or otherwise processed) if a component inside of the subform is responsible for submitting the page. This allows for comparatively fine-grained control of which components will be validated and pushed into the model without the compromises of using entirely separate form elements. UIXSubform is a <html:code>NamingContainer</html:code> and therefore IDs can be reused between subforms. <section name="Behavior of subforms"> <html:p> A <html:code>UIXSubform</html:code> is considered "submitted" if an event is queued by one of its children or facets for a phase later than "Apply Request Values" (that is, for later than <html:code>decode()</html:code>). The most common example is a (non-immediate) "command" component (like an <h:commandButton> or <tr:commandButton>). </html:p> <html:p> A <html:code>UIXSubform</html:code> will always allow the "Apply Request Values" phase to execute for its children, even when not "submitted", but when not "submitted", the "Process Validations" and "Update Model Values" phases will be skipped. This differs from an ordinary form component, which, when not submitted, does not (and cannot) run "Apply Request Values" either. </html:p> </section> <section name="UIXSubform and "default""> <html:p> In some scenarios, there may be buttons (or other components that submit the page) outside of the main content of a page. If this main content is in a UIXSubform, it could not be fully processed whenever those buttons are clicked, since those buttons aren't inside of the UIXSubform. To support this scenario, Apache Trinidad supports a "default" property on UIXSubform. A "default" subform behaves like any other subform in most respects, but if <html:em>no</html:em> subforms are "submitted" - if no subform has an appropriate event come from its children - then all "default" subforms act as if they are "submitted". </html:p> </section>]]> </mfp:long-description> <mfp:author>Adam Winer</mfp:author> <mfp:naming-container>true</mfp:naming-container> <mfp:tag-class-modifier>abstract</mfp:tag-class-modifier> </component-extension> </component> </faces-config>