Author: akazakov
Date: 2008-02-19 11:03:04 -0500 (Tue, 19 Feb 2008)
New Revision: 6433
Modified:
trunk/seam/tests/org.jboss.tools.seam.core.test/projects/SeamWebWarTestProject/WebContent/varAttributes.xhtml
trunk/seam/tests/org.jboss.tools.seam.core.test/projects/SeamWebWarTestProject/src/action/org/domain/SeamWebWarTestProject/entity/TestComponentForVarAttributes.java
Log:
JBIDE-999 Improved JUnitTest
Modified:
trunk/seam/tests/org.jboss.tools.seam.core.test/projects/SeamWebWarTestProject/WebContent/varAttributes.xhtml
===================================================================
---
trunk/seam/tests/org.jboss.tools.seam.core.test/projects/SeamWebWarTestProject/WebContent/varAttributes.xhtml 2008-02-19
16:00:51 UTC (rev 6432)
+++
trunk/seam/tests/org.jboss.tools.seam.core.test/projects/SeamWebWarTestProject/WebContent/varAttributes.xhtml 2008-02-19
16:03:04 UTC (rev 6433)
@@ -1,20 +1,32 @@
<!DOCTYPE composition PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<ui:composition
xmlns="http://www.w3.org/1999/xhtml"
-
xmlns:s="http://jboss.com/products/seam/taglib"
xmlns:ui="http://java.sun.com/jsf/facelets"
-
xmlns:f="http://java.sun.com/jsf/core"
xmlns:h="http://java.sun.com/jsf/html"
-
xmlns:rich="http://richfaces.ajax4jsf.org/rich"
template="layout/template.xhtml">
-
<ui:define name="body">
- <h:dataTable var="entry"
value="#{testComponentForVars.list}">
- <h:column>
- <h:outputText value="#{entry.name}" />
- </h:column>
- </h:dataTable>
+ <h:dataTable value="#{mapItems}" var="mapItem">
+ <h:dataTable value="#{mapItem.value.items}" var="test">
+ <h:outputText value="#{test.name}"/>
+ </h:dataTable>
-</ui:define>
+ <h:dataTable value="#{setItems}" var="value">
+ <h:outputText value="#{value.name}"/>
+ </h:dataTable>
+
+ <h:dataTable value="#{listItems}" var="value">
+ <h:outputText value="#{value.name}"/>
+ </h:dataTable>
+
+ <h:dataTable value="#{arrayItems}" var="item">
+ <h:outputText value="#{item.name}"/>
+ </h:dataTable>
+
+ <h:dataTable value="#{testComponentForVars.list}"
var="item">
+ <h:outputText value="#{item.name}"/>
+ </h:dataTable>
+ </h:dataTable>
+
+</ui:define>
</ui:composition>
\ No newline at end of file
Modified:
trunk/seam/tests/org.jboss.tools.seam.core.test/projects/SeamWebWarTestProject/src/action/org/domain/SeamWebWarTestProject/entity/TestComponentForVarAttributes.java
===================================================================
---
trunk/seam/tests/org.jboss.tools.seam.core.test/projects/SeamWebWarTestProject/src/action/org/domain/SeamWebWarTestProject/entity/TestComponentForVarAttributes.java 2008-02-19
16:00:51 UTC (rev 6432)
+++
trunk/seam/tests/org.jboss.tools.seam.core.test/projects/SeamWebWarTestProject/src/action/org/domain/SeamWebWarTestProject/entity/TestComponentForVarAttributes.java 2008-02-19
16:03:04 UTC (rev 6433)
@@ -1,23 +1,44 @@
package org.domain.SeamWebWarTestProject.entity;
-import java.io.Serializable;
-import org.jboss.seam.ScopeType;
-import org.jboss.seam.annotations.Name;
-import org.jboss.seam.annotations.Scope;
import java.util.List;
+import java.util.Map;
+import java.util.Set;
-(a)Scope(ScopeType.EVENT)
+import org.jboss.seam.annotations.Name;
+import org.jboss.seam.annotations.datamodel.DataModel;
+
@Name("testComponentForVars")
-public class TestComponentForVarAttributes implements Serializable {
- static final long serialVersionUID = 1001;
+public class TestComponentForVarAttributes {
+ @DataModel
+ private Set<Value> setItems;
+
+ @DataModel
+ private List<Value> listItems;
+
+ @DataModel
+ private Map<String, Test> mapItems;
+
+ @DataModel
+ private Value[] arrayItems;
+
+ public Test getTest() {
+ return null;
+ }
+
+ public List<Value> getList() {
+ return null;
+ }
+
public static class Value {
public String getName() {
return null;
}
}
- public List<Value> getList() {
- return null;
+ public static class Test {
+ public List<Value> getItems() {
+ return null;
+ }
}
}
\ No newline at end of file