Seam SVN: r9103 - trunk/seam-gen/icefaces/view.
by seam-commits@lists.jboss.org
Author: jguglielmin
Date: 2008-09-22 15:41:51 -0400 (Mon, 22 Sep 2008)
New Revision: 9103
Modified:
trunk/seam-gen/icefaces/view/edit.xhtml
trunk/seam-gen/icefaces/view/edit.xhtml.ftl
trunk/seam-gen/icefaces/view/form.xhtml
trunk/seam-gen/icefaces/view/home.xhtml
trunk/seam-gen/icefaces/view/list.xhtml
trunk/seam-gen/icefaces/view/login.xhtml
trunk/seam-gen/icefaces/view/query.xhtml
Log:
redo h components into ice components for ICE-3543
Modified: trunk/seam-gen/icefaces/view/edit.xhtml
===================================================================
--- trunk/seam-gen/icefaces/view/edit.xhtml 2008-09-22 18:45:26 UTC (rev 9102)
+++ trunk/seam-gen/icefaces/view/edit.xhtml 2008-09-22 19:41:51 UTC (rev 9103)
@@ -32,15 +32,15 @@
</ice:panelGroup>
<div class="actionButtons">
- <h:commandButton id="edit@homeName@save"
+ <ice:commandButton id="edit@homeName@save"
value="Save"
action="#{@homeName@.persist}"
rendered="#{!@homeName@.managed}"/>
- <h:commandButton id="edit@homeName@update"
+ <ice:commandButton id="edit@homeName@update"
value="Save"
action="#{@homeName@.update}"
rendered="#{@homeName@.managed}"/>
- <h:commandButton id="edit@homeName@delete"
+ <ice:commandButton id="edit@homeName@delete"
value="Delete"
action="#{@homeName@.remove}"
immediate="true"
Modified: trunk/seam-gen/icefaces/view/edit.xhtml.ftl
===================================================================
--- trunk/seam-gen/icefaces/view/edit.xhtml.ftl 2008-09-22 18:45:26 UTC (rev 9102)
+++ trunk/seam-gen/icefaces/view/edit.xhtml.ftl 2008-09-22 19:41:51 UTC (rev 9103)
@@ -41,18 +41,18 @@
<div class="actionButtons">
- <h:commandButton id="save${homeName}"
+ <ice:commandButton id="save${homeName}"
value="Save"
action="${'#'}{${homeName}.persist}"
disabled="${'#'}{!${homeName}.wired}"
rendered="${'#'}{!${homeName}.managed}"/>
- <h:commandButton id="update${homeName}"
+ <ice:commandButton id="update${homeName}"
value="Save"
action="${'#'}{${homeName}.update}"
rendered="${'#'}{${homeName}.managed}"/>
- <h:commandButton id="delete${homeName}"
+ <ice:commandButton id="delete${homeName}"
value="Delete"
action="${'#'}{${homeName}.remove}"
immediate="true"
Modified: trunk/seam-gen/icefaces/view/form.xhtml
===================================================================
--- trunk/seam-gen/icefaces/view/form.xhtml 2008-09-22 18:45:26 UTC (rev 9102)
+++ trunk/seam-gen/icefaces/view/form.xhtml 2008-09-22 19:41:51 UTC (rev 9103)
@@ -33,7 +33,7 @@
</ice:panelGroup>
<div class="actionButtons">
- <h:commandButton id="@methodName@" value="@methodName@"
+ <ice:commandButton id="@methodName@" value="@methodName@"
action="#{@componentName@.@methodName(a)}"/>
</div>
</ice:form>
Modified: trunk/seam-gen/icefaces/view/home.xhtml
===================================================================
--- trunk/seam-gen/icefaces/view/home.xhtml 2008-09-22 18:45:26 UTC (rev 9102)
+++ trunk/seam-gen/icefaces/view/home.xhtml 2008-09-22 19:41:51 UTC (rev 9103)
@@ -5,7 +5,7 @@
xmlns:ui="http://java.sun.com/jsf/facelets"
xmlns:f="http://java.sun.com/jsf/core"
xmlns:h="http://java.sun.com/jsf/html"
- xmlns:ice="http://www.icesoft.com/icefaces/component"
+ xmlns:ice="http://www.icesoft.com/icefaces/component"
template="layout/template.xhtml">
<ui:define name="body">
Modified: trunk/seam-gen/icefaces/view/list.xhtml
===================================================================
--- trunk/seam-gen/icefaces/view/list.xhtml 2008-09-22 18:45:26 UTC (rev 9102)
+++ trunk/seam-gen/icefaces/view/list.xhtml 2008-09-22 19:41:51 UTC (rev 9103)
@@ -5,7 +5,7 @@
xmlns:ui="http://java.sun.com/jsf/facelets"
xmlns:f="http://java.sun.com/jsf/core"
xmlns:h="http://java.sun.com/jsf/html"
- xmlns:ice="http://www.icesoft.com/icefaces/component"
+ xmlns:ice="http://www.icesoft.com/icefaces/component"
template="layout/template.xhtml">
<ui:define name="body">
Modified: trunk/seam-gen/icefaces/view/login.xhtml
===================================================================
--- trunk/seam-gen/icefaces/view/login.xhtml 2008-09-22 18:45:26 UTC (rev 9102)
+++ trunk/seam-gen/icefaces/view/login.xhtml 2008-09-22 19:41:51 UTC (rev 9103)
@@ -5,7 +5,7 @@
xmlns:ui="http://java.sun.com/jsf/facelets"
xmlns:f="http://java.sun.com/jsf/core"
xmlns:h="http://java.sun.com/jsf/html"
- xmlns:ice="http://www.icesoft.com/icefaces/component"
+ xmlns:ice="http://www.icesoft.com/icefaces/component"
template="layout/template.xhtml">
<ui:define name="body">
Modified: trunk/seam-gen/icefaces/view/query.xhtml
===================================================================
--- trunk/seam-gen/icefaces/view/query.xhtml 2008-09-22 18:45:26 UTC (rev 9102)
+++ trunk/seam-gen/icefaces/view/query.xhtml 2008-09-22 19:41:51 UTC (rev 9103)
@@ -5,7 +5,7 @@
xmlns:ui="http://java.sun.com/jsf/facelets"
xmlns:f="http://java.sun.com/jsf/core"
xmlns:h="http://java.sun.com/jsf/html"
- xmlns:ice="http://www.icesoft.com/icefaces/component"
+ xmlns:ice="http://www.icesoft.com/icefaces/component"
template="layout/template.xhtml">
<ui:define name="body">
16 years, 2 months
Seam SVN: r9102 - in trunk/src: main/org/jboss/seam/deployment and 2 other directories.
by seam-commits@lists.jboss.org
Author: pete.muir(a)jboss.org
Date: 2008-09-22 14:45:26 -0400 (Mon, 22 Sep 2008)
New Revision: 9102
Added:
trunk/src/main/org/jboss/seam/deployment/WarRootDeploymentStrategy.java
Modified:
trunk/src/debug/org/jboss/seam/debug/hot/HotDeployFilter.java
trunk/src/main/org/jboss/seam/deployment/AbstractScanner.java
trunk/src/main/org/jboss/seam/deployment/DeploymentStrategy.java
trunk/src/main/org/jboss/seam/deployment/DotPageDotXmlDeploymentHandler.java
trunk/src/main/org/jboss/seam/deployment/HotDeploymentStrategy.java
trunk/src/main/org/jboss/seam/deployment/Scanner.java
trunk/src/main/org/jboss/seam/deployment/StandardDeploymentStrategy.java
trunk/src/main/org/jboss/seam/deployment/URLScanner.java
trunk/src/main/org/jboss/seam/init/Initialization.java
trunk/src/main/org/jboss/seam/navigation/Pages.java
Log:
JBSEAM-3435
Modified: trunk/src/debug/org/jboss/seam/debug/hot/HotDeployFilter.java
===================================================================
--- trunk/src/debug/org/jboss/seam/debug/hot/HotDeployFilter.java 2008-09-22 18:24:28 UTC (rev 9101)
+++ trunk/src/debug/org/jboss/seam/debug/hot/HotDeployFilter.java 2008-09-22 18:45:26 UTC (rev 9102)
@@ -3,7 +3,6 @@
import static org.jboss.seam.ScopeType.APPLICATION;
import static org.jboss.seam.annotations.Install.BUILT_IN;
-import java.io.File;
import java.io.IOException;
import javax.servlet.FilterChain;
@@ -19,11 +18,9 @@
import org.jboss.seam.annotations.intercept.BypassInterceptors;
import org.jboss.seam.annotations.web.Filter;
import org.jboss.seam.core.Init;
-import org.jboss.seam.exception.Exceptions;
import org.jboss.seam.init.Initialization;
import org.jboss.seam.log.LogProvider;
import org.jboss.seam.log.Logging;
-import org.jboss.seam.navigation.Pages;
import org.jboss.seam.web.AbstractFilter;
@Name("org.jboss.seam.debug.hotDeployFilter")
@@ -40,62 +37,13 @@
throws IOException, ServletException
{
Init init = (Init) getServletContext().getAttribute( Seam.getComponentName(Init.class) );
- if ( init!=null && init.hasHotDeployableComponents() )
+ if ( init!=null)
{
- for ( File file: init.getHotDeployPaths() )
- {
- if ( scan(request, init, file) )
- {
- Seam.clearComponentNameCache();
- new Initialization( getServletContext() ).redeploy( (HttpServletRequest) request );
- break;
- }
- }
+ new Initialization( getServletContext() ).redeploy( (HttpServletRequest) request );
}
-
- //TODO: check the timestamp, for a minor optimization
- // instead
- Pages pages = (Pages) getServletContext().getAttribute(Seam.getComponentName(Pages.class));
- if (pages!= null) {
- pages.initialize();
- }
-
- getServletContext().removeAttribute( Seam.getComponentName(Exceptions.class) );
-
- //TODO: is there anything we should remove from the session scope?
- /*HttpSession session = ( (HttpServletRequest) request ).getSession(false);
- if (session!=null)
- {
- session.removeAttribute( ... );
- }*/
-
chain.doFilter(request, response);
}
- private boolean scan(ServletRequest request, Init init, File file)
- {
- if ( file.isFile() )
- {
- if ( !file.exists() || ( file.lastModified() > init.getTimestamp() ) )
- {
- if ( log.isDebugEnabled() )
- {
- log.debug( "file updated: " + file.getName() );
- }
- return true;
- }
- }
- else if ( file.isDirectory() )
- {
- for ( File f: file.listFiles() )
- {
- if ( scan(request, init, f) )
- {
- return true;
- }
- }
- }
- return false;
- }
+
}
Modified: trunk/src/main/org/jboss/seam/deployment/AbstractScanner.java
===================================================================
--- trunk/src/main/org/jboss/seam/deployment/AbstractScanner.java 2008-09-22 18:24:28 UTC (rev 9101)
+++ trunk/src/main/org/jboss/seam/deployment/AbstractScanner.java 2008-09-22 18:45:26 UTC (rev 9102)
@@ -34,5 +34,10 @@
{
return deploymentStrategy;
}
+
+ public long getTimestamp()
+ {
+ return Long.MAX_VALUE;
+ }
}
Modified: trunk/src/main/org/jboss/seam/deployment/DeploymentStrategy.java
===================================================================
--- trunk/src/main/org/jboss/seam/deployment/DeploymentStrategy.java 2008-09-22 18:24:28 UTC (rev 9101)
+++ trunk/src/main/org/jboss/seam/deployment/DeploymentStrategy.java 2008-09-22 18:45:26 UTC (rev 9102)
@@ -11,12 +11,11 @@
import java.util.ArrayList;
import java.util.Enumeration;
import java.util.HashMap;
-import java.util.HashSet;
import java.util.List;
import java.util.Map;
import java.util.Properties;
-import java.util.Set;
+
import org.jboss.seam.log.LogProvider;
import org.jboss.seam.log.Logging;
@@ -36,9 +35,6 @@
private List<File> files = new ArrayList<File>();
- private Set<String> excludes = new HashSet<String>();
- private Set<String> wildCardExcludes = new HashSet<String>();
-
private Map<String, DeploymentHandler> deploymentHandlers;
/**
@@ -189,20 +185,6 @@
*/
public void handle(String name)
{
- for (String exclude: excludes)
- {
- if (name.equals(exclude))
- {
- return;
- }
- }
- for (String exclude: wildCardExcludes)
- {
- if (name.startsWith(exclude))
- {
- return;
- }
- }
for (String key: getDeploymentHandlers().keySet())
{
getDeploymentHandlers().get(key).handle(name, getClassLoader());
@@ -327,19 +309,9 @@
this.files = files;
}
- public void addExclude(String path)
+ public long getTimestamp()
{
- if (path == null)
- {
- throw new NullPointerException("Cannot exclude a null path");
- }
- if (path.endsWith("*"))
- {
- wildCardExcludes.add(path.substring(0, path.length() - 1));
- }
- else
- {
- excludes.add(path);
- }
+ return getScanner().getTimestamp();
}
+
}
Modified: trunk/src/main/org/jboss/seam/deployment/DotPageDotXmlDeploymentHandler.java
===================================================================
--- trunk/src/main/org/jboss/seam/deployment/DotPageDotXmlDeploymentHandler.java 2008-09-22 18:24:28 UTC (rev 9101)
+++ trunk/src/main/org/jboss/seam/deployment/DotPageDotXmlDeploymentHandler.java 2008-09-22 18:45:26 UTC (rev 9102)
@@ -54,9 +54,9 @@
{
if (Contexts.isEventContextActive())
{
- if (Contexts.getEventContext().isSet(HotDeploymentStrategy.NAME))
+ if (Contexts.getEventContext().isSet(WarRootDeploymentStrategy.NAME))
{
- DeploymentStrategy deploymentStrategy = (DeploymentStrategy) Contexts.getEventContext().get(StandardDeploymentStrategy.NAME);
+ DeploymentStrategy deploymentStrategy = (DeploymentStrategy) Contexts.getEventContext().get(WarRootDeploymentStrategy.NAME);
Object deploymentHandler = deploymentStrategy.getDeploymentHandlers().get(NAME);
if (deploymentHandler != null)
{
@@ -71,25 +71,4 @@
}
}
- public static DotPageDotXmlDeploymentHandler hotInstance()
- {
- if (Contexts.isEventContextActive())
- {
- DeploymentStrategy deploymentStrategy = (DeploymentStrategy) Contexts.getEventContext().get(HotDeploymentStrategy.NAME);
- if (deploymentStrategy != null)
- {
- Object deploymentHandler = deploymentStrategy.getDeploymentHandlers().get(NAME);
- if (deploymentHandler != null)
- {
- return (DotPageDotXmlDeploymentHandler) deploymentHandler;
- }
- }
- return null;
- }
- else
- {
- throw new IllegalStateException("Event context not active");
- }
- }
-
}
Modified: trunk/src/main/org/jboss/seam/deployment/HotDeploymentStrategy.java
===================================================================
--- trunk/src/main/org/jboss/seam/deployment/HotDeploymentStrategy.java 2008-09-22 18:24:28 UTC (rev 9101)
+++ trunk/src/main/org/jboss/seam/deployment/HotDeploymentStrategy.java 2008-09-22 18:45:26 UTC (rev 9102)
@@ -50,6 +50,8 @@
private ComponentDeploymentHandler componentDeploymentHandler;
private AnnotationDeploymentHandler annotationDeploymentHandler;
+
+ private long timestamp = 0L;
private ClassLoader classLoader;
@@ -95,7 +97,7 @@
return classLoader != null;
}
- public boolean isHotDeployClasslLoaderEnabled()
+ public boolean isHotDeployClassLoaderEnabled()
{
return hotDeployClassLoader != null;
}
Modified: trunk/src/main/org/jboss/seam/deployment/Scanner.java
===================================================================
--- trunk/src/main/org/jboss/seam/deployment/Scanner.java 2008-09-22 18:24:28 UTC (rev 9101)
+++ trunk/src/main/org/jboss/seam/deployment/Scanner.java 2008-09-22 18:45:26 UTC (rev 9102)
@@ -31,4 +31,6 @@
*/
public DeploymentStrategy getDeploymentStrategy();
+ public long getTimestamp();
+
}
Modified: trunk/src/main/org/jboss/seam/deployment/StandardDeploymentStrategy.java
===================================================================
--- trunk/src/main/org/jboss/seam/deployment/StandardDeploymentStrategy.java 2008-09-22 18:24:28 UTC (rev 9101)
+++ trunk/src/main/org/jboss/seam/deployment/StandardDeploymentStrategy.java 2008-09-22 18:45:26 UTC (rev 9102)
@@ -56,7 +56,6 @@
getDeploymentHandlers().put(NamespaceDeploymentHandler.NAME, namespaceDeploymentHandler);
annotationDeploymentHandler = new AnnotationDeploymentHandler(getPropertyValues(AnnotationDeploymentHandler.ANNOTATIONS_KEY), classLoader);
getDeploymentHandlers().put(AnnotationDeploymentHandler.NAME, annotationDeploymentHandler);
- getDeploymentHandlers().put(DotPageDotXmlDeploymentHandler.NAME, new DotPageDotXmlDeploymentHandler());
}
@Override
Modified: trunk/src/main/org/jboss/seam/deployment/URLScanner.java
===================================================================
--- trunk/src/main/org/jboss/seam/deployment/URLScanner.java 2008-09-22 18:24:28 UTC (rev 9101)
+++ trunk/src/main/org/jboss/seam/deployment/URLScanner.java 2008-09-22 18:45:26 UTC (rev 9102)
@@ -28,6 +28,8 @@
{
private static final LogProvider log = Logging.getLogProvider(URLScanner.class);
+ private long timestamp;
+
public URLScanner(DeploymentStrategy deploymentStrategy)
{
super(deploymentStrategy);
@@ -111,6 +113,7 @@
try
{
log.debug("archive: " + file);
+ touchTimestamp(file);
ZipFile zip = new ZipFile(file);
Enumeration<? extends ZipEntry> entries = zip.entries();
while ( entries.hasMoreElements() )
@@ -138,9 +141,24 @@
}
else
{
+ touchTimestamp(file);
handleItem(newPath);
}
}
}
+ private void touchTimestamp(File file)
+ {
+ if (file.lastModified() > timestamp)
+ {
+ timestamp = file.lastModified();
+ }
+ }
+
+ @Override
+ public long getTimestamp()
+ {
+ return timestamp;
+ }
+
}
Added: trunk/src/main/org/jboss/seam/deployment/WarRootDeploymentStrategy.java
===================================================================
--- trunk/src/main/org/jboss/seam/deployment/WarRootDeploymentStrategy.java (rev 0)
+++ trunk/src/main/org/jboss/seam/deployment/WarRootDeploymentStrategy.java 2008-09-22 18:45:26 UTC (rev 9102)
@@ -0,0 +1,58 @@
+package org.jboss.seam.deployment;
+
+import java.io.File;
+
+/**
+ * A special deployment strategy that can be used to scan the war root. This
+ * is treated as a special case.
+ *
+ * @author pmuir
+ *
+ */
+public class WarRootDeploymentStrategy extends DeploymentStrategy
+{
+
+ private ClassLoader classLoader;
+
+ private File[] warRoot;
+
+ public static final String HANDLERS_KEY = "org.jboss.seam.deployment.deploymentHandlers";
+
+ public static final String NAME = "warRootDeploymentStrategy";
+
+ public WarRootDeploymentStrategy(ClassLoader classLoader, File warRoot)
+ {
+ this.classLoader = classLoader;
+ this.warRoot = new File[1];
+ this.warRoot[0] = warRoot;
+ getDeploymentHandlers().put(DotPageDotXmlDeploymentHandler.NAME, new DotPageDotXmlDeploymentHandler());
+ }
+
+ @Override
+ public ClassLoader getClassLoader()
+ {
+ return classLoader;
+ }
+
+ @Override
+ protected String getDeploymentHandlersKey()
+ {
+ return HANDLERS_KEY;
+ }
+
+ @Override
+ public void handle(String name)
+ {
+ if (!(name.startsWith("WEB-INF") || name.startsWith("/WEB-INF")))
+ {
+ super.handle(name);
+ }
+ }
+
+ @Override
+ public void scan()
+ {
+ getScanner().scanDirectories(warRoot);
+ }
+
+}
Property changes on: trunk/src/main/org/jboss/seam/deployment/WarRootDeploymentStrategy.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Modified: trunk/src/main/org/jboss/seam/init/Initialization.java
===================================================================
--- trunk/src/main/org/jboss/seam/init/Initialization.java 2008-09-22 18:24:28 UTC (rev 9101)
+++ trunk/src/main/org/jboss/seam/init/Initialization.java 2008-09-22 18:45:26 UTC (rev 9102)
@@ -5,7 +5,6 @@
*/
package org.jboss.seam.init;
-
import java.io.File;
import java.io.IOException;
import java.io.InputStream;
@@ -42,10 +41,10 @@
import org.jboss.seam.contexts.ServletLifecycle;
import org.jboss.seam.core.Expressions;
import org.jboss.seam.core.Init;
-import org.jboss.seam.deployment.DeploymentStrategy;
-import org.jboss.seam.deployment.DotPageDotXmlDeploymentHandler;
import org.jboss.seam.deployment.HotDeploymentStrategy;
import org.jboss.seam.deployment.StandardDeploymentStrategy;
+import org.jboss.seam.deployment.WarRootDeploymentStrategy;
+import org.jboss.seam.exception.Exceptions;
import org.jboss.seam.log.LogProvider;
import org.jboss.seam.log.Logging;
import org.jboss.seam.navigation.Pages;
@@ -82,9 +81,10 @@
private StandardDeploymentStrategy standardDeploymentStrategy;
private HotDeploymentStrategy hotDeploymentStrategy;
+ private WarRootDeploymentStrategy warRootDeploymentStrategy;
- private File warRootDirectory;
private File hotDeployDirectory;
+ private File warRoot;
private Set<String> nonPropertyAttributes = new HashSet<String>();
@@ -103,14 +103,13 @@
public Initialization(ServletContext servletContext)
{
this.servletContext = servletContext;
- this.warRootDirectory = getRealFile(servletContext, "/");
+ this.warRoot = getRealFile(servletContext, "/");
this.hotDeployDirectory = getRealFile(servletContext, HotDeploymentStrategy.DEFAULT_HOT_DEPLOYMENT_DIRECTORY_PATH);
}
public Initialization create()
{
standardDeploymentStrategy = new StandardDeploymentStrategy(Thread.currentThread().getContextClassLoader());
- addWarRoot(standardDeploymentStrategy);
standardDeploymentStrategy.scan();
addNamespaces();
initComponentsFromXmlDocument("/WEB-INF/components.xml");
@@ -121,13 +120,6 @@
initJndiProperties();
return this;
}
-
- private void addWarRoot(DeploymentStrategy deploymentStrategy)
- {
- deploymentStrategy.getFiles().add(warRootDirectory);
- deploymentStrategy.addExclude("WEB-INF/classes/*");
- deploymentStrategy.addExclude("/WEB-INF/classes/*");
- }
private void initComponentsFromXmlDocuments()
{
@@ -619,7 +611,8 @@
hotDeploymentStrategy = createHotDeployment(Thread.currentThread().getContextClassLoader());
scanForComponents();
addComponent( new ComponentDescriptor(Init.class), Contexts.getApplicationContext());
- Init init = (Init) Component.getInstance(Init.class, ScopeType.APPLICATION);
+ Init init = (Init) Component.getInstance(Init.class, ScopeType.APPLICATION);
+ init.setHotDeployPaths( hotDeploymentStrategy.getHotDeploymentPaths() );
ComponentDescriptor desc = findDescriptor(Jbpm.class);
if (desc != null && desc.isInstalled())
{
@@ -629,22 +622,24 @@
init.setTimestamp( System.currentTimeMillis() );
addSpecialComponents(init);
+ // Add the war root deployment
+ warRootDeploymentStrategy = new WarRootDeploymentStrategy(Thread.currentThread().getContextClassLoader(), warRoot);
+ warRootDeploymentStrategy.scan();
+
// Make the deployment strategies available in the contexts. This gives
// access to custom deployment handlers for processing custom annotations
// etc.
Contexts.getEventContext().set(StandardDeploymentStrategy.NAME, standardDeploymentStrategy);
Contexts.getEventContext().set(HotDeploymentStrategy.NAME, hotDeploymentStrategy);
+ Contexts.getEventContext().set(WarRootDeploymentStrategy.NAME, warRootDeploymentStrategy);
if (hotDeploymentStrategy.isEnabled())
{
hotDeploymentStrategy.scan();
- if (hotDeploymentStrategy.isHotDeployClasslLoaderEnabled())
+ if (hotDeploymentStrategy.isHotDeployClassLoaderEnabled())
{
installHotDeployableComponents();
}
- // TODO Hack
- hotDeploymentStrategy.getFiles().add(warRootDirectory);
- init.setHotDeployPaths( hotDeploymentStrategy.getHotDeploymentPaths() );
}
installComponents(init);
@@ -661,38 +656,53 @@
public Initialization redeploy(HttpServletRequest request)
{
- log.info("redeploying");
ServletLifecycle.beginReinitialization(request);
- Init init = Init.instance();
- for ( String name: init.getHotDeployableComponents() )
+ hotDeploymentStrategy = createHotDeployment(Thread.currentThread().getContextClassLoader());
+ if (hotDeploymentStrategy.isEnabled())
{
- Component component = Component.forName(name);
- if (component!=null)
+ hotDeploymentStrategy.scan();
+ Init init = Init.instance();
+
+ if (init.getTimestamp() < hotDeploymentStrategy.getTimestamp())
{
- ScopeType scope = component.getScope();
- if ( scope!=ScopeType.STATELESS && scope.isContextActive() )
+ log.info("redeploying");
+ Seam.clearComponentNameCache();
+ for ( String name: init.getHotDeployableComponents() )
{
- scope.getContext().remove(name);
+ Component component = Component.forName(name);
+ if (component!=null)
+ {
+ ScopeType scope = component.getScope();
+ if ( scope!=ScopeType.STATELESS && scope.isContextActive() )
+ {
+ scope.getContext().remove(name);
+ }
+ init.removeObserverMethods(component);
+ }
+ Contexts.getApplicationContext().remove(name + COMPONENT_SUFFIX);
}
- init.removeObserverMethods(component);
+
+ if (hotDeploymentStrategy.isHotDeployClassLoaderEnabled())
+ {
+ installHotDeployableComponents();
+ }
+ Contexts.getEventContext().set(HotDeploymentStrategy.NAME, hotDeploymentStrategy);
+ init.setTimestamp( System.currentTimeMillis() );
+ installComponents(init);
+ log.info("done redeploying");
}
- Contexts.getApplicationContext().remove(name + COMPONENT_SUFFIX);
+
+ WarRootDeploymentStrategy warRootDeploymentStrategy = new WarRootDeploymentStrategy(Thread.currentThread().getContextClassLoader(), warRoot);
+ warRootDeploymentStrategy.scan();
+ Contexts.getEventContext().set(WarRootDeploymentStrategy.NAME, warRootDeploymentStrategy);
+ Pages pages = Pages.instance();
+ if (pages!= null) {
+ pages.initialize();
+ }
+
+ Contexts.getApplicationContext().remove(Seam.getComponentName(Exceptions.class));
}
- //TODO open the ability to reuse the classloader by looking at the components class classloaders
- hotDeploymentStrategy = createHotDeployment(Thread.currentThread().getContextClassLoader());
- addWarRoot(hotDeploymentStrategy);
- hotDeploymentStrategy.scan();
- if (hotDeploymentStrategy.isHotDeployClasslLoaderEnabled())
- {
- installHotDeployableComponents();
- }
- Contexts.getEventContext().set(HotDeploymentStrategy.NAME, hotDeploymentStrategy);
- Pages.instance().setHotDotPageDotXmlFileNames(DotPageDotXmlDeploymentHandler.hotInstance().getFiles());
- init.setTimestamp( System.currentTimeMillis() );
- init.setHotDeployPaths(hotDeploymentStrategy.getHotDeploymentPaths());
- installComponents(init);
ServletLifecycle.endInitialization();
- log.info("done redeploying");
return this;
}
Modified: trunk/src/main/org/jboss/seam/navigation/Pages.java
===================================================================
--- trunk/src/main/org/jboss/seam/navigation/Pages.java 2008-09-22 18:24:28 UTC (rev 9101)
+++ trunk/src/main/org/jboss/seam/navigation/Pages.java 2008-09-22 18:45:26 UTC (rev 9102)
@@ -84,11 +84,8 @@
private Map<String, Page> pagesByViewId;
private Map<String, List<Page>> pageStacksByViewId;
- private Map<String, ConversationIdParameter> conversations;
+ private Map<String, ConversationIdParameter> conversations;
- private Set<String> dotPageDotXmlFileNames;
- private Set<String> hotDotPageDotXmlFileNames;
-
private String[] resources = { "/WEB-INF/pages.xml" };
private SortedSet<String> wildcardViewIds = new TreeSet<String>(
@@ -106,12 +103,6 @@
@Create
public void create()
{
- dotPageDotXmlFileNames = new HashSet<String>();
- hotDotPageDotXmlFileNames = new HashSet<String>();
- if (DotPageDotXmlDeploymentHandler.instance() != null)
- {
- dotPageDotXmlFileNames = DotPageDotXmlDeploymentHandler.instance().getFiles();
- }
initialize();
}
@@ -132,8 +123,11 @@
parse(stream);
}
}
-
- parsePages(hotDotPageDotXmlFileNames, dotPageDotXmlFileNames);
+
+ if (DotPageDotXmlDeploymentHandler.instance() != null)
+ {
+ parsePages(DotPageDotXmlDeploymentHandler.instance().getFiles());
+ }
}
private void parsePages(Set<String> ...fileNames)
@@ -1691,19 +1685,8 @@
getCurrentViewId().startsWith("/debug.");
}
-
public Collection<String> getKnownViewIds() {
return pagesByViewId.keySet();
}
- public Set<String> getHotDotPageDotXmlFileNames()
- {
- return hotDotPageDotXmlFileNames;
- }
-
- public void setHotDotPageDotXmlFileNames(Set<String> hotDotPageDotXmlFileNames)
- {
- this.hotDotPageDotXmlFileNames = hotDotPageDotXmlFileNames;
- }
-
}
16 years, 2 months
Seam SVN: r9101 - trunk/examples/icefaces/view.
by seam-commits@lists.jboss.org
Author: jguglielmin
Date: 2008-09-22 14:24:28 -0400 (Mon, 22 Sep 2008)
New Revision: 9101
Modified:
trunk/examples/icefaces/view/home.xhtml
Log:
JBSEAM-3334, ICE-3334
Modified: trunk/examples/icefaces/view/home.xhtml
===================================================================
--- trunk/examples/icefaces/view/home.xhtml 2008-09-22 18:01:38 UTC (rev 9100)
+++ trunk/examples/icefaces/view/home.xhtml 2008-09-22 18:24:28 UTC (rev 9101)
@@ -3,6 +3,7 @@
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:ice="http://www.icesoft.com/icefaces/component"
xmlns:s="http://jboss.com/products/seam/taglib">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
@@ -29,7 +30,7 @@
<h:inputSecret id="password" value="#{identity.password}" style="width: 165px;"/>
</div>
<div class="errors"><h:messages globalOnly="true"/></div>
- <div class="buttonBox"><h:commandButton id="login" action="#{identity.login}" value="Account Login"
+ <div class="buttonBox"><ice:commandButton id="login" action="#{identity.login}" value="Account Login"
styleClass="button"/></div>
<div class="notes"><s:link id="register" view="/register.xhtml" value="Register New User"/></div>
</fieldset>
16 years, 2 months
Seam SVN: r9100 - trunk/build.
by seam-commits@lists.jboss.org
Author: danielc.roth
Date: 2008-09-22 14:01:38 -0400 (Mon, 22 Sep 2008)
New Revision: 9100
Added:
trunk/build/build-info.txt
Log:
Just some short pointers on where to look when adding new modules to Seam
Added: trunk/build/build-info.txt
===================================================================
--- trunk/build/build-info.txt (rev 0)
+++ trunk/build/build-info.txt 2008-09-22 18:01:38 UTC (rev 9100)
@@ -0,0 +1,23 @@
+* Build dist, run tests and create eclipse classpath
+
+The easiest approach is to look in the files for a similar module and just copy/paste/modify.
+
+/build.xml Builds dist and examples and runs unit tests.
+/build/build.xml Deploys jars to local maven repo
+/build/classpath.tmpl Classpath entries used when running ant eclipseclasspath
+/build/ci.build.xml Publishes seam to snapshot repo (?)
+/build/root.pom.xml Contains all maven dependencies. Versions go here.
+/build/yourMod.pom.xml Pom for the module with appropriate dependencies. All deps must be in
+ http://repository.jboss.com/maven2/
+
+
+* Build examples
+/examples/build.xml "Mother" ant script for the examples. Most(all?) buils example scripts
+ import this script.
+/examples/yourMod/build.xml Essentially just sets some properties. Then the mother script does it all
+
+
+
+* Add docs
+Put your doc in /doc/Seam_Reference_Guide/en-US (or appropriate language) and add it to
+/doc/Seam_Reference_Guide/en-US/master.xml
\ No newline at end of file
16 years, 2 months
Seam SVN: r9099 - in trunk/src: test/integration/src/org/jboss/seam/test/integration/i8ln and 1 other directory.
by seam-commits@lists.jboss.org
Author: dan.j.allen
Date: 2008-09-22 11:45:21 -0400 (Mon, 22 Sep 2008)
New Revision: 9099
Modified:
trunk/src/main/org/jboss/seam/mock/AbstractSeamTest.java
trunk/src/test/integration/src/org/jboss/seam/test/integration/i8ln/LocaleTest.java
Log:
restore old behavior of SeamTest such that the JSF Application object is recreated before each class
Modified: trunk/src/main/org/jboss/seam/mock/AbstractSeamTest.java
===================================================================
--- trunk/src/main/org/jboss/seam/mock/AbstractSeamTest.java 2008-09-22 15:10:09 UTC (rev 9098)
+++ trunk/src/main/org/jboss/seam/mock/AbstractSeamTest.java 2008-09-22 15:45:21 UTC (rev 9099)
@@ -73,6 +73,7 @@
{
private Application application;
+ private ApplicationFactory applicationFactory;
private ServletContext servletContext;
private static SeamPhaseListener phases;
private MockHttpSession session;
@@ -935,7 +936,6 @@
*/
protected void stopSeam() throws Exception
{
- ((ApplicationFactory) FactoryFinder.getFactory(FactoryFinder.APPLICATION_FACTORY)).setApplication(null);
ServletLifecycle.endApplication();
}
@@ -947,7 +947,8 @@
protected void setupClass() throws Exception
{
servletContext = (MockServletContext) ServletLifecycle.getServletContext();
- application = ((ApplicationFactory) FactoryFinder.getFactory(FactoryFinder.APPLICATION_FACTORY)).getApplication();
+ applicationFactory = (ApplicationFactory) FactoryFinder.getFactory(FactoryFinder.APPLICATION_FACTORY);
+ application = applicationFactory.getApplication();
conversationViewRootAttributes = new HashMap<String, Map>();
seamFilter = createSeamFilter();
FactoryFinder.setFactory(FactoryFinder.FACES_CONTEXT_FACTORY, MockFacesContextFactory.class.getName());
@@ -966,6 +967,7 @@
{
seamFilter.destroy();
conversationViewRootAttributes = null;
+ applicationFactory.setApplication(null);
}
protected Filter createSeamFilter() throws ServletException
Modified: trunk/src/test/integration/src/org/jboss/seam/test/integration/i8ln/LocaleTest.java
===================================================================
--- trunk/src/test/integration/src/org/jboss/seam/test/integration/i8ln/LocaleTest.java 2008-09-22 15:10:09 UTC (rev 9098)
+++ trunk/src/test/integration/src/org/jboss/seam/test/integration/i8ln/LocaleTest.java 2008-09-22 15:45:21 UTC (rev 9099)
@@ -8,18 +8,34 @@
import javax.faces.component.UIOutput;
import javax.faces.event.ValueChangeEvent;
+import org.jboss.seam.international.LocaleConfig;
import org.jboss.seam.international.LocaleSelector;
+import org.jboss.seam.Seam;
+import org.jboss.seam.contexts.Contexts;
import org.jboss.seam.mock.SeamTest;
import org.testng.annotations.Test;
public class LocaleTest extends SeamTest
{
-
@Test
public void localeTest() throws Exception
{
+ new NonFacesRequest()
+ {
+ @Override
+ protected void renderResponse() throws Exception
+ {
+ // it's necessary to emulate the startup behavior of LocaleConfig since it alters the JSF Application
+ // and we cannot be sure that the JSF Application wasn't cleared by an earlier class
+ // NOTE: I wish this test suite had some better place of initializing the application context
+ Contexts.getApplicationContext().remove(Seam.getComponentName(LocaleConfig.class));
+ LocaleConfig.instance();
+ }
+ }.run();
+
new FacesRequest()
{
+
@Override
protected void invokeApplication() throws Exception
{
16 years, 2 months
Seam SVN: r9098 - trunk/examples/groovybooking/view.
by seam-commits@lists.jboss.org
Author: jharting
Date: 2008-09-22 11:10:09 -0400 (Mon, 22 Sep 2008)
New Revision: 9098
Modified:
trunk/examples/groovybooking/view/book.xhtml
trunk/examples/groovybooking/view/conversations.xhtml
trunk/examples/groovybooking/view/main.xhtml
trunk/examples/groovybooking/view/password.xhtml
trunk/examples/groovybooking/view/register.xhtml
Log:
JBSEAM-3431 Added ids for groovybooking example.
Modified: trunk/examples/groovybooking/view/book.xhtml
===================================================================
--- trunk/examples/groovybooking/view/book.xhtml 2008-09-22 11:14:43 UTC (rev 9097)
+++ trunk/examples/groovybooking/view/book.xhtml 2008-09-22 15:10:09 UTC (rev 9098)
@@ -49,10 +49,10 @@
<s:validateAll>
<f:facet name="aroundInvalidField">
- <s:span styleClass="errors"/>
+ <s:span id="Error" styleClass="errors"/>
</f:facet>
<f:facet name="afterInvalidField">
- <s:div styleClass="errors">
+ <s:div id="Message" styleClass="errors">
<s:message/>
</s:div>
</f:facet>
@@ -78,7 +78,7 @@
<div class="entry">
<div class="label"><h:outputLabel for="beds">Room Preference:</h:outputLabel></div>
<div class="input">
- <s:decorate>
+ <s:decorate id="bedsDecorate">
<h:selectOneMenu id="beds" value="#{booking.beds}">
<f:selectItem itemLabel="One king-size bed" itemValue="1"/>
<f:selectItem itemLabel="Two double beds" itemValue="2"/>
@@ -91,7 +91,7 @@
<div class="entry">
<div class="label"><h:outputLabel for="smoking">Smoking Preference:</h:outputLabel></div>
<div id="radio" class="input">
- <s:decorate>
+ <s:decorate id="smokingDecorate">
<h:selectOneRadio id="smoking" value="#{booking.smoking}" layout="pageDirection">
<f:selectItem itemLabel="Smoking" itemValue="true"/>
<f:selectItem itemLabel="Non Smoking" itemValue="false"/>
@@ -125,7 +125,7 @@
<div class="entry">
<div class="label"><h:outputLabel for="creditCardExpiryMonth">Credit Card Expiry:</h:outputLabel></div>
<div class="input">
- <s:decorate>
+ <s:decorate id="creditCardExpiryDecorate">
<h:selectOneMenu id="creditCardExpiryMonth" value="#{booking.creditCardExpiryMonth}">
<f:selectItem itemLabel="Jan" itemValue="1"/>
<f:selectItem itemLabel="Feb" itemValue="2"/>
Modified: trunk/examples/groovybooking/view/conversations.xhtml
===================================================================
--- trunk/examples/groovybooking/view/conversations.xhtml 2008-09-22 11:14:43 UTC (rev 9097)
+++ trunk/examples/groovybooking/view/conversations.xhtml 2008-09-22 15:10:09 UTC (rev 9098)
@@ -11,19 +11,19 @@
</div>
<div class="section">
- <h:form>
- <h:dataTable value="#{conversationList}" var="entry">
- <h:column>
- <h:commandLink action="#{entry.select}" value="#{entry.description}"/>
+ <h:form id="ConversationListForm">
+ <h:dataTable id="ConversationListDataTable" value="#{conversationList}" var="entry">
+ <h:column id="column1">
+ <h:commandLink id="EntryDescriptionLink" action="#{entry.select}" value="#{entry.description}"/>
 
- <h:outputText value="[current]" rendered="#{entry.current}"/>
+ <h:outputText id="CurrentEntry" value="[current]" rendered="#{entry.current}"/>
</h:column>
- <h:column>
- <h:outputText value="#{entry.startDatetime}">
+ <h:column id="column2">
+ <h:outputText id="EntryStartDateTime" value="#{entry.startDatetime}">
<s:convertDateTime type="time" pattern="hh:mm"/>
</h:outputText>
-
- <h:outputText value="#{entry.lastDatetime}">
+ <h:outputText id="EntryLastDateTime" value="#{entry.lastDatetime}">
<s:convertDateTime type="time" pattern="hh:mm"/>
</h:outputText>
</h:column>
Modified: trunk/examples/groovybooking/view/main.xhtml
===================================================================
--- trunk/examples/groovybooking/view/main.xhtml 2008-09-22 11:14:43 UTC (rev 9097)
+++ trunk/examples/groovybooking/view/main.xhtml 2008-09-22 15:10:09 UTC (rev 9098)
@@ -14,7 +14,7 @@
<h:form id="main">
<span class="errors">
- <h:messages globalOnly="true"/>
+ <h:messages id="messages" globalOnly="true"/>
</span>
<h1>Search Hotels</h1>
@@ -27,7 +27,7 @@
 
<a:status>
<f:facet name="start">
- <h:graphicImage value="/img/spinner.gif"/>
+ <h:graphicImage id="Spinner" value="/img/spinner.gif"/>
</f:facet>
</a:status>
<br/>
@@ -44,7 +44,7 @@
<a:outputPanel id="searchResults">
<div class="section">
- <h:outputText value="No Hotels Found" rendered="#{hotels != null and hotels.rowCount==0}"/>
+ <h:outputText id="NoHotelsFoundMessage" value="No Hotels Found" rendered="#{hotels != null and hotels.rowCount==0}"/>
<h:dataTable id="hotels" value="#{hotels}" var="hot" rendered="#{hotels.rowCount>0}">
<h:column>
<f:facet name="header">Name</f:facet>
@@ -67,7 +67,7 @@
<s:link id="viewHotel" value="View Hotel" action="#{hotelBooking.selectHotel(hot)}"/>
</h:column>
</h:dataTable>
- <s:link value="More results" action="#{hotelSearch.nextPage}" rendered="#{hotelSearch.nextPageAvailable}"/>
+ <s:link id="MoreResultsLink" value="More results" action="#{hotelSearch.nextPage}" rendered="#{hotelSearch.nextPageAvailable}"/>
</div>
</a:outputPanel>
Modified: trunk/examples/groovybooking/view/password.xhtml
===================================================================
--- trunk/examples/groovybooking/view/password.xhtml 2008-09-22 11:14:43 UTC (rev 9097)
+++ trunk/examples/groovybooking/view/password.xhtml 2008-09-22 15:10:09 UTC (rev 9098)
@@ -15,10 +15,10 @@
<h:form id="setpassword">
<f:facet name="aroundInvalidField">
- <s:span styleClass="errors"/>
+ <s:span id="Error" styleClass="errors"/>
</f:facet>
<f:facet name="afterInvalidField">
- <s:div styleClass="errors">
+ <s:div id="Message" styleClass="errors">
<s:message/>
</s:div>
</f:facet>
@@ -28,7 +28,7 @@
<div class="entry">
<div class="label"><h:outputLabel for="password">Password:</h:outputLabel></div>
<div class="input">
- <s:decorate>
+ <s:decorate id="PasswordDecorate">
<h:inputSecret id="password" value="#{user.password}" required="true">
<s:validate/>
</h:inputSecret>
@@ -39,14 +39,14 @@
<div class="entry">
<div class="label"><h:outputLabel for="verify">Verify:</h:outputLabel></div>
<div class="input">
- <s:decorate>
+ <s:decorate id="VerifyDecorate">
<h:inputSecret id="verify" value="#{changePassword.verify}" required="true"/>
</s:decorate>
</div>
</div>
<div class="entry errors">
- <h:messages globalOnly="true"/>
+ <h:messages id="Messages" globalOnly="true"/>
</div>
<div class="entry">
Modified: trunk/examples/groovybooking/view/register.xhtml
===================================================================
--- trunk/examples/groovybooking/view/register.xhtml 2008-09-22 11:14:43 UTC (rev 9097)
+++ trunk/examples/groovybooking/view/register.xhtml 2008-09-22 15:10:09 UTC (rev 9098)
@@ -61,7 +61,7 @@
<div class="entry">
<div class="label"><h:outputLabel for="password">Password:</h:outputLabel></div>
<div class="input">
- <s:decorate>
+ <s:decorate id="passwordDecorate">
<h:inputSecret id="password" value="#{user.password}" required="true"/>
</s:decorate>
</div>
@@ -70,7 +70,7 @@
<div class="entry">
<div class="label"><h:outputLabel for="verify">Verify Password:</h:outputLabel></div>
<div class="input">
- <s:decorate>
+ <s:decorate id="verifyDecorate">
<h:inputSecret id="verify" value="#{register.verify}" required="true"/>
</s:decorate>
</div>
@@ -79,7 +79,7 @@
</s:validateAll>
<div class="entry errors">
- <h:messages globalOnly="true"/>
+ <h:messages id="messages" globalOnly="true"/>
</div>
<div class="entry">
16 years, 2 months
Seam SVN: r9097 - in trunk: examples/rss/src/org/jboss/seam/rss and 1 other directories.
by seam-commits@lists.jboss.org
Author: nickarls
Date: 2008-09-22 07:14:43 -0400 (Mon, 22 Sep 2008)
New Revision: 9097
Modified:
trunk/doc/Seam_Reference_Guide/en-US/Rss.xml
trunk/examples/rss/src/org/jboss/seam/rss/RSSTest.java
trunk/src/rss/org/jboss/seam/rss/ui/UIEntry.java
trunk/src/rss/org/jboss/seam/rss/ui/UIFeed.java
Log:
Refactored summaryFormat to textFormat, fixed feed format, updated docs
Modified: trunk/doc/Seam_Reference_Guide/en-US/Rss.xml
===================================================================
--- trunk/doc/Seam_Reference_Guide/en-US/Rss.xml 2008-09-22 11:13:12 UTC (rev 9096)
+++ trunk/doc/Seam_Reference_Guide/en-US/Rss.xml 2008-09-22 11:14:43 UTC (rev 9097)
@@ -115,6 +115,13 @@
The value is a string.
</para>
</listitem>
+ <listitem>
+ <para>
+ <literal>feedFormat</literal>
+ —The feed format. The value is a string and defaults
+ to ATOM1. Valid values are RSS10, RSS20, ATOM03 and ATOM10.
+ </para>
+ </listitem>
</itemizedlist>
<para>
<emphasis>Child elemenents</emphasis>
@@ -196,9 +203,10 @@
</listitem>
<listitem>
<para>
- <literal>summaryFormat</literal>
- —The format of the body of the story. The value is a string
- and valid values are "text" and "html". Defaults to "html".
+ <literal>textFormat</literal>
+ —The format of the body and title of the story.
+ The value is a string and valid values are "text" and
+ "html". Defaults to "html".
</para>
</listitem>
<listitem>
Modified: trunk/examples/rss/src/org/jboss/seam/rss/RSSTest.java
===================================================================
--- trunk/examples/rss/src/org/jboss/seam/rss/RSSTest.java 2008-09-22 11:13:12 UTC (rev 9096)
+++ trunk/examples/rss/src/org/jboss/seam/rss/RSSTest.java 2008-09-22 11:14:43 UTC (rev 9097)
@@ -28,7 +28,7 @@
entry.setLink("Link " + i);
entry.setPublished(new Date(0));
entry.setSummary("Summary <b>" + i + "</b>");
- entry.setTitle("Title " + i);
+ entry.setTitle("Title <i>" + i + "</i>");
entry.setUid(UUID.randomUUID().toString());
entry.setUpdated(new Date());
entries.add(entry);
Modified: trunk/src/rss/org/jboss/seam/rss/ui/UIEntry.java
===================================================================
--- trunk/src/rss/org/jboss/seam/rss/ui/UIEntry.java 2008-09-22 11:13:12 UTC (rev 9096)
+++ trunk/src/rss/org/jboss/seam/rss/ui/UIEntry.java 2008-09-22 11:14:43 UTC (rev 9097)
@@ -30,7 +30,7 @@
private String link;
private String author;
private String summary;
- private TextType summaryFormat = TextType.html;
+ private TextType textFormat = TextType.html;
private Date published;
private Date updated;
@@ -40,6 +40,12 @@
return COMPONENT_TYPE;
}
+ private Text makeText(String textString) {
+ Text text = new Text(textFormat);
+ text.setText(textString);
+ return text;
+ }
+
@SuppressWarnings("unchecked")
@Override
public void encodeBegin(FacesContext facesContext) throws IOException
@@ -48,7 +54,7 @@
ItemEntry itemEntry = new ItemEntry();
itemEntry.setUid(getUid());
- itemEntry.setTitle(getTitle());
+ itemEntry.setTitle(makeText(getTitle()));
itemEntry.addLink(getLink());
String author = getAuthor();
if (author != null)
@@ -57,9 +63,7 @@
authorPerson.setName(author);
itemEntry.addAuthorOrCreator(authorPerson);
}
- Text summary = new Text(summaryFormat);
- summary.setText(getSummary());
- itemEntry.setDescriptionOrSummary(summary);
+ itemEntry.setDescriptionOrSummary(makeText(getSummary()));
if (getUpdated() != null) {
itemEntry.setUpdatedDate(getUpdated(), new SimpleDateFormat(ATOM_DATE_FORMAT));
}
@@ -140,14 +144,14 @@
this.uid = uid;
}
- public TextType getSummaryFormat()
+ public TextType getTextFormat()
{
- return summaryFormat;
+ return textFormat;
}
- public void setSummaryFormat(TextType summaryFormat)
+ public void setTextFormat(TextType textFormat)
{
- this.summaryFormat = summaryFormat;
+ this.textFormat = textFormat;
}
}
Modified: trunk/src/rss/org/jboss/seam/rss/ui/UIFeed.java
===================================================================
--- trunk/src/rss/org/jboss/seam/rss/ui/UIFeed.java 2008-09-22 11:13:12 UTC (rev 9096)
+++ trunk/src/rss/org/jboss/seam/rss/ui/UIFeed.java 2008-09-22 11:14:43 UTC (rev 9097)
@@ -42,16 +42,15 @@
private static final String COMPONENT_TYPE = "org.jboss.seam.rss.ui.UIFeed";
private static final String EXTENSION = "xml";
private static final String MIMETYPE = "text/xml";
- private static final FeedFormat DEFAULT_FEED_FORMAT = FeedFormat.ATOM10;
private boolean sendRedirect = true;
- private FeedFormat feedFormat = DEFAULT_FEED_FORMAT;
private String uid;
private String title;
private String subtitle;
private Date updated;
private String link;
+ private FeedFormat feedFormat = FeedFormat.ATOM10;
@SuppressWarnings("unchecked")
@@ -75,7 +74,7 @@
ChannelFeed channelFeed = (ChannelFeed) Contexts.getEventContext().get(FEED_IMPL_KEY);
ByteArrayOutputStream byteStream = new ByteArrayOutputStream();
try {
- FeedWriter.writeChannel(DEFAULT_FEED_FORMAT, channelFeed, byteStream);
+ FeedWriter.writeChannel(feedFormat, channelFeed, byteStream);
} catch (YarfrawException e) {
/**
* Was IOException, but 1.5 does not have this constructor
@@ -165,9 +164,9 @@
this.link = link;
}
- public String getFeedFormat()
+ public FeedFormat getFeedFormat()
{
- return (String) valueOf("feedFormat", feedFormat);
+ return (FeedFormat) valueOf("feedFormat", feedFormat);
}
public void setFeedFormat(FeedFormat feedFormat)
16 years, 2 months
Seam SVN: r9096 - trunk/src/main/org/jboss/seam/web.
by seam-commits@lists.jboss.org
Author: pete.muir(a)jboss.org
Date: 2008-09-22 07:13:12 -0400 (Mon, 22 Sep 2008)
New Revision: 9096
Modified:
trunk/src/main/org/jboss/seam/web/ExceptionFilter.java
Log:
JBSEAM-1277
Modified: trunk/src/main/org/jboss/seam/web/ExceptionFilter.java
===================================================================
--- trunk/src/main/org/jboss/seam/web/ExceptionFilter.java 2008-09-22 10:34:22 UTC (rev 9095)
+++ trunk/src/main/org/jboss/seam/web/ExceptionFilter.java 2008-09-22 11:13:12 UTC (rev 9096)
@@ -27,6 +27,7 @@
import org.jboss.seam.annotations.web.Filter;
import org.jboss.seam.contexts.Contexts;
import org.jboss.seam.contexts.FacesLifecycle;
+import org.jboss.seam.contexts.Lifecycle;
import org.jboss.seam.core.ConversationPropagation;
import org.jboss.seam.core.Manager;
import org.jboss.seam.exception.Exceptions;
@@ -73,15 +74,8 @@
protected void endWebRequestAfterException(HttpServletRequest request, HttpServletResponse response, Exception e)
throws ServletException, IOException
{
- //TODO: Are we really sure that someone flushes the "old"
- // conversation context before we get to here? I guess
- // the PhaseListener probably does it, but we want to
- // make sure of that...
log.warn("running exception handlers");
- //the FacesContext is gone - create a fake one for Redirect and HttpError to call
- MockFacesContext facesContext = createFacesContext(request, response);
- facesContext.setCurrent();
//if the event context was cleaned up, fish the conversation id
//directly out of the ServletRequest attributes, else get it from
@@ -91,6 +85,13 @@
(Manager) request.getAttribute( Seam.getComponentName(Manager.class) );
String conversationId = manager==null ? null : manager.getCurrentConversationId();
+ // Ensure that the call in which the exception occurred was cleaned up - it might not be, and there is no harm in trying
+ Lifecycle.endRequest();
+
+ //the FacesContext is gone - create a fake one for Redirect and HttpError to call
+ MockFacesContext facesContext = createFacesContext(request, response);
+ facesContext.setCurrent();
+
//Initialize the temporary context objects
FacesLifecycle.beginExceptionRecovery( facesContext.getExternalContext() );
16 years, 2 months
Seam SVN: r9095 - trunk/doc/Seam_Reference_Guide/en-US.
by seam-commits@lists.jboss.org
Author: pete.muir(a)jboss.org
Date: 2008-09-22 06:34:22 -0400 (Mon, 22 Sep 2008)
New Revision: 9095
Modified:
trunk/doc/Seam_Reference_Guide/en-US/Controls.xml
Log:
Add ICEfaces to recommended list
Modified: trunk/doc/Seam_Reference_Guide/en-US/Controls.xml
===================================================================
--- trunk/doc/Seam_Reference_Guide/en-US/Controls.xml 2008-09-22 09:32:14 UTC (rev 9094)
+++ trunk/doc/Seam_Reference_Guide/en-US/Controls.xml 2008-09-22 10:34:22 UTC (rev 9095)
@@ -7,7 +7,7 @@
Seam includes a number of JSF controls that are useful for working with
Seam. These are intended to complement the built-in JSF controls, and
controls from other third-party libraries. We recommend
- JBoss RichFaces, and Apache MyFaces Trinidad tag libraries for use with Seam.
+ JBoss RichFaces, ICEsoft ICEfaces and Apache MyFaces Trinidad tag libraries for use with Seam.
We do not recommend the use of the Tomahawk tag library.
</para>
16 years, 2 months
Seam SVN: r9094 - trunk/src/rss/org/jboss/seam/rss/ui.
by seam-commits@lists.jboss.org
Author: nickarls
Date: 2008-09-22 05:32:14 -0400 (Mon, 22 Sep 2008)
New Revision: 9094
Modified:
trunk/src/rss/org/jboss/seam/rss/ui/UIEntry.java
trunk/src/rss/org/jboss/seam/rss/ui/UIFeed.java
Log:
Fixed NPEs for dates
Modified: trunk/src/rss/org/jboss/seam/rss/ui/UIEntry.java
===================================================================
--- trunk/src/rss/org/jboss/seam/rss/ui/UIEntry.java 2008-09-22 09:31:47 UTC (rev 9093)
+++ trunk/src/rss/org/jboss/seam/rss/ui/UIEntry.java 2008-09-22 09:32:14 UTC (rev 9094)
@@ -60,8 +60,12 @@
Text summary = new Text(summaryFormat);
summary.setText(getSummary());
itemEntry.setDescriptionOrSummary(summary);
- itemEntry.setUpdatedDate(getUpdated(), new SimpleDateFormat(ATOM_DATE_FORMAT));
- itemEntry.setPubDate(getPublished(), new SimpleDateFormat(ATOM_DATE_FORMAT));
+ if (getUpdated() != null) {
+ itemEntry.setUpdatedDate(getUpdated(), new SimpleDateFormat(ATOM_DATE_FORMAT));
+ }
+ if (getPublished() != null) {
+ itemEntry.setPubDate(getPublished(), new SimpleDateFormat(ATOM_DATE_FORMAT));
+ }
channelFeed.addItem(itemEntry);
}
Modified: trunk/src/rss/org/jboss/seam/rss/ui/UIFeed.java
===================================================================
--- trunk/src/rss/org/jboss/seam/rss/ui/UIFeed.java 2008-09-22 09:31:47 UTC (rev 9093)
+++ trunk/src/rss/org/jboss/seam/rss/ui/UIFeed.java 2008-09-22 09:32:14 UTC (rev 9094)
@@ -62,7 +62,9 @@
channelFeed.setUid(getUid());
channelFeed.setTitle(getTitle());
channelFeed.setDescriptionOrSubtitle(getSubtitle());
- channelFeed.setPubDate(getUpdated(), new SimpleDateFormat(ATOM_DATE_FORMAT));
+ if (getUpdated() != null) {
+ channelFeed.setPubDate(getUpdated(), new SimpleDateFormat(ATOM_DATE_FORMAT));
+ }
channelFeed.addLink(getLink());
Contexts.getEventContext().set(FEED_IMPL_KEY, channelFeed);
}
16 years, 2 months