Author: scabanovich
Date: 2010-01-27 11:32:38 -0500 (Wed, 27 Jan 2010)
New Revision: 19962
Added:
trunk/jsf/tests/org.jboss.tools.jsf.test/projects/JSFKickStartOldFormat/WebContent/WEB-INF/faces-config-2.xml
Modified:
trunk/jsf/plugins/org.jboss.tools.jsf/resources/meta/jsf2.meta
trunk/jsf/tests/org.jboss.tools.jsf.test/projects/JSFKickStartOldFormat/testCases.xml
trunk/jsf/tests/org.jboss.tools.jsf.test/src/org/jboss/tools/jsf/test/JSFModelTest.java
Log:
https://jira.jboss.org/jira/browse/JBIDE-5471
Modified: trunk/jsf/plugins/org.jboss.tools.jsf/resources/meta/jsf2.meta
===================================================================
--- trunk/jsf/plugins/org.jboss.tools.jsf/resources/meta/jsf2.meta 2010-01-27 16:28:29 UTC
(rev 19961)
+++ trunk/jsf/plugins/org.jboss.tools.jsf/resources/meta/jsf2.meta 2010-01-27 16:32:38 UTC
(rev 19962)
@@ -372,10 +372,6 @@
name="navigation-handler" xmlname="navigation-handler.#text">
<Editor name="AccessibleJava"/>
</XModelAttribute>
- <XModelAttribute PROPERTIES="category=general"
- name="partial-traversal" xmlname="partial-traversal.#text">
- <Editor name="AccessibleJava"/>
- </XModelAttribute>
<XModelAttribute PROPERTIES="category=general"
name="view-handler" xmlname="view-handler.#text">
<Editor name="AccessibleJava"/>
</XModelAttribute>
@@ -789,6 +785,7 @@
name="validator-id" xmlname="#text">
<Editor name="AccessibleJava"/>
</XModelAttribute>
+ <XModelAttribute PROPERTIES="category=general" name="id"
xmlname="id"/>
<XModelAttribute TRIM="no" name="comment"
xmlname="#comment">
<Editor name="Note"/>
</XModelAttribute>
Added:
trunk/jsf/tests/org.jboss.tools.jsf.test/projects/JSFKickStartOldFormat/WebContent/WEB-INF/faces-config-2.xml
===================================================================
---
trunk/jsf/tests/org.jboss.tools.jsf.test/projects/JSFKickStartOldFormat/WebContent/WEB-INF/faces-config-2.xml
(rev 0)
+++
trunk/jsf/tests/org.jboss.tools.jsf.test/projects/JSFKickStartOldFormat/WebContent/WEB-INF/faces-config-2.xml 2010-01-27
16:32:38 UTC (rev 19962)
@@ -0,0 +1,66 @@
+<?xml version="1.0"?>
+<faces-config metadata-complete="true" version="2.0"
+
xmlns="http://java.sun.com/xml/ns/javaee"
+
xmlns:xi="http://www.w3.org/2001/XInclude"
+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
http://java.sun.com/xml/ns/javaee/web-facesconfig_2_0.xsd">
+ <name>myFacesConfig</name>
+ <behavior>
+ <description>kk</description>
+ <behavior-id>behavior1</behavior-id>
+ <behavior-class>MyBehavior</behavior-class>
+ <attribute>
+ <attribute-name>a1</attribute-name>
+ <attribute-class>MyAttribute</attribute-class>
+ </attribute>
+ <property>
+ <property-name>p1</property-name>
+ <property-class>MyProperty</property-class>
+ </property>
+ <behavior-extension/>
+ <behavior-extension/>
+ </behavior>
+ <managed-bean>
+ <managed-bean-name>a</managed-bean-name>
+ <managed-bean-class>A</managed-bean-class>
+ <managed-bean-scope>request</managed-bean-scope>
+ </managed-bean>
+ <navigation-rule>
+ <from-view-id>cc</from-view-id>
+ <navigation-case>
+ <from-outcome>aaa</from-outcome>
+ <to-view-id>/c2.jsp</to-view-id>
+ <redirect include-view-params="true">
+ <view-param>
+ <name>p1</name>
+ <value>v1</value>
+ </view-param>
+ </redirect>
+ </navigation-case>
+ </navigation-rule>
+ <absolute-ordering>
+ <name>name1</name>
+ </absolute-ordering>
+ <ordering>
+ <before>
+ <name>n3</name>
+ </before>
+ </ordering>
+ <render-kit>
+ <render-kit-id>kit</render-kit-id>
+ <client-behavior-renderer>
+
<client-behavior-renderer-type>MyClientBehaviorRendererType</client-behavior-renderer-type>
+
<client-behavior-renderer-class>MyRenderer</client-behavior-renderer-class>
+ </client-behavior-renderer>
+ </render-kit>
+ <application>
+ <resource-handler>MyResourceHandler</resource-handler>
+ <system-event-listener>
+
<system-event-listener-class>MySystemEventListener</system-event-listener-class>
+ <system-event-class>MySystemEvent</system-event-class>
+ <source-class>MySource</source-class>
+ </system-event-listener>
+ <default-validators>
+ <validator-id id="MyDefaultValidator">validator1</validator-id>
+ </default-validators>
+ </application>
+</faces-config>
Property changes on:
trunk/jsf/tests/org.jboss.tools.jsf.test/projects/JSFKickStartOldFormat/WebContent/WEB-INF/faces-config-2.xml
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Modified:
trunk/jsf/tests/org.jboss.tools.jsf.test/projects/JSFKickStartOldFormat/testCases.xml
===================================================================
---
trunk/jsf/tests/org.jboss.tools.jsf.test/projects/JSFKickStartOldFormat/testCases.xml 2010-01-27
16:28:29 UTC (rev 19961)
+++
trunk/jsf/tests/org.jboss.tools.jsf.test/projects/JSFKickStartOldFormat/testCases.xml 2010-01-27
16:32:38 UTC (rev 19962)
@@ -520,5 +520,71 @@
<property name="attributeValue" value="Function Example."/>
</test>
+ <!-- Test Faces Config 2.0 -->
+ <!-- @metadata-complete -->
+ <test name="JSFModelTest:testPaths:attribute">
+ <property name="path" value="/faces-config-2.xml"/>
+ <property name="attributeName" value="metadata-complete"/>
+ <property name="attributeValue" value="true"/>
+ </test>
+ <!-- <name> -->
+ <test name="JSFModelTest:testPaths:attribute">
+ <property name="path" value="/faces-config-2.xml"/>
+ <property name="attributeName" value="faces config name"/>
+ <property name="attributeValue" value="myFacesConfig"/>
+ </test>
+ <!-- <resource-handler> -->
+ <test name="JSFModelTest:testPaths:attribute">
+ <property name="path"
value="/faces-config-2.xml/application"/>
+ <property name="attributeName" value="resource-handler"/>
+ <property name="attributeValue" value="MyResourceHandler"/>
+ </test>
+
+ <!-- <system-event-listener> -->
+ <test name="JSFModelTest:testPaths:attribute">
+ <property name="path"
value="/faces-config-2.xml/application/MySystemEventListener"/>
+ <property name="attributeName" value="system-event-class"/>
+ <property name="attributeValue" value="MySystemEvent"/>
+ </test>
+ <test name="JSFModelTest:testPaths:attribute">
+ <property name="path"
value="/faces-config-2.xml/application/MySystemEventListener"/>
+ <property name="attributeName" value="source-class"/>
+ <property name="attributeValue" value="MySource"/>
+ </test>
+
+ <!-- <behavior> -->
+ <test name="JSFModelTest:testPaths:attribute">
+ <property name="path"
value="/faces-config-2.xml/Behaviors/behavior1"/>
+ <property name="attributeName" value="behavior-class"/>
+ <property name="attributeValue" value="MyBehavior"/>
+ </test>
+ <test name="JSFModelTest:testPaths:attribute">
+ <property name="path"
value="/faces-config-2.xml/Behaviors/behavior1/a1"/>
+ <property name="attributeName" value="attribute-class"/>
+ <property name="attributeValue" value="MyAttribute"/>
+ </test>
+ <test name="JSFModelTest:testPaths:attribute">
+ <property name="path"
value="/faces-config-2.xml/Behaviors/behavior1/p1"/>
+ <property name="attributeName" value="property-class"/>
+ <property name="attributeValue" value="MyProperty"/>
+ </test>
+ <test name="JSFModelTest:testPaths">
+ <property name="path"
value="/faces-config-2.xml/Behaviors/behavior1/behavior-extension"/>
+ </test>
+
+ <!-- <default-validators> -->
+ <test name="JSFModelTest:testPaths">
+ <property name="path" value="/faces-config-2.xml/application/Default
Validators"/>
+ </test>
+ <!-- <validator-id> -->
+ <test name="JSFModelTest:testPaths">
+ <property name="path" value="/faces-config-2.xml/application/Default
Validators/validator1"/>
+ </test>
+ <test name="JSFModelTest:testPaths:attribute">
+ <property name="path" value="/faces-config-2.xml/application/Default
Validators/validator1"/>
+ <property name="attributeName" value="id"/>
+ <property name="attributeValue" value="MyDefaultValidator"/>
+ </test>
+
</tests>
\ No newline at end of file
Modified:
trunk/jsf/tests/org.jboss.tools.jsf.test/src/org/jboss/tools/jsf/test/JSFModelTest.java
===================================================================
---
trunk/jsf/tests/org.jboss.tools.jsf.test/src/org/jboss/tools/jsf/test/JSFModelTest.java 2010-01-27
16:28:29 UTC (rev 19961)
+++
trunk/jsf/tests/org.jboss.tools.jsf.test/src/org/jboss/tools/jsf/test/JSFModelTest.java 2010-01-27
16:32:38 UTC (rev 19962)
@@ -97,7 +97,21 @@
}
}
assertTrue(sb.toString(), errorCount == 0);
+
+ XModelObject o = n.getModel().getByPath("/faces-config-2.xml");
+// printPaths(o);
+
}
+
+ void printPaths(XModelObject o) {
+ if(o == null) {
+ System.out.println("null");
+ return;
+ }
+ System.out.println(o.getPath());
+ XModelObject[] cs = o.getChildren();
+ for (int i = 0; i < cs.length; i++) printPaths(cs[i]);
+ }
public void testJSFProjectStructure() {
IModelNature n = EclipseResourceUtil.getModelNature(project);