Author: scabanovich
Date: 2011-06-10 17:41:31 -0400 (Fri, 10 Jun 2011)
New Revision: 32024
Added:
trunk/jsf/tests/org.jboss.tools.jsf.text.ext.test/projects/JSF2CompositeOpenOn/WebContent/pages/inputname2.xhtml
trunk/jsf/tests/org.jboss.tools.jsf.text.ext.test/projects/JSF2CompositeOpenOn/WebContent/resources/demo/input2.xhtml
Modified:
trunk/jsf/tests/org.jboss.tools.jsf.text.ext.test/src/org/jboss/tools/jsf/text/ext/test/JSF2CCAttrsOpenOnTest.java
trunk/jsf/tests/org.jboss.tools.jsf.text.ext.test/src/org/jboss/tools/jsf/text/ext/test/JSF2CompositeLibOpenOnTest.java
Log:
JBIDE-9099
https://issues.jboss.org/browse/JBIDE-9099
Added:
trunk/jsf/tests/org.jboss.tools.jsf.text.ext.test/projects/JSF2CompositeOpenOn/WebContent/pages/inputname2.xhtml
===================================================================
---
trunk/jsf/tests/org.jboss.tools.jsf.text.ext.test/projects/JSF2CompositeOpenOn/WebContent/pages/inputname2.xhtml
(rev 0)
+++
trunk/jsf/tests/org.jboss.tools.jsf.text.ext.test/projects/JSF2CompositeOpenOn/WebContent/pages/inputname2.xhtml 2011-06-10
21:41:31 UTC (rev 32024)
@@ -0,0 +1,36 @@
+<!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"
+
xmlns:c="http://java.sun.com/jstl/core"
+
xmlns:ez="http://java.sun.com/jsf/composite/demo">
+
+<f:loadBundle basename="resources" var="pageMsgs" />
+
+<ui:composition template="/templates/common.xhtml"
+
xmlns:jar="http://java.sun.com/jsf/composite/jarPage"
+
xmlns:jar1="http://java.sun.com/jsf/composite/jarPage1">
+
+ <h:outputStylesheet name="stylesheet/style.css"
type="text/css"/>
+
+ <ui:define name="pageTitle">Input User Name</ui:define>
+
+ <ui:define name="pageHeader">Facelets Hello
Application</ui:define>
+
+ <ui:define name="body">
+ <ez:input2 id="inputname" label="${registeredMsgs.prompt}"
value="#{user.name}" action="#{user.sayHello}" submitlabel="Say
Hello"/>
+ <h:outputText
value="${registeredMsgs['demo.long.named.property']}" />
+ <h:outputText value="${pageMsgs.prompt}" />
+ <h:outputText value="${pageMsgs['demo.long.named.property']}"
/>
+ <div class="info">
+ <form>
+ <jar:echo1 echo="Hello" />
+ <jar:echo echo="Hello" />
+ <jar:echo anknownAttr="1" echo="Hello" />
+ <jar1:echo echo="Hello" />
+ </form>
+ </div>
+ </ui:define>
+</ui:composition>
+</html>
Property changes on:
trunk/jsf/tests/org.jboss.tools.jsf.text.ext.test/projects/JSF2CompositeOpenOn/WebContent/pages/inputname2.xhtml
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added:
trunk/jsf/tests/org.jboss.tools.jsf.text.ext.test/projects/JSF2CompositeOpenOn/WebContent/resources/demo/input2.xhtml
===================================================================
---
trunk/jsf/tests/org.jboss.tools.jsf.text.ext.test/projects/JSF2CompositeOpenOn/WebContent/resources/demo/input2.xhtml
(rev 0)
+++
trunk/jsf/tests/org.jboss.tools.jsf.text.ext.test/projects/JSF2CompositeOpenOn/WebContent/resources/demo/input2.xhtml 2011-06-10
21:41:31 UTC (rev 32024)
@@ -0,0 +1,22 @@
+<?xml version="1.0"?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<h:outputText
xmlns="http://www.w3.org/1999/xhtml"
+
xmlns:h="http://java.sun.com/jsf/html"
+
xmlns:cc="http://java.sun.com/jsf/composite">
+
+ <cc:interface>
+ <cc:attribute name="label"/>
+ <cc:attribute name="value" required="true"/>
+ <cc:attribute name="action" required="true"
method-signature="java.lang.String f()"/>
+ <cc:attribute name="submitlabel"/>
+ </cc:interface>
+
+ <cc:implementation>
+ <h:form>
+ <h:outputText value="#{cc.attrs.label}" />
+ <h:inputText value="#{cc.attrs.value}" />
+ <h:commandButton action="#{cc.attrs.action}"
value="#{cc.attrs.submitlabel}" />
+ </h:form>
+ </cc:implementation>
+</h:outputText>
\ No newline at end of file
Property changes on:
trunk/jsf/tests/org.jboss.tools.jsf.text.ext.test/projects/JSF2CompositeOpenOn/WebContent/resources/demo/input2.xhtml
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Modified:
trunk/jsf/tests/org.jboss.tools.jsf.text.ext.test/src/org/jboss/tools/jsf/text/ext/test/JSF2CCAttrsOpenOnTest.java
===================================================================
---
trunk/jsf/tests/org.jboss.tools.jsf.text.ext.test/src/org/jboss/tools/jsf/text/ext/test/JSF2CCAttrsOpenOnTest.java 2011-06-10
21:30:57 UTC (rev 32023)
+++
trunk/jsf/tests/org.jboss.tools.jsf.text.ext.test/src/org/jboss/tools/jsf/text/ext/test/JSF2CCAttrsOpenOnTest.java 2011-06-10
21:41:31 UTC (rev 32024)
@@ -42,6 +42,7 @@
public class JSF2CCAttrsOpenOnTest extends TestCase {
private static final String PROJECT_NAME = "JSF2CompositeOpenOn";
private static final String PAGE_NAME =
PROJECT_NAME+"/WebContent/resources/demo/input.xhtml";
+ private static final String PAGE2_NAME =
PROJECT_NAME+"/WebContent/resources/demo/input2.xhtml";
public IProject project = null;
@@ -125,11 +126,24 @@
}
}
- public void testCCInterfaceAttrs() throws PartInitException, BadLocationException {
- final String editorName = "input.xhtml";
+ /**
+ * This test runs with default root element <html> and default namespace prefix
'composite'.
+ */
+ public void testCCInterfaceAttrs1() throws PartInitException, BadLocationException {
+ testCCInterfaceAttrs(PAGE_NAME, "input.xhtml");
+ }
+
+ /**
+ * In input2.xhtml root element is not html and namespace prefix is 'cc' instead
of default 'composite'.
+ */
+ public void testCCInterfaceAttrs2() throws PartInitException, BadLocationException {
+ testCCInterfaceAttrs(PAGE2_NAME, "input2.xhtml");
+ }
+
+ void testCCInterfaceAttrs(String pageName, String editorName) throws PartInitException,
BadLocationException {
final String elToTest = "cc.attrs.action";
final String atributeAction = "action";
- IEditorPart editor = WorkbenchUtils.openEditor(PAGE_NAME);
+ IEditorPart editor = WorkbenchUtils.openEditor(pageName);
assertTrue(editor instanceof JSPMultiPageEditor);
JobUtils.waitForIdle();
JSPMultiPageEditor jspMultyPageEditor = (JSPMultiPageEditor) editor;
Modified:
trunk/jsf/tests/org.jboss.tools.jsf.text.ext.test/src/org/jboss/tools/jsf/text/ext/test/JSF2CompositeLibOpenOnTest.java
===================================================================
---
trunk/jsf/tests/org.jboss.tools.jsf.text.ext.test/src/org/jboss/tools/jsf/text/ext/test/JSF2CompositeLibOpenOnTest.java 2011-06-10
21:30:57 UTC (rev 32023)
+++
trunk/jsf/tests/org.jboss.tools.jsf.text.ext.test/src/org/jboss/tools/jsf/text/ext/test/JSF2CompositeLibOpenOnTest.java 2011-06-10
21:41:31 UTC (rev 32024)
@@ -39,6 +39,7 @@
public class JSF2CompositeLibOpenOnTest extends TestCase {
private static final String PROJECT_NAME = "JSF2CompositeOpenOn";
private static final String PAGE_NAME =
PROJECT_NAME+"/WebContent/pages/inputname.xhtml";
+ private static final String PAGE2_NAME =
PROJECT_NAME+"/WebContent/pages/inputname2.xhtml";
public IProject project = null;
protected void setUp() {
@@ -57,17 +58,28 @@
}
public void testAttribute() throws Exception {
- testOpenon("<ez:input", "label", "input.xhtml",
"<composite:attribute name=\"label\"/>");
- testOpenon("<ez:input", "value", "input.xhtml",
"<composite:attribute name=\"value\"
required=\"true\"/>");
- testOpenon("<ez:input", "action", "input.xhtml",
"<composite:attribute name=\"action\" required=\"true\"
method-signature=\"java.lang.String f()\"/>");
+ testOpenon(PAGE_NAME, "<ez:input", "label",
"input.xhtml", "<composite:attribute
name=\"label\"/>");
+ testOpenon(PAGE_NAME, "<ez:input", "value",
"input.xhtml", "<composite:attribute name=\"value\"
required=\"true\"/>");
+ testOpenon(PAGE_NAME, "<ez:input", "action",
"input.xhtml", "<composite:attribute name=\"action\"
required=\"true\" method-signature=\"java.lang.String
f()\"/>");
}
+ /**
+ * Root element is not html and namespace prefix is 'cc' instead of default
'composite.
+ *
+ * @throws Exception
+ */
+ public void testAttribute2() throws Exception {
+ testOpenon(PAGE2_NAME, "<ez:input2", "label",
"input2.xhtml", "<cc:attribute name=\"label\"/>");
+ testOpenon(PAGE2_NAME, "<ez:input2", "value",
"input2.xhtml", "<cc:attribute name=\"value\"
required=\"true\"/>");
+ testOpenon(PAGE2_NAME, "<ez:input2", "action",
"input2.xhtml", "<cc:attribute name=\"action\"
required=\"true\" method-signature=\"java.lang.String
f()\"/>");
+ }
+
public void testTag() throws Exception {
- testOpenon("<ez:input", "input", "input.xhtml",
null);
+ testOpenon(PAGE_NAME, "<ez:input", "input",
"input.xhtml", null);
}
- private void testOpenon(String text, String subtext, String editorName, String
targetSelection) throws PartInitException, BadLocationException {
- IEditorPart editor = WorkbenchUtils.openEditor(PAGE_NAME);
+ private void testOpenon(String page, String text, String subtext, String editorName,
String targetSelection) throws PartInitException, BadLocationException {
+ IEditorPart editor = WorkbenchUtils.openEditor(page);
assertTrue(editor instanceof JSPMultiPageEditor);
JobUtils.waitForIdle();
JSPMultiPageEditor jspMultyPageEditor = (JSPMultiPageEditor) editor;