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

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Thu Mar 27 07:54:21 EDT 2008


Author: adamw
Date: 2008-03-27 07:54:21 -0400 (Thu, 27 Mar 2008)
New Revision: 275

Modified:
   trunk/resources/WEB-INF/web-design.xml
   trunk/resources/WEB-INF/web-dev.xml
   trunk/resources/WEB-INF/web-prod.xml
   trunk/resources/messages_en.properties
   trunk/src/action/org/jboss/blog/session/feed/mod/FeedModBean.java
   trunk/src/action/org/jboss/blog/session/feed/mod/RemoteFeedModBean.java
   trunk/view/manage/feed_mod.xhtml
   trunk/view/manage/feed_propose.xhtml
   trunk/view/manage/remote/remote_mod.xhtml
   trunk/view/manage/remote/remote_propose.xhtml
   trunk/view/stylesheet/blog.css
   trunk/view/stylesheet/org_main.css
Log:


Modified: trunk/resources/WEB-INF/web-design.xml
===================================================================
--- trunk/resources/WEB-INF/web-design.xml	2008-03-26 12:10:05 UTC (rev 274)
+++ trunk/resources/WEB-INF/web-design.xml	2008-03-27 11:54:21 UTC (rev 275)
@@ -101,6 +101,11 @@
     </context-param>
     -->
 
+    <context-param>
+        <param-name>facelets.SKIP_COMMENTS</param-name>
+        <param-value>true</param-value>
+    </context-param>
+
     <!-- JSF -->
 
     <context-param>

Modified: trunk/resources/WEB-INF/web-dev.xml
===================================================================
--- trunk/resources/WEB-INF/web-dev.xml	2008-03-26 12:10:05 UTC (rev 274)
+++ trunk/resources/WEB-INF/web-dev.xml	2008-03-27 11:54:21 UTC (rev 275)
@@ -97,6 +97,11 @@
         <param-value>org.jboss.shotoku.web.FilesystemResourceResolver</param-value>
     </context-param>
 
+    <context-param>
+        <param-name>facelets.SKIP_COMMENTS</param-name>
+        <param-value>true</param-value>
+    </context-param>
+
     <!-- JSF -->
 
     <context-param>

Modified: trunk/resources/WEB-INF/web-prod.xml
===================================================================
--- trunk/resources/WEB-INF/web-prod.xml	2008-03-26 12:10:05 UTC (rev 274)
+++ trunk/resources/WEB-INF/web-prod.xml	2008-03-27 11:54:21 UTC (rev 275)
@@ -93,6 +93,11 @@
         <param-value>org.jboss.shotoku.web.ShotokuFilesystemResourceResolver</param-value>
     </context-param>
 
+    <context-param>
+        <param-name>facelets.SKIP_COMMENTS</param-name>
+        <param-value>true</param-value>
+    </context-param>
+
     <!-- JSF -->
 
     <context-param>

Modified: trunk/resources/messages_en.properties
===================================================================
--- trunk/resources/messages_en.properties	2008-03-26 12:10:05 UTC (rev 274)
+++ trunk/resources/messages_en.properties	2008-03-27 11:54:21 UTC (rev 275)
@@ -103,6 +103,13 @@
 blog.feed.enclosure.invalid=Enclosure on post: '#0' with url '#1', property: #2, #3
 blog.feed.image.invalid=Image for post: '#0', property: #1, #2
 
+blog.feed.remote.parseok.nocategories=Parsing the feed was successfull! However entries of this feed do \
+  not contain any category information - please check, if the feed contains only posts, that you'd like \
+  to aggregate. If so, you can proceed to fill in other details of the feed.
+blog.feed.remote.parseok.categories=Parsing the feed was successfull! You can now (optionally) choose \
+  a category, from which posts you'd like to aggregate, and proceed to fill in other details of the feed.
+blog.feed.remote.parsenotok=Parsing the feed failed, because of the following exception: #0. 
+
 blog.feed.remote.updated=Remote feed {0} updated.
 blog.feed.remote.adding.quickstart=Enter your atom/rss2 feed address in the box to the left; if it is correct \
   and the feed parses without any problems, you'll be able to proceed and fill in other details of the new feed.

