[jboss-cvs] JBossBlog SVN: r133 - in trunk: resources/WEB-INF and 7 other directories.

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Thu Nov 22 09:12:23 EST 2007


Author: adamw
Date: 2007-11-22 09:12:23 -0500 (Thu, 22 Nov 2007)
New Revision: 133

Added:
   trunk/src/action/org/jboss/shotoku/
   trunk/src/action/org/jboss/shotoku/web/
   trunk/src/action/org/jboss/shotoku/web/FilesystemResourceResolver.java
   trunk/src/action/org/jboss/shotoku/web/ResourcesFilter.java
Modified:
   trunk/blog.iml
   trunk/build.xml
   trunk/resources/WEB-INF/web.xml
   trunk/src/action/org/jboss/blog/session/manage/NewRemoteFeedBean.java
   trunk/src/action/org/jboss/blog/session/parser/ParserServiceImpl.java
   trunk/view/layout/template.xhtml
   trunk/view/manage/add.xhtml
   trunk/view/manage/add_remote.xhtml
   trunk/view/manage/index.xhtml
Log:


Modified: trunk/blog.iml
===================================================================
--- trunk/blog.iml	2007-11-22 11:08:03 UTC (rev 132)
+++ trunk/blog.iml	2007-11-22 14:12:23 UTC (rev 133)
@@ -52,6 +52,15 @@
         <SOURCES />
       </library>
     </orderEntry>
+    <orderEntry type="module-library">
+      <library>
+        <CLASSES>
+          <root url="jar://$MODULE_DIR$/lib/jsf-facelets.jar!/" />
+        </CLASSES>
+        <JAVADOC />
+        <SOURCES />
+      </library>
+    </orderEntry>
     <orderEntryProperties />
   </component>
 </module>

Modified: trunk/build.xml
===================================================================
--- trunk/build.xml	2007-11-22 11:08:03 UTC (rev 132)
+++ trunk/build.xml	2007-11-22 14:12:23 UTC (rev 133)
@@ -119,18 +119,11 @@
                                 <include name="classes/**/*.class"/>
                         </fileset>
                 </copy>         
-                <copy todir="${war.dir}/WEB-INF/lib">
+                <!--<copy todir="${war.dir}/WEB-INF/lib">
                         <fileset dir="${lib.dir}">
-                                <include name="richfaces-impl*.jar" />
-                        		<include name="richfaces-ui*.jar" />
-                                <include name="oscache*.jar" />
-                                <include name="commons-digester.jar" />
-                                <include name="commons-beanutils.jar" />
-                                <include name="jsf-facelets.jar" />
-                                <include name="jboss-seam-*.jar" />
-                                <exclude name="jboss-seam-gen.jar" />
+                            moved to ear goal
                         </fileset>
-                </copy>
+                </copy>  -->
                 <copy todir="${war.dir}/WEB-INF/classes">
                         <fileset dir="${basedir}/resources"> 
                                 <include name="messages*.properties"/>
@@ -159,6 +152,16 @@
                         		<include name="lib/richfaces-api*.jar" />
                                 <include name="lib/rome*.jar" />
                                 <include name="lib/jdom*.jar" />
+
+                                <!-- moved from the war goal -->
+                                <include name="lib/richfaces-impl*.jar" />
+                        		<include name="lib/richfaces-ui*.jar" />
+                                <include name="lib/oscache*.jar" />
+                                <include name="lib/commons-digester.jar" />
+                                <include name="lib/commons-beanutils.jar" />
+                                <include name="lib/jsf-facelets.jar" />
+                                <include name="lib/jboss-seam-*.jar" />
+                                <exclude name="lib/jboss-seam-gen.jar" />
                         </fileset>
                 </copy>
                 <copy todir="${ear.dir}/META-INF">
@@ -219,7 +222,7 @@
                 <delete dir="${ear.deploy.dir}" failonerror="no"/>
         </target>
         
-        <target name="restart" depends="explode" description="Restart the exploded archive">
+        <target name="restart" depends="clean,unexplode,explode" description="Restart the exploded archive">
                 <touch file="${ear.deploy.dir}/META-INF/application.xml"/>
         </target>
 
@@ -242,11 +245,6 @@
         		<delete dir="${src.schema.dir}" failonerror="no"/>
                 <delete dir="${basedir}/test-report"/>
                 <delete dir="${basedir}/test-output"/>
