Skip to content

Commit

Permalink
Register UISelectItemGroups component as new f:selectItemGroups tag
Browse files Browse the repository at this point in the history
  • Loading branch information
BalusC committed Mar 27, 2021
1 parent cc1aca7 commit 78e8e52
Show file tree
Hide file tree
Showing 4 changed files with 229 additions and 0 deletions.
Expand Up @@ -984,6 +984,20 @@ public void populateApplicationConfiguration(Document toPopulate) {
}
faces_configElement.appendChild(componentElement);
}
{
Element componentElement = toPopulate.createElementNS(ns, "component");
{
Element component_typeElement = toPopulate.createElementNS(ns, "component-type");
component_typeElement.appendChild(toPopulate.createTextNode("jakarta.faces.SelectItemGroups"));
componentElement.appendChild(component_typeElement);
}
{
Element component_classElement = toPopulate.createElementNS(ns, "component-class");
component_classElement.appendChild(toPopulate.createTextNode("jakarta.faces.component.UISelectItemGroups"));
componentElement.appendChild(component_classElement);
}
faces_configElement.appendChild(componentElement);
}
{
Element componentElement = toPopulate.createElementNS(ns, "component");
{
Expand Down
Expand Up @@ -24,6 +24,7 @@
import jakarta.faces.component.UIParameter;
import jakarta.faces.component.UISelectItem;
import jakarta.faces.component.UISelectItems;
import jakarta.faces.component.UISelectItemGroups;
import jakarta.faces.component.UIViewAction;
import jakarta.faces.component.UIViewParameter;
import jakarta.faces.component.UIWebsocket;
Expand Down Expand Up @@ -100,6 +101,8 @@ public CoreLibrary(String namespace) {

this.addComponent("selectItems", UISelectItems.COMPONENT_TYPE, null);

this.addComponent("selectItemGroups", UISelectItemGroups.COMPONENT_TYPE, null);

addTagHandler("setPropertyActionListener", SetPropertyActionListenerHandler.class);

this.addComponent("subview", "jakarta.faces.NamingContainer", null);
Expand Down
Expand Up @@ -1400,6 +1400,59 @@ of POJOs.
</attribute>
</tag>

<tag>
<description><![CDATA[
<p class="changed_added_4_0">
<strong>UISelectItemGroups</strong> is a component that may be nested inside a <code>UISelectMany</code> or <code>UISelectOne</code> component,
and causes the addition of one or more <code>SelectItemGroup</code> of one or more <code>SelectItem</code> instances to the list of available options in the parent component.
This component accepts only children of type <code>UISelectItems</code> or <code>UISelectItem</code>.
</p>
]]></description>
<tag-name>selectItemGroups</tag-name>
<component>
<component-type>jakarta.faces.SelectItemGroups</component-type>
<renderer-type/>
</component>
<attribute>
<description><![CDATA[
<p class="changed_added_4_0">
Component identifier of the <code>UISelectItemGroups</code> component to be created.
</p>
]]></description>
<name>id</name>
<type>java.lang.String</type>
</attribute>
<attribute>
<description><![CDATA[
<p class="changed_added_4_0">
Value binding expression to a backing bean property bound to the component instance for the <code>UIComponent</code> created by this custom action.
</p>
]]></description>
<name>binding</name>
<type>jakarta.faces.component.UIComponent</type>
</attribute>
<attribute>
<description><![CDATA[
<p class="changed_added_4_0">
Value expression pointing at any array or <code>Iterable</code>.
The member elements may be instances of any type which is acceptable by the <code>value</code> attribute of any nested <code>UISelectItems</code> or <code>UISelectItem</code> component.
</p>
]]></description>
<name>value</name>
<type>java.lang.Object</type>
</attribute>
<attribute>
<description><![CDATA[
<p class="changed_added_4_0">
Expose the currently iterated member element from the <code>value</code> attribute under this request scoped key,
so that it may be referred to in EL for the value of other attributes of any nested component.
</p>
]]></description>
<name>var</name>
<type>java.lang.String</type>
</attribute>
</tag>

<tag>
<description><![CDATA[
<p>Register an ActionListener instance on the UIComponent
Expand Down
159 changes: 159 additions & 0 deletions impl/src/main/resources/com/sun/faces/standard-html-renderkit.xml
Expand Up @@ -4339,6 +4339,165 @@ https://javaserverfaces-spec-public.dev.java.net/issues/show_bug.cgi?id=447
<component-family>jakarta.faces.SelectItems</component-family>
</component-extension>
</component>
<component>
<component-type>jakarta.faces.SelectItemGroups</component-type>
<component-class>jakarta.faces.component.UISelectItemGroups</component-class>

<property>
<description><![CDATA[
A mutable Map of the attributes associated with
this component, keyed by attribute name.
]]></description>
<display-name>Attributes Map</display-name>
<icon/>
<property-name>attributes</property-name>
<property-class>java.util.Map</property-class>
<property-extension>
<tag-attribute>false</tag-attribute>
<read-only>true</read-only>
</property-extension>
</property>
<property>
<description><![CDATA[
The number of child components associated with
this component.
]]></description>
<display-name>Child Component Count</display-name>
<icon/>
<property-name>childCount</property-name>
<property-class>int</property-class>
<property-extension>
<tag-attribute>false</tag-attribute>
<read-only>true</read-only>
</property-extension>
</property>
<property>
<description><![CDATA[
A mutable List of the child components associated with
this component.
]]></description>
<display-name>Child Component List</display-name>
<icon/>
<property-name>children</property-name>
<property-class>java.util.List</property-class>
<property-extension>
<tag-attribute>false</tag-attribute>
<read-only>true</read-only>
</property-extension>
</property>
<property>
<description><![CDATA[
A mutable Map of the facets associated with
this component, keyed by facet name.
]]></description>
<display-name>Facets Map</display-name>
<icon/>
<property-name>facets</property-name>
<property-class>java.util.Map</property-class>
<property-extension>
<tag-attribute>false</tag-attribute>
<read-only>true</read-only>
</property-extension>
</property>
<property>
<description><![CDATA[
The component family to which this component belongs. This property
is used to select an appropriate Renderer.
]]></description>
<display-name>Component Family</display-name>
<icon/>
<property-name>family</property-name>
<property-class>java.lang.String</property-class>
<property-extension>
<tag-attribute>false</tag-attribute>
<read-only>true</read-only>
</property-extension>
</property>
<property>
<description><![CDATA[
The component identifier for this component. This value must be
unique within the closest parent component that is a naming
container.
]]></description>
<display-name>Component Identifier</display-name>
<icon/>
<property-name>id</property-name>
<property-class>java.lang.String</property-class>
</property>
<property>
<description><![CDATA[
The parent component for this component. On the root component
in the component tree (which must be of type UIViewRoot), this
property is null.
]]></description>
<display-name>Parent Component</display-name>
<icon/>
<property-name>parent</property-name>
<property-class>jakarta.faces.component.UIComponent</property-class>
<property-extension>
<tag-attribute>false</tag-attribute>
<read-only>true</read-only>
</property-extension>
</property>
<property>
<description><![CDATA[
Flag indicating whether or not this component should be rendered
(during Render Response Phase), or processed on any subsequent
form submit. The default value for this property is true.
]]></description>
<display-name>Rendered Flag</display-name>
<icon/>
<property-name>rendered</property-name>
<property-class>boolean</property-class>
<property-extension>
<value-expression-enabled>true</value-expression-enabled>
</property-extension>
</property>
<property>
<description><![CDATA[
Identifier used (in conjunction with the "family" property) to
select an appropriate Renderer to encode and decode this component.
]]></description>
<display-name>Renderer Type</display-name>
<icon/>
<property-name>rendererType</property-name>
<property-class>java.lang.String</property-class>
<property-extension>
<tag-attribute>false</tag-attribute>
</property-extension>
</property>
<property>
<description><![CDATA[
Flag indicating whether or not this component takes responsibility
for rendering its own children. This decision is normally delegated
to the associated Renderer, if there is one.
]]></description>
<display-name>Renders Children</display-name>
<icon/>
<property-name>rendersChildren</property-name>
<property-class>boolean</property-class>
<property-extension>
<tag-attribute>false</tag-attribute>
<read-only>true</read-only>
</property-extension>
</property>
<property>
<description>
The current value of this component.
</description>
<display-name>Value</display-name>
<icon/>
<property-name>value</property-name>
<property-class>java.lang.Object</property-class>
<property-extension>
<value-expression-enabled>true</value-expression-enabled>
</property-extension>
</property>

<component-extension>
<component-family>jakarta.faces.SelectItemGroups</component-family>
</component-extension>
</component>
<component>
<component-type>jakarta.faces.SelectMany</component-type>
<component-class>jakarta.faces.component.UISelectMany</component-class>
Expand Down

0 comments on commit 78e8e52

Please sign in to comment.