Author: mareshkau
Date: 2009-12-18 08:57:23 -0500 (Fri, 18 Dec 2009)
New Revision: 19461
Added:
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsf2test/WebContent/pages/JBIDE/5516/
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsf2test/WebContent/pages/JBIDE/5516/jbide5516.xhtml
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsf2test/WebContent/pages/JBIDE/5516/jbide5516.xhtml.xml
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsf2test/WebContent/taglibs/
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsf2test/WebContent/taglibs/components/
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsf2test/WebContent/taglibs/components/paginator.xhtml
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsf2test/WebContent/taglibs/mareshkau.taglib.xml
Modified:
trunk/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/model/pv/JSFProjectTagLibs.java
trunk/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/web/JSFWebHelper.java
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsf2test/WebContent/WEB-INF/web.xml
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/src/org/jboss/tools/jsf/vpe/jsf/test/jbide/TestForUsingComponentsLibrariesWithDefaultNamespace.java
trunk/jst/plugins/org.jboss.tools.jst.web/src/org/jboss/tools/jst/web/tld/TaglibMapping.java
Log:
https://jira.jboss.org/jira/browse/JBIDE-5516 javax.faces.FACELETS_LIBRARIES processing
has been added
Modified:
trunk/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/model/pv/JSFProjectTagLibs.java
===================================================================
---
trunk/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/model/pv/JSFProjectTagLibs.java 2009-12-18
13:41:32 UTC (rev 19460)
+++
trunk/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/model/pv/JSFProjectTagLibs.java 2009-12-18
13:57:23 UTC (rev 19461)
@@ -71,6 +71,7 @@
XModelObject webRoot = FileSystemsHelper.getWebRoot(getModel());
if(webxml == null || webRoot == null) return null;
XModelObject cp = WebAppHelper.findWebAppContextParam(webxml,
"facelets.LIBRARIES");
+ if(cp == null) cp = WebAppHelper.findWebAppContextParam(webxml,
"javax.faces.FACELETS_LIBRARIES");
if(cp == null) return null;
String value = cp.getAttributeValue("param-value");
if(value == null || value.length() == 0) return null;
Modified:
trunk/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/web/JSFWebHelper.java
===================================================================
---
trunk/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/web/JSFWebHelper.java 2009-12-18
13:41:32 UTC (rev 19460)
+++
trunk/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/web/JSFWebHelper.java 2009-12-18
13:57:23 UTC (rev 19461)
@@ -38,6 +38,13 @@
";"
);
+ public static ConfigFilesData FACELETS_LIBRARIES =
+ new ConfigFilesData(
+ "javax.faces.FACELETS_LIBRARIES",
+ new String[]{},
+ ";"
+ );
+
static {
FACES_CONFIG_DATA.usesDefaultWithoutRegistration = true;
}
@@ -68,8 +75,9 @@
public static void registerFaceletsTaglib(XModel model, String path) throws
XModelException {
registerConfigFile(model, path, FACELET_TAGLIB_DATA);
+ registerConfigFile(model, path, FACELETS_LIBRARIES);
}
-
+
public static XModelObject findInitParam(XModelObject webxml) {
return findInitParam(webxml, FACES_CONFIG_DATA.param);
}
Modified:
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsf2test/WebContent/WEB-INF/web.xml
===================================================================
---
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsf2test/WebContent/WEB-INF/web.xml 2009-12-18
13:41:32 UTC (rev 19460)
+++
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsf2test/WebContent/WEB-INF/web.xml 2009-12-18
13:57:23 UTC (rev 19461)
@@ -8,7 +8,12 @@
<display-name>
JavaServer Faces 2.0 Test Application
</display-name>
-
+
+ <context-param>
+ <param-name>javax.faces.FACELETS_LIBRARIES</param-name>
+ <param-value>/taglibs/mareshkau.taglib.xml</param-value>
+ </context-param>
+
<servlet>
<servlet-name>Faces Servlet</servlet-name>
<servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
Added:
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsf2test/WebContent/pages/JBIDE/5516/jbide5516.xhtml
===================================================================
---
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsf2test/WebContent/pages/JBIDE/5516/jbide5516.xhtml
(rev 0)
+++
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsf2test/WebContent/pages/JBIDE/5516/jbide5516.xhtml 2009-12-18
13:57:23 UTC (rev 19461)
@@ -0,0 +1,11 @@
+<!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:h="http://java.sun.com/jsf/html"
+
xmlns:f="http://java.sun.com/jsf/core"
+
xmlns:aj="https://javaserverfaces.dev.java.net/demo/ajax"
+
xmlns:ui="http://java.sun.com/jsf/facelets"
+ xmlns:ma="http://mareshkau/tags">
+<h:body id="jbide5516">
+<ma:paginator />
+</h:body>
+</html>
Added:
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsf2test/WebContent/pages/JBIDE/5516/jbide5516.xhtml.xml
===================================================================
---
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsf2test/WebContent/pages/JBIDE/5516/jbide5516.xhtml.xml
(rev 0)
+++
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsf2test/WebContent/pages/JBIDE/5516/jbide5516.xhtml.xml 2009-12-18
13:57:23 UTC (rev 19461)
@@ -0,0 +1,30 @@
+<tests>
+<test id="jbide5516">
+<DIV ID="jbide5516">
+<DIV VPE:INCLUDE-ELEMENT="yes" STYLE="-moz-user-modify:
read-only;">
+<TABLE BORDER="0" STYLE="margin-right: auto; margin-left: auto;
-moz-user-modify: read-only;">
+<TBODY>
+<TR>
+<TD>
+<INPUT TYPE="submit" VALUE="1" STYLE="-moz-user-modify:
read-only;"/>
+
+</TD>
+<TD>
+<INPUT TYPE="submit" VALUE="2" STYLE="-moz-user-modify:
read-only;"/>
+
+</TD>
+<TD>
+<INPUT TYPE="submit" VALUE="3" STYLE="-moz-user-modify:
read-only;"/>
+
+</TD>
+<TD>
+<INPUT TYPE="submit" VALUE="4" STYLE="-moz-user-modify:
read-only;"/>
+
+</TD>
+</TR>
+</TBODY>
+</TABLE>
+</DIV>
+</DIV>
+</test>
+</tests>
Added:
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsf2test/WebContent/taglibs/components/paginator.xhtml
===================================================================
---
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsf2test/WebContent/taglibs/components/paginator.xhtml
(rev 0)
+++
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsf2test/WebContent/taglibs/components/paginator.xhtml 2009-12-18
13:57:23 UTC (rev 19461)
@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<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">
+<ui:component>
+ <h:panelGrid style="margin-right:auto;margin-left:auto;"
columns="4">
+ <h:commandButton value="1" type="submit" >
+ </h:commandButton>
+ <h:commandButton value="2" type="submit" >
+ </h:commandButton>
+ <h:commandButton value="3" type="submit" >
+ </h:commandButton>
+ <h:commandButton value="4" type="submit">
+ </h:commandButton>
+ </h:panelGrid>
+</ui:component>
+</html>
Added:
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsf2test/WebContent/taglibs/mareshkau.taglib.xml
===================================================================
---
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsf2test/WebContent/taglibs/mareshkau.taglib.xml
(rev 0)
+++
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsf2test/WebContent/taglibs/mareshkau.taglib.xml 2009-12-18
13:57:23 UTC (rev 19461)
@@ -0,0 +1,10 @@
+<!DOCTYPE facelet-taglib PUBLIC
+ "-//Sun Microsystems, Inc.//DTD Facelet Taglib 1.0//EN"
+ "http://java.sun.com/dtd/web-facesconfig_1_0.dtd">
+<facelet-taglib>
+ <namespace>http://mareshkau/tags</namespace>
+ <tag>
+ <tag-name>paginator</tag-name>
+ <source>components/paginator.xhtml</source>
+ </tag>
+</facelet-taglib>
Modified:
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/src/org/jboss/tools/jsf/vpe/jsf/test/jbide/TestForUsingComponentsLibrariesWithDefaultNamespace.java
===================================================================
---
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/src/org/jboss/tools/jsf/vpe/jsf/test/jbide/TestForUsingComponentsLibrariesWithDefaultNamespace.java 2009-12-18
13:41:32 UTC (rev 19460)
+++
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/src/org/jboss/tools/jsf/vpe/jsf/test/jbide/TestForUsingComponentsLibrariesWithDefaultNamespace.java 2009-12-18
13:57:23 UTC (rev 19461)
@@ -28,7 +28,13 @@
performContentTest("JBIDE/5352/jbide5352.xhtml"); //$NON-NLS-1$
}
-
+ /**
+ * Test Case for
https://jira.jboss.org/jira/browse/JBIDE-5516
+ * @throws Throwable
+ */
+ public void testFaceletsLibrariesSupport() throws Throwable{
+ performContentTest("JBIDE/5516/jbide5516.xhtml"); //$NON-NLS-1$
+ }
@Override
protected String getTestProjectName() {
return JsfAllTests.IMPORT_JSF_20_PROJECT_NAME;
Modified:
trunk/jst/plugins/org.jboss.tools.jst.web/src/org/jboss/tools/jst/web/tld/TaglibMapping.java
===================================================================
---
trunk/jst/plugins/org.jboss.tools.jst.web/src/org/jboss/tools/jst/web/tld/TaglibMapping.java 2009-12-18
13:41:32 UTC (rev 19460)
+++
trunk/jst/plugins/org.jboss.tools.jst.web/src/org/jboss/tools/jst/web/tld/TaglibMapping.java 2009-12-18
13:57:23 UTC (rev 19461)
@@ -90,6 +90,7 @@
XModelObject webRoot = FileSystemsHelper.getWebRoot(model);
if(webxml == null || webRoot == null) return;
XModelObject cp = WebAppHelper.findWebAppContextParam(webxml,
"facelets.LIBRARIES"); //$NON-NLS-1$
+ if(cp == null) cp = WebAppHelper.findWebAppContextParam(webxml,
"javax.faces.FACELETS_LIBRARIES");
if(cp == null) return;
String paths = cp.getAttributeValue("param-value"); //$NON-NLS-1$
if(paths == null || paths.length() == 0) return;