Modified: trunk/src/action/org/jboss/blog/session/feed/mod/FeedModBean.java
===================================================================
--- trunk/src/action/org/jboss/blog/session/feed/mod/FeedModBean.java	2008-03-26 12:10:05 UTC (rev 274)
+++ trunk/src/action/org/jboss/blog/session/feed/mod/FeedModBean.java	2008-03-27 11:54:21 UTC (rev 275)
@@ -8,6 +8,7 @@
 import org.jboss.blog.session.merge.MergeServiceBean;
 import org.jboss.blog.session.feed.lock.FeedsLocksBean;
 import org.jboss.blog.session.update.UpdateHandlerAsync;
+import org.jboss.blog.session.xml.velocity.TemplateServiceBean;
 import org.jboss.seam.ScopeType;
 import org.jboss.seam.core.Events;
 import org.jboss.seam.annotations.*;
@@ -46,6 +47,9 @@
     private UpdateHandlerAsync updateHandlerAsync;
 
     @In
+    private TemplateServiceBean templateService;
+
+    @In
     private Events events;
 
     public void initNewFeed(Feed feed) {
@@ -56,6 +60,8 @@
         feed.setAccepted(true);
         feed.setPosts(new ArrayList<Post>());
         feed.setPostAuthorType(PostAuthorType.BLOG_AUTHOR_IF_MISSING);
+
+        feed.getTemplates().put(XmlType.ATOM, templateService.templatesOfType(XmlType.ATOM).get(0));
     }
 
     public Feed getFeed() {

Modified: trunk/src/action/org/jboss/blog/session/feed/mod/RemoteFeedModBean.java
===================================================================
--- trunk/src/action/org/jboss/blog/session/feed/mod/RemoteFeedModBean.java	2008-03-26 12:10:05 UTC (rev 274)
+++ trunk/src/action/org/jboss/blog/session/feed/mod/RemoteFeedModBean.java	2008-03-27 11:54:21 UTC (rev 275)
@@ -64,7 +64,6 @@
     private Feed parsedFeed;
 
     private boolean parseOk;
-    private Exception parseException;
 
     private final static String ALL_CATEGORIES = "ALL";
     private final static String OTHER_CATEGORY = "OTHER";
@@ -107,14 +106,6 @@
         this.parseOk = parseOk;
     }
 
-    public Exception getParseException() {
-        return parseException;
-    }
-
-    public void setParseException(Exception parseException) {
-        this.parseException = parseException;
-    }
-
     public List<SelectItem> getIncludeCategories() {
         return includeCategories;
     }
@@ -197,7 +188,8 @@
             }
 
             initIncludeCategories();
-            for (Category cat : getCategoriesOfPosts(parsedFeed)) {
+            Set<Category> categories = getCategoriesOfPosts(parsedFeed);
+            for (Category cat : categories) {
                 includeCategories.add(new SelectItem(cat.getName(), cat.getName()));    
             }
             finishIncludeCategories();
@@ -205,8 +197,18 @@
             generateVisiblePosts();
 
             setParseOk(true);
+
+            if (categories.size() == 0) {
+                facesMessages.addToControlFromResourceBundle("parse", FacesMessage.SEVERITY_INFO,
+                        "blog.feed.remote.parseok.nocategories");
+            } else {
+                facesMessages.addToControlFromResourceBundle("parse", FacesMessage.SEVERITY_INFO,
+                        "blog.feed.remote.parseok.categories");
+            }
         } catch (ParserException e) {
-            setParseException(e);
+            facesMessages.addToControlFromResourceBundle("parse", FacesMessage.SEVERITY_ERROR,
+                        "blog.feed.remote.parsenotok", e.getMessage());
+
             setParseOk(false);
         }
     }

