minor code cleanup
git-svn-id: https://svn.apache.org/repos/asf/myfaces/extensions/scripting/trunk@939651 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/extscript-core-root/extscript-core/src/main/java/org/apache/myfaces/extensions/scripting/api/ScriptingConst.java b/extscript-core-root/extscript-core/src/main/java/org/apache/myfaces/extensions/scripting/api/ScriptingConst.java
index 6032011..ce5769b 100644
--- a/extscript-core-root/extscript-core/src/main/java/org/apache/myfaces/extensions/scripting/api/ScriptingConst.java
+++ b/extscript-core-root/extscript-core/src/main/java/org/apache/myfaces/extensions/scripting/api/ScriptingConst.java
@@ -115,4 +115,5 @@
" <dispatcher>ERROR</dispatcher>\n" +
" </filter-mapping>";
static final String EXT_VAL_REQ_KEY = "org.apache.myfaces.extension.scripting.clearExtvalCache_Done";
+ public static final String JAVAX_FACES = "javax.faces";
}
diff --git a/extscript-core-root/extscript-core/src/main/java/org/apache/myfaces/extensions/scripting/core/util/WeavingContext.java b/extscript-core-root/extscript-core/src/main/java/org/apache/myfaces/extensions/scripting/core/util/WeavingContext.java
index 6b647ae..5a2ade1 100644
--- a/extscript-core-root/extscript-core/src/main/java/org/apache/myfaces/extensions/scripting/core/util/WeavingContext.java
+++ b/extscript-core-root/extscript-core/src/main/java/org/apache/myfaces/extensions/scripting/core/util/WeavingContext.java
@@ -190,7 +190,7 @@
*/
@SuppressWarnings("unused")
public static boolean isFilterEnabled() {
- return _filterEnabled.get();
+ return _filterEnabled!= null && _filterEnabled.get();
}
/**
diff --git a/extscript-core-root/extscript-myfaces2-extensions/faces-config.NavData b/extscript-core-root/extscript-myfaces2-extensions/faces-config.NavData
index e69de29..298bfc5 100644
--- a/extscript-core-root/extscript-myfaces2-extensions/faces-config.NavData
+++ b/extscript-core-root/extscript-myfaces2-extensions/faces-config.NavData
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<Scene Scope="Project" version="2">
+ <Scope Scope="Faces Configuration Only"/>
+ <Scope Scope="Project"/>
+ <Scope Scope="All Faces Configurations"/>
+</Scene>
diff --git a/extscript-core-root/extscript-myfaces2-extensions/src/main/java/org/apache/myfaces/extensions/scripting/jsf2/annotation/BaseAnnotationScanListener.java b/extscript-core-root/extscript-myfaces2-extensions/src/main/java/org/apache/myfaces/extensions/scripting/jsf2/annotation/BaseAnnotationScanListener.java
index da8276a..55b66cb 100644
--- a/extscript-core-root/extscript-myfaces2-extensions/src/main/java/org/apache/myfaces/extensions/scripting/jsf2/annotation/BaseAnnotationScanListener.java
+++ b/extscript-core-root/extscript-myfaces2-extensions/src/main/java/org/apache/myfaces/extensions/scripting/jsf2/annotation/BaseAnnotationScanListener.java
@@ -27,12 +27,17 @@
import java.util.logging.Logger;
/**
+ * Base Class for the JSF2 annotation scanning
+ * (note we do not rely on the impl
+ * for annotation scanning because in the long
+ * run we want to support Mojarra)
+ *
* @author Werner Punz (latest modification by $Author$)
* @version $Revision$ $Date$
*/
public class BaseAnnotationScanListener {
- Logger log = Logger.getLogger(this.getClass().getName());
+ Logger _log = Logger.getLogger(this.getClass().getName());
static Map<String, Object> _alreadyRegistered = new ConcurrentHashMap<String, Object>(8, 0.75f, 1);
protected RuntimeConfig getRuntimeConfig() {
diff --git a/extscript-core-root/extscript-myfaces2-extensions/src/main/java/org/apache/myfaces/extensions/scripting/jsf2/annotation/BeanImplementationListener.java b/extscript-core-root/extscript-myfaces2-extensions/src/main/java/org/apache/myfaces/extensions/scripting/jsf2/annotation/BeanImplementationListener.java
index 1dcbf1b..364f259 100644
--- a/extscript-core-root/extscript-myfaces2-extensions/src/main/java/org/apache/myfaces/extensions/scripting/jsf2/annotation/BeanImplementationListener.java
+++ b/extscript-core-root/extscript-myfaces2-extensions/src/main/java/org/apache/myfaces/extensions/scripting/jsf2/annotation/BeanImplementationListener.java
@@ -30,12 +30,12 @@
import java.util.logging.Level;
/**
+ * bean implementation listener which registers new java sources
+ * into the runtime config, note this class is not thread safe
+ * it is only allowed to be called from a single thread
+ *
* @author Werner Punz (latest modification by $Author$)
* @version $Revision$ $Date$
- * <p/>
- * bean implementation listener which registers new java sources
- * into the runtime config, note this class is not thread safe
- * it is only allowed to be called from a single thread
*/
public class BeanImplementationListener extends BaseAnnotationScanListener implements AnnotationScanListener {
@@ -101,14 +101,14 @@
/*since we reprocess the managed properties we can handle them here by clearing them first*/
mbean.getManagedProperties().clear();
for (Field field : fields) {
- if (log.isLoggable(Level.FINEST)) {
- log.log(Level.FINEST, " Scanning field '" + field.getName() + "'");
+ if (_log.isLoggable(Level.FINEST)) {
+ _log.log(Level.FINEST, " Scanning field '" + field.getName() + "'");
}
javax.faces.bean.ManagedProperty property = field
.getAnnotation(ManagedProperty.class);
if (property != null) {
- if (log.isLoggable(Level.FINE)) {
- log.log(Level.FINE, " Field '" + field.getName()
+ if (_log.isLoggable(Level.FINE)) {
+ _log.log(Level.FINE, " Field '" + field.getName()
+ "' has a @ManagedProperty annotation");
}
diff --git a/extscript-core-root/extscript-myfaces2-extensions/src/main/java/org/apache/myfaces/extensions/scripting/jsf2/annotation/BehaviorImplementationListener.java b/extscript-core-root/extscript-myfaces2-extensions/src/main/java/org/apache/myfaces/extensions/scripting/jsf2/annotation/BehaviorImplementationListener.java
index b22a1be..d33384b 100644
--- a/extscript-core-root/extscript-myfaces2-extensions/src/main/java/org/apache/myfaces/extensions/scripting/jsf2/annotation/BehaviorImplementationListener.java
+++ b/extscript-core-root/extscript-myfaces2-extensions/src/main/java/org/apache/myfaces/extensions/scripting/jsf2/annotation/BehaviorImplementationListener.java
@@ -19,7 +19,6 @@
package org.apache.myfaces.extensions.scripting.jsf2.annotation;
import org.apache.myfaces.extensions.scripting.api.AnnotationScanListener;
-import org.apache.myfaces.extensions.scripting.jsf2.annotation.purged.PurgedComponent;
import org.apache.myfaces.extensions.scripting.jsf2.annotation.purged.PurgedBehavior;
import javax.faces.component.behavior.FacesBehavior;
@@ -47,8 +46,8 @@
protected void addEntity(Class clazz, String val) {
- if (log.isLoggable(Level.FINEST)) {
- log.log(Level.FINEST, "addBehavior(" + val + ","
+ if (_log.isLoggable(Level.FINEST)) {
+ _log.log(Level.FINEST, "addBehavior(" + val + ","
+ clazz.getName() + ")");
}
getApplication().addBehavior(val, clazz.getName());
diff --git a/extscript-core-root/extscript-myfaces2-extensions/src/main/java/org/apache/myfaces/extensions/scripting/jsf2/annotation/BehaviorRendererImplementationListener.java b/extscript-core-root/extscript-myfaces2-extensions/src/main/java/org/apache/myfaces/extensions/scripting/jsf2/annotation/BehaviorRendererImplementationListener.java
index a7f3c99..f012b05 100644
--- a/extscript-core-root/extscript-myfaces2-extensions/src/main/java/org/apache/myfaces/extensions/scripting/jsf2/annotation/BehaviorRendererImplementationListener.java
+++ b/extscript-core-root/extscript-myfaces2-extensions/src/main/java/org/apache/myfaces/extensions/scripting/jsf2/annotation/BehaviorRendererImplementationListener.java
@@ -19,7 +19,6 @@
package org.apache.myfaces.extensions.scripting.jsf2.annotation;
import org.apache.myfaces.extensions.scripting.jsf2.annotation.purged.PurgedClientBehaviorRenderer;
-import org.apache.myfaces.extensions.scripting.jsf2.annotation.purged.PurgedRenderer;
import javax.faces.FactoryFinder;
import javax.faces.context.FacesContext;
@@ -166,9 +165,9 @@
renderKit.addClientBehaviorRenderer(entry.getRendererType(), PurgedClientBehaviorRenderer.class.newInstance());
}
} catch (InstantiationException e) {
- log.log(Level.SEVERE, "", e);
+ _log.log(Level.SEVERE, "", e);
} catch (IllegalAccessException e) {
- log.log(Level.SEVERE, "", e);
+ _log.log(Level.SEVERE, "", e);
}
}
diff --git a/extscript-core-root/extscript-myfaces2-extensions/src/main/java/org/apache/myfaces/extensions/scripting/jsf2/annotation/ComponentImplementationListener.java b/extscript-core-root/extscript-myfaces2-extensions/src/main/java/org/apache/myfaces/extensions/scripting/jsf2/annotation/ComponentImplementationListener.java
index ff6fdd1..8d9d124 100644
--- a/extscript-core-root/extscript-myfaces2-extensions/src/main/java/org/apache/myfaces/extensions/scripting/jsf2/annotation/ComponentImplementationListener.java
+++ b/extscript-core-root/extscript-myfaces2-extensions/src/main/java/org/apache/myfaces/extensions/scripting/jsf2/annotation/ComponentImplementationListener.java
@@ -19,7 +19,6 @@
package org.apache.myfaces.extensions.scripting.jsf2.annotation;
import org.apache.myfaces.extensions.scripting.api.AnnotationScanListener;
-import org.apache.myfaces.extensions.scripting.core.util.WeavingContext;
import org.apache.myfaces.extensions.scripting.jsf2.annotation.purged.PurgedComponent;
import javax.faces.component.FacesComponent;
@@ -47,8 +46,8 @@
protected void addEntity(Class clazz, String val) {
- if (log.isLoggable(Level.FINEST)) {
- log.log(Level.FINEST, "addComponent(" + val + "," + clazz.getName() + ")");
+ if (_log.isLoggable(Level.FINEST)) {
+ _log.log(Level.FINEST, "addComponent(" + val + "," + clazz.getName() + ")");
}
getApplication().addComponent(val, clazz.getName());
//register the renderer if not registered
diff --git a/extscript-core-root/extscript-myfaces2-extensions/src/main/java/org/apache/myfaces/extensions/scripting/jsf2/annotation/GenericAnnotationScanner.java b/extscript-core-root/extscript-myfaces2-extensions/src/main/java/org/apache/myfaces/extensions/scripting/jsf2/annotation/GenericAnnotationScanner.java
index 340e90b..c0ec34c 100644
--- a/extscript-core-root/extscript-myfaces2-extensions/src/main/java/org/apache/myfaces/extensions/scripting/jsf2/annotation/GenericAnnotationScanner.java
+++ b/extscript-core-root/extscript-myfaces2-extensions/src/main/java/org/apache/myfaces/extensions/scripting/jsf2/annotation/GenericAnnotationScanner.java
@@ -18,10 +18,7 @@
*/
package org.apache.myfaces.extensions.scripting.jsf2.annotation;
-import org.apache.myfaces.extensions.scripting.api.AnnotationScanListener;
-import org.apache.myfaces.extensions.scripting.api.ClassScanListener;
-import org.apache.myfaces.extensions.scripting.api.ClassScanner;
-import org.apache.myfaces.extensions.scripting.api.ScriptingWeaver;
+import org.apache.myfaces.extensions.scripting.api.*;
import org.apache.myfaces.extensions.scripting.core.util.WeavingContext;
import org.apache.myfaces.extensions.scripting.loaders.java.ScannerClassloader;
import org.apache.myfaces.extensions.scripting.refresh.ReloadingMetadata;
@@ -47,7 +44,6 @@
Map<String, String> _registeredAnnotations = new HashMap<String, String>();
LinkedList<String> _sourcePaths = new LinkedList<String>();
- private static final String JAVAX_FACES = "javax.faces";
ScriptingWeaver _weaver = null;
@@ -68,7 +64,7 @@
List<java.lang.annotation.Annotation> retVal = new ArrayList<java.lang.annotation.Annotation>(annotations.length);
for (java.lang.annotation.Annotation annotation : annotations) {
- if (annotation.annotationType().getName().startsWith(JAVAX_FACES)) {
+ if (annotation.annotationType().getName().startsWith(ScriptingConst.JAVAX_FACES)) {
retVal.add(annotation);
}
diff --git a/extscript-core-root/extscript-myfaces2-extensions/src/main/java/org/apache/myfaces/extensions/scripting/jsf2/annotation/IOCResolver.java b/extscript-core-root/extscript-myfaces2-extensions/src/main/java/org/apache/myfaces/extensions/scripting/jsf2/annotation/IOCResolver.java
deleted file mode 100644
index 4e3789e..0000000
--- a/extscript-core-root/extscript-myfaces2-extensions/src/main/java/org/apache/myfaces/extensions/scripting/jsf2/annotation/IOCResolver.java
+++ /dev/null
@@ -1,35 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.myfaces.extensions.scripting.jsf2.annotation;
-
-/**
- * @author Werner Punz (latest modification by $Author$)
- * @version $Revision$ $Date$
- * <p/>
- * parses an existing object
- * and resolves its ioc patterns
- * and triggers the reloading of its managed beans
- * wherever needed
- * <p/>
- * <p/>
- * TODO implement this
- */
-
-public class IOCResolver {
-}
diff --git a/extscript-core-root/extscript-myfaces2-extensions/src/main/java/org/apache/myfaces/extensions/scripting/jsf2/annotation/MapEntityAnnotationScanner.java b/extscript-core-root/extscript-myfaces2-extensions/src/main/java/org/apache/myfaces/extensions/scripting/jsf2/annotation/MapEntityAnnotationScanner.java
index 13f0f39..c39d5a0 100644
--- a/extscript-core-root/extscript-myfaces2-extensions/src/main/java/org/apache/myfaces/extensions/scripting/jsf2/annotation/MapEntityAnnotationScanner.java
+++ b/extscript-core-root/extscript-myfaces2-extensions/src/main/java/org/apache/myfaces/extensions/scripting/jsf2/annotation/MapEntityAnnotationScanner.java
@@ -27,6 +27,9 @@
import java.lang.annotation.Annotation;
/**
+ * Annotation scanner which scans generically
+ * an annotation with more than one entry values.
+ *
* @author Werner Punz (latest modification by $Author$)
* @version $Revision$ $Date$
*/
diff --git a/extscript-core-root/extscript-myfaces2-extensions/src/main/java/org/apache/myfaces/extensions/scripting/jsf2/annotation/RendererImplementationListener.java b/extscript-core-root/extscript-myfaces2-extensions/src/main/java/org/apache/myfaces/extensions/scripting/jsf2/annotation/RendererImplementationListener.java
index 79ae391..7bd4679 100644
--- a/extscript-core-root/extscript-myfaces2-extensions/src/main/java/org/apache/myfaces/extensions/scripting/jsf2/annotation/RendererImplementationListener.java
+++ b/extscript-core-root/extscript-myfaces2-extensions/src/main/java/org/apache/myfaces/extensions/scripting/jsf2/annotation/RendererImplementationListener.java
@@ -29,7 +29,6 @@
import javax.faces.render.Renderer;
import java.util.HashMap;
import java.util.Map;
-import java.util.TreeMap;
import java.util.logging.Level;
/**
@@ -78,7 +77,7 @@
renderKitId == null && toCompare.getRenderKitId() == null) {
return true;
}
- //TODO a simple hash compare should be enough for almost if not all cases since the hashes have a very low propability to be the same
+
return componentFamily.equals(toCompare.getComponentFamily()) &&
rendererType.equals(toCompare.getRendererType()) &&
renderKitId.equals(toCompare.getRenderKitId());
@@ -129,8 +128,8 @@
_inverseIndex.put(entry, clazz.getName());
_alreadyRegistered.put(clazz.getName(), entry);
- if (log.isLoggable(Level.FINEST)) {
- log.log(Level.FINEST, "addRenderer(" + renderKitId + ", "
+ if (_log.isLoggable(Level.FINEST)) {
+ _log.log(Level.FINEST, "addRenderer(" + renderKitId + ", "
+ entry.getComponentFamily() + ", " + entry.getRendererType()
+ ", " + clazz.getName() + ")");
}
@@ -138,9 +137,9 @@
try {
renderKit.addRenderer(entry.getComponentFamily(), entry.getRendererType(), (Renderer) clazz.newInstance());
} catch (InstantiationException e) {
- log.log(Level.SEVERE, "", e);
+ _log.log(Level.SEVERE, "", e);
} catch (IllegalAccessException e) {
- log.log(Level.SEVERE, "", e);
+ _log.log(Level.SEVERE, "", e);
}
}
@@ -193,9 +192,9 @@
renderKit.addRenderer(entry.getComponentFamily(), entry.getRendererType(), PurgedRenderer.class.newInstance());
}
} catch (InstantiationException e) {
- log.log(Level.SEVERE, "", e);
+ _log.log(Level.SEVERE, "", e);
} catch (IllegalAccessException e) {
- log.log(Level.SEVERE, "", e);
+ _log.log(Level.SEVERE, "", e);
}
}
}
diff --git a/extscript-core-root/extscript-myfaces2-extensions/src/main/java/org/apache/myfaces/extensions/scripting/jsf2/annotation/SingleEntityAnnotationListener.java b/extscript-core-root/extscript-myfaces2-extensions/src/main/java/org/apache/myfaces/extensions/scripting/jsf2/annotation/SingleEntityAnnotationListener.java
index 6c47d98..42c36c5 100644
--- a/extscript-core-root/extscript-myfaces2-extensions/src/main/java/org/apache/myfaces/extensions/scripting/jsf2/annotation/SingleEntityAnnotationListener.java
+++ b/extscript-core-root/extscript-myfaces2-extensions/src/main/java/org/apache/myfaces/extensions/scripting/jsf2/annotation/SingleEntityAnnotationListener.java
@@ -25,6 +25,9 @@
import java.lang.annotation.Annotation;
/**
+ * annotation scanner which generalized
+ * scans annotations with one value entry
+ *
* @author Werner Punz (latest modification by $Author$)
* @version $Revision$ $Date$
*/
diff --git a/extscript-examples/myfaces20-example/src/main/webapp/TestJavascriptBean.xhtml b/extscript-examples/myfaces20-example/src/main/webapp/TestJavascriptBean.xhtml
index 59abf12..46787d9 100644
--- a/extscript-examples/myfaces20-example/src/main/webapp/TestJavascriptBean.xhtml
+++ b/extscript-examples/myfaces20-example/src/main/webapp/TestJavascriptBean.xhtml
@@ -13,7 +13,7 @@
<div class="centerDiv">
<h:form>
<h:panelGroup styleClass="stdBoxBig">
- <h:outputFormat value="#{scriptTestBean.hello}" />
+ <h:outputFormat value="#{scriptTestBean.hello}"/>
</h:panelGroup>
</h:form>
</div>
diff --git a/extscript-examples/myfaces20-example/src/main/webapp/WEB-INF/faces-config.xml b/extscript-examples/myfaces20-example/src/main/webapp/WEB-INF/faces-config.xml
index 65a7557..fc9b5c7 100644
--- a/extscript-examples/myfaces20-example/src/main/webapp/WEB-INF/faces-config.xml
+++ b/extscript-examples/myfaces20-example/src/main/webapp/WEB-INF/faces-config.xml
@@ -115,6 +115,11 @@
</renderer>
</render-kit>
<application>
+ <!-- disable an Ext-Val warning which is triggered falsely by the latest version -->
+ <system-event-listener>
+ <system-event-listener-class>org.apache.myfaces.blank.SuppressExtValWarningStartupListener</system-event-listener-class>
+ <system-event-class>javax.faces.event.PostConstructApplicationEvent</system-event-class>
+ </system-event-listener>
<system-event-listener>
<system-event-listener-class>org.apache.myfaces.javaloader.eventTest.TestListener</system-event-listener-class>
<system-event-class>javax.faces.event.PreRenderViewEvent</system-event-class>
diff --git a/extscript-examples/myfaces20-example/src/main/webapp/beanValidation.xhtml b/extscript-examples/myfaces20-example/src/main/webapp/beanValidation.xhtml
index a6ad881..af3637c 100644
--- a/extscript-examples/myfaces20-example/src/main/webapp/beanValidation.xhtml
+++ b/extscript-examples/myfaces20-example/src/main/webapp/beanValidation.xhtml
@@ -7,12 +7,17 @@
</head>
<body>
-<ui:composition template="/template.xhtml">
+<ui:composition template="/template.xhtml">
<ui:define name="body">
<h1>
- <h:outputText value="Hello this form should trigger some bean validation via ext-val"/>
+ <h:outputText
+ value="A simple bean validation example using Apache MyFaces Ext-Val and the Bean Validation RI"/>
</h1>
+ <h2>
+ <h:outputText
+ value="You can edit the corresponding files under /WEB-INF/java/org/apache/myfaces/javaloader/beanvalidationtesting/"/>
+ </h2>
<h:form id="form2">
<h:panelGrid id="grid" columns="1" styleClass="stdBox">
<h:panelGrid columns="3">
@@ -27,7 +32,6 @@
<h:commandLink id="link1" action="#{validationController.validateSubmit}">
<h:outputText id="linkText" value="Submit"/>
</h:commandLink>
-
</h:panelGrid>
</h:form>
</ui:define>
diff --git a/extscript-examples/myfaces20-example/src/main/webapp/blog.xhtml b/extscript-examples/myfaces20-example/src/main/webapp/blog.xhtml
index 2dcef4a..efd6f1f 100644
--- a/extscript-examples/myfaces20-example/src/main/webapp/blog.xhtml
+++ b/extscript-examples/myfaces20-example/src/main/webapp/blog.xhtml
@@ -11,14 +11,11 @@
</head>
<body>
<ui:composition template="/template.xhtml">
-
<ui:define name="body">
<h1>
<ui:insert name="title">Ext-Scripting Groovy Blog Example</ui:insert>
</h1>
-
<h:form id="form">
-
<div class="left" style="margin-top: 3px;">
<h:panelGrid id="grid" columns="1" styleClass="stdBox">
<h:outputText id="title1" styleClass="title" value="#{blogView.title}"/>
@@ -40,11 +37,9 @@
</h:panelGrid>
<hr/>
<h:commandButton styleClass="btn" action="#{blogView.addEntry}" value="Add Blog Entry">
-
</h:commandButton>
</h:panelGrid>
</div>
-
<h:panelGrid id="content" columns="1" styleClass="right">
<ui:repeat value="#{blogService.blogEntries}" var="item">
<h:panelGrid columns="1" styleClass="messageBox">
@@ -60,7 +55,6 @@
<br/>
</ui:repeat>
</h:panelGrid>
-
</h:form>
</ui:define>
</ui:composition>
diff --git a/extscript-examples/myfaces20-example/src/main/webapp/compilerWindow.xhtml b/extscript-examples/myfaces20-example/src/main/webapp/compilerWindow.xhtml
index 25a9806..9623d91 100644
--- a/extscript-examples/myfaces20-example/src/main/webapp/compilerWindow.xhtml
+++ b/extscript-examples/myfaces20-example/src/main/webapp/compilerWindow.xhtml
@@ -8,28 +8,16 @@
</head>
<body>
<ui:composition template="/template.xhtml">
+ <ui:define name="additionalHeadIncludes">
+ <link type="text/css" rel="stylesheet" href="#{resource['styles:compilerWindow.css']}"/>
+ </ui:define>
+
<ui:define name="body">
- <style type="text/css">
- div#menu {
- display: none;
- }
-
-
- div.centerDiv {
- width: auto;
- }
- div.errorBox {
- width: auto;
- }
-
- div.errorBox .line {
- width: auto;
- }
- </style>
<!-- also we need to add some values here -->
<div class="centerDiv">
<h:form>
- <h:outputLink style="margin-left: 10px; color: white; font-weight: bold;" value="./compilerWindow.jsf" >Refresh Compiler output >></h:outputLink>
+ <h:outputLink style="margin-left: 10px; color: white; font-weight: bold;"
+ value="./compilerWindow.jsf">Refresh Compiler output >></h:outputLink>
</h:form>
</div>
</ui:define>
diff --git a/extscript-examples/myfaces20-example/src/main/webapp/complexBean.xhtml b/extscript-examples/myfaces20-example/src/main/webapp/complexBean.xhtml
index 1c44513..618a665 100644
--- a/extscript-examples/myfaces20-example/src/main/webapp/complexBean.xhtml
+++ b/extscript-examples/myfaces20-example/src/main/webapp/complexBean.xhtml
@@ -2,29 +2,19 @@
"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:f="http://java.sun.com/jsf/core" xmlns:h="http://java.sun.com/jsf/html">
-<head>
+<h:head>
<title>Hello World</title>
-</head>
+</h:head>
<h:body>
-
-
- <h1> this example tests complex bean relationships for refreshing</h1>
- <h:form id="myForm">
- <h:outputScript name="jsf.js" library="javax.faces" target="head"/>
-
-
- <h:inputText value="#{myBean.test}">
- <f:ajax render="#{myBean.bindingMyTest.clientId}" event="keyup"/>
- </h:inputText>
- <h:inputText id="myText" value="#{myBean.test}" binding="#{myBean.bindingMyTest}"/>
-
-
- <h:outputText value="#{receiver.myBean.hello}" />
- <h:outputText value="#{receiver.myBean.secondaryBean.hello}" />
-
-
- </h:form>
-
-
+ <h1><h:outputFormat value="This example tests complex bean relationships for refreshing"/></h1>
+ <h:form id="myForm">
+ <h:outputScript name="jsf.js" library="javax.faces" target="head"/>
+ <h:inputText value="#{myBean.test}">
+ <f:ajax render="#{myBean.bindingMyTest.clientId}" event="keyup"/>
+ </h:inputText>
+ <h:inputText id="myText" value="#{myBean.test}" binding="#{myBean.bindingMyTest}"/>
+ <h:outputText value="#{receiver.myBean.hello}"/>
+ <h:outputText value="#{receiver.myBean.secondaryBean.hello}"/>
+ </h:form>
</h:body>
</html>
diff --git a/extscript-examples/myfaces20-example/src/main/webapp/componentTest.xhtml b/extscript-examples/myfaces20-example/src/main/webapp/componentTest.xhtml
index da8c156..8ac13b8 100644
--- a/extscript-examples/myfaces20-example/src/main/webapp/componentTest.xhtml
+++ b/extscript-examples/myfaces20-example/src/main/webapp/componentTest.xhtml
@@ -12,18 +12,13 @@
<!-- also we need to add some values here -->
<div class="centerDiv">
<h:form>
-
-
-
<h:panelGroup styleClass="stdBoxBig">
-
+
<h:commandLink style="color: white;" value="press me" action="#{javatestbean.doAction}"/>
<grv:testcomponent2 testAttr="vvv" testAttr3="Attribute 3 set"
testAttr4="Attribute 4 set and showing"/>
-
</h:panelGroup>
-
- <grv:tagHandlertest />
+ <grv:tagHandlertest/>
</h:form>
</div>
</ui:define>
diff --git a/extscript-examples/myfaces20-example/src/main/webapp/helloWorld.xhtml b/extscript-examples/myfaces20-example/src/main/webapp/helloWorld.xhtml
index 48038cf..3833c74 100644
--- a/extscript-examples/myfaces20-example/src/main/webapp/helloWorld.xhtml
+++ b/extscript-examples/myfaces20-example/src/main/webapp/helloWorld.xhtml
@@ -16,8 +16,7 @@
<h:form id="form">
<h:panelGroup styleClass="left">
<h:panelGroup styleClass="stdBox">
- <h:messages />
-
+ <h:messages/>
<h3>Validator Test 1</h3>
<h:outputText id="output1" value="Please enter your name"/>
<h:outputText value="#{javatestbean4.hello}"/>
@@ -40,16 +39,15 @@
<br/>
<h:outputFormat escape="false" value="#{javatestbean.sayHello}"/>
</h:panelGroup>
- <!--
+
<h:panelGroup styleClass="stdBox">
<h3>Converter Test 1</h3>
please insert "hello world" into the input field
- <h:inputText>
+ <h:inputText value="#{testbean.xxx}">
<grv:testConverter1/>
<grv:testValidator1/>
</h:inputText>
</h:panelGroup>
- -->
<h:panelGroup styleClass="stdBox">
<h3>Action Test 1</h3>
<h:commandButton value="Press me dynamic" action="#{testbean.doit}"/>
diff --git a/extscript-examples/myfaces20-example/src/main/webapp/helloWorld2.xhtml b/extscript-examples/myfaces20-example/src/main/webapp/helloWorld2.xhtml
index ce00e66..6c0e784 100644
--- a/extscript-examples/myfaces20-example/src/main/webapp/helloWorld2.xhtml
+++ b/extscript-examples/myfaces20-example/src/main/webapp/helloWorld2.xhtml
@@ -7,12 +7,12 @@
<title>Hello World 2</title>
</h:head>
<h:body>
-<ui:composition template="/template.xhtml">
- <ui:define name="body">
- <h1 style="color: yellow;">
- <h:outputText value="#{helloBean.hello}" />
- </h1>
- </ui:define>
-</ui:composition>
+ <ui:composition template="/template.xhtml">
+ <ui:define name="body">
+ <h1 style="color: yellow;">
+ <h:outputText value="#{helloBean.hello}"/>
+ </h1>
+ </ui:define>
+ </ui:composition>
</h:body>
</html>
\ No newline at end of file
diff --git a/extscript-examples/myfaces20-example/src/main/webapp/index.jsp b/extscript-examples/myfaces20-example/src/main/webapp/index.jsp
index 4d0669f..330de79 100644
--- a/extscript-examples/myfaces20-example/src/main/webapp/index.jsp
+++ b/extscript-examples/myfaces20-example/src/main/webapp/index.jsp
@@ -1,5 +1,4 @@
<%@ page session="false" %>
<%
response.sendRedirect("helloWorld.jsf");
-//(new org.apache.myfaces.blank.HelloWorldController()).getName();
%>
\ No newline at end of file
diff --git a/extscript-examples/myfaces20-example/src/main/webapp/javablog.xhtml b/extscript-examples/myfaces20-example/src/main/webapp/javablog.xhtml
index 820805f..6b0851f 100644
--- a/extscript-examples/myfaces20-example/src/main/webapp/javablog.xhtml
+++ b/extscript-examples/myfaces20-example/src/main/webapp/javablog.xhtml
@@ -12,21 +12,15 @@
<ui:define name="body">
<h:outputScript name="jsf.js" library="javax.faces"
target="head"/>
-
-
<h1>
<ui:insert name="title">Ext-Scripting Javablog Example</ui:insert>
</h1>
-
<h:form id="form">
-
<div class="left" style="margin-top: 3px;">
<h:panelGrid id="grid" columns="1" styleClass="stdBox">
<h:outputFormat id="title1" escape="false" styleClass="title" value="#{javaBlogView.title}"/>
<h:outputFormat id="title11" escape="false" styleClass="title1" value="#{javaBlogView.title1}"/>
-
<hr/>
-
<h:panelGrid columns="2" columnClasses="label, input">
<h:outputText value="First Name"/>
<h:inputText value="#{javaBlogView.firstName}"/>
@@ -45,7 +39,6 @@
</h:commandButton>
</h:panelGrid>
</div>
-
<h:panelGrid id="content" columns="1" styleClass="right">
<ui:repeat value="#{javaBlogService.blogEntries}" var="item">
<h:panelGrid columns="1" styleClass="messageBox">
@@ -61,7 +54,6 @@
<br/>
</ui:repeat>
</h:panelGrid>
-
</h:form>
</ui:define>
</ui:composition>
diff --git a/extscript-examples/myfaces20-example/src/main/webapp/resources/styles/compilerWindow.css b/extscript-examples/myfaces20-example/src/main/webapp/resources/styles/compilerWindow.css
new file mode 100644
index 0000000..0e98754
--- /dev/null
+++ b/extscript-examples/myfaces20-example/src/main/webapp/resources/styles/compilerWindow.css
@@ -0,0 +1,15 @@
+div#menu {
+ display: none;
+}
+
+div.centerDiv {
+ width: auto;
+}
+
+div.errorBox {
+ width: auto;
+}
+
+div.errorBox .line {
+ width: auto;
+}
\ No newline at end of file
diff --git a/extscript-examples/myfaces20-example/src/main/webapp/template.xhtml b/extscript-examples/myfaces20-example/src/main/webapp/template.xhtml
index cb3092a..a5c9708 100644
--- a/extscript-examples/myfaces20-example/src/main/webapp/template.xhtml
+++ b/extscript-examples/myfaces20-example/src/main/webapp/template.xhtml
@@ -8,51 +8,43 @@
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<title>Myfaces Example Facelets</title>
-
<link type="text/css" rel="stylesheet" href="#{resource['styles:main.css']}"/>
-
-
+ <ui:insert name="additionalHeadIncludes">
+ </ui:insert>
</h:head>
<h:body>
-
-<div id="menu">
- <h:panelGroup>
- <h:outputLink value="./helloWorld.jsf">Hello world Example</h:outputLink>
- <h:outputLink value="./blog.jsf">Groovy Blogging Example</h:outputLink>
- <h:outputLink value="./javablog.jsf">Java Blogging Example</h:outputLink>
- <h:outputLink value="./componentTest.jsf">Component Testcase</h:outputLink>
- <h:outputLink value="./compilerWindow.jsf" target="_blank">Compiler Output</h:outputLink>
+ <div id="menu">
+ <h:panelGroup>
+ <h:outputLink value="./helloWorld.jsf">Hello world Example</h:outputLink>
+ <h:outputLink value="./blog.jsf">Groovy Blogging Example</h:outputLink>
+ <h:outputLink value="./javablog.jsf">Java Blogging Example</h:outputLink>
+ <h:outputLink value="./componentTest.jsf">Component Testcase</h:outputLink>
+ <h:outputLink value="./compilerWindow.jsf" target="_blank">Compiler Output</h:outputLink>
- </h:panelGroup>
-</div>
+ </h:panelGroup>
+ </div>
-<div id="backGroundFloat">
+ <div id="backGroundFloat">
+ </div>
+ <div class="centerDiv">
+ <h:panelGroup>
+ <h3>
+ <h:outputFormat value="Compiler Output" escape="false"/>
+ </h3>
+ <exs:compilerOutput errorsLabel="Errors:" warningsLabel="Warnings:" scriptingLanguage=""/>
+ </h:panelGroup>
+ <h:panelGroup>
+ <h3>
+ <h:outputFormat value="Change History" escape="false"/>
+ </h3>
+ <exs:taintHistory noEntries="5"/>
+ </h:panelGroup>
-</div>
-<div class="centerDiv">
-
-
- <h:panelGroup>
- <h3>
- <h:outputFormat value="Compiler Output" escape="false"/>
- </h3>
- <exs:compilerOutput errorsLabel="Errors:" warningsLabel="Warnings:" scriptingLanguage=""/>
- </h:panelGroup>
-
- <h:panelGroup>
- <h3>
- <h:outputFormat value="Change History" escape="false"/>
- </h3>
- <exs:taintHistory noEntries="5" />
- </h:panelGroup>
-
-
- <p>
- <ui:insert name="body">Hello World Example!</ui:insert>
- </p>
-</div>
-
+ <p>
+ <ui:insert name="body">Hello World Example!</ui:insert>
+ </p>
+ </div>
</h:body>
</html>