All Downloads are FREE. Search and download functionalities are using the official Maven repository.

META-INF.maven-faces-plugin.components.trinidad.Subform.xml Maven / Gradle / Ivy

There is a newer version: 2.2.1
Show newest version
<?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 &quot;submitted&quot; if an
event is queued by one of its children or facets for a phase later
than &quot;Apply Request Values&quot; (that is, for later than
<html:code>decode()</html:code>).  The most common example is a
(non-immediate) &quot;command&quot; component (like an &lt;h:commandButton&gt;
or &lt;tr:commandButton&gt;).
</html:p>
<html:p>
A <html:code>UIXSubform</html:code> will always allow the
&quot;Apply Request Values&quot; phase to execute for its children,
even when not &quot;submitted&quot;, but when not &quot;submitted&quot;, the
&quot;Process Validations&quot; and &quot;Update Model Values&quot; phases will
be skipped.  This differs from an ordinary form component,
which, when not submitted, does not (and cannot) run
&quot;Apply Request Values&quot; either.
</html:p>
</section>
<section name="UIXSubform and &quot;default&quot;">
<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 &quot;default&quot; property on
UIXSubform.  A &quot;default&quot; subform behaves like any other
subform in most respects, but if <html:em>no</html:em> subforms
are &quot;submitted&quot; - if no subform has an appropriate event
come from its children - then all &quot;default&quot; subforms act
as if they are &quot;submitted&quot;.
</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>






© 2015 - 2024 Weber Informatics LLC | Privacy Policy