Modified: trunk/view/manage/feed_mod.xhtml
===================================================================
--- trunk/view/manage/feed_mod.xhtml	2008-03-26 12:10:05 UTC (rev 274)
+++ trunk/view/manage/feed_mod.xhtml	2008-03-27 11:54:21 UTC (rev 275)
@@ -75,7 +75,7 @@
     </h:inputText>
 </h:panelGroup>
 
-<h:outputLabel for="group"><span class="required">*</span> Group:</h:outputLabel>
+<h:outputLabel for="group"><span class="required">*</span> Project/ group:</h:outputLabel>
 <h:panelGroup>
     <h:selectOneMenu id="group" required="true" value="#{feedMod.feed.group}">
         <a:support event="onblur" reRender="groupMessage" ajaxSingle="true" bypassUpdates="true"/>
@@ -121,7 +121,7 @@
     </a:outputPanel>
 </h:panelGroup>
 
-<h:outputLabel><span class="required">*</span> Xml templates:</h:outputLabel>
+<!--<h:outputLabel><span class="required">*</span> Xml templates:</h:outputLabel>
 <h:panelGroup>
     <h:dataTable var="templateType" value="#{feedMod.templateTypes}">
         <h:column>
@@ -135,7 +135,7 @@
             </h:selectOneMenu>
         </h:column>
     </h:dataTable>
-</h:panelGroup>
+</h:panelGroup>-->
 
 </h:panelGrid>
 
@@ -152,10 +152,10 @@
             </li>
         </s:fragment>
         <li>
-            <s:button value="Cancel" view="/manage/index.xhtml" propagation="end" styleClass="submit" 
-                    rendered="#{identity.hasPermission('management', 'view')}"/>
+            <s:button value="Cancel" view="/manage/index.xhtml" propagation="end" styleClass="submit"
+                      rendered="#{identity.hasPermission('management', 'view')}"/>
             <s:button value="Cancel" view="/home.xhtml" propagation="end" styleClass="submit"
-                    rendered="#{!identity.hasPermission('management', 'view')}"/>
+                      rendered="#{!identity.hasPermission('management', 'view')}"/>
         </li>
     </ul>
 </div>

Modified: trunk/view/manage/feed_propose.xhtml
===================================================================
--- trunk/view/manage/feed_propose.xhtml	2008-03-26 12:10:05 UTC (rev 274)
+++ trunk/view/manage/feed_propose.xhtml	2008-03-27 11:54:21 UTC (rev 275)
@@ -7,7 +7,7 @@
                 xmlns:h="http://java.sun.com/jsf/html"
                 xmlns:rich="http://richfaces.org/rich"
                 xmlns:a="http://richfaces.org/a4j"
-                template="../layout/template.xhtml">    
+                template="../layout/template.xhtml">
     <ui:define name="header">
         Propose a new feed - edit data
     </ui:define>

Modified: trunk/view/manage/remote/remote_mod.xhtml
===================================================================
--- trunk/view/manage/remote/remote_mod.xhtml	2008-03-26 12:10:05 UTC (rev 274)
+++ trunk/view/manage/remote/remote_mod.xhtml	2008-03-27 11:54:21 UTC (rev 275)
@@ -34,7 +34,7 @@
         </a:outputPanel>
     </h:panelGroup>
 
-    <h:outputLabel for="postAuthorType"><span class="required">*</span> Post author:</h:outputLabel>
+    <h:outputLabel for="postAuthorType"><span class="required">*</span> How to determine posts authors:</h:outputLabel>
     <h:panelGroup>
         <h:selectOneMenu id="postAuthorType" value="#{remoteFeedMod.remoteFeed.postAuthorType}"
                          required="true" styleClass="selectwide">
@@ -76,13 +76,7 @@
 
     <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:
