You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@myfaces.apache.org by ma...@apache.org on 2008/08/20 10:28:43 UTC
svn commit: r687284 - in
/myfaces/trinidad/trunk/trinidad-impl/src/main/resources/org/apache/myfaces/trinidadinternal/menu:
./ xml/ xml/schemas/
Author: matzew
Date: Wed Aug 20 01:28:42 2008
New Revision: 687284
URL: http://svn.apache.org/viewvc?rev=687284&view=rev
Log:
TRINIDAD-1183 - Allows any node in the whole menu tree to be obtained through its "id", unique or not.
ported to 10x trunk
Added:
myfaces/trinidad/trunk/trinidad-impl/src/main/resources/org/apache/myfaces/trinidadinternal/menu/
myfaces/trinidad/trunk/trinidad-impl/src/main/resources/org/apache/myfaces/trinidadinternal/menu/xml/
myfaces/trinidad/trunk/trinidad-impl/src/main/resources/org/apache/myfaces/trinidadinternal/menu/xml/schemas/
myfaces/trinidad/trunk/trinidad-impl/src/main/resources/org/apache/myfaces/trinidadinternal/menu/xml/schemas/base.xsd
myfaces/trinidad/trunk/trinidad-impl/src/main/resources/org/apache/myfaces/trinidadinternal/menu/xml/schemas/groupNode.xsd
myfaces/trinidad/trunk/trinidad-impl/src/main/resources/org/apache/myfaces/trinidadinternal/menu/xml/schemas/itemNode.xsd
myfaces/trinidad/trunk/trinidad-impl/src/main/resources/org/apache/myfaces/trinidadinternal/menu/xml/schemas/menu.xsd
myfaces/trinidad/trunk/trinidad-impl/src/main/resources/org/apache/myfaces/trinidadinternal/menu/xml/schemas/menuNode.xsd
myfaces/trinidad/trunk/trinidad-impl/src/main/resources/org/apache/myfaces/trinidadinternal/menu/xml/schemas/sharedNode.xsd
Added: myfaces/trinidad/trunk/trinidad-impl/src/main/resources/org/apache/myfaces/trinidadinternal/menu/xml/schemas/base.xsd
URL: http://svn.apache.org/viewvc/myfaces/trinidad/trunk/trinidad-impl/src/main/resources/org/apache/myfaces/trinidadinternal/menu/xml/schemas/base.xsd?rev=687284&view=auto
==============================================================================
--- myfaces/trinidad/trunk/trinidad-impl/src/main/resources/org/apache/myfaces/trinidadinternal/menu/xml/schemas/base.xsd (added)
+++ myfaces/trinidad/trunk/trinidad-impl/src/main/resources/org/apache/myfaces/trinidadinternal/menu/xml/schemas/base.xsd Wed Aug 20 01:28:42 2008
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="iso-8859-1" ?>
+<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+ xmlns:afmenu="http://myfaces.apache.org/trinidad/menu"
+ targetNamespace="http://myfaces.apache.org/trinidad/menu"
+ elementFormDefault="qualified">
+
+<!-- Additional types for Trinidad commandNavigationItems -->
+ <xsd:simpleType name="char">
+ <xsd:restriction base="xsd:string">
+ <xsd:length value="1"/>
+ </xsd:restriction>
+ </xsd:simpleType>
+
+ <xsd:simpleType name="elExpression">
+ <xsd:restriction base="xsd:string">
+ <xsd:pattern value="#\{.+\}"/>
+ </xsd:restriction>
+ </xsd:simpleType>
+
+ <xsd:simpleType name="stringOrElExpression">
+ <xsd:union memberTypes="xsd:string afmenu:elExpression"/>
+ </xsd:simpleType>
+
+ <xsd:simpleType name="charOrElExpression">
+ <xsd:union memberTypes="afmenu:char afmenu:elExpression"/>
+ </xsd:simpleType>
+
+ <xsd:simpleType name="booleanOrElExpression">
+ <xsd:union memberTypes="xsd:boolean afmenu:elExpression"/>
+ </xsd:simpleType>
+
+ <xsd:simpleType name="intOrElExpression">
+ <xsd:union memberTypes="xsd:int afmenu:elExpression"/>
+ </xsd:simpleType>
+<!-- end custom types -->
+
+ <xsd:element name="base" type="afmenu:baseType">
+ <xsd:annotation>
+ <xsd:documentation>
+ Base node for all afmenu elements
+ </xsd:documentation>
+ </xsd:annotation>
+ </xsd:element>
+ <xsd:complexType name="baseType"/>
+</xsd:schema>
Added: myfaces/trinidad/trunk/trinidad-impl/src/main/resources/org/apache/myfaces/trinidadinternal/menu/xml/schemas/groupNode.xsd
URL: http://svn.apache.org/viewvc/myfaces/trinidad/trunk/trinidad-impl/src/main/resources/org/apache/myfaces/trinidadinternal/menu/xml/schemas/groupNode.xsd?rev=687284&view=auto
==============================================================================
--- myfaces/trinidad/trunk/trinidad-impl/src/main/resources/org/apache/myfaces/trinidadinternal/menu/xml/schemas/groupNode.xsd (added)
+++ myfaces/trinidad/trunk/trinidad-impl/src/main/resources/org/apache/myfaces/trinidadinternal/menu/xml/schemas/groupNode.xsd Wed Aug 20 01:28:42 2008
@@ -0,0 +1,26 @@
+<?xml version="1.0" encoding="windows-1252" ?>
+<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+ xmlns:afmenu="http://myfaces.apache.org/trinidad/menu"
+ targetNamespace="http://myfaces.apache.org/trinidad/menu"
+ elementFormDefault="qualified">
+ <xsd:include schemaLocation="menuNode.xsd"/>
+ <xsd:element name="groupNode" type="afmenu:groupNodeType"
+ substitutionGroup="afmenu:menuNode">
+ <xsd:annotation>
+ <xsd:documentation>
+ A menu node that refers to another node, typically a child node,
+ to perform its menu navigation. The referenced node may also be a group
+ node that refers to another node, etc. The final node must be an action
+ node that performs the action and menu occurs as a result.
+ Has an id reference and a label.
+ </xsd:documentation>
+ </xsd:annotation>
+ </xsd:element>
+ <xsd:complexType name="groupNodeType">
+ <xsd:complexContent>
+ <xsd:extension base="afmenu:menuNodeType">
+ <xsd:attribute name="idref" use="required" type="xsd:string"/>
+ </xsd:extension>
+ </xsd:complexContent>
+ </xsd:complexType>
+</xsd:schema>
Added: myfaces/trinidad/trunk/trinidad-impl/src/main/resources/org/apache/myfaces/trinidadinternal/menu/xml/schemas/itemNode.xsd
URL: http://svn.apache.org/viewvc/myfaces/trinidad/trunk/trinidad-impl/src/main/resources/org/apache/myfaces/trinidadinternal/menu/xml/schemas/itemNode.xsd?rev=687284&view=auto
==============================================================================
--- myfaces/trinidad/trunk/trinidad-impl/src/main/resources/org/apache/myfaces/trinidadinternal/menu/xml/schemas/itemNode.xsd (added)
+++ myfaces/trinidad/trunk/trinidad-impl/src/main/resources/org/apache/myfaces/trinidadinternal/menu/xml/schemas/itemNode.xsd Wed Aug 20 01:28:42 2008
@@ -0,0 +1,38 @@
+<?xml version="1.0" encoding="iso-8859-1" ?>
+<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+ xmlns:afmenu="http://myfaces.apache.org/trinidad/menu"
+ targetNamespace="http://myfaces.apache.org/trinidad/menu"
+ elementFormDefault="qualified">
+ <xsd:include schemaLocation="menuNode.xsd"/>
+ <xsd:element name="itemNode" type="afmenu:itemNodeType"
+ substitutionGroup="afmenu:menuNode">
+ <xsd:annotation>
+ <xsd:documentation>
+ A menu node that specifies an action or a destination when the menu item
+ is clicked.
+ </xsd:documentation>
+ </xsd:annotation>
+ </xsd:element>
+ <xsd:complexType name="itemNodeType">
+ <xsd:complexContent>
+ <xsd:extension base="afmenu:menuNodeType">
+ <xsd:attribute name="action" type="afmenu:stringOrElExpression"/>
+ <xsd:attribute name="destination" type="xsd:string"/>
+ <xsd:attribute name="actionListener" type="afmenu:elExpression"/>
+ <xsd:attribute name="launchListener" type="afmenu:elExpression"/>
+ <xsd:attribute name="returnListener" type="afmenu:elExpression"/>
+ <xsd:attribute name="immediate" default="false"
+ type="afmenu:booleanOrElExpression"/>
+ <xsd:attribute name="useWindow" default="false"
+ type="afmenu:booleanOrElExpression"/>
+ <xsd:attribute name="windowHeight" type="afmenu:intOrElExpression"/>
+ <xsd:attribute name="windowWidth" type="afmenu:intOrElExpression"/>
+ <xsd:attribute name="focusViewId" type="xsd:anyURI" use="required"/>
+ <xsd:attribute name="defaultFocusPath" default="false"
+ type="afmenu:booleanOrElExpression"/>
+ <xsd:attribute name="targetFrame" type="afmenu:stringOrElExpression"/>
+ <xsd:anyAttribute/>
+ </xsd:extension>
+ </xsd:complexContent>
+ </xsd:complexType>
+</xsd:schema>
Added: myfaces/trinidad/trunk/trinidad-impl/src/main/resources/org/apache/myfaces/trinidadinternal/menu/xml/schemas/menu.xsd
URL: http://svn.apache.org/viewvc/myfaces/trinidad/trunk/trinidad-impl/src/main/resources/org/apache/myfaces/trinidadinternal/menu/xml/schemas/menu.xsd?rev=687284&view=auto
==============================================================================
--- myfaces/trinidad/trunk/trinidad-impl/src/main/resources/org/apache/myfaces/trinidadinternal/menu/xml/schemas/menu.xsd (added)
+++ myfaces/trinidad/trunk/trinidad-impl/src/main/resources/org/apache/myfaces/trinidadinternal/menu/xml/schemas/menu.xsd Wed Aug 20 01:28:42 2008
@@ -0,0 +1,27 @@
+<?xml version="1.0" encoding="iso-8859-1" ?>
+<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+ xmlns:afmenu="http://myfaces.apache.org/trinidad/menu"
+ targetNamespace="http://myfaces.apache.org/trinidad/menu"
+ elementFormDefault="qualified">
+ <xsd:include schemaLocation="itemNode.xsd"/>
+ <xsd:include schemaLocation="groupNode.xsd"/>
+ <xsd:include schemaLocation="sharedNode.xsd"/>
+ <xsd:element name="menu" type="afmenu:menuType">
+ <xsd:annotation>
+ <xsd:documentation>
+ Top level tag for a menu model.
+ </xsd:documentation>
+ </xsd:annotation>
+ </xsd:element>
+ <xsd:complexType name="menuType">
+ <xsd:choice minOccurs="0" maxOccurs="unbounded">
+ <xsd:element ref="afmenu:itemNode"/>
+ <xsd:element ref="afmenu:groupNode"/>
+ <xsd:element ref="afmenu:sharedNode"/>
+ </xsd:choice>
+ <xsd:attribute name="xmlns" type="xsd:anyURI"
+ default="http://myfaces.apache.org/trinidad/menu"/>
+ <xsd:attribute name="var" type="xsd:string"/>
+ <xsd:attribute name="resourceBundle" type="xsd:anyURI"/>
+ </xsd:complexType>
+</xsd:schema>
Added: myfaces/trinidad/trunk/trinidad-impl/src/main/resources/org/apache/myfaces/trinidadinternal/menu/xml/schemas/menuNode.xsd
URL: http://svn.apache.org/viewvc/myfaces/trinidad/trunk/trinidad-impl/src/main/resources/org/apache/myfaces/trinidadinternal/menu/xml/schemas/menuNode.xsd?rev=687284&view=auto
==============================================================================
--- myfaces/trinidad/trunk/trinidad-impl/src/main/resources/org/apache/myfaces/trinidadinternal/menu/xml/schemas/menuNode.xsd (added)
+++ myfaces/trinidad/trunk/trinidad-impl/src/main/resources/org/apache/myfaces/trinidadinternal/menu/xml/schemas/menuNode.xsd Wed Aug 20 01:28:42 2008
@@ -0,0 +1,41 @@
+<?xml version="1.0" encoding="iso-8859-1" ?>
+<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+ xmlns:afmenu="http://myfaces.apache.org/trinidad/menu"
+ xmlns:xml="http://www.w3.org/XML/1998/namespace"
+ targetNamespace="http://myfaces.apache.org/trinidad/menu"
+ elementFormDefault="qualified">
+ <xsd:include schemaLocation="base.xsd"/>
+
+ <xsd:element name="menuNode" type="afmenu:menuNodeType">
+ <xsd:annotation>
+ <xsd:documentation>
+ A menu node. It will be either an itemNode or a groupNode.
+ </xsd:documentation>
+ </xsd:annotation>
+ </xsd:element>
+ <xsd:complexType name="menuNodeType">
+ <xsd:complexContent>
+ <xsd:extension base="afmenu:baseType">
+ <xsd:choice minOccurs="0" maxOccurs="unbounded">
+ <xsd:element ref="afmenu:itemNode"/>
+ <xsd:element ref="afmenu:groupNode"/>
+ <xsd:element ref="afmenu:sharedNode"/>
+ </xsd:choice>
+ <xsd:attribute name="id" type="xsd:id" use="required"/>
+ <xsd:attribute name="label" type="afmenu:stringOrElExpression"/>
+ <xsd:attribute name="icon" type="xsd:anyURI"/>
+ <xsd:attribute name="readOnly" default="false"
+ type="afmenu:booleanOrElExpression"/>
+ <xsd:attribute name="rendered" default="true"
+ type="afmenu:booleanOrElExpression"/>
+ <xsd:attribute name="disabled" default="false"
+ type="afmenu:booleanOrElExpression"/>
+ <xsd:attribute name="accessKey" type="afmenu:charOrElExpression"/>
+ <xsd:attribute name="labelAndAccessKey"
+ type="afmenu:stringOrElExpression"/>
+ <xsd:attribute name="visible" type="afmenu:booleanOrElExpression"
+ default="true"/>
+ </xsd:extension>
+ </xsd:complexContent>
+ </xsd:complexType>
+</xsd:schema>
Added: myfaces/trinidad/trunk/trinidad-impl/src/main/resources/org/apache/myfaces/trinidadinternal/menu/xml/schemas/sharedNode.xsd
URL: http://svn.apache.org/viewvc/myfaces/trinidad/trunk/trinidad-impl/src/main/resources/org/apache/myfaces/trinidadinternal/menu/xml/schemas/sharedNode.xsd?rev=687284&view=auto
==============================================================================
--- myfaces/trinidad/trunk/trinidad-impl/src/main/resources/org/apache/myfaces/trinidadinternal/menu/xml/schemas/sharedNode.xsd (added)
+++ myfaces/trinidad/trunk/trinidad-impl/src/main/resources/org/apache/myfaces/trinidadinternal/menu/xml/schemas/sharedNode.xsd Wed Aug 20 01:28:42 2008
@@ -0,0 +1,21 @@
+<?xml version="1.0" encoding="iso-8859-1" ?>
+<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+ xmlns:afmenu="http://myfaces.apache.org/trinidad/menu"
+ targetNamespace="http://myfaces.apache.org/trinidad/menu"
+ elementFormDefault="qualified">
+ <xsd:include schemaLocation="base.xsd"/>
+ <xsd:element name="sharedNode" type="afmenu:sharedNodeType">
+ <xsd:annotation>
+ <xsd:documentation>
+ A menu node that points to another menu model
+ </xsd:documentation>
+ </xsd:annotation>
+ </xsd:element>
+ <xsd:complexType name="sharedNodeType">
+ <xsd:complexContent>
+ <xsd:extension base="afmenu:baseType">
+ <xsd:attribute name="ref" type="xsd:string" use="required"/>
+ </xsd:extension>
+ </xsd:complexContent>
+ </xsd:complexType>
+</xsd:schema>