-                <delete failonerror="no">
-                        <fileset dir="${test.dir}">
-                                <exclude name="**/*.class" if="eclipse.running"/>
-                        </fileset>
-                </delete>
         </target>
 
         <target name="compiletest" unless="eclipse.running" description="Compile the Java source code for the tests">

Modified: trunk/resources/WEB-INF/web.xml
===================================================================
--- trunk/resources/WEB-INF/web.xml	2007-11-22 11:08:03 UTC (rev 132)
+++ trunk/resources/WEB-INF/web.xml	2007-11-22 14:12:23 UTC (rev 133)
@@ -1,22 +1,27 @@
 <?xml version="1.0" ?>
 <web-app xmlns="http://java.sun.com/xml/ns/javaee"
          xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-         xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" 
+         xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"
          version="2.5">
 
     <!-- Ajax4jsf -->
-    
+
     <context-param>
         <param-name>org.richfaces.SKIN</param-name>
         <param-value>blueSky</param-value>
     </context-param>
- 
-   <!-- Seam -->
-    
-   <listener>
-      <listener-class>org.jboss.seam.servlet.SeamListener</listener-class>
-   </listener>
-    
+
+    <context-param>
+        <param-name>sourceBasePath</param-name>
+        <param-value>/Users/adamwarski/blog/view</param-value>
+    </context-param>
+
+    <!-- Seam -->
+
+    <listener>
+        <listener-class>org.jboss.seam.servlet.SeamListener</listener-class>
+    </listener>
+
     <filter>
         <filter-name>Seam Filter</filter-name>
         <filter-class>org.jboss.seam.servlet.SeamFilter</filter-class>
