[jboss-cvs] JBossBlog SVN: r134 - in trunk: src/action/org/jboss/blog/session/parser and 5 other directories.
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Thu Nov 22 14:39:39 EST 2007
Author: adamw
Date: 2007-11-22 14:39:39 -0500 (Thu, 22 Nov 2007)
New Revision: 134
Added:
trunk/src/action/org/jboss/blog/session/manage/FeedModBean.java
trunk/src/action/org/jboss/blog/session/manage/InvalidFeedTypeException.java
trunk/src/action/org/jboss/blog/session/manage/RemoteFeedModBean.java
trunk/view/manage/feed_add.xhtml
trunk/view/manage/feed_mod.xhtml
trunk/view/manage/remote_add.xhtml
Removed:
trunk/view/layout/display.xhtml
trunk/view/layout/edit.xhtml
trunk/view/layout/loginout.xhtml
trunk/view/login.page.xml
Modified:
trunk/src/action/org/jboss/blog/session/parser/ParserServiceImpl.java
trunk/src/model/org/jboss/blog/model/Post.java
trunk/view/home.xhtml
trunk/view/layout/template.xhtml
trunk/view/login.xhtml
trunk/view/manage/add.xhtml
trunk/view/manage/index.xhtml
trunk/view/stylesheet/theme.css
Log:
Added: trunk/src/action/org/jboss/blog/session/manage/FeedModBean.java
===================================================================
--- trunk/src/action/org/jboss/blog/session/manage/FeedModBean.java (rev 0)
+++ trunk/src/action/org/jboss/blog/session/manage/FeedModBean.java 2007-11-22 19:39:39 UTC (rev 134)
@@ -0,0 +1,25 @@
+package org.jboss.blog.session.manage;
+
+import org.jboss.blog.model.Feed;
+import org.jboss.seam.ScopeType;
+import org.jboss.seam.annotations.In;
+import org.jboss.seam.annotations.Name;
+import org.jboss.seam.annotations.Scope;
+
+/**
+ * @author <a href="mailto:adam at warski.org">Adam Warski</a>
+ */
+ at Scope(ScopeType.CONVERSATION)
+ at Name("feedMod")
+public class FeedModBean {
+ @In
+ private Feed feed;
+
+ public Feed getFeed() {
+ return feed;
+ }
+
+ public void setFeed(Feed feed) {
+ this.feed = feed;
+ }
+}
Added: trunk/src/action/org/jboss/blog/session/manage/InvalidFeedTypeException.java
===================================================================
--- trunk/src/action/org/jboss/blog/session/manage/InvalidFeedTypeException.java (rev 0)
+++ trunk/src/action/org/jboss/blog/session/manage/InvalidFeedTypeException.java 2007-11-22 19:39:39 UTC (rev 134)
@@ -0,0 +1,7 @@
+package org.jboss.blog.session.manage;
+
+/**
+ * @author <a href="mailto:adam at warski.org">Adam Warski</a>
+ */
+public class InvalidFeedTypeException extends RuntimeException {
+}
Copied: trunk/src/action/org/jboss/blog/session/manage/RemoteFeedModBean.java (from rev 133, trunk/src/action/org/jboss/blog/session/manage/NewRemoteFeedBean.java)
===================================================================
--- trunk/src/action/org/jboss/blog/session/manage/RemoteFeedModBean.java (rev 0)
+++ trunk/src/action/org/jboss/blog/session/manage/RemoteFeedModBean.java 2007-11-22 19:39:39 UTC (rev 134)
@@ -0,0 +1,92 @@
+package org.jboss.blog.session.manage;
+
+import org.hibernate.validator.NotEmpty;
+import org.jboss.blog.model.Blog;
+import org.jboss.blog.model.Feed;
+import org.jboss.blog.model.RemoteFeed;
+import org.jboss.blog.session.parser.ParserException;
+import org.jboss.blog.session.parser.ParserService;
+import org.jboss.seam.ScopeType;
+import org.jboss.seam.annotations.In;
+import org.jboss.seam.annotations.Name;
+import org.jboss.seam.annotations.Out;
+import org.jboss.seam.annotations.Scope;
+
+/**
+ * @author <a href="mailto:adam at warski.org">Adam Warski</a>
+ */
+ at Scope(ScopeType.CONVERSATION)
+ at Name("remoteFeedMod")
+public class RemoteFeedModBean {
+ @In
+ private ParserService parserService;
+
+ @In(required = false)
+ @Out(required = false)
+ private Feed feed;
+
+ @NotEmpty
+ private String link;
+
+ private boolean parseOk;
+ private Exception parseException;
+
+ public String getLink() {
+ return link;
+ }
+
+ public void setLink(String link) {
+ this.link = link;
+ }
+
+ public boolean isParseOk() {
+ return parseOk;
+ }
+
+ public void setParseOk(boolean parseOk) {
+ this.parseOk = parseOk;
+ }
+
+ public Exception getParseException() {
+ return parseException;
+ }
+
+ public void setParseException(Exception parseException) {
+ this.parseException = parseException;
+ }
+
+ public Feed getFeed() {
+ return feed;
+ }
+
+ public void setFeed(Feed feed) {
+ this.feed = feed;
+ }
+
+ public void parseFeed() {
+ try {
+ Blog blog = parserService.parse(getLink());
+
+ if (feed == null) {
+ RemoteFeed newRemoteFeed = new RemoteFeed();
+ newRemoteFeed.setLink(getLink());
+ newRemoteFeed.setBlog(blog);
+ newRemoteFeed.setMaxPosts(10);
+
+ feed = newRemoteFeed;
+ } else {
+ if (feed instanceof RemoteFeed) {
+ RemoteFeed remoteFeed = (RemoteFeed) feed;
+ remoteFeed.setLink(getLink());
+ } else {
+ throw new InvalidFeedTypeException();
+ }
+ }
+
+ setParseOk(true);
+ } catch (ParserException e) {
+ 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 14:12:23 UTC (rev 133)
+++ trunk/src/action/org/jboss/blog/session/parser/ParserServiceImpl.java 2007-11-22 19:39:39 UTC (rev 134)
@@ -63,7 +63,8 @@
post.setTitle(entry.getTitle());
post.setPublished(entry.getPublishedDate());
- post.setModified(entry.getUpdatedDate());
+ post.setModified(
+ entry.getUpdatedDate() == null ? entry.getPublishedDate() : entry.getUpdatedDate());
post.setLink(entry.getLink());
post.setGuid(entry.getUri());
Modified: trunk/src/model/org/jboss/blog/model/Post.java
===================================================================
--- trunk/src/model/org/jboss/blog/model/Post.java 2007-11-22 14:12:23 UTC (rev 133)
+++ trunk/src/model/org/jboss/blog/model/Post.java 2007-11-22 19:39:39 UTC (rev 134)
@@ -56,7 +56,7 @@
@NotNull
private Date modified;
- @ManyToOne
+ @ManyToOne(fetch = FetchType.LAZY)
@NotNull
private Blog blog;
Modified: trunk/view/home.xhtml
===================================================================
--- trunk/view/home.xhtml 2007-11-22 14:12:23 UTC (rev 133)
+++ trunk/view/home.xhtml 2007-11-22 19:39:39 UTC (rev 134)
@@ -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"
@@ -7,12 +7,7 @@
xmlns:h="http://java.sun.com/jsf/html"
xmlns:rich="http://richfaces.org/rich"
template="layout/template.xhtml">
-
-<ui:define name="body">
-
- <h:messages globalOnly="true" styleClass="message"/>
-
- <s:link value="Manage feeds" view="/manage/index.xhtml" propagation="none" />
-
-</ui:define>
+ <ui:define name="body">
+ <s:link value="Manage feeds" view="/manage/index.xhtml" propagation="none" />
+ </ui:define>
</ui:composition>
Deleted: trunk/view/layout/display.xhtml
===================================================================
--- trunk/view/layout/display.xhtml 2007-11-22 14:12:23 UTC (rev 133)
+++ trunk/view/layout/display.xhtml 2007-11-22 19:39:39 UTC (rev 134)
@@ -1,16 +0,0 @@
-<ui:composition xmlns="http://www.w3.org/1999/xhtml"
- xmlns:ui="http://java.sun.com/jsf/facelets"
- xmlns:h="http://java.sun.com/jsf/html"
- xmlns:f="http://java.sun.com/jsf/core"
- xmlns:s="http://jboss.com/products/seam/taglib">
-
- <div class="prop">
- <span class="name">
- <ui:insert name="label"/>
- </span>
- <span class="value">
- <ui:insert/>
- </span>
- </div>
-
-</ui:composition>
\ No newline at end of file
Deleted: trunk/view/layout/edit.xhtml
===================================================================
--- trunk/view/layout/edit.xhtml 2007-11-22 14:12:23 UTC (rev 133)
+++ trunk/view/layout/edit.xhtml 2007-11-22 19:39:39 UTC (rev 134)
@@ -1,24 +0,0 @@
-<ui:composition xmlns="http://www.w3.org/1999/xhtml"
- xmlns:ui="http://java.sun.com/jsf/facelets"
- xmlns:h="http://java.sun.com/jsf/html"
- xmlns:f="http://java.sun.com/jsf/core"
- xmlns:s="http://jboss.com/products/seam/taglib">
-
- <div class="prop">
-
- <s:label styleClass="name #{invalid?'errors':''}">
- <ui:insert name="label"/>
- <s:span styleClass="required" rendered="#{required}">*</s:span>
- </s:label>
-
- <span class="value #{invalid?'errors':''}">
- <s:validateAll>
- <ui:insert/>
- </s:validateAll>
- </span>
-
- <s:message styleClass="error errors"/>
-
- </div>
-
-</ui:composition>
\ No newline at end of file
Deleted: trunk/view/layout/loginout.xhtml
===================================================================
--- trunk/view/layout/loginout.xhtml 2007-11-22 14:12:23 UTC (rev 133)
+++ trunk/view/layout/loginout.xhtml 2007-11-22 19:39:39 UTC (rev 134)
@@ -1,12 +0,0 @@
-<div class="loginout"
- xmlns="http://www.w3.org/1999/xhtml"
- xmlns:ui="http://java.sun.com/jsf/facelets"
- xmlns:h="http://java.sun.com/jsf/html"
- xmlns:f="http://java.sun.com/jsf/core"
- xmlns:s="http://jboss.com/products/seam/taglib">
- <h:outputText value="Welcome, #{identity.username}" rendered="#{identity.loggedIn}"/>
-  | 
- <s:link view="/login.xhtml" value="Login" rendered="#{not identity.loggedIn}"/>
- <s:link view="/home.xhtml" action="#{identity.logout}" value="Logout" rendered="#{identity.loggedIn}"/>
- |
-</div>
Modified: trunk/view/layout/template.xhtml
===================================================================
--- trunk/view/layout/template.xhtml 2007-11-22 14:12:23 UTC (rev 133)
+++ trunk/view/layout/template.xhtml 2007-11-22 19:39:39 UTC (rev 134)
@@ -17,7 +17,9 @@
</ui:include>
<div class="body">
- <ui:insert name="body"/>
+ <h:messages globalOnly="true" styleClass="message"/>
+
+ <ui:insert name="body"/>
</div>
<div class="footer">
Deleted: trunk/view/login.page.xml
===================================================================
--- trunk/view/login.page.xml 2007-11-22 14:12:23 UTC (rev 133)
+++ trunk/view/login.page.xml 2007-11-22 19:39:39 UTC (rev 134)
@@ -1,12 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<page xmlns="http://jboss.com/products/seam/pages"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://jboss.com/products/seam/pages http://jboss.com/products/seam/pages-2.0.xsd">
-
- <navigation from-action="#{identity.login}">
- <rule if="#{identity.loggedIn}">
- <redirect view-id="/home.xhtml"/>
- </rule>
- </navigation>
-
-</page>
Modified: trunk/view/login.xhtml
===================================================================
--- trunk/view/login.xhtml 2007-11-22 14:12:23 UTC (rev 133)
+++ trunk/view/login.xhtml 2007-11-22 19:39:39 UTC (rev 134)
@@ -1,5 +1,5 @@
-<!DOCTYPE composition PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<!DOCTYPE composition PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+ "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"
@@ -7,39 +7,35 @@
xmlns:h="http://java.sun.com/jsf/html"
xmlns:rich="http://richfaces.org/rich"
template="layout/template.xhtml">
+ <ui:define name="body">
+ <h:form id="login">
-<ui:define name="body">
-
- <h:messages styleClass="message"/>
-
- <h:form id="login">
-
- <rich:panel>
- <f:facet name="header">Login</f:facet>
-
- <p>Please login using any username and password</p>
-
- <div class="dialog">
- <h:panelGrid columns="2" rowClasses="prop" columnClasses="name,value">
- <h:outputLabel for="username">Username</h:outputLabel>
- <h:inputText id="username"
- value="#{identity.username}"/>
- <h:outputLabel for="password">Password</h:outputLabel>
- <h:inputSecret id="password"
- value="#{identity.password}"/>
- <h:outputLabel for="rememberMe">Remember me</h:outputLabel>
- <h:selectBooleanCheckbox id="rememberMe"
- value="#{identity.rememberMe}"/>
- </h:panelGrid>
+ <rich:panel>
+ <f:facet name="header">Login</f:facet>
+
+ <p>Please login using any username and password</p>
+
+ <div class="dialog">
+ <h:panelGrid columns="2" rowClasses="prop" columnClasses="name,value">
+ <h:outputLabel for="username">Username</h:outputLabel>
+ <h:inputText id="username"
+ value="#{identity.username}"/>
+ <h:outputLabel for="password">Password</h:outputLabel>
+ <h:inputSecret id="password"
+ value="#{identity.password}"/>
+ <h:outputLabel for="rememberMe">Remember me</h:outputLabel>
+ <h:selectBooleanCheckbox id="rememberMe"
+ value="#{identity.rememberMe}"/>
+ </h:panelGrid>
+ </div>
+
+ </rich:panel>
+
+ <div class="actionButtons">
+ <h:commandButton value="Login" action="#{identity.login}"/>
</div>
-
- </rich:panel>
-
- <div class="actionButtons">
- <h:commandButton value="Login" action="#{identity.login}"/>
- </div>
-
- </h:form>
- </ui:define>
+ </h:form>
+
+ </ui:define>
</ui:composition>
Modified: trunk/view/manage/add.xhtml
===================================================================
--- trunk/view/manage/add.xhtml 2007-11-22 14:12:23 UTC (rev 133)
+++ trunk/view/manage/add.xhtml 2007-11-22 19:39:39 UTC (rev 134)
@@ -16,11 +16,8 @@
<ul>
<li>
- <s:link value="Add a new remote feed" view="/manage/add_remote.xhtml" />
+ <s:link value="Add a new remote feed" view="/manage/remote_add.xhtml" />
</li>
- <li>
- <s:link value="Add a new aggregated feed" />
- </li>
</ul>
</ui:define>
</ui:composition>
Added: trunk/view/manage/feed_add.xhtml
===================================================================
--- trunk/view/manage/feed_add.xhtml (rev 0)
+++ trunk/view/manage/feed_add.xhtml 2007-11-22 19:39:39 UTC (rev 134)
@@ -0,0 +1,18 @@
+<!DOCTYPE composition PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+ "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"
+ xmlns:f="http://java.sun.com/jsf/core"
+ xmlns:h="http://java.sun.com/jsf/html"
+ xmlns:rich="http://richfaces.org/rich"
+ xmlns:a="http://richfaces.org/a4j"
+ template="../layout/template.xhtml">
+ <ui:define name="body">
+ <h1>Add a new feed - edit data</h1>
+
+ <ui:include src="feed_mod.xhtml">
+ <ui:param name="new" value="true" />
+ </ui:include>
+ </ui:define>
+</ui:composition>
Added: trunk/view/manage/feed_mod.xhtml
===================================================================
--- trunk/view/manage/feed_mod.xhtml (rev 0)
+++ trunk/view/manage/feed_mod.xhtml 2007-11-22 19:39:39 UTC (rev 134)
@@ -0,0 +1,133 @@
+<!DOCTYPE composition PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+ "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"
+ xmlns:f="http://java.sun.com/jsf/core"
+ xmlns:h="http://java.sun.com/jsf/html"
+ xmlns:rich="http://richfaces.org/rich"
+ xmlns:a="http://richfaces.org/a4j">
+ <h:form>
+ <h:panelGrid columns="2">
+ <h:outputLabel for="title"><span class="required">*</span> Title:</h:outputLabel>
+ <h:panelGroup>
+ <h:inputText id="title" value="#{feedMod.feed.blog.title}" required="true" size="32">
+ <a:support event="onblur" reRender="titleMessage" ajaxSingle="true" bypassUpdates="true"/>
+ <s:validate />
+ </h:inputText>
+
+ <a:outputPanel id="titleMessage">
+ <h:message for="title" styleClass="error" />
+ </a:outputPanel>
+ </h:panelGroup>
+
+ <h:outputLabel for="author"><span class="required">*</span> Author:</h:outputLabel>
+ <h:panelGroup>
+ <h:inputText id="author" value="#{feedMod.feed.blog.author}" required="true" size="32">
+ <a:support event="onblur" reRender="authorMessage" ajaxSingle="true" bypassUpdates="true"/>
+ <s:validate />
+ </h:inputText>
+
+ <a:outputPanel id="authorMessage">
+ <h:message for="author" styleClass="error" />
+ </a:outputPanel>
+ </h:panelGroup>
+
+ <h:outputLabel for="description">Description:</h:outputLabel>
+ <h:panelGroup>
+ <h:inputTextarea id="description" value="#{feedMod.feed.blog.description}" required="true" rows="4"
+ cols="32">
+ <a:support event="onblur" reRender="descriptionMessage" ajaxSingle="true" bypassUpdates="true"/>
+ <s:validate />
+ </h:inputTextarea>
+
+ <a:outputPanel id="descriptionMessage">
+ <h:message for="description" styleClass="error" />
+ </a:outputPanel>
+ </h:panelGroup>
+
+ <h:outputLabel for="link"><span class="required">*</span> Link to blog:</h:outputLabel>
+ <h:panelGroup>
+ <h:inputText id="link" value="#{feedMod.feed.blog.link}" required="true" size="64">
+ <a:support event="onblur" reRender="linkMessage" ajaxSingle="true" bypassUpdates="true"/>
+ <s:validate />
+ </h:inputText>
+
+ <a:outputPanel id="linkMessage">
+ <h:message for="link" styleClass="error" />
+ </a:outputPanel>
+ </h:panelGroup>
+
+ <h:outputLabel for="maxPosts">
+ <span class="required">*</span> Maximum number of posts in a feed:
+ </h:outputLabel>
+ <h:panelGroup>
+ <h:inputText id="maxPosts" value="#{feedMod.feed.maxPosts}" required="true" size="16">
+ <a:support event="onblur" reRender="maxPostsMessage" ajaxSingle="true" bypassUpdates="true"/>
+ <s:validate />
+ </h:inputText>
+
+ <a:outputPanel id="maxPostsMessage">
+ <h:message for="maxPosts" styleClass="error" />
+ </a:outputPanel>
+ </h:panelGroup>
+
+ <h:outputLabel for="useBlogAuthorInPosts">Overwrite post author with blog author in posts:</h:outputLabel>
+ <h:panelGroup>
+ <h:selectBooleanCheckbox id="useBlogAuthorInPosts" value="#{feedMod.feed.useBlogAuthorInPosts}"
+ required="true">
+ <a:support event="onblur" reRender="useBlogAuthorInPostsMessage" ajaxSingle="true"
+ bypassUpdates="true"/>
+ <s:validate />
+ </h:selectBooleanCheckbox>
+
+ <a:outputPanel id="useBlogAuthorInPostsMessage">
+ <h:message for="useBlogAuthorInPosts" styleClass="error" />
+ </a:outputPanel>
+ </h:panelGroup>
+
+ <h:outputLabel />
+ <h:panelGroup>
+ <s:button value="Add" />
+ </h:panelGroup>
+ </h:panelGrid>
+
+ <h3>Posts preview:</h3>
+
+ <h:panelGroup rendered="#{feedMod.feed.blog.posts.size() == 0}">
+ This feed doesn't have any posts. Unable to preview.
+ </h:panelGroup>
+ <h:panelGroup rendered="#{feedMod.feed.blog.posts.size() > 0}">
+ <h:dataTable value="#{feedMod.feed.blog.posts}" var="post" rows="1">
+ <h:column>
+ <h:panelGrid columns="2">
+ <h:outputText value="Title:" />
+ <h:outputText value="#{post.title}" />
+
+ <h:outputText value="Author:" />
+ <h:outputText value="#{post.author}" />
+
+ <h:outputText value="Published date:" />
+ <h:outputText value="#{post.published}" />
+
+ <h:outputText value="Modified date:" />
+ <h:outputText value="#{post.modified}" />
+
+ <h:outputText value="Link:" />
+ <h:outputText value="#{post.link}" />
+
+ <h:outputText value="Categories:" />
+ <h:panelGroup>
+ <ui:repeat var="category" value="#{post.categories}">
+ #{category};
+ </ui:repeat>
+ </h:panelGroup>
+
+ <h:outputText value="Content:" />
+ <h:outputText value="#{post.content}" />
+ </h:panelGrid>
+ </h:column>
+ </h:dataTable>
+ </h:panelGroup>
+ </h:form>
+</ui:composition>
Modified: trunk/view/manage/index.xhtml
===================================================================
--- trunk/view/manage/index.xhtml 2007-11-22 14:12:23 UTC (rev 133)
+++ trunk/view/manage/index.xhtml 2007-11-22 19:39:39 UTC (rev 134)
@@ -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"
@@ -7,14 +7,9 @@
xmlns:h="http://java.sun.com/jsf/html"
xmlns:rich="http://richfaces.org/rich"
template="../layout/template.xhtml">
+ <ui:define name="body">
+ <h1>Manage feeds</h1>
-<ui:define name="body">
-
- <h:messages globalOnly="true" styleClass="message"/>
-
- <h1>Manage feeds</h1>
-
- <s:link value="Add new feed" view="/manage/add.xhtml" propagation="begin" />
-
-</ui:define>
+ <s:link value="Add new feed" view="/manage/add.xhtml" propagation="begin" />
+ </ui:define>
</ui:composition>
Copied: trunk/view/manage/remote_add.xhtml (from rev 133, trunk/view/manage/add_remote.xhtml)
===================================================================
--- trunk/view/manage/remote_add.xhtml (rev 0)
+++ trunk/view/manage/remote_add.xhtml 2007-11-22 19:39:39 UTC (rev 134)
@@ -0,0 +1,52 @@
+<!DOCTYPE composition PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+ "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"
+ xmlns:f="http://java.sun.com/jsf/core"
+ xmlns:h="http://java.sun.com/jsf/html"
+ xmlns:rich="http://richfaces.org/rich"
+ xmlns:a="http://richfaces.org/a4j"
+ template="../layout/template.xhtml">
+ <ui:define name="body">
+ <h1>Add a new remote feed</h1>
+
+ <h:form>
+ <h:panelGrid columns="2">
+ <h:outputLabel><span class="required">*</span> Remote feed address:</h:outputLabel> <br />
+ <h:panelGroup>
+ <h:inputText id="link" value="#{remoteFeedMod.link}" required="true" size="64">
+ <s:validate />
+ </h:inputText>
+ <a:outputPanel id="linkMessage">
+ <h:message for="link" styleClass="error" />
+ </a:outputPanel>
+ </h:panelGroup>
+
+ <h:panelGroup />
+ <h:panelGroup>
+ <a:commandButton action="#{remoteFeedMod.parseFeed}" value="Read and parse the feed"
+ reRender="parseStatus,proceed,linkMessage,link" />
+ <a:status stopText="" startText="Wait ..." />
+ </h:panelGroup>
+
+ <h:panelGroup />
+ <h:panelGroup id="parseStatus">
+ <h:panelGroup rendered="#{remoteFeedMod.parseOk}">
+ Parsing the feed was successfull! You can proceed.
+ </h:panelGroup>
+ <h:panelGroup rendered="#{!remoteFeedMod.parseOk and remoteFeedMod.parseException != null}">
+ Parsing the feed failed, because of the following exception:
+ #{newRemoteFeed.parseException.message}
+ </h:panelGroup>
+ </h:panelGroup>
+
+ <h:panelGroup />
+ <h:panelGroup id="proceed">
+ <s:button rendered="#{remoteFeedMod.parseOk}" value="Next »"
+ view="/manage/feed_add.xhtml" />
+ </h:panelGroup>
+ </h:panelGrid>
+ </h:form>
+ </ui:define>
+</ui:composition>
Modified: trunk/view/stylesheet/theme.css
===================================================================
--- trunk/view/stylesheet/theme.css 2007-11-22 14:12:23 UTC (rev 133)
+++ trunk/view/stylesheet/theme.css 2007-11-22 19:39:39 UTC (rev 134)
@@ -19,6 +19,10 @@
border-color: gray;
}
+input[type='button'][disabled='disabled'] {
+ color: gray;
+}
+
.tableControl, .actionButtons {
width: 100%;
}
More information about the jboss-cvs-commits
mailing list