Author: dvinnichek
Date: 2010-08-02 06:01:25 -0400 (Mon, 02 Aug 2010)
New Revision: 23861
Added:
trunk/vpe/tests/org.jboss.tools.vpe.spring.test/resources/SpringTest/src/main/webapp/WEB-INF/jsp/radiobuttons.jsp
trunk/vpe/tests/org.jboss.tools.vpe.spring.test/resources/SpringTest/src/main/webapp/WEB-INF/jsp/radiobuttons.jsp.xml
Modified:
trunk/vpe/tests/org.jboss.tools.vpe.spring.test/resources/SpringTest/src/main/java/org/jboss/tools/vpe/spring/test/springtest/FormBean.java
trunk/vpe/tests/org.jboss.tools.vpe.spring.test/resources/SpringTest/src/main/webapp/WEB-INF/jsp/checkboxes.jsp
trunk/vpe/tests/org.jboss.tools.vpe.spring.test/resources/SpringTest/src/main/webapp/WEB-INF/jsp/checkboxes.jsp.xml
trunk/vpe/tests/org.jboss.tools.vpe.spring.test/resources/SpringTest/src/main/webapp/WEB-INF/springapp-servlet.xml
trunk/vpe/tests/org.jboss.tools.vpe.spring.test/resources/SpringTest/src/main/webapp/index.jsp
trunk/vpe/tests/org.jboss.tools.vpe.spring.test/src/org/jboss/tools/vpe/spring/test/SpringComponentTest.java
Log:
add tests for form:radiobuttons
Modified:
trunk/vpe/tests/org.jboss.tools.vpe.spring.test/resources/SpringTest/src/main/java/org/jboss/tools/vpe/spring/test/springtest/FormBean.java
===================================================================
---
trunk/vpe/tests/org.jboss.tools.vpe.spring.test/resources/SpringTest/src/main/java/org/jboss/tools/vpe/spring/test/springtest/FormBean.java 2010-08-02
08:43:30 UTC (rev 23860)
+++
trunk/vpe/tests/org.jboss.tools.vpe.spring.test/resources/SpringTest/src/main/java/org/jboss/tools/vpe/spring/test/springtest/FormBean.java 2010-08-02
10:01:25 UTC (rev 23861)
@@ -17,7 +17,9 @@
private boolean chechbox3Selected = false;
private Map<Integer, String> availableCategories = new HashMap<Integer,
String>();
- private Set<Integer> selectedCategories = new HashSet<Integer>();
+ private Set<Integer> selectedCategories1 = new HashSet<Integer>();
+ private Set<Integer> selectedCategories2 = new HashSet<Integer>();
+ private Set<Integer> selectedCategories3 = new HashSet<Integer>();
private List<CategoryType> favoriteCategories = new
ArrayList<CategoryType>();
private String selectedCategory;
@@ -27,7 +29,9 @@
for (CategoryType categoryType : CategoryType.values()) {
availableCategories.put(categoryType.getId(), categoryType.getName());
}
- selectedCategories.add(CategoryType.Books.getId());
+ selectedCategories1.add(CategoryType.Sport.getId());
+ selectedCategories2.add(CategoryType.Fishing.getId());
+ selectedCategories3.add(CategoryType.Books.getId());
favoriteCategories.add(CategoryType.Sport);
favoriteCategories.add(CategoryType.Books);
selectedCategory = CategoryType.Sport.getName();
@@ -65,14 +69,30 @@
this.availableCategories = availableCategories;
}
- public Set<Integer> getSelectedCategories() {
- return selectedCategories;
+ public Set<Integer> getSelectedCategories1() {
+ return selectedCategories1;
}
- public void setSelectedCategories(Set<Integer> selectedCategories) {
- this.selectedCategories = selectedCategories;
+ public void setSelectedCategories1(Set<Integer> selectedCategories1) {
+ this.selectedCategories1 = selectedCategories1;
}
+ public Set<Integer> getSelectedCategories2() {
+ return selectedCategories2;
+ }
+
+ public void setSelectedCategories2(Set<Integer> selectedCategories2) {
+ this.selectedCategories2 = selectedCategories2;
+ }
+
+ public Set<Integer> getSelectedCategories3() {
+ return selectedCategories3;
+ }
+
+ public void setSelectedCategories3(Set<Integer> selectedCategories3) {
+ this.selectedCategories3 = selectedCategories3;
+ }
+
public List<CategoryType> getFavoriteCategories() {
return favoriteCategories;
}
Modified:
trunk/vpe/tests/org.jboss.tools.vpe.spring.test/resources/SpringTest/src/main/webapp/WEB-INF/jsp/checkboxes.jsp
===================================================================
---
trunk/vpe/tests/org.jboss.tools.vpe.spring.test/resources/SpringTest/src/main/webapp/WEB-INF/jsp/checkboxes.jsp 2010-08-02
08:43:30 UTC (rev 23860)
+++
trunk/vpe/tests/org.jboss.tools.vpe.spring.test/resources/SpringTest/src/main/webapp/WEB-INF/jsp/checkboxes.jsp 2010-08-02
10:01:25 UTC (rev 23861)
@@ -14,19 +14,19 @@
<form:form modelAttribute="formBean">
<form:checkboxes id="checkboxes1"
items="${formBean.availableCategories}"
- path="selectedCategories" />
+ path="selectedCategories1" />
<br/>form:checkboxes with id, items and path attributes.
<br/><br/>
<form:checkboxes id="checkboxes2"
cssClass="tall-checkbox" cssStyle="width: 30px;"
items="${formBean.availableCategories}"
- path="selectedCategories" />
+ path="selectedCategories2" />
<br/>form:checkboxes with id, cssStyle, cssClass, items and path attributes.
(Must look as a big square.)
<br/><br/>
<form:checkboxes id="checkboxes3" disabled="true"
itemLabel="id" itemValue="id"
items="${formBean.favoriteCategories}"
- path="selectedCategories" />
+ path="selectedCategories3" />
<br/>disabled form:checkboxes with itemLabel attribute
<br/><br/>
</form:form>
Modified:
trunk/vpe/tests/org.jboss.tools.vpe.spring.test/resources/SpringTest/src/main/webapp/WEB-INF/jsp/checkboxes.jsp.xml
===================================================================
---
trunk/vpe/tests/org.jboss.tools.vpe.spring.test/resources/SpringTest/src/main/webapp/WEB-INF/jsp/checkboxes.jsp.xml 2010-08-02
08:43:30 UTC (rev 23860)
+++
trunk/vpe/tests/org.jboss.tools.vpe.spring.test/resources/SpringTest/src/main/webapp/WEB-INF/jsp/checkboxes.jsp.xml 2010-08-02
10:01:25 UTC (rev 23861)
@@ -1,19 +1,19 @@
<tests>
<test id="checkboxes1">
<span>
- <input id="checkboxes11" name="selectedCategories"
type="checkbox"/>
+ <input id="checkboxes11" type="checkbox"/>
<label>${formBean.availableCategories}</label>
</span>
</test>
<test id="checkboxes2">
<span>
- <input id="checkboxes21" name="selectedCategories"
class="tall-checkbox" style="width: 30px;"
type="checkbox"/>
+ <input id="checkboxes21" class="tall-checkbox"
style="width: 30px;" type="checkbox"/>
<label>${formBean.availableCategories}</label>
</span>
</test>
<test id="checkboxes3">
<span>
- <input id="checkboxes31" name="selectedCategories"
disabled="disabled" type="checkbox"/>
+ <input id="checkboxes31" disabled="disabled"
type="checkbox"/>
<label>${formBean.availableCategories}.id</label>
</span>
</test>
Added:
trunk/vpe/tests/org.jboss.tools.vpe.spring.test/resources/SpringTest/src/main/webapp/WEB-INF/jsp/radiobuttons.jsp
===================================================================
---
trunk/vpe/tests/org.jboss.tools.vpe.spring.test/resources/SpringTest/src/main/webapp/WEB-INF/jsp/radiobuttons.jsp
(rev 0)
+++
trunk/vpe/tests/org.jboss.tools.vpe.spring.test/resources/SpringTest/src/main/webapp/WEB-INF/jsp/radiobuttons.jsp 2010-08-02
10:01:25 UTC (rev 23861)
@@ -0,0 +1,35 @@
+<%@ taglib prefix="form"
uri="http://www.springframework.org/tags/form" %>
+<%@ taglib prefix="c"
uri="http://java.sun.com/jstl/core" %>
+<html>
+<head>
+ <style>
+ .tall-radiobuttons {
+ -moz-appearance: none;
+ height: 30px;
+ }
+ </style>
+</head>
+<body>
+ <h1>Test of form:radiobuttons</h1>
+
+ <form:form modelAttribute="formBean">
+ <form:radiobuttons id="radiobuttons1"
+ path="selectedCategories1"
+ items="${formBean.availableCategories}" />
+ <br/>form:checkboxes with id, items and path attributes.
+ <br/><br/>
+ <form:radiobuttons id="radiobuttons2"
+ cssClass="tall-radiobuttons" cssStyle="width: 30px;"
+ items="${formBean.availableCategories}"
+ path="selectedCategories2" />
+ <br/>form:radiobuttons with id, cssStyle, cssClass, items and path attributes.
(Must look as a big circle.)
+ <br/><br/>
+ <form:radiobuttons id="radiobuttons3" disabled="true"
+ itemLabel="id" itemValue="id"
+ items="${formBean.favoriteCategories}"
+ path="selectedCategories3" />
+ <br/>disabled form:radiobuttons with itemLabel attribute
+ <br/><br/>
+ </form:form>
+</body>
+</html>
Property changes on:
trunk/vpe/tests/org.jboss.tools.vpe.spring.test/resources/SpringTest/src/main/webapp/WEB-INF/jsp/radiobuttons.jsp
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Name: svn:eol-style
+ native
Added:
trunk/vpe/tests/org.jboss.tools.vpe.spring.test/resources/SpringTest/src/main/webapp/WEB-INF/jsp/radiobuttons.jsp.xml
===================================================================
---
trunk/vpe/tests/org.jboss.tools.vpe.spring.test/resources/SpringTest/src/main/webapp/WEB-INF/jsp/radiobuttons.jsp.xml
(rev 0)
+++
trunk/vpe/tests/org.jboss.tools.vpe.spring.test/resources/SpringTest/src/main/webapp/WEB-INF/jsp/radiobuttons.jsp.xml 2010-08-02
10:01:25 UTC (rev 23861)
@@ -0,0 +1,20 @@
+<tests>
+ <test id="radiobuttons1">
+ <span>
+ <input id="radiobuttons11" type="radio"/>
+ <label>${formBean.favoriteCategories}</label>
+ </span>
+ </test>
+ <test id="radiobuttons2">
+ <span>
+ <input id="radiobuttons21" type="radio"
class="tall-radiobuttons" style="width: 30px;"/>
+ <label>${formBean.favoriteCategories}</label>
+ </span>
+ </test>
+ <test id="radiobuttons3">
+ <span>
+ <input id="radiobuttons31" disabled="disabled"
type="radio"/>
+ <label>${formBean.favoriteCategories}.id</label>
+ </span>
+ </test>
+</tests>
\ No newline at end of file
Property changes on:
trunk/vpe/tests/org.jboss.tools.vpe.spring.test/resources/SpringTest/src/main/webapp/WEB-INF/jsp/radiobuttons.jsp.xml
___________________________________________________________________
Name: svn:mime-type
+ text/xml
Name: svn:eol-style
+ native
Modified:
trunk/vpe/tests/org.jboss.tools.vpe.spring.test/resources/SpringTest/src/main/webapp/WEB-INF/springapp-servlet.xml
===================================================================
---
trunk/vpe/tests/org.jboss.tools.vpe.spring.test/resources/SpringTest/src/main/webapp/WEB-INF/springapp-servlet.xml 2010-08-02
08:43:30 UTC (rev 23860)
+++
trunk/vpe/tests/org.jboss.tools.vpe.spring.test/resources/SpringTest/src/main/webapp/WEB-INF/springapp-servlet.xml 2010-08-02
10:01:25 UTC (rev 23861)
@@ -11,6 +11,7 @@
<bean name="/checkbox.htm"
class="org.jboss.tools.vpe.spring.test.springtest.FormController"/>
<bean name="/checkboxes.htm"
class="org.jboss.tools.vpe.spring.test.springtest.FormController"/>
<bean name="/radiobutton.htm"
class="org.jboss.tools.vpe.spring.test.springtest.FormController"/>
+ <bean name="/radiobuttons.htm"
class="org.jboss.tools.vpe.spring.test.springtest.FormController"/>
<bean name="/errors.htm"
class="org.jboss.tools.vpe.spring.test.springtest.controller.ErrorsController">
<property name="validator" ref="fieldValidator"/>
</bean>
Modified:
trunk/vpe/tests/org.jboss.tools.vpe.spring.test/resources/SpringTest/src/main/webapp/index.jsp
===================================================================
---
trunk/vpe/tests/org.jboss.tools.vpe.spring.test/resources/SpringTest/src/main/webapp/index.jsp 2010-08-02
08:43:30 UTC (rev 23860)
+++
trunk/vpe/tests/org.jboss.tools.vpe.spring.test/resources/SpringTest/src/main/webapp/index.jsp 2010-08-02
10:01:25 UTC (rev 23861)
@@ -1,11 +1,13 @@
+<a href="checkbox.htm">checkbox.htm</a>
+<br/>
<a href="checkboxes.htm">checkboxes.htm</a>
<br/>
-<a href="checkbox.htm">checkbox.htm</a>
+<a href="radiobutton.htm">radiobutton.htm</a>
<br/>
+<a href="radiobuttons.htm">radiobuttons.htm</a>
+<br/>
<a href="form.htm">form.htm</a>
<br/>
<a href="errors.htm">errors.htm</a>
<br/>
-<a href="radiobutton.htm">radiobutton.htm</a>
-<br/>
Modified:
trunk/vpe/tests/org.jboss.tools.vpe.spring.test/src/org/jboss/tools/vpe/spring/test/SpringComponentTest.java
===================================================================
---
trunk/vpe/tests/org.jboss.tools.vpe.spring.test/src/org/jboss/tools/vpe/spring/test/SpringComponentTest.java 2010-08-02
08:43:30 UTC (rev 23860)
+++
trunk/vpe/tests/org.jboss.tools.vpe.spring.test/src/org/jboss/tools/vpe/spring/test/SpringComponentTest.java 2010-08-02
10:01:25 UTC (rev 23861)
@@ -43,6 +43,11 @@
performTestForVpeComponent((IFile)TestUtil.getResource(
"src/main/webapp/WEB-INF/jsp/radiobutton.jsp",
SpringAllTests.IMPORT_PROJECT_NAME)); //$NON-NLS-1$
}
+
+ public void testRadiobuttons() throws Throwable {
+ performTestForVpeComponent((IFile)TestUtil.getResource(
+ "src/main/webapp/WEB-INF/jsp/radiobuttons.jsp",
SpringAllTests.IMPORT_PROJECT_NAME)); //$NON-NLS-1$
+ }
public void testForm() throws Throwable {
performTestForVpeComponent((IFile)TestUtil.getResource(