@@ -25,52 +30,82 @@
     <filter-mapping>
         <filter-name>Seam Filter</filter-name>
         <url-pattern>/*</url-pattern>
+        <dispatcher>ERROR</dispatcher>
+        <dispatcher>FORWARD</dispatcher>
+        <dispatcher>INCLUDE</dispatcher>
+        <dispatcher>REQUEST</dispatcher>
     </filter-mapping>
-        
-   <servlet>
-      <servlet-name>Seam Resource Servlet</servlet-name>
-      <servlet-class>org.jboss.seam.servlet.SeamResourceServlet</servlet-class>
-   </servlet>
-    
-   <servlet-mapping>
-      <servlet-name>Seam Resource Servlet</servlet-name>
-      <url-pattern>/seam/resource/*</url-pattern>
-   </servlet-mapping>
-   
-   <!-- Facelets development mode (disable in production) -->
-   
-   <context-param>
-      <param-name>facelets.DEVELOPMENT</param-name>
-      <param-value>true</param-value>
-   </context-param>
-    
-   <!-- JSF -->
-   
-   <context-param>
-      <param-name>javax.faces.DEFAULT_SUFFIX</param-name>
-      <param-value>.xhtml</param-value>
-   </context-param>
 
-   <servlet>
-      <servlet-name>Faces Servlet</servlet-name>
-      <servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
-      <load-on-startup>1</load-on-startup>
-   </servlet>
-    
-   <servlet-mapping>
-      <servlet-name>Faces Servlet</servlet-name>
-      <url-pattern>*.seam</url-pattern>
-   </servlet-mapping>
-                  
-   <security-constraint> 
-       <display-name>Restrict raw XHTML Documents</display-name>
-       <web-resource-collection>
-           <web-resource-name>XHTML</web-resource-name>
-           <url-pattern>*.xhtml</url-pattern>
-       </web-resource-collection>
-       <auth-constraint/>
-   </security-constraint>
-   
-   
-   
+    <!-- Resources filter -->
+
+    <filter>
+        <filter-name>Resources Filter</filter-name>
+        <filter-class>org.jboss.shotoku.web.ResourcesFilter</filter-class>
+    </filter>
+
+    <filter-mapping>
+        <filter-name>Resources Filter</filter-name>
+        <url-pattern>/*</url-pattern>
+        <dispatcher>ERROR</dispatcher>
+        <dispatcher>FORWARD</dispatcher>
+        <dispatcher>INCLUDE</dispatcher>
+        <dispatcher>REQUEST</dispatcher>
+    </filter-mapping>
+
+    <servlet>
+        <servlet-name>Seam Resource Servlet</servlet-name>
+        <servlet-class>org.jboss.seam.servlet.SeamResourceServlet</servlet-class>
+    </servlet>
+
+    <servlet-mapping>
+        <servlet-name>Seam Resource Servlet</servlet-name>
+        <url-pattern>/seam/resource/*</url-pattern>
+    </servlet-mapping>
+
+    <!-- Facelets development mode (disable in production) -->
+
+    <context-param>
+        <param-name>facelets.DEVELOPMENT</param-name>
+        <param-value>true</param-value>
+    </context-param>
+
+    <context-param>
+        <param-name>facelets.REFRESH_PERIOD</param-name>
+        <param-value>0</param-value>
+    </context-param>
+
+    <context-param>
+        <param-name>facelets.RESOURCE_RESOLVER</param-name>
+        <param-value>org.jboss.shotoku.web.FilesystemResourceResolver</param-value>
+    </context-param>
+
+    <!-- JSF -->
+
+    <context-param>
+        <param-name>javax.faces.DEFAULT_SUFFIX</param-name>
+        <param-value>.xhtml</param-value>
+    </context-param>
+
+    <servlet>
+        <servlet-name>Faces Servlet</servlet-name>
+        <servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
+        <load-on-startup>1</load-on-startup>
+    </servlet>
+
+    <servlet-mapping>
+        <servlet-name>Faces Servlet</servlet-name>
+        <url-pattern>*.seam</url-pattern>
+    </servlet-mapping>
+
+    <security-constraint>
+        <display-name>Restrict raw XHTML Documents</display-name>
+        <web-resource-collection>
+            <web-resource-name>XHTML</web-resource-name>
+            <url-pattern>*.xhtml</url-pattern>
+        </web-resource-collection>
+        <auth-constraint/>
+    </security-constraint>
+
+
+
 </web-app>

Modified: trunk/src/action/org/jboss/blog/session/manage/NewRemoteFeedBean.java
===================================================================
--- trunk/src/action/org/jboss/blog/session/manage/NewRemoteFeedBean.java	2007-11-22 11:08:03 UTC (rev 132)
+++ trunk/src/action/org/jboss/blog/session/manage/NewRemoteFeedBean.java	2007-11-22 14:12:23 UTC (rev 133)
@@ -20,7 +20,7 @@
     @NotEmpty
     private String link;
 
-    private Boolean parseOk;
+    private boolean parseOk;
     private Exception parseException;
 
     public String getLink() {
@@ -31,11 +31,11 @@
         this.link = link;
     }
 
-    public Boolean isParseOk() {
+    public boolean isParseOk() {
         return parseOk;
     }
 
-    public void setParseOk(Boolean parseOk) {
+    public void setParseOk(boolean parseOk) {
         this.parseOk = parseOk;
     }
 
@@ -49,10 +49,11 @@
 
     public void parseFeed() {
         try {
+            System.out.println("getLink() = " + getLink());
             parserService.parse(getLink());
             setParseOk(true);
         } catch (ParserException e) {
-            setParseException(parseException);
+            setParseException(e);
             setParseOk(false);
         }
     }

Modified: trunk/src/action/org/jboss/blog/session/parser/ParserServiceImpl.java
===================================================================
--- trunk/src/action/org/jboss/blog/session/parser/ParserServiceImpl.java	2007-11-22 11:08:03 UTC (rev 132)
+++ trunk/src/action/org/jboss/blog/session/parser/ParserServiceImpl.java	2007-11-22 14:12:23 UTC (rev 133)
@@ -10,6 +10,7 @@
 import org.jboss.blog.model.Blog;
 import org.jboss.blog.model.Post;
 import org.jboss.blog.tools.StringTools;
+import org.jboss.seam.annotations.AutoCreate;
 import org.jboss.seam.annotations.Name;
 
 import javax.ejb.Remove;
@@ -24,6 +25,7 @@
  */
 @Stateless
 @Name("parserService")
+ at AutoCreate
 public class ParserServiceImpl implements ParserService {
     public Blog parse(String link) throws ParserException {
         try {

Added: trunk/src/action/org/jboss/shotoku/web/FilesystemResourceResolver.java
===================================================================
--- trunk/src/action/org/jboss/shotoku/web/FilesystemResourceResolver.java	                        (rev 0)
+++ trunk/src/action/org/jboss/shotoku/web/FilesystemResourceResolver.java	2007-11-22 14:12:23 UTC (rev 133)
@@ -0,0 +1,32 @@
+package org.jboss.shotoku.web;
+
+import com.sun.facelets.impl.ResourceResolver;
+
+import javax.faces.context.FacesContext;
+import java.net.MalformedURLException;
+import java.net.URL;
+
+/**
+ * @author <a href="mailto:adam at warski.org">Adam Warski</a>
+ */
+public class FilesystemResourceResolver implements ResourceResolver {
+    private String sourceBasePath;
+
+    public String getSourceBasePath() {
+        if (sourceBasePath == null) {
+            sourceBasePath = FacesContext.getCurrentInstance().getExternalContext()
+                    .getInitParameter("sourceBasePath");
+        }
+
+        return sourceBasePath;
+    }
+
+    public URL resolveUrl(String s) {
+        try {
+            return new URL("file", "", getSourceBasePath() + s);
+        } catch (MalformedURLException e) {
+            e.printStackTrace();
+            return null;
+        }
+    }
+}

Added: trunk/src/action/org/jboss/shotoku/web/ResourcesFilter.java
===================================================================
--- trunk/src/action/org/jboss/shotoku/web/ResourcesFilter.java	                        (rev 0)
+++ trunk/src/action/org/jboss/shotoku/web/ResourcesFilter.java	2007-11-22 14:12:23 UTC (rev 133)
@@ -0,0 +1,189 @@
+/******************************************************************************
+ * JBoss, a division of Red Hat                                               *
+ * Copyright 2006, Red Hat Middleware, LLC, and individual                    *
+ * contributors as indicated by the @authors tag. See the                     *
+ * copyright.txt in the distribution for a full listing of                    *
+ * individual contributors.                                                   *
+ *                                                                            *
+ * This is free software; you can redistribute it and/or modify it            *
+ * under the terms of the GNU Lesser General Public License as                *
+ * published by the Free Software Foundation; either version 2.1 of           *
+ * the License, or (at your option) any later version.                        *
+ *                                                                            *
+ * This software is distributed in the hope that it will be useful,           *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of             *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU           *
+ * Lesser General Public License for more details.                            *
+ *                                                                            *
+ * You should have received a copy of the GNU Lesser General Public           *
+ * License along with this software; if not, write to the Free                *
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA         *
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.                   *
+ ******************************************************************************/
+package org.jboss.shotoku.web;
+
+import javax.servlet.*;
+import javax.servlet.http.HttpServletRequest;
+import java.io.*;
+import java.util.HashSet;
+import java.util.Set;
+import java.util.Arrays;
+import java.util.logging.Logger;
+
+/**
+ * A filter, which reads resources from the filesystem and makes them visible to the
+ * application as deployed files --- useful for development. Specifically,
+ * the <code>sourceBasePath</code> init-parameter value
+ * is prepended to the path. The file referenced by the path is then included
+ * in the request. To specify for which file extensions the filter is enabled,
+ * set the <code>extensions</code> init parameter. If not set, it defaults to:
+ * <code>jsp,css,html,htm,gif,jpg,jpeg,png,txt,xhtml</code>.
+ *
+ * @author <a href="mailto:adam at warski.org">Adam Warski</a>
+ */
+public class ResourcesFilter implements Filter {
+    private final static Logger log = Logger.getLogger(ResourcesFilter.class.getName());
+
+    /**
+	 * A list of extensions, which are filtered by default, if nothing is
+	 * specified in the filter configuration.
+	 */
+	private final static String DEFAULT_EXTENSIONS = "jsp,css,html,htm,gif,jpg,jpeg,png,txt,xhtml";
+
+	/**
+	 * Base path to a directory where files will
+	 * be copied; it's a subdirectory of a deployment directory created by the
+	 * app server.
+	 */
+	private String destBasePath;
+
+	/**
+	 * Directory in the filesystem from which to read the files.
+	 */
+	private String sourceBasePath;
+
+	/**
+	 * A set of <code>java.lang.String</code>s, which are extensions, that are filtered.
+	 */
+	private Set<String> extensions;
+
+    /**
+	 * Transfers all bytes from the given input stream to the given output
+	 * stream.
+	 *
+	 * @param is
+	 *            Input stream to read from.
+	 * @param os
+	 *            Output stream to write to.
+	 * @throws java.io.IOException In case of an IO exception.
+	 */
+	private void transfer(InputStream is, OutputStream os) throws IOException {
+		byte[] buffer = new byte[1024];
+		int read;
+		while ((read = is.read(buffer)) != -1) {
+			os.write(buffer, 0, read);
+		}
+	}
+
+	public void init(FilterConfig conf) {
+		sourceBasePath = conf.getInitParameter("sourceBasePath");
+        if (sourceBasePath == null || "".equals(sourceBasePath)) {
+            sourceBasePath = conf.getServletContext().getInitParameter("sourceBasePath");
+        }
+
+        destBasePath = conf.getServletContext().getRealPath("");
+
+		extensions = new HashSet<String>();
+		String filteredExtensionsString = conf.getInitParameter("extensions");
+
+		if (filteredExtensionsString == null) {
+			filteredExtensionsString = DEFAULT_EXTENSIONS;
+		}
+
+		String[] tokens = filteredExtensionsString.split(",");
+
+        extensions.addAll(Arrays.asList(tokens));
+	}
+
+	private String safeToString(Object o) {
+		if (o == null) {
+			return null;
+		}
+
+		return o.toString();
+	}
+
+	private boolean checkExtension(String path) {
+		int dotIndex = path.lastIndexOf('.');
+
+		if (dotIndex != -1) {
+			String extension = path.substring(dotIndex + 1);
+			return extensions.contains(extension);
+		} else {
+			return false;
+		}
+	}
+
+	public void doFilter(ServletRequest request, ServletResponse response,
+			FilterChain chain) throws IOException, ServletException {
+		if (request instanceof HttpServletRequest) {
+			HttpServletRequest httpRequest = (HttpServletRequest) request;
+
+			/* Getting the name of the requested resource; first checking if
+			 * it is an included, then forwarded resource. Finally, checking
+			 * the request uri itself. */
+			String requestedResource;
+			requestedResource = safeToString(httpRequest.getAttribute("javax.servlet.include.servlet_path"));
+
+			if (requestedResource == null) {
+				requestedResource = httpRequest.getServletPath();
+			}
+
+            // JSF check - we have to replace .jsf with .jsp.
+			String realRequestedResource = requestedResource;
+			if (realRequestedResource.endsWith(".jsf")) {
+				realRequestedResource = realRequestedResource.replace(".jsf", ".jsp");
+			} else if (realRequestedResource.endsWith(".seam")) {
+				realRequestedResource = realRequestedResource.replace(".seam", ".xhtml");
+			}
+
+			// Filtering only some file extensions. Not filtering Seam's debug.xhtml.
+			if ((!checkExtension(realRequestedResource)) || (realRequestedResource.indexOf("debug.xhtml") != -1)) {
+				chain.doFilter(request, response);
+				return;
+			}
+
+            File sourceFile = new File(sourceBasePath + realRequestedResource);
+			File destFile = new File(destBasePath + realRequestedResource);
+
+			InputStream in = null;
+			OutputStream out = null;
+
+			try {
+				destFile.getParentFile().mkdirs();
+				destFile.setLastModified(System.currentTimeMillis());
+
+				in = new FileInputStream(sourceFile);
+				out = new FileOutputStream(destFile);
+
+				transfer(in, out);
+			} catch (Exception e) {
+                log.warning("Cannot copy resource: " + sourceFile);
+            } finally {
+				if (in != null) {
+					in.close();
+				}
+
+				if (out != null) {
+					out.close();
+				}
+			}
+		}
+
+        chain.doFilter(request, response);
+    }
+
+	public void destroy() {
+
+	}
+}
\ No newline at end of file

Modified: trunk/view/layout/template.xhtml
===================================================================
--- trunk/view/layout/template.xhtml	2007-11-22 11:08:03 UTC (rev 132)
+++ trunk/view/layout/template.xhtml	2007-11-22 14:12:23 UTC (rev 133)
@@ -8,23 +8,21 @@
 <head>    
     <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
     <title>blog</title>
-    <link href="stylesheet/theme.css" rel="stylesheet" type="text/css" />
+    <link href="/blog/stylesheet/theme.css" rel="stylesheet" type="text/css" />
 </head>
 
 <body>
-
     <ui:include src="menu.xhtml">
         <ui:param name="projectName" value="blog"/>
-    </ui:include>
-
-	<div class="body">
+    </ui:include>
+
+	<div class="body">
 		<ui:insert name="body"/>
 	</div>
-
+
 	<div class="footer">
 		Powered by <a href="http://jboss.com/products/seam">Seam</a>.
 		Generated by seam-gen.
 	</div>
-
 </body>
 </html>

Modified: trunk/view/manage/add.xhtml
===================================================================
--- trunk/view/manage/add.xhtml	2007-11-22 11:08:03 UTC (rev 132)
+++ trunk/view/manage/add.xhtml	2007-11-22 14:12:23 UTC (rev 133)
@@ -1,5 +1,5 @@
 <!DOCTYPE composition PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
-                      "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+        "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
 <ui:composition xmlns="http://www.w3.org/1999/xhtml"
                 xmlns:s="http://jboss.com/products/seam/taglib"
                 xmlns:ui="http://java.sun.com/jsf/facelets"
@@ -8,13 +8,19 @@
                 xmlns:rich="http://richfaces.org/rich"
                 template="../layout/template.xhtml">
 
-<ui:define name="body">
+    <ui:define name="body">
 
-    <h:messages globalOnly="true" styleClass="message"/>
+        <h:messages globalOnly="true" styleClass="message"/>
 
-    <h1>Add a new feed</h1>
-
-    <s:link value="Add a new remote feed" view="/manage/add_remote.xhtml" />
-    <s:link value="Add a new aggregated feed" />
-</ui:define>
+        <h1>Add a new feed</h1>
+        
+        <ul>
+            <li>
+                <s:link value="Add a new remote feed" view="/manage/add_remote.xhtml" />
+            </li>
+            <li>
+                <s:link value="Add a new aggregated feed" />
+            </li>
+        </ul>
+    </ui:define>
 </ui:composition>

Modified: trunk/view/manage/add_remote.xhtml
===================================================================
--- trunk/view/manage/add_remote.xhtml	2007-11-22 11:08:03 UTC (rev 132)
+++ trunk/view/manage/add_remote.xhtml	2007-11-22 14:12:23 UTC (rev 133)
@@ -25,23 +25,22 @@
                 <h:message for="link" styleClass="error" />
             </a:outputPanel>
             <br />
-
-            <a:commandButton action="#{newRemoteFeed.parseFeed}" value="Read the feed" id="readFeed"
+            <a:commandButton action="#{newRemoteFeed.parseFeed}" value="Read the feed"
                              reRender="parseStatus" /> <br />
 
-            Status: <a:status stopText="n/a" startText="Wait ..." for="readFeed" /> <br />
+            Status: <a:status stopText="n/a" startText="Wait ..." /> <br />
             <h:panelGroup id="parseStatus">
-                <h:panelGroup rendered="#{newRemoteFeed.parseOk == true}">
+                <h:panelGroup rendered="#{newRemoteFeed.parseOk}">
                     Parsing the feed was successfull! You can proceed.
                 </h:panelGroup>
-                <h:panelGroup rendered="#{newRemoteFeed.parseOk == false}">
+                <h:panelGroup rendered="#{!newRemoteFeed.parseOk and newRemoteFeed.parseException != null}">
                     Parsing the feed failed, because of the following exception:
                     #{newRemoteFeed.parseException.message}
                 </h:panelGroup>
                 <br />
-            </h:panelGroup>
 
-            <h:commandButton disabled="#{newRemoteFeed.parseOk != true}" value="Next" />
+                <h:commandButton disabled="#{!newRemoteFeed.parseOk}" value="Next" />
+            </h:panelGroup>
         </h:form>
     </ui:define>
 </ui:composition>

Modified: trunk/view/manage/index.xhtml
===================================================================
--- trunk/view/manage/index.xhtml	2007-11-22 11:08:03 UTC (rev 132)
+++ trunk/view/manage/index.xhtml	2007-11-22 14:12:23 UTC (rev 133)
@@ -14,7 +14,7 @@
 
     <h1>Manage feeds</h1>
 
-    <s:link value="Add new feed" view="/manage/add.xhtml" propagation="start" />
+    <s:link value="Add new feed" view="/manage/add.xhtml" propagation="begin" />
 
 </ui:define>
 </ui:composition>




More information about the jboss-cvs-commits mailing list