Author: yradtsevich
Date: 2009-04-08 14:07:00 -0400 (Wed, 08 Apr 2009)
New Revision: 14612
Added:
trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/WEB-INF/classes/
trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/WEB-INF/classes/demo/
trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/WEB-INF/classes/demo/resources.properties
trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/panelMenuGroup/jbide1605.xhtml.xml
trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/templates/
trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/templates/common.xhtml
Removed:
trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/templetes/
trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/src/org/jboss/tools/jsf/vpe/richfaces/test/jbide/JBIDE1605Test.java
Modified:
trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/panelMenuGroup/jbide1605.xhtml
trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/src/org/jboss/tools/jsf/vpe/richfaces/test/RichFacesAllTests.java
trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/src/org/jboss/tools/jsf/vpe/richfaces/test/RichFacesComponentContentTest.java
Log:
issue JBIDE-1605: VPE: no internationalization for <rich:panelMenuGroup>
https://jira.jboss.org/jira/browse/JBIDE-1605
- JUnit test has been rewritten
Added:
trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/WEB-INF/classes/demo/resources.properties
===================================================================
---
trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/WEB-INF/classes/demo/resources.properties
(rev 0)
+++
trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/WEB-INF/classes/demo/resources.properties 2009-04-08
18:07:00 UTC (rev 14612)
@@ -0,0 +1,2 @@
+prompt=Your Name\:
+greeting=Hello
Modified:
trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/panelMenuGroup/jbide1605.xhtml
===================================================================
---
trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/panelMenuGroup/jbide1605.xhtml 2009-04-08
17:24:26 UTC (rev 14611)
+++
trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/panelMenuGroup/jbide1605.xhtml 2009-04-08
18:07:00 UTC (rev 14612)
@@ -5,81 +5,16 @@
xmlns:f="http://java.sun.com/jsf/core"
xmlns:rich="http://richfaces.org/rich">
-<f:loadBundle basename="demo.resources" var="msg" />
<ui:composition template="/templates/common.xhtml">
<ui:define name="pageTitle">Greeting to User</ui:define>
<ui:define name="pageHeader">Greeting Page</ui:define>
<ui:define name="body">
- <!-- Panel Menu component -->
-<h:panelGrid columns="2" columnClasses="cols"
width="100%">
- <rich:panelMenu style="width:200px" mode="ajax"
- iconExpandedGroup="disc" iconCollapsedGroup="disc"
- iconExpandedTopGroup="chevronUp" iconGroupTopPosition="right"
- iconCollapsedTopGroup="chevronDown"
iconCollapsedTopPosition="right">
- <!-- Panel Menu Group component -->
- <rich:panelMenuGroup label="#{msg['greeting']}">
- <rich:panelMenuItem label="#{msg.greeting}"
- action="#{panelMenu.updateCurrent}">
- <f:param name="current" value="Item 1.1" />
- </rich:panelMenuItem>
- <!-- Panel Menu Item component -->
- <rich:panelMenuItem label="Item 1.2"
- action="#{panelMenu.updateCurrent}">
- <f:param name="current" value="Item 1.2" />
- </rich:panelMenuItem>
- <rich:panelMenuItem label="Item 1.3"
- action="#{panelMenu.updateCurrent}">
- <f:param name="current" value="Item 1.3" />
- </rich:panelMenuItem>
- </rich:panelMenuGroup>
- <rich:panelMenuGroup label="Group 2">
- <rich:panelMenuItem label="Item 2.1"
- action="#{panelMenu.updateCurrent}">
- <f:param name="current" value="Item 2.1" />
- </rich:panelMenuItem>
- <rich:panelMenuItem label="Item 2.2"
- action="#{panelMenu.updateCurrent}">
- <f:param name="current" value="Item 2.2" />
- </rich:panelMenuItem>
- <rich:panelMenuItem label="Item 2.3"
- action="#{panelMenu.updateCurrent}">
- <f:param name="current" value="Item 2.3" />
- </rich:panelMenuItem>
- <rich:panelMenuGroup label="Group 2.4">
- <rich:panelMenuItem label="Item 2.4.1"
- action="#{panelMenu.updateCurrent}">
- <f:param name="current" value="Item 2.4.1" />
- </rich:panelMenuItem>
- <rich:panelMenuItem label="Item 2.4.2"
- action="#{panelMenu.updateCurrent}">
- <f:param name="current" value="Item 2.4.2" />
- </rich:panelMenuItem>
- <rich:panelMenuItem label="Item 2.4.3"
- action="#{panelMenu.updateCurrent}">
- <f:param name="current" value="Item 2.4.3" />
- </rich:panelMenuItem>
- </rich:panelMenuGroup>
- <rich:panelMenuItem label="Item 2.5"
- action="#{panelMenu.updateCurrent}">
- <f:param name="current" value="Item 2.5" />
- </rich:panelMenuItem>
- </rich:panelMenuGroup>
- <rich:panelMenuGroup label="Group 3">
- <rich:panelMenuItem label="Item 3.1"
- action="#{panelMenu.updateCurrent}">
- <f:param name="current" value="Item 3.1" />
- </rich:panelMenuItem>c
- <rich:panelMenuItem label="Item 3.2"
- action="#{panelMenu.updateCurrent}">
- <f:param name="current" value="Item 3.2" />
- </rich:panelMenuItem>
- <rich:panelMenuItem label="Item 3.3"
- action="#{panelMenu.updateCurrent}">
- <f:param name="current" value="Item 3.3" />
- </rich:panelMenuItem>
- </rich:panelMenuGroup>
- </rich:panelMenu>
-</h:panelGrid>
+ <h:panelGrid columns="2" columnClasses="cols"
width="100%">
+ <f:loadBundle basename="demo.resources" var="i18n" />
+ <rich:panelMenu>
+ <rich:panelMenuGroup id="panelMenuGroup1"
label="#{i18n['greeting']}"/>
+ </rich:panelMenu>
+ </h:panelGrid>
</ui:define>
</ui:composition>
-</html>
\ No newline at end of file
+</html>
Added:
trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/panelMenuGroup/jbide1605.xhtml.xml
===================================================================
---
trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/panelMenuGroup/jbide1605.xhtml.xml
(rev 0)
+++
trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/panelMenuGroup/jbide1605.xhtml.xml 2009-04-08
18:07:00 UTC (rev 14612)
@@ -0,0 +1,22 @@
+<tests>
+ <test id="panelMenuGroup1">
+ <DIV CLASS="dr-pmenu-top-group-div rich-pmenu-top-group-div">
+ <TABLE CELLSPACING="0" CELLPADDING="0" BORDER="0"
+ CLASS="dr-pmenu-top-group rich-pmenu-group" STYLE="">
+ <TR>
+ <TD VPE-USER-TOGGLE-ID="1"
+ CLASS="rich-pmenu-group-self-icon rich-pmenu-top-group-self-icon">
+ <IMG SRC="/.*resources/panelMenuGroup/spacer.gif/" />
+ </TD>
+ <TD STYLE="width: 100%;"
CLASS="rich-pmenu-top-group-self-label">
+ Hello
+ </TD>
+ <TD CLASS="rich-pmenu-top-group-self-icon">
+ <IMG WIDTH="16" VSPACE="0" HSPACE="0"
HEIGHT="16"
+ SRC="/.*resources/panelMenuGroup/spacer.gif/" />
+ </TD>
+ </TR>
+ </TABLE>
+ </DIV>
+ </test>
+</tests>
Copied:
trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/templates
(from rev 14513,
trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/templetes)
Added:
trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/templates/common.xhtml
===================================================================
---
trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/templates/common.xhtml
(rev 0)
+++
trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/templates/common.xhtml 2009-04-08
18:07:00 UTC (rev 14612)
@@ -0,0 +1,64 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html
xmlns="http://www.w3.org/1999/xhtml"
+
xmlns:ui="http://java.sun.com/jsf/facelets"
+
xmlns:h="http://java.sun.com/jsf/html"
+
xmlns:f="http://java.sun.com/jsf/core">
+
+ <head>
+ <title><ui:insert name="pageTitle">Page
Title</ui:insert></title>
+ <style type="text/css">
+ body {
+ font-family: Verdana, Arial, Helvetica, sans-serif;
+ font-size: 14px;
+ }
+ .header {
+ font-family: Verdana, Arial, Helvetica, sans-serif;
+ font-size: 18px;
+ }
+ .bottom {
+ font-family: Verdana, Arial, Helvetica, sans-serif;
+ font-size: 9px;
+ text-align: center;
+ vertical-align: middle;
+ color: #8E969D;
+ }
+ </style>
+ </head>
+
+<body bgcolor="#ffffff">
+<table style="border:1px solid #CAD6E0" align="center"
cellpadding="0" cellspacing="0" border="0"
width="400">
+<tbody>
+
+ <tr>
+ <td class="header" height="42" align="center"
valign="middle" width="100%" bgcolor="#E4EBEB">
+ <ui:insert name="pageHeader">Page Header</ui:insert>
+ </td>
+ </tr>
+ <tr>
+ <td height="1" width="100%"
bgcolor="#CAD6E0"></td>
+ </tr>
+
+ <tr>
+ <td width="100%" colspan="2">
+ <table width="100%" style="height:150px" align="left"
cellpadding="0" cellspacing="0" border="0">
+ <tbody>
+ <tr>
+ <td align="center" width="100%"
valign="middle">
+
+ <ui:insert name="body">Page Body</ui:insert>
+
+ </td>
+ </tr>
+ </tbody>
+ </table>
+ </td>
+ </tr>
+
+ <tr>
+ <td colspan="2" valign="bottom" height="1"
width="100%" bgcolor="#CAD6E0"></td>
+ </tr>
+</tbody>
+</table>
+</body>
+
+</html>
\ No newline at end of file
Modified:
trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/src/org/jboss/tools/jsf/vpe/richfaces/test/RichFacesAllTests.java
===================================================================
---
trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/src/org/jboss/tools/jsf/vpe/richfaces/test/RichFacesAllTests.java 2009-04-08
17:24:26 UTC (rev 14611)
+++
trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/src/org/jboss/tools/jsf/vpe/richfaces/test/RichFacesAllTests.java 2009-04-08
18:07:00 UTC (rev 14612)
@@ -17,7 +17,6 @@
import junit.framework.TestSuite;
import org.jboss.tools.jsf.vpe.richfaces.test.jbide.JBIDE1579Test;
-import org.jboss.tools.jsf.vpe.richfaces.test.jbide.JBIDE1605Test;
import org.jboss.tools.jsf.vpe.richfaces.test.jbide.JBIDE1606Test;
import org.jboss.tools.jsf.vpe.richfaces.test.jbide.JBIDE1613Test;
import org.jboss.tools.jsf.vpe.richfaces.test.jbide.JBIDE1713Test;
@@ -62,7 +61,6 @@
suite.addTestSuite(RichFacesFileUploadTemplateTestCase.class);
suite.addTestSuite(RichFacesColumnsTemplateTestCase.class);
suite.addTestSuite(RichFacesPickListTemplateTestCase.class);
- suite.addTestSuite(JBIDE1605Test.class);
suite.addTestSuite(JBIDE1606Test.class);
suite.addTestSuite(RichFacesComponentContentTest.class);
Modified:
trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/src/org/jboss/tools/jsf/vpe/richfaces/test/RichFacesComponentContentTest.java
===================================================================
---
trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/src/org/jboss/tools/jsf/vpe/richfaces/test/RichFacesComponentContentTest.java 2009-04-08
17:24:26 UTC (rev 14611)
+++
trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/src/org/jboss/tools/jsf/vpe/richfaces/test/RichFacesComponentContentTest.java 2009-04-08
18:07:00 UTC (rev 14612)
@@ -25,10 +25,10 @@
setCheckWarning(false);
}
- /**
- *
- * @throws Throwable
- */
+ public void testJbide1605() throws Throwable {
+ performContentTest("components/panelMenuGroup/jbide1605.xhtml");
//$NON-NLS-1$
+ }
+
public void testAjaxValidator() throws Throwable {
performInvisibleTagTest(
"components/ajaxValidator.xhtml", "ajaxValidator");//$NON-NLS-1$
//$NON-NLS-2$
Deleted:
trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/src/org/jboss/tools/jsf/vpe/richfaces/test/jbide/JBIDE1605Test.java
===================================================================
---
trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/src/org/jboss/tools/jsf/vpe/richfaces/test/jbide/JBIDE1605Test.java 2009-04-08
17:24:26 UTC (rev 14611)
+++
trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/src/org/jboss/tools/jsf/vpe/richfaces/test/jbide/JBIDE1605Test.java 2009-04-08
18:07:00 UTC (rev 14612)
@@ -1,81 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 Red Hat, Inc.
- * Distributed under license by Red Hat, Inc. All rights reserved.
- * This program is made available under the terms of the
- * Eclipse Public License v1.0 which accompanies this distribution,
- * and is available at
http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Red Hat, Inc. - initial API and implementation
- ******************************************************************************/
-
-package org.jboss.tools.jsf.vpe.richfaces.test.jbide;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.eclipse.core.resources.IFile;
-import org.jboss.tools.jsf.vpe.richfaces.test.RichFacesAllTests;
-import org.jboss.tools.vpe.editor.util.HTML;
-import org.jboss.tools.vpe.ui.test.TestUtil;
-import org.jboss.tools.vpe.ui.test.VpeTest;
-import org.mozilla.interfaces.nsIDOMElement;
-import org.mozilla.interfaces.nsIDOMNode;
-
-/**
- * <p>
- * Test case for testing
- * <p>
- * <a
href="https://jira.jboss.org/jira/browse/JBIDE-1605">
- *
https://jira.jboss.org/jira/browse/JBIDE-1605
- * </a> issue.
- *
- * @author Evgenij Stherbin
- */
-public class JBIDE1605Test extends VpeTest {
-
- /** The Constant COMPONENTS_INPLACE_SELECT_INPLACE_SELECT_XHTML. */
- private static final String PAGE =
"components/panelMenuGroup/jbide1605.xhtml"; //$NON-NLS-1$
-
- /** The Constant COUNT_OF_DIVS. */
- private static final int COUNT_OF_DIVS = 13;
-
- /**
- * The Constructor.
- *
- * @param name the name
- */
- public JBIDE1605Test(String name) {
- super(name);
- }
-
- /**
- * Ftest simple JBID e1605.
- *
- * @throws Throwable the throwable
- */
- public void testSimpleJBIDE1605() throws Throwable {
- performTestForVpeComponent((IFile) TestUtil.getComponentPath(PAGE,
RichFacesAllTests.IMPORT_PROJECT_NAME));
- }
-
- /**
- * Test JBID e1605.
- *
- * @throws Throwable the throwable
- */
- public void testJBIDE1605() throws Throwable {
- final nsIDOMElement rst = TestUtil.performTestForRichFacesComponent((IFile)
TestUtil.getComponentPath(PAGE,
- RichFacesAllTests.IMPORT_PROJECT_NAME));
-
- List<nsIDOMNode> elements = new ArrayList<nsIDOMNode>();
-
-// DOMTreeDumper dumper = new DOMTreeDumper();
-// dumper.dumpToStream(System.err, rst);
- TestUtil.findAllElementsByName(rst, elements, HTML.TAG_DIV);
- assertEquals("Size should be equals",COUNT_OF_DIVS,elements.size());
-
- }
-
-
-
-}