-            #{remoteFeedMod.parseException.message}
-        </h:panelGroup>
+        <h:message for="parse" infoClass="info" warnClass="error" errorClass="error" fatalClass="error" />
     </h:panelGroup>
 </h:panelGrid>
 
@@ -91,7 +85,7 @@
         <s:fragment rendered="#{!remoteFeedMod.parseOk}">
             <li>
                 <a:commandButton action="#{remoteFeedMod.parseFeed}" value="Read and parse the feed"
-                                 styleClass="submit"
+                                 styleClass="submit" id="parse"
                                  reRender="parseStatus,proceed,linkMessage,link,captchaGraphic,captchaMessage,postAuthorType,includeCategoryHeader,includeCategoryBody,addressBody,postsIncluded" />
             </li>
         </s:fragment>

Modified: trunk/view/manage/remote/remote_propose.xhtml
===================================================================
--- trunk/view/manage/remote/remote_propose.xhtml	2008-03-26 12:10:05 UTC (rev 274)
+++ trunk/view/manage/remote/remote_propose.xhtml	2008-03-27 11:54:21 UTC (rev 275)
@@ -13,26 +13,23 @@
     </ui:define>
 
     <ui:define name="body">
+        <div><ul class="messages"><li class="messages_info">
+            If you are blogging on a JBoss-related subject, you can aggregate your blog on JBoss.ORG!
+            Blogs written by the JBoss Community members are very valuable, and we'd like
+            to make them much more visible!
+        </li></ul></div>
+
         <div class="TwoColumnBlogSubnav">
             <h4>Tips</h4>
             <ul>
                 <li>
-                    If you are blogging on a JBoss-related subject, you can aggregate your blog on JBoss.ORG!
-                    Blogs written by the JBoss Community members are very valuable, and we'd like
-                    to make them much more visible!
-                </li>
-                <li>
                     #{messages['blog.feed.remote.adding.quickstart']}
                     After submitting, your feed will be added to the propositions queue and reviewed.
                 </li>
                 <li>
-                    If your blog concernes a specific project, select an appropriate project group on the next
-                    screen.
-                </li>
-                <li>
                     If you are blogging on a wider area of subjects, please submit a feed of only jboss-related
-                    entries (for example a feed of one category/ tag), or select a category after parsing the feed
-                    (if category information is included in the entries of the feed).
+                    entries (for example a feed of one category/ tag), or, if category information is included
+                    in the entries of the feed, select a category after parsing the feed.
                 </li>
                 <li class="last">
                     #{messages['blog.feed.remote.mod.authors']}

Modified: trunk/view/stylesheet/blog.css
===================================================================
--- trunk/view/stylesheet/blog.css	2008-03-26 12:10:05 UTC (rev 274)
+++ trunk/view/stylesheet/blog.css	2008-03-27 11:54:21 UTC (rev 275)
@@ -97,6 +97,14 @@
     display: block;
 }
 
+span.info {
+    color: black;
+    background-color: #fef9e6;
+    border: 1px solid #f9ba82;
+    padding: 5px;
+    display: block;
+}
+
 span.required {
     color: red;
 }
Modified: trunk/view/stylesheet/org_main.css
===================================================================
--- trunk/view/stylesheet/org_main.css	2008-03-26 12:10:05 UTC (rev 274)
+++ trunk/view/stylesheet/org_main.css	2008-03-27 11:54:21 UTC (rev 275)
@@ -1045,7 +1045,7 @@
 
 .messages_info {
     margin:0 20px 12px -20px;
-    padding:15px 15px 15px 0;
+    padding:15px;
     background-color:#fef9e6;
     border: 1px solid #f9ba82;
     list-style:none;
@@ -1053,7 +1053,7 @@
 
 .messages_warn {
     margin:0 20px 12px -20px;
-    padding:15px 15px 15px 0;
+    padding:15px;
     background-color: #CC3333;
     border: 1px solid #7B1E1E; 
     list-style: none;




More information about the jboss-cvs-commits mailing list