Seam SVN: r7895 - in maven-plugins/trunk: seam-jdocbook-style/src/main/css/css and 1 other directory.
by seam-commits@lists.jboss.org
Author: newtonm
Date: 2008-04-10 02:59:04 -0400 (Thu, 10 Apr 2008)
New Revision: 7895
Modified:
maven-plugins/trunk/seam-docbook-xslt/src/main/resources/xslt/org/jboss/seam/main-html.xsl
maven-plugins/trunk/seam-docbook-xslt/src/main/resources/xslt/org/jboss/seam/nochunk-html.xsl
maven-plugins/trunk/seam-jdocbook-style/src/main/css/css/seamframework.css
Log:
Made the names of the header XSL params and CSS classes generic.
Modified: maven-plugins/trunk/seam-docbook-xslt/src/main/resources/xslt/org/jboss/seam/main-html.xsl
===================================================================
--- maven-plugins/trunk/seam-docbook-xslt/src/main/resources/xslt/org/jboss/seam/main-html.xsl 2008-04-10 05:39:40 UTC (rev 7894)
+++ maven-plugins/trunk/seam-docbook-xslt/src/main/resources/xslt/org/jboss/seam/main-html.xsl 2008-04-10 06:59:04 UTC (rev 7895)
@@ -15,8 +15,8 @@
<xsl:import href="classpath:/xslt/org/jboss/main-html.xsl" />
<xsl:param name="html.stylesheet" select="'css/seamframework.css'" />
- <xsl:param name="jbossOrgHref" select="'http://www.seamframework.org'" />
- <xsl:param name="commDocHref" select="'http://www.seamframework.org/Documentation'" />
- <xsl:param name="jbossOrgLinkText" select="'SeamFramework.org'" />
+ <xsl:param name="siteHref" select="'http://www.seamframework.org'" />
+ <xsl:param name="docHref" select="'http://www.seamframework.org/Documentation'" />
+ <xsl:param name="siteLinkText" select="'SeamFramework.org'" />
</xsl:stylesheet>
Modified: maven-plugins/trunk/seam-docbook-xslt/src/main/resources/xslt/org/jboss/seam/nochunk-html.xsl
===================================================================
--- maven-plugins/trunk/seam-docbook-xslt/src/main/resources/xslt/org/jboss/seam/nochunk-html.xsl 2008-04-10 05:39:40 UTC (rev 7894)
+++ maven-plugins/trunk/seam-docbook-xslt/src/main/resources/xslt/org/jboss/seam/nochunk-html.xsl 2008-04-10 06:59:04 UTC (rev 7895)
@@ -15,8 +15,8 @@
<xsl:import href="classpath:/xslt/org/jboss/nochunk-html.xsl"/>
<xsl:param name="html.stylesheet" select="'css/seamframework-nochunk.css'" />
- <xsl:param name="jbossOrgHref" select="'http://www.seamframework.org'" />
- <xsl:param name="commDocHref" select="'http://www.seamframework.org/Documentation'" />
- <xsl:param name="jbossOrgLinkText" select="'SeamFramework.org'" />
+ <xsl:param name="siteHref" select="'http://www.seamframework.org'" />
+ <xsl:param name="docHref" select="'http://www.seamframework.org/Documentation'" />
+ <xsl:param name="siteLinkText" select="'SeamFramework.org'" />
</xsl:stylesheet>
Modified: maven-plugins/trunk/seam-jdocbook-style/src/main/css/css/seamframework.css
===================================================================
--- maven-plugins/trunk/seam-jdocbook-style/src/main/css/css/seamframework.css 2008-04-10 05:39:40 UTC (rev 7894)
+++ maven-plugins/trunk/seam-jdocbook-style/src/main/css/css/seamframework.css 2008-04-10 06:59:04 UTC (rev 7895)
@@ -36,7 +36,7 @@
}
/* Override header images */
-#title a.jbossOrg_href {
+#title a.site_href {
display: block;
height: 100px;
width: 362px;
@@ -44,7 +44,7 @@
background: url(../images/seamframework/seamlogo.png) top left no-repeat;
}
-#title a.commDoc_href {
+#title a.doc_href {
display: block;
height: 100px;
background: transparent url(../images/seamframework/community_doc.png) top right no-repeat;
16 years, 7 months
Seam SVN: r7894 - in maven-plugins/trunk/seam-jdocbook-style/src/main: images/images/seamframework and 1 other directory.
by seam-commits@lists.jboss.org
Author: newtonm
Date: 2008-04-10 01:39:40 -0400 (Thu, 10 Apr 2008)
New Revision: 7894
Added:
maven-plugins/trunk/seam-jdocbook-style/src/main/images/images/seamframework/community_doc.png
Removed:
maven-plugins/trunk/seam-jdocbook-style/src/main/images/images/seamframework/support_doc.png
Modified:
maven-plugins/trunk/seam-jdocbook-style/src/main/css/css/seamframework-nochunk.css
maven-plugins/trunk/seam-jdocbook-style/src/main/css/css/seamframework.css
Log:
Renamed support_doc.png to community_doc.png and tidied up CSS.
Modified: maven-plugins/trunk/seam-jdocbook-style/src/main/css/css/seamframework-nochunk.css
===================================================================
--- maven-plugins/trunk/seam-jdocbook-style/src/main/css/css/seamframework-nochunk.css 2008-04-09 23:39:21 UTC (rev 7893)
+++ maven-plugins/trunk/seam-jdocbook-style/src/main/css/css/seamframework-nochunk.css 2008-04-10 05:39:40 UTC (rev 7894)
@@ -1,4 +1,4 @@
-@IMPORT url("seamframework.css");
+@import url("seamframework.css");
.title {
margin-top: 30px;
Modified: maven-plugins/trunk/seam-jdocbook-style/src/main/css/css/seamframework.css
===================================================================
--- maven-plugins/trunk/seam-jdocbook-style/src/main/css/css/seamframework.css 2008-04-09 23:39:21 UTC (rev 7893)
+++ maven-plugins/trunk/seam-jdocbook-style/src/main/css/css/seamframework.css 2008-04-10 05:39:40 UTC (rev 7894)
@@ -1,15 +1,12 @@
@import url(jbossorg.css);
-/*
- Override image, set font
-*/
+/* Override background image, font */
body {
background-image: url(../images/seamframework/bkg_gradient.png);
font-family: 'Lucida Grande', Geneva, Verdana, Arial, sans-serif;
}
-/*
- More sfwk styling */
+/* More sfwk styling */
a {
text-decoration: none;
}
@@ -19,9 +16,7 @@
background-image: url(../images/seamframework/title_hdr.png);
}
-/*
- Use sfwk colour for titles
-*/
+/* Use sfwk colour for titles */
h2,h3,h4,h5,h6 {
color: #BA5624;
}
@@ -35,97 +30,40 @@
color: white;
}
-/*
- Override image
-*/
-div.caution {
- background-image: url(../images/seamframework/caution.png);
-}
-
-/*
- Override image
-*/
-div.important {
- background-image: url(../images/seamframework/important.png);
-}
-
-/*
- Override image
-*/
-div.note {
- background-image: url(../images/seamframework/note.png);
-}
-
-/*
- Override image
-*/
-div.tip {
- background-image: url(../images/seamframework/tip.png);
-}
-
-/*
- Override image
-*/
-div.warning {
- background-image: url(../images/seamframework/warning.png);
-}
-
-/*
- Override image
-*/
-ul {
- list-style-image: url(../images/seamframework/dot.png);
-}
-
-/*
- Override image
-*/
-ul ul {
- list-style-image: url(../images/seamframework/dot2.png);
-}
-
div.note a:visited,div.tip a:visited,div.important a:visited,div.caution a:visited,div.warning a:visited,div.note a:link,div.tip a:link,div.important a:link,div.caution a:link,div.warning a:link
- {
+{
color: #f7f2d0;
}
+/* Override header images */
#title a.jbossOrg_href {
display: block;
height: 100px;
width: 362px;
float: left;
- background: url(../images/seamframework/seamlogo.png) top left no-repeat
- ;
+ background: url(../images/seamframework/seamlogo.png) top left no-repeat;
}
#title a.commDoc_href {
display: block;
height: 100px;
- background: transparent url(../images/seamframework/support_doc.png) top
- right no-repeat;
+ background: transparent url(../images/seamframework/community_doc.png) top right no-repeat;
}
-/*
- Use sfwk colour as background for examples
- */
+/* Use sfwk colour as background for examples */
.example {
- background: url(../images/seamframework/leftside_bkgimage.gif) top left
- repeat;
+ background: url(../images/seamframework/leftside_bkgimage.gif) top left repeat;
padding: 5px;
margin-bottom: 10px;
}
-/*
- Make the seam version info into a title
- */
+/* Make the seam version info into a title */
.releaseinfo {
color: #BA5624;
font-size: 150%;
}
-/*
- use sfwk.org tables
- */
+/* Use sfwk.org tables */
.table-contents th {
background: #EDE8DB url(../images/seamframework/th.bg.gif) repeat-x scroll 0pt;
color: black;
@@ -138,72 +76,22 @@
border-right: 1px solid #D3D2D1;
}
-/*
- Image override
-*/
-.docnav li.next a strong {
- background-image: url(../images/seamframework/stock-go-forward.png);
-}
+/* Override admonition and navigation images */
+div.caution { background-image: url(../images/seamframework/caution.png); }
+div.important { background-image: url(../images/seamframework/important.png); }
+div.note { background-image: url(../images/seamframework/note.png); }
+div.tip { background-image: url(../images/seamframework/tip.png); }
+div.warning { background-image: url(../images/seamframework/warning.png); }
+ul { list-style-image: url(../images/seamframework/dot.png); }
+ul ul { list-style-image: url(../images/seamframework/dot2.png); }
-/*
- Image override
-*/
-.docnav li.previous a strong {
- background-image: url(../images/seamframework/stock-go-back.png);
-}
-
-/*
- Image override
-*/
-.docnav li.home a strong {
- background-image: url(../images/seamframework/stock-home.png);
-}
-
-/*
- Image override
-*/
-.docnav li.up a strong {
- background-image: url(../images/seamframework/stock-go-up.png);
-}
-
-/*
- Image override
-*/
-.navheader td.next a {
- background-image: url(../images/seamframework/stock-go-forward.png);
-}
-
-/*
- Image override
-*/
-.navheader td.previous a {
- background-image: url(../images/seamframework/stock-go-back.png);
-}
-
-/*
- Image override
-*/
-.navfooter td.next a {
- background-image: url(../images/seamframework/stock-go-forward.png);
-}
-
-/*
- Image override
-*/
-.navfooter td.previous a {
- background-image: url(../images/seamframework/stock-go-back.png);
-}
-
-/*
- Image override
-*/
-.navfooter td.home a {
- background-image: url(../images/seamframework/stock-home.png);
-}
-
-/*
- Image override
-*/
-.navfooter td.up a {
- background-image: url(../images/seamframework/stock-go-up.png);
-}
+.docnav li.next a strong { background-image: url(../images/seamframework/stock-go-forward.png); }
+.docnav li.previous a strong { background-image: url(../images/seamframework/stock-go-back.png); }
+.docnav li.home a strong { background-image: url(../images/seamframework/stock-home.png); }
+.docnav li.up a strong { background-image: url(../images/seamframework/stock-go-up.png); }
+.navheader td.next a { background-image: url(../images/seamframework/stock-go-forward.png); }
+.navheader td.previous a { background-image: url(../images/seamframework/stock-go-back.png); }
+.navfooter td.next a { background-image: url(../images/seamframework/stock-go-forward.png); }
+.navfooter td.previous a { background-image: url(../images/seamframework/stock-go-back.png); }
+.navfooter td.home a { background-image: url(../images/seamframework/stock-home.png); }
+.navfooter td.up a { background-image: url(../images/seamframework/stock-go-up.png); }
Copied: maven-plugins/trunk/seam-jdocbook-style/src/main/images/images/seamframework/community_doc.png (from rev 7791, maven-plugins/trunk/seam-jdocbook-style/src/main/images/images/seamframework/support_doc.png)
===================================================================
(Binary files differ)
Deleted: maven-plugins/trunk/seam-jdocbook-style/src/main/images/images/seamframework/support_doc.png
===================================================================
(Binary files differ)
16 years, 7 months
Seam SVN: r7893 - branches/Seam_2_0/src/main/org/jboss/seam.
by seam-commits@lists.jboss.org
Author: shane.bryzak(a)jboss.com
Date: 2008-04-09 19:39:21 -0400 (Wed, 09 Apr 2008)
New Revision: 7893
Modified:
branches/Seam_2_0/src/main/org/jboss/seam/remoting-2.0.xsd
Log:
JBSEAM-2870
Modified: branches/Seam_2_0/src/main/org/jboss/seam/remoting-2.0.xsd
===================================================================
--- branches/Seam_2_0/src/main/org/jboss/seam/remoting-2.0.xsd 2008-04-09 23:38:25 UTC (rev 7892)
+++ branches/Seam_2_0/src/main/org/jboss/seam/remoting-2.0.xsd 2008-04-09 23:39:21 UTC (rev 7893)
@@ -4,13 +4,13 @@
xmlns:components="http://jboss.com/products/seam/components" attributeFormDefault="unqualified">
<xs:import namespace="http://jboss.com/products/seam/components" schemaLocation="components-2.0.xsd"/>
- <xs:element name="remoting-config">
+ <xs:element name="remoting">
<xs:complexType mixed="true">
<xs:attributeGroup ref="components:attlist.component"/>
- <xs:attributeGroup ref="remoting:attlist.remotingConfig"/>
+ <xs:attributeGroup ref="remoting:attlist.remoting"/>
</xs:complexType>
</xs:element>
- <xs:attributeGroup name="attlist.remotingConfig">
+ <xs:attributeGroup name="attlist.remoting">
<xs:attribute name="poll-interval" />
<xs:attribute name="poll-timeout" />
<xs:attribute name="debug">
16 years, 7 months
Seam SVN: r7892 - trunk/src/main/org/jboss/seam.
by seam-commits@lists.jboss.org
Author: shane.bryzak(a)jboss.com
Date: 2008-04-09 19:38:25 -0400 (Wed, 09 Apr 2008)
New Revision: 7892
Modified:
trunk/src/main/org/jboss/seam/remoting-2.1.xsd
Log:
JBSEAM-2870
Modified: trunk/src/main/org/jboss/seam/remoting-2.1.xsd
===================================================================
--- trunk/src/main/org/jboss/seam/remoting-2.1.xsd 2008-04-09 19:22:16 UTC (rev 7891)
+++ trunk/src/main/org/jboss/seam/remoting-2.1.xsd 2008-04-09 23:38:25 UTC (rev 7892)
@@ -4,13 +4,13 @@
xmlns:components="http://jboss.com/products/seam/components" attributeFormDefault="unqualified">
<xs:import namespace="http://jboss.com/products/seam/components" schemaLocation="components-2.1.xsd"/>
- <xs:element name="remoting-config">
+ <xs:element name="remoting">
<xs:complexType mixed="true">
<xs:attributeGroup ref="components:attlist.component"/>
- <xs:attributeGroup ref="remoting:attlist.remotingConfig"/>
+ <xs:attributeGroup ref="remoting:attlist.remoting"/>
</xs:complexType>
</xs:element>
- <xs:attributeGroup name="attlist.remotingConfig">
+ <xs:attributeGroup name="attlist.remoting">
<xs:attribute name="poll-interval" />
<xs:attribute name="poll-timeout" />
<xs:attribute name="debug">
16 years, 7 months
Seam SVN: r7891 - in branches/Seam_2_0/examples/contactlist: resources/WEB-INF and 1 other directories.
by seam-commits@lists.jboss.org
Author: norman.richards(a)jboss.com
Date: 2008-04-09 15:22:16 -0400 (Wed, 09 Apr 2008)
New Revision: 7891
Added:
branches/Seam_2_0/examples/contactlist/resources/WEB-INF/classes/
branches/Seam_2_0/examples/contactlist/resources/messages.properties
Removed:
branches/Seam_2_0/examples/contactlist/resources/WEB-INF/classes/
Modified:
branches/Seam_2_0/examples/contactlist/view/editContact.xhtml
Log:
JBSEAM-2844
Added: branches/Seam_2_0/examples/contactlist/resources/messages.properties
===================================================================
--- branches/Seam_2_0/examples/contactlist/resources/messages.properties (rev 0)
+++ branches/Seam_2_0/examples/contactlist/resources/messages.properties 2008-04-09 19:22:16 UTC (rev 7891)
@@ -0,0 +1,6 @@
+Contact_created New contact #{contact.firstName} #{contact.lastName} created
+Contact_deleted Contact #{contact.firstName} #{contact.lastName} deleted
+Contact_updated Contact #{contact.firstName} #{contact.lastName} updated
+Comment_created New comment posted
+
+javax.faces.component.UIInput.REQUIRED=value is required
Modified: branches/Seam_2_0/examples/contactlist/view/editContact.xhtml
===================================================================
--- branches/Seam_2_0/examples/contactlist/view/editContact.xhtml 2008-04-09 18:54:32 UTC (rev 7890)
+++ branches/Seam_2_0/examples/contactlist/view/editContact.xhtml 2008-04-09 19:22:16 UTC (rev 7891)
@@ -44,13 +44,13 @@
<tr class="prop">
<td class="name">First Name:</td>
<td class="value">
- <s:decorate><h:inputText id="firstName" value="#{contact.firstName}"/></s:decorate>
+ <s:decorate><h:inputText id="firstName" value="#{contact.firstName}" required="true"/></s:decorate>
</td>
</tr>
<tr class="prop">
<td class="name">Last Name:</td>
<td class="value">
- <s:decorate><h:inputText id="lastName" value="#{contact.lastName}"/></s:decorate>
+ <s:decorate><h:inputText id="lastName" value="#{contact.lastName}" required="true"/></s:decorate>
</td>
</tr>
<tr class="prop">
16 years, 7 months
Seam SVN: r7890 - in trunk/examples/contactlist: resources/WEB-INF/classes and 1 other directories.
by seam-commits@lists.jboss.org
Author: norman.richards(a)jboss.com
Date: 2008-04-09 14:54:32 -0400 (Wed, 09 Apr 2008)
New Revision: 7890
Added:
trunk/examples/contactlist/resources/messages.properties
Removed:
trunk/examples/contactlist/resources/WEB-INF/classes/messages.properties
Modified:
trunk/examples/contactlist/view/editContact.xhtml
Log:
JBSEAM-2844
Deleted: trunk/examples/contactlist/resources/WEB-INF/classes/messages.properties
===================================================================
--- trunk/examples/contactlist/resources/WEB-INF/classes/messages.properties 2008-04-09 17:19:20 UTC (rev 7889)
+++ trunk/examples/contactlist/resources/WEB-INF/classes/messages.properties 2008-04-09 18:54:32 UTC (rev 7890)
@@ -1,4 +0,0 @@
-Contact_created New contact #{contact.firstName} #{contact.lastName} created
-Contact_deleted Contact #{contact.firstName} #{contact.lastName} deleted
-Contact_updated Contact #{contact.firstName} #{contact.lastName} updated
-Comment_created New comment posted
Added: trunk/examples/contactlist/resources/messages.properties
===================================================================
--- trunk/examples/contactlist/resources/messages.properties (rev 0)
+++ trunk/examples/contactlist/resources/messages.properties 2008-04-09 18:54:32 UTC (rev 7890)
@@ -0,0 +1,21 @@
+Contact_created New contact #{contact.firstName} #{contact.lastName} created
+Contact_deleted Contact #{contact.firstName} #{contact.lastName} deleted
+Contact_updated Contact #{contact.firstName} #{contact.lastName} updated
+Comment_created New comment posted
+
+javax.faces.component.UIInput.REQUIRED=value is required
+
+validator.assertFalse=assertion failed
+validator.assertTrue=assertion failed
+validator.future=must be a future date
+validator.length=length must be between {min} and {max}
+validator.max=must be less than or equal to {value}
+validator.min=must be greater than or equal to {value}
+validator.notNull=may not be null
+validator.past=must be a past date
+validator.pattern=must match "{regex}"
+validator.range=must be between {min} and {max}
+validator.size=size must be between {min} and {max}
+validator.email=not a well-formed email address
+
+validator.zip=not a valid zipcode
Modified: trunk/examples/contactlist/view/editContact.xhtml
===================================================================
--- trunk/examples/contactlist/view/editContact.xhtml 2008-04-09 17:19:20 UTC (rev 7889)
+++ trunk/examples/contactlist/view/editContact.xhtml 2008-04-09 18:54:32 UTC (rev 7890)
@@ -44,13 +44,13 @@
<tr class="prop">
<td class="name">First Name:</td>
<td class="value">
- <s:decorate><h:inputText id="firstName" value="#{contact.firstName}"/></s:decorate>
+ <s:decorate><h:inputText id="firstName" value="#{contact.firstName}" required="true"/></s:decorate>
</td>
</tr>
<tr class="prop">
<td class="name">Last Name:</td>
<td class="value">
- <s:decorate><h:inputText id="lastName" value="#{contact.lastName}"/></s:decorate>
+ <s:decorate><h:inputText id="lastName" value="#{contact.lastName}" required="true"/></s:decorate>
</td>
</tr>
<tr class="prop">
16 years, 7 months
Seam SVN: r7889 - in trunk/examples/wiki/src/main/org/jboss/seam/wiki: core/template and 1 other directories.
by seam-commits@lists.jboss.org
Author: christian.bauer(a)jboss.com
Date: 2008-04-09 13:19:20 -0400 (Wed, 09 Apr 2008)
New Revision: 7889
Added:
trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/template/WikiDocumentEditorDefaults.java
Modified:
trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/action/DocumentHome.java
trunk/examples/wiki/src/main/org/jboss/seam/wiki/plugin/blogdirectory/BlogEntryDefaults.java
Log:
JBSEAM-2646, templates for document creation (only BlogEntry for now)
Modified: trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/action/DocumentHome.java
===================================================================
--- trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/action/DocumentHome.java 2008-04-09 17:12:30 UTC (rev 7888)
+++ trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/action/DocumentHome.java 2008-04-09 17:19:20 UTC (rev 7889)
@@ -24,7 +24,7 @@
import org.jboss.seam.wiki.core.exception.InvalidWikiRequestException;
import org.jboss.seam.wiki.core.template.TemplateRegistry;
import org.jboss.seam.wiki.core.template.WikiDocumentTemplate;
-import org.jboss.seam.wiki.core.template.WikiDocumentEditorTemplate;
+import org.jboss.seam.wiki.core.template.WikiDocumentEditorDefaults;
import org.jboss.seam.wiki.preferences.Preferences;
import org.hibernate.validator.Length;
@@ -101,9 +101,9 @@
defaults = (WikiDocumentDefaults)tplClass.newInstance();
}
- if (WikiDocumentEditorTemplate.class.isAssignableFrom(tplClass)) {
+ if (WikiDocumentEditorDefaults.class.isAssignableFrom(tplClass)) {
getLog().debug("letting template set editor defaults");
- ((WikiDocumentEditorTemplate)defaults).setEditorDefaults(this);
+ ((WikiDocumentEditorDefaults)defaults).setEditorDefaults(this);
}
} catch (Exception ex) {
Copied: trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/template/WikiDocumentEditorDefaults.java (from rev 7888, trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/template/WikiDocumentEditorTemplate.java)
===================================================================
--- trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/template/WikiDocumentEditorDefaults.java (rev 0)
+++ trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/template/WikiDocumentEditorDefaults.java 2008-04-09 17:19:20 UTC (rev 7889)
@@ -0,0 +1,17 @@
+/*
+ * JBoss, Home of Professional Open Source
+ *
+ * Distributable under LGPL license.
+ * See terms of license at gnu.org.
+ */
+package org.jboss.seam.wiki.core.template;
+
+import org.jboss.seam.wiki.core.action.DocumentHome;
+
+/**
+ * @author Christian Bauer
+ */
+public interface WikiDocumentEditorDefaults {
+
+ public void setEditorDefaults(DocumentHome editor);
+}
Modified: trunk/examples/wiki/src/main/org/jboss/seam/wiki/plugin/blogdirectory/BlogEntryDefaults.java
===================================================================
--- trunk/examples/wiki/src/main/org/jboss/seam/wiki/plugin/blogdirectory/BlogEntryDefaults.java 2008-04-09 17:12:30 UTC (rev 7888)
+++ trunk/examples/wiki/src/main/org/jboss/seam/wiki/plugin/blogdirectory/BlogEntryDefaults.java 2008-04-09 17:19:20 UTC (rev 7889)
@@ -7,7 +7,7 @@
package org.jboss.seam.wiki.plugin.blogdirectory;
import org.jboss.seam.wiki.core.template.WikiDocumentTemplate;
-import org.jboss.seam.wiki.core.template.WikiDocumentEditorTemplate;
+import org.jboss.seam.wiki.core.template.WikiDocumentEditorDefaults;
import org.jboss.seam.wiki.core.model.WikiDocumentDefaults;
import org.jboss.seam.wiki.core.action.DocumentHome;
import org.jboss.seam.international.Messages;
@@ -16,7 +16,7 @@
* @author Christian Bauer
*/
@WikiDocumentTemplate("#{messages['blogDirectory.label.template.BlogEntry']}")
-public class BlogEntryDefaults extends WikiDocumentDefaults implements WikiDocumentEditorTemplate {
+public class BlogEntryDefaults extends WikiDocumentDefaults implements WikiDocumentEditorDefaults {
@Override
public String getName() {
16 years, 7 months
Seam SVN: r7888 - in trunk/examples/wiki: src/etc/WEB-INF and 14 other directories.
by seam-commits@lists.jboss.org
Author: christian.bauer(a)jboss.com
Date: 2008-04-09 13:12:30 -0400 (Wed, 09 Apr 2008)
New Revision: 7888
Added:
trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/exception/InvalidWikiConfigurationException.java
trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/template/
trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/template/TemplateRegistry.java
trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/template/WikiDocumentEditorTemplate.java
trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/template/WikiDocumentTemplate.java
trunk/examples/wiki/src/main/org/jboss/seam/wiki/plugin/blogdirectory/BlogEntryDefaults.java
trunk/examples/wiki/src/main/org/jboss/seam/wiki/plugin/faqBrowser/FaqQuestionDefaults.java
trunk/examples/wiki/src/main/org/jboss/seam/wiki/plugin/forum/TopicDefaults.java
trunk/examples/wiki/src/main/org/jboss/seam/wiki/plugin/forum/TopicListDefaults.java
Modified:
trunk/examples/wiki/src/etc/META-INF/seam-deployment.properties
trunk/examples/wiki/src/etc/WEB-INF/pages.xml
trunk/examples/wiki/src/etc/i18n/messages_blogDirectory_en.properties
trunk/examples/wiki/src/etc/i18n/messages_en.properties
trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/action/DocumentHome.java
trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/model/WikiDocumentDefaults.java
trunk/examples/wiki/src/main/org/jboss/seam/wiki/plugin/faqBrowser/FaqQuestionHome.java
trunk/examples/wiki/src/main/org/jboss/seam/wiki/plugin/forum/ForumHome.java
trunk/examples/wiki/src/main/org/jboss/seam/wiki/plugin/forum/TopicHome.java
trunk/examples/wiki/view/dirDisplay_d.xhtml
trunk/examples/wiki/view/docDisplay_d.xhtml
trunk/examples/wiki/view/includes/directoryBrowserIconMenu.xhtml
trunk/examples/wiki/view/includes/userControl.xhtml
trunk/examples/wiki/view/includes/wikiTextEditor.xhtml
trunk/examples/wiki/view/themes/default/css/faqBrowser.css
trunk/examples/wiki/view/themes/default/css/template.css
trunk/examples/wiki/view/themes/inrelationto/css/inrelationto.css
trunk/examples/wiki/view/themes/sfwkorg/css/sfwk.css
Log:
JBSEAM-2646, templates for document creation (only BlogEntry for now)
Modified: trunk/examples/wiki/src/etc/META-INF/seam-deployment.properties
===================================================================
--- trunk/examples/wiki/src/etc/META-INF/seam-deployment.properties 2008-04-09 12:38:39 UTC (rev 7887)
+++ trunk/examples/wiki/src/etc/META-INF/seam-deployment.properties 2008-04-09 17:12:30 UTC (rev 7888)
@@ -1 +1 @@
-org.jboss.seam.deployment.annotationTypes=org.jboss.seam.wiki.preferences.annotations.Preferences
\ No newline at end of file
+org.jboss.seam.deployment.annotationTypes=org.jboss.seam.wiki.preferences.annotations.Preferences:org.jboss.seam.wiki.core.template.WikiDocumentTemplate
\ No newline at end of file
Modified: trunk/examples/wiki/src/etc/WEB-INF/pages.xml
===================================================================
--- trunk/examples/wiki/src/etc/WEB-INF/pages.xml 2008-04-09 12:38:39 UTC (rev 7887)
+++ trunk/examples/wiki/src/etc/WEB-INF/pages.xml 2008-04-09 17:12:30 UTC (rev 7888)
@@ -66,6 +66,7 @@
<page view-id="/docEdit*" no-conversation-view-id="/wiki.xhtml">
<param name="documentId" value="#{documentHome.nodeId}"/>
<param name="parentDirectoryId" value="#{documentHome.parentNodeId}"/>
+ <param name="templateType" value="#{documentHome.templateType}"/>
<action execute="#{documentHome.initEditor}"/>
<begin-conversation flush-mode="MANUAL" join="true"/>
Modified: trunk/examples/wiki/src/etc/i18n/messages_blogDirectory_en.properties
===================================================================
--- trunk/examples/wiki/src/etc/i18n/messages_blogDirectory_en.properties 2008-04-09 12:38:39 UTC (rev 7887)
+++ trunk/examples/wiki/src/etc/i18n/messages_blogDirectory_en.properties 2008-04-09 17:12:30 UTC (rev 7888)
@@ -15,4 +15,7 @@
blogDirectory.label.Tagged=tagged
blogDirectory.label.NoBlogEntriesFound=No blog entries found.
blogDirectory.label.Tag=Tag
-blogDirectory.label.Tags=Tags
\ No newline at end of file
+blogDirectory.label.Tags=Tags
+
+blogDirectory.label.template.BlogEntry=Weblog Entry
+blogDirectory.label.template.NewBlogEntryTitle=My weblog entry title...
Modified: trunk/examples/wiki/src/etc/i18n/messages_en.properties
===================================================================
--- trunk/examples/wiki/src/etc/i18n/messages_en.properties 2008-04-09 12:38:39 UTC (rev 7887)
+++ trunk/examples/wiki/src/etc/i18n/messages_en.properties 2008-04-09 17:12:30 UTC (rev 7888)
@@ -720,3 +720,7 @@
lacewiki.preferences.comments.EnableByDefault=Enable comments by default for new documents
lacewiki.preferences.comments.Threaded=Threaded comment display (or flat)
+
+# Templates
+
+lacewiki.label.template.RegularWikiDocument=Regular Document
Modified: trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/action/DocumentHome.java
===================================================================
--- trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/action/DocumentHome.java 2008-04-09 12:38:39 UTC (rev 7887)
+++ trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/action/DocumentHome.java 2008-04-09 17:12:30 UTC (rev 7888)
@@ -21,6 +21,10 @@
import org.jboss.seam.wiki.core.engine.WikiLinkResolver;
import org.jboss.seam.wiki.core.renderer.MacroWikiTextRenderer;
import org.jboss.seam.wiki.core.model.*;
+import org.jboss.seam.wiki.core.exception.InvalidWikiRequestException;
+import org.jboss.seam.wiki.core.template.TemplateRegistry;
+import org.jboss.seam.wiki.core.template.WikiDocumentTemplate;
+import org.jboss.seam.wiki.core.template.WikiDocumentEditorTemplate;
import org.jboss.seam.wiki.preferences.Preferences;
import org.hibernate.validator.Length;
@@ -52,6 +56,7 @@
private boolean isOnSiteFeed = false;
private List<WikiFile> historicalFiles;
private Long numOfHistoricalFiles = 0l;
+ private String templateType;
/* -------------------------- Basic Overrides ------------------------------ */
@@ -77,6 +82,36 @@
tagEditor.setTags(doc.getTags());
outjectDocumentAndDirectory(doc, getParentNode());
+
+ if (templateType != null && !templateType.equals(WikiDocumentDefaults.class.getName())) {
+ getLog().debug("using custom template class for WikiDocument defaults: " + templateType);
+ WikiDocumentDefaults defaults;
+ try {
+ Class<?> tplClass = Class.forName(templateType);
+
+ if (!TemplateRegistry.instance().getTemplateTypes().contains(tplClass)) {
+ throw new InvalidWikiRequestException("Invalid templateType: " + templateType);
+ }
+
+ if (tplClass.getAnnotation(WikiDocumentTemplate.class).requiresTemplateInstance()) {
+ getLog().debug("instantiating template " + tplClass.getName() + " with current document instance");
+ defaults = (WikiDocumentDefaults)tplClass.getConstructor(WikiDocument.class).newInstance(doc);
+ } else {
+ getLog().debug("instantiating template " + tplClass.getName() + " with no-arg constructor");
+ defaults = (WikiDocumentDefaults)tplClass.newInstance();
+ }
+
+ if (WikiDocumentEditorTemplate.class.isAssignableFrom(tplClass)) {
+ getLog().debug("letting template set editor defaults");
+ ((WikiDocumentEditorTemplate)defaults).setEditorDefaults(this);
+ }
+
+ } catch (Exception ex) {
+ throw new InvalidWikiRequestException("Invalid templateType: " + templateType);
+ }
+ doc.setDefaults(defaults);
+ }
+
return doc;
}
@@ -405,4 +440,12 @@
public TagEditor getTagEditor() {
return tagEditor;
}
+
+ public String getTemplateType() {
+ return templateType;
+ }
+
+ public void setTemplateType(String templateType) {
+ this.templateType = templateType;
+ }
}
Added: trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/exception/InvalidWikiConfigurationException.java
===================================================================
--- trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/exception/InvalidWikiConfigurationException.java (rev 0)
+++ trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/exception/InvalidWikiConfigurationException.java 2008-04-09 17:12:30 UTC (rev 7888)
@@ -0,0 +1,29 @@
+/*
+ * JBoss, Home of Professional Open Source
+ *
+ * Distributable under LGPL license.
+ * See terms of license at gnu.org.
+ */
+package org.jboss.seam.wiki.core.exception;
+
+/**
+ * @author Christian Bauer
+ */
+public class InvalidWikiConfigurationException extends RuntimeException {
+
+ public InvalidWikiConfigurationException() {
+ super();
+ }
+
+ public InvalidWikiConfigurationException(String s) {
+ super(s);
+ }
+
+ public InvalidWikiConfigurationException(String s, Throwable throwable) {
+ super(s, throwable);
+ }
+
+ public InvalidWikiConfigurationException(Throwable throwable) {
+ super(throwable);
+ }
+}
Modified: trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/model/WikiDocumentDefaults.java
===================================================================
--- trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/model/WikiDocumentDefaults.java 2008-04-09 12:38:39 UTC (rev 7887)
+++ trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/model/WikiDocumentDefaults.java 2008-04-09 17:12:30 UTC (rev 7888)
@@ -6,6 +6,22 @@
public class WikiDocumentDefaults {
+ WikiDocument template;
+
+ public WikiDocumentDefaults() {}
+
+ public WikiDocumentDefaults(WikiDocument template) {
+ this.template = template;
+ }
+
+ public WikiDocument getTemplate() {
+ return template;
+ }
+
+ public void setTemplate(WikiDocument template) {
+ this.template = template;
+ }
+
public String getName() {
return "New Document";
}
Added: trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/template/TemplateRegistry.java
===================================================================
--- trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/template/TemplateRegistry.java (rev 0)
+++ trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/template/TemplateRegistry.java 2008-04-09 17:12:30 UTC (rev 7888)
@@ -0,0 +1,74 @@
+/*
+ * JBoss, Home of Professional Open Source
+ *
+ * Distributable under LGPL license.
+ * See terms of license at gnu.org.
+ */
+package org.jboss.seam.wiki.core.template;
+
+import org.jboss.seam.annotations.*;
+import org.jboss.seam.annotations.Observer;
+import org.jboss.seam.log.Log;
+import org.jboss.seam.ScopeType;
+import org.jboss.seam.Component;
+import org.jboss.seam.wiki.core.model.WikiDocumentDefaults;
+import org.jboss.seam.wiki.core.exception.InvalidWikiConfigurationException;
+import org.jboss.seam.core.Interpolator;
+
+import java.util.*;
+
+/**
+ * @author Christian Bauer
+ */
+@Name("templateRegistry")
+(a)Scope(ScopeType.APPLICATION)
+public class TemplateRegistry {
+
+ @Logger
+ static Log log;
+
+ @In(
+ value="#{deploymentStrategy.annotatedClasses['org.jboss.seam.wiki.core.template.WikiDocumentTemplate']}",
+ required = false
+ )
+ Set<Class> templateClasses;
+
+ Map<Class, String> templates = new HashMap<Class, String>();
+ List<Class> templateTypes = new ArrayList<Class>();
+
+ @Observer("Wiki.started")
+ public void create() {
+ log.debug("initializing template registry");
+
+ for (Class<?> templateClass : templateClasses) {
+
+ String templateName = interpolate(templateClass.getAnnotation(WikiDocumentTemplate.class).value());
+
+ if (!WikiDocumentDefaults.class.isAssignableFrom(templateClass)) {
+ throw new InvalidWikiConfigurationException("Annotated @WikiDocumentTemplate class '"
+ + templateClass
+ + "' does not implement WikiDocumentDefaults interface");
+ }
+
+ log.debug("adding template class " + templateClass.getName() + " as '" + templateName + "'");
+ templates.put(templateClass, templateName);
+ templateTypes.add(templateClass);
+ }
+ }
+
+ private String interpolate(String s) {
+ return Interpolator.instance().interpolate(s);
+ }
+
+ public Map<Class, String> getTemplates() {
+ return templates;
+ }
+
+ public List<Class> getTemplateTypes() {
+ return templateTypes;
+ }
+
+ public static TemplateRegistry instance() {
+ return (TemplateRegistry)Component.getInstance(TemplateRegistry.class);
+ }
+}
Added: trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/template/WikiDocumentEditorTemplate.java
===================================================================
--- trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/template/WikiDocumentEditorTemplate.java (rev 0)
+++ trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/template/WikiDocumentEditorTemplate.java 2008-04-09 17:12:30 UTC (rev 7888)
@@ -0,0 +1,17 @@
+/*
+ * JBoss, Home of Professional Open Source
+ *
+ * Distributable under LGPL license.
+ * See terms of license at gnu.org.
+ */
+package org.jboss.seam.wiki.core.template;
+
+import org.jboss.seam.wiki.core.action.DocumentHome;
+
+/**
+ * @author Christian Bauer
+ */
+public interface WikiDocumentEditorTemplate {
+
+ public void setEditorDefaults(DocumentHome editor);
+}
Added: trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/template/WikiDocumentTemplate.java
===================================================================
--- trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/template/WikiDocumentTemplate.java (rev 0)
+++ trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/template/WikiDocumentTemplate.java 2008-04-09 17:12:30 UTC (rev 7888)
@@ -0,0 +1,22 @@
+/*
+ * JBoss, Home of Professional Open Source
+ *
+ * Distributable under LGPL license.
+ * See terms of license at gnu.org.
+ */
+package org.jboss.seam.wiki.core.template;
+
+import java.lang.annotation.Target;
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+
+/**
+ * @author Christian Bauer
+ */
+(a)Target(ElementType.TYPE)
+(a)Retention(RetentionPolicy.RUNTIME)
+public @interface WikiDocumentTemplate {
+ String value();
+ boolean requiresTemplateInstance() default false;
+}
Added: trunk/examples/wiki/src/main/org/jboss/seam/wiki/plugin/blogdirectory/BlogEntryDefaults.java
===================================================================
--- trunk/examples/wiki/src/main/org/jboss/seam/wiki/plugin/blogdirectory/BlogEntryDefaults.java (rev 0)
+++ trunk/examples/wiki/src/main/org/jboss/seam/wiki/plugin/blogdirectory/BlogEntryDefaults.java 2008-04-09 17:12:30 UTC (rev 7888)
@@ -0,0 +1,35 @@
+/*
+ * JBoss, Home of Professional Open Source
+ *
+ * Distributable under LGPL license.
+ * See terms of license at gnu.org.
+ */
+package org.jboss.seam.wiki.plugin.blogdirectory;
+
+import org.jboss.seam.wiki.core.template.WikiDocumentTemplate;
+import org.jboss.seam.wiki.core.template.WikiDocumentEditorTemplate;
+import org.jboss.seam.wiki.core.model.WikiDocumentDefaults;
+import org.jboss.seam.wiki.core.action.DocumentHome;
+import org.jboss.seam.international.Messages;
+
+/**
+ * @author Christian Bauer
+ */
+@WikiDocumentTemplate("#{messages['blogDirectory.label.template.BlogEntry']}")
+public class BlogEntryDefaults extends WikiDocumentDefaults implements WikiDocumentEditorTemplate {
+
+ @Override
+ public String getName() {
+ return Messages.instance().get("blogDirectory.label.template.NewBlogEntryTitle");
+ }
+
+ @Override
+ public String[] getHeaderMacrosAsString() {
+ return new String[]{ "blogEntry" };
+ }
+
+ public void setEditorDefaults(DocumentHome editor) {
+ editor.setPushOnFeeds(true);
+ editor.setPushOnSiteFeed(true);
+ }
+}
Added: trunk/examples/wiki/src/main/org/jboss/seam/wiki/plugin/faqBrowser/FaqQuestionDefaults.java
===================================================================
--- trunk/examples/wiki/src/main/org/jboss/seam/wiki/plugin/faqBrowser/FaqQuestionDefaults.java (rev 0)
+++ trunk/examples/wiki/src/main/org/jboss/seam/wiki/plugin/faqBrowser/FaqQuestionDefaults.java 2008-04-09 17:12:30 UTC (rev 7888)
@@ -0,0 +1,46 @@
+/*
+ * JBoss, Home of Professional Open Source
+ *
+ * Distributable under LGPL license.
+ * See terms of license at gnu.org.
+ */
+package org.jboss.seam.wiki.plugin.faqBrowser;
+
+import org.jboss.seam.wiki.core.model.WikiDocumentDefaults;
+import org.jboss.seam.wiki.core.model.WikiDocument;
+import org.jboss.seam.wiki.core.template.WikiDocumentTemplate;
+import org.jboss.seam.international.Messages;
+
+/**
+ * @author Christian Bauer
+ */
+public class FaqQuestionDefaults extends WikiDocumentDefaults {
+
+ public FaqQuestionDefaults() {
+ super();
+ }
+
+ @Override
+ public String getName() {
+ return Messages.instance().get("faqBrowser.label.NewQuestionTitle");
+ }
+
+ @Override
+ public String[] getHeaderMacrosAsString() {
+ return new String[]{"faqBrowser", "docPager"};
+ }
+
+ @Override
+ public String getContentText() {
+ return Messages.instance().get("lacewiki.msg.wikiTextEditor.EditThisText");
+ }
+
+ @Override
+ public void setOptions(WikiDocument newQuestion) {
+ newQuestion.setNameAsTitle(true);
+ newQuestion.setEnableComments(true);
+ newQuestion.setEnableCommentForm(true);
+ newQuestion.setEnableCommentsOnFeeds(false);
+ }
+
+}
Modified: trunk/examples/wiki/src/main/org/jboss/seam/wiki/plugin/faqBrowser/FaqQuestionHome.java
===================================================================
--- trunk/examples/wiki/src/main/org/jboss/seam/wiki/plugin/faqBrowser/FaqQuestionHome.java 2008-04-09 12:38:39 UTC (rev 7887)
+++ trunk/examples/wiki/src/main/org/jboss/seam/wiki/plugin/faqBrowser/FaqQuestionHome.java 2008-04-09 17:12:30 UTC (rev 7888)
@@ -4,10 +4,8 @@
import org.jboss.seam.annotations.*;
import org.jboss.seam.core.Conversation;
import org.jboss.seam.core.Events;
-import org.jboss.seam.international.Messages;
import org.jboss.seam.wiki.core.action.DocumentHome;
import org.jboss.seam.wiki.core.model.WikiDocument;
-import org.jboss.seam.wiki.core.model.WikiDocumentDefaults;
import static javax.faces.application.FacesMessage.SEVERITY_INFO;
@@ -41,31 +39,7 @@
@Override
public WikiDocument afterNodeCreated(WikiDocument doc) {
WikiDocument newQuestion = super.afterNodeCreated(doc);
-
- WikiDocumentDefaults newQuestionDefaults=
- new WikiDocumentDefaults() {
- @Override
- public String getName() {
- return Messages.instance().get("faqBrowser.label.NewQuestionTitle");
- }
- @Override
- public String[] getHeaderMacrosAsString() {
- return new String[] { "faqBrowser", "docPager" };
- }
- @Override
- public String getContentText() {
- return Messages.instance().get("lacewiki.msg.wikiTextEditor.EditThisText");
- }
- @Override
- public void setOptions(WikiDocument newQuestion) {
- newQuestion.setNameAsTitle(true);
- newQuestion.setEnableComments(true);
- newQuestion.setEnableCommentForm(true);
- newQuestion.setEnableCommentsOnFeeds(false);
- }
- };
- newQuestion.setDefaults(newQuestionDefaults);
-
+ newQuestion.setDefaults(new FaqQuestionDefaults());
return newQuestion;
}
Modified: trunk/examples/wiki/src/main/org/jboss/seam/wiki/plugin/forum/ForumHome.java
===================================================================
--- trunk/examples/wiki/src/main/org/jboss/seam/wiki/plugin/forum/ForumHome.java 2008-04-09 12:38:39 UTC (rev 7887)
+++ trunk/examples/wiki/src/main/org/jboss/seam/wiki/plugin/forum/ForumHome.java 2008-04-09 17:12:30 UTC (rev 7888)
@@ -1,13 +1,11 @@
package org.jboss.seam.wiki.plugin.forum;
import org.jboss.seam.ScopeType;
-import org.jboss.seam.international.Messages;
import org.jboss.seam.annotations.*;
import org.jboss.seam.core.Conversation;
import org.jboss.seam.core.Events;
import org.jboss.seam.wiki.core.model.*;
import org.jboss.seam.wiki.core.action.DirectoryHome;
-import org.jboss.seam.wiki.util.WikiUtil;
import javax.faces.application.FacesMessage;
import static javax.faces.application.FacesMessage.SEVERITY_INFO;
@@ -68,40 +66,12 @@
getEntityManager().persist(newMenuItem);
// Default document is topic list
- WikiDocumentDefaults topicListDefaults =
- new WikiDocumentDefaults() {
- @Override
- public String getName() {
- return getInstance().getName() + " " + Messages.instance().get("forum.label.Forum");
- }
- @Override
- public String[] getHeaderMacrosAsString() {
- return new String[] {"clearBackground", "hideControls", "hideComments", "hideTags", "hideCreatorHistory"};
- }
- @Override
- public String[] getContentMacrosAsString() {
- return new String[] {"forumTopics"};
- }
- @Override
- public String getContentText() {
- return "";
- }
- @Override
- public void setOptions(WikiDocument document) {
- document.setAreaNumber(getInstance().getAreaNumber());
- document.setWikiname(WikiUtil.convertToWikiName(document.getName()));
- document.setNameAsTitle(true);
- document.setReadAccessLevel(getInstance().getReadAccessLevel());
- document.setWriteAccessLevel(org.jboss.seam.wiki.core.model.Role.ADMINROLE_ACCESSLEVEL);
- document.setEnableComments(false);
- document.setEnableCommentForm(false);
- document.setEnableCommentsOnFeeds(false);
- document.setCreatedBy(getCurrentUser());
- }
- };
-
- WikiDocument topicList = new WikiDocument(topicListDefaults);
-
+ WikiDocument topicListTemplate = new WikiDocument();
+ topicListTemplate.setName(getInstance().getName());
+ topicListTemplate.setCreatedBy(currentUser);
+ topicListTemplate.setAreaNumber(getInstance().getAreaNumber());
+ topicListTemplate.setReadAccessLevel(getInstance().getReadAccessLevel());
+ WikiDocument topicList = new WikiDocument(new TopicListDefaults(topicListTemplate));
topicList.setParent(getInstance());
getInstance().setDefaultFile(topicList);
Added: trunk/examples/wiki/src/main/org/jboss/seam/wiki/plugin/forum/TopicDefaults.java
===================================================================
--- trunk/examples/wiki/src/main/org/jboss/seam/wiki/plugin/forum/TopicDefaults.java (rev 0)
+++ trunk/examples/wiki/src/main/org/jboss/seam/wiki/plugin/forum/TopicDefaults.java 2008-04-09 17:12:30 UTC (rev 7888)
@@ -0,0 +1,50 @@
+/*
+ * JBoss, Home of Professional Open Source
+ *
+ * Distributable under LGPL license.
+ * See terms of license at gnu.org.
+ */
+package org.jboss.seam.wiki.plugin.forum;
+
+import org.jboss.seam.international.Messages;
+import org.jboss.seam.wiki.core.model.WikiDocumentDefaults;
+import org.jboss.seam.wiki.core.model.WikiDocument;
+
+/**
+ * @author Christian Bauer
+ */
+public class TopicDefaults extends WikiDocumentDefaults {
+
+ public TopicDefaults() {
+ super();
+ }
+
+ @Override
+ public String getName() {
+ return Messages.instance().get("forum.label.NewTopic");
+ }
+
+ @Override
+ public String[] getHeaderMacrosAsString() {
+ return new String[] { "clearBackground", "hideControls", "hideComments",
+ "hideTags", "hideCreatorHistory", "disableContentMacros", "forumPosting" };
+ }
+
+ @Override
+ public String getContentText() {
+ return Messages.instance().get("lacewiki.msg.wikiTextEditor.EditThisText");
+ }
+
+ @Override
+ public String[] getFooterMacrosAsString() {
+ return new String[] { "forumReplies" };
+ }
+
+ @Override
+ public void setOptions(WikiDocument newTopic) {
+ newTopic.setNameAsTitle(false);
+ newTopic.setEnableComments(true);
+ newTopic.setEnableCommentForm(true);
+ newTopic.setEnableCommentsOnFeeds(true);
+ }
+}
Modified: trunk/examples/wiki/src/main/org/jboss/seam/wiki/plugin/forum/TopicHome.java
===================================================================
--- trunk/examples/wiki/src/main/org/jboss/seam/wiki/plugin/forum/TopicHome.java 2008-04-09 12:38:39 UTC (rev 7887)
+++ trunk/examples/wiki/src/main/org/jboss/seam/wiki/plugin/forum/TopicHome.java 2008-04-09 17:12:30 UTC (rev 7888)
@@ -1,23 +1,21 @@
package org.jboss.seam.wiki.plugin.forum;
import org.jboss.seam.ScopeType;
-import org.jboss.seam.faces.Renderer;
-import org.jboss.seam.ui.validator.FormattedTextValidator;
import org.jboss.seam.annotations.*;
import org.jboss.seam.annotations.web.RequestParameter;
import org.jboss.seam.core.Conversation;
import org.jboss.seam.core.Events;
-import org.jboss.seam.international.Messages;
+import org.jboss.seam.faces.Renderer;
+import org.jboss.seam.ui.validator.FormattedTextValidator;
import org.jboss.seam.wiki.core.action.DocumentHome;
import org.jboss.seam.wiki.core.action.prefs.WikiPreferences;
+import org.jboss.seam.wiki.core.engine.WikiMacro;
import org.jboss.seam.wiki.core.model.WikiDirectory;
import org.jboss.seam.wiki.core.model.WikiDocument;
-import org.jboss.seam.wiki.core.model.WikiDocumentDefaults;
-import org.jboss.seam.wiki.core.engine.WikiMacro;
import org.jboss.seam.wiki.preferences.Preferences;
-import static javax.faces.application.FacesMessage.SEVERITY_INFO;
import javax.faces.application.FacesMessage;
+import static javax.faces.application.FacesMessage.SEVERITY_INFO;
import javax.faces.validator.ValidatorException;
@Name("topicHome")
@@ -60,38 +58,8 @@
@Override
public WikiDocument afterNodeCreated(WikiDocument doc) {
WikiDocument newTopic = super.afterNodeCreated(doc);
-
- WikiDocumentDefaults newTopicDefaults =
- new WikiDocumentDefaults() {
- @Override
- public String getName() {
- return Messages.instance().get("forum.label.NewTopic");
- }
- @Override
- public String[] getHeaderMacrosAsString() {
- return new String[] { "clearBackground", "hideControls", "hideComments",
- "hideTags", "hideCreatorHistory", "disableContentMacros", "forumPosting" };
- }
- @Override
- public String getContentText() {
- return Messages.instance().get("lacewiki.msg.wikiTextEditor.EditThisText");
- }
- @Override
- public String[] getFooterMacrosAsString() {
- return new String[] { "forumReplies" };
- }
- @Override
- public void setOptions(WikiDocument newTopic) {
- newTopic.setNameAsTitle(false);
- newTopic.setEnableComments(true);
- newTopic.setEnableCommentForm(true);
- newTopic.setEnableCommentsOnFeeds(true);
- }
- };
- newTopic.setDefaults(newTopicDefaults);
-
+ newTopic.setDefaults(new TopicDefaults());
setPushOnFeeds(true);
-
return newTopic;
}
Added: trunk/examples/wiki/src/main/org/jboss/seam/wiki/plugin/forum/TopicListDefaults.java
===================================================================
--- trunk/examples/wiki/src/main/org/jboss/seam/wiki/plugin/forum/TopicListDefaults.java (rev 0)
+++ trunk/examples/wiki/src/main/org/jboss/seam/wiki/plugin/forum/TopicListDefaults.java 2008-04-09 17:12:30 UTC (rev 7888)
@@ -0,0 +1,55 @@
+/*
+ * JBoss, Home of Professional Open Source
+ *
+ * Distributable under LGPL license.
+ * See terms of license at gnu.org.
+ */
+package org.jboss.seam.wiki.plugin.forum;
+
+import org.jboss.seam.international.Messages;
+import org.jboss.seam.wiki.util.WikiUtil;
+import org.jboss.seam.wiki.core.model.WikiDocument;
+import org.jboss.seam.wiki.core.model.WikiDocumentDefaults;
+
+/**
+ * @author Christian Bauer
+ */
+public class TopicListDefaults extends WikiDocumentDefaults {
+
+ public TopicListDefaults(WikiDocument template) {
+ super(template);
+ }
+
+ @Override
+ public String getName() {
+ return getTemplate().getName() + " " + Messages.instance().get("forum.label.Forum");
+ }
+
+ @Override
+ public String[] getHeaderMacrosAsString() {
+ return new String[]{"clearBackground", "hideControls", "hideComments", "hideTags", "hideCreatorHistory"};
+ }
+
+ @Override
+ public String[] getContentMacrosAsString() {
+ return new String[]{"forumTopics"};
+ }
+
+ @Override
+ public String getContentText() {
+ return "";
+ }
+
+ @Override
+ public void setOptions(WikiDocument document) {
+ document.setAreaNumber(getTemplate().getAreaNumber());
+ document.setWikiname(WikiUtil.convertToWikiName(document.getName()));
+ document.setNameAsTitle(true);
+ document.setReadAccessLevel(getTemplate().getReadAccessLevel());
+ document.setWriteAccessLevel(org.jboss.seam.wiki.core.model.Role.ADMINROLE_ACCESSLEVEL);
+ document.setEnableComments(false);
+ document.setEnableCommentForm(false);
+ document.setEnableCommentsOnFeeds(false);
+ document.setCreatedBy(getTemplate().getCreatedBy());
+ }
+}
Modified: trunk/examples/wiki/view/dirDisplay_d.xhtml
===================================================================
--- trunk/examples/wiki/view/dirDisplay_d.xhtml 2008-04-09 12:38:39 UTC (rev 7887)
+++ trunk/examples/wiki/view/dirDisplay_d.xhtml 2008-04-09 17:12:30 UTC (rev 7888)
@@ -31,14 +31,32 @@
<h:outputText escape="false" value="#{messages['lacewiki.button.EditDirectory']}"/>
</s:link>
- <s:link id="createDoc" styleClass="linkNavigation"
- accesskey="#{messages['lacewiki.button.NewDocument.accesskey']}"
- view="/docEdit_#{skin}.xhtml" propagation="none"
- rendered="#{s:hasPermission('Node', 'create', directoryBrowser.instance)}">
- <h:outputText escape="false" value="#{messages['lacewiki.button.NewDocument']}"/>
- <f:param name="documentId"/>
- <f:param name="parentDirectoryId" value="#{directoryBrowser.instance.id}"/>
- </s:link>
+ <s:div id="createDoc" styleClass="linkNavigationMenu"
+ rendered="#{s:hasPermission('Node', 'create', directoryBrowser.instance)}">
+ <h:outputLink value="javascript://no-op"
+ onmouseover="jQuery(this).parent().menu();"
+ accesskey="#{messages['lacewiki.button.NewDocument.accesskey']}">
+ <h:outputText escape="false" value="#{messages['lacewiki.button.NewDocument']}"/>
+ </h:outputLink><ul class="contextMenuItems">
+ <li>
+ <s:link view="/docEdit_#{skin}.xhtml" propagation="none">
+ <h:outputText escape="false" value="#{messages['lacewiki.label.template.RegularWikiDocument']}"/>
+ <f:param name="documentId" value=""/>
+ <f:param name="parentDirectoryId" value="#{directoryBrowser.instance.id}"/>
+ </s:link>
+ </li>
+ <ui:repeat var="templateType" value="#{templateRegistry.templateTypes}">
+ <li>
+ <s:link view="/docEdit_#{skin}.xhtml" propagation="none">
+ <h:outputText escape="false" value="#{templateRegistry.templates[templateType]}"/>
+ <f:param name="documentId" value=""/>
+ <f:param name="parentDirectoryId" value="#{directoryBrowser.instance.id}"/>
+ <f:param name="templateType" value="#{templateType.name}"/>
+ </s:link>
+ </li>
+ </ui:repeat>
+ </ul>
+ </s:div>
<s:link id="uploadFile" styleClass="linkNavigation"
accesskey="#{messages['lacewiki.button.UploadFile.accesskey']}"
Modified: trunk/examples/wiki/view/docDisplay_d.xhtml
===================================================================
--- trunk/examples/wiki/view/docDisplay_d.xhtml 2008-04-09 12:38:39 UTC (rev 7887)
+++ trunk/examples/wiki/view/docDisplay_d.xhtml 2008-04-09 17:12:30 UTC (rev 7888)
@@ -27,14 +27,32 @@
<s:fragment rendered="#{not documentHome.instance.macroPresent('hideControls') or s:hasPermission('User', 'isAdmin', currentUser)}">
- <s:link id="createDoc" styleClass="linkNavigation"
- accesskey="#{messages['lacewiki.button.CreateDocument.accesskey']}"
- view="/docEdit_#{skin}.xhtml" propagation="none"
- rendered="#{s:hasPermission('Node', 'create', documentHome.instance.parent)}">
- <h:outputText escape="false" value="#{messages['lacewiki.button.CreateDocument']}"/>
- <f:param name="documentId" value=""/>
- <f:param name="parentDirectoryId" value="#{documentHome.instance.parent.id}"/>
- </s:link>
+ <s:div id="createDoc" styleClass="linkNavigationMenu"
+ rendered="#{s:hasPermission('Node', 'create', documentHome.instance.parent)}">
+ <h:outputLink value="javascript://no-op"
+ onmouseover="jQuery(this).parent().menu();"
+ accesskey="#{messages['lacewiki.button.CreateDocument.accesskey']}">
+ <h:outputText escape="false" value="#{messages['lacewiki.button.CreateDocument']}"/>
+ </h:outputLink><ul
+ class="contextMenuItems">
+ <li>
+ <s:link view="/docEdit_#{skin}.xhtml" propagation="none">
+ <h:outputText escape="false" value="#{messages['lacewiki.label.template.RegularWikiDocument']}"/>
+ <f:param name="documentId" value=""/>
+ <f:param name="parentDirectoryId" value="#{documentHome.instance.parent.id}"/>
+ </s:link>
+ </li>
+ <ui:repeat var="templateType" value="#{templateRegistry.templateTypes}">
+ <li>
+ <s:link view="/docEdit_#{skin}.xhtml" propagation="none">
+ <h:outputText escape="false" value="#{templateRegistry.templates[templateType]}"/>
+ <f:param name="documentId" value=""/>
+ <f:param name="parentDirectoryId" value="#{documentHome.instance.parent.id}"/>
+ <f:param name="templateType" value="#{templateType.name}"/>
+ </s:link>
+ </li>
+ </ui:repeat>
+ </ul></s:div>
<s:link id="editDoc" styleClass="linkNavigation"
accesskey="#{messages['lacewiki.button.EditDocument.accesskey']}"
Modified: trunk/examples/wiki/view/includes/directoryBrowserIconMenu.xhtml
===================================================================
--- trunk/examples/wiki/view/includes/directoryBrowserIconMenu.xhtml 2008-04-09 12:38:39 UTC (rev 7887)
+++ trunk/examples/wiki/view/includes/directoryBrowserIconMenu.xhtml 2008-04-09 17:12:30 UTC (rev 7888)
@@ -4,7 +4,7 @@
xmlns:h="http://java.sun.com/jsf/html"
xmlns:s="http://jboss.com/products/seam/taglib">
- <h:outputLink value="#" tabindex="1"
+ <h:outputLink value="javascript://no-op" tabindex="1"
onmouseover="jQuery(this).children('.dirItemIcon').attr('src','#{themePath}/img/menu_down.gif').toggleClass('mouseOver');
jQuery(this).parent('.contextMenu').menu(); jQuery(this).children('.contextMenuItems').show();"
onmouseout="jQuery(this).children('.dirItemIcon').attr('src','#{icon}').toggleClass('mouseOver')">
Modified: trunk/examples/wiki/view/includes/userControl.xhtml
===================================================================
--- trunk/examples/wiki/view/includes/userControl.xhtml 2008-04-09 12:38:39 UTC (rev 7887)
+++ trunk/examples/wiki/view/includes/userControl.xhtml 2008-04-09 17:12:30 UTC (rev 7888)
@@ -97,7 +97,7 @@
<s:span styleClass="label">
<h:outputText value="#{messages['lacewiki.label.userControl.Password']} "/>
- <h:outputLink value="#" id="openPasswordResetPopup" tabindex="51">
+ <h:outputLink value="javascript://no-op" id="openPasswordResetPopup" tabindex="51">
<h:outputText styleClass="linkText" escape="false" value="(#{messages['lacewiki.button.userControl.ResetPassword']})"/>
</h:outputLink>
<h:outputText value=":"/>
Modified: trunk/examples/wiki/view/includes/wikiTextEditor.xhtml
===================================================================
--- trunk/examples/wiki/view/includes/wikiTextEditor.xhtml 2008-04-09 12:38:39 UTC (rev 7887)
+++ trunk/examples/wiki/view/includes/wikiTextEditor.xhtml 2008-04-09 17:12:30 UTC (rev 7888)
@@ -116,7 +116,7 @@
<s:fragment>
<s:fragment rendered="#{not empty textPreviewId}">
- <h:outputLink value="#"
+ <h:outputLink value="javascript://no-op"
tabindex="1" styleClass="buttonNonpersistent noWrapWhitespace"
accesskey="#{messages['lacewiki.button.wikiTextEditor.UpdatePreview.accesskey']}"
onclick="rememberCursorPosition('##{namingContainer}\\\\:#{textEditorId}TextArea'); #{textEditorId}UpdatePreview(); return false;">
Modified: trunk/examples/wiki/view/themes/default/css/faqBrowser.css
===================================================================
--- trunk/examples/wiki/view/themes/default/css/faqBrowser.css 2008-04-09 12:38:39 UTC (rev 7887)
+++ trunk/examples/wiki/view/themes/default/css/faqBrowser.css 2008-04-09 17:12:30 UTC (rev 7888)
@@ -60,6 +60,7 @@
}
.faqQuestionList {
+ width: 100%;
}
.faqQuestionList .rowOdd {
Modified: trunk/examples/wiki/view/themes/default/css/template.css
===================================================================
--- trunk/examples/wiki/view/themes/default/css/template.css 2008-04-09 12:38:39 UTC (rev 7887)
+++ trunk/examples/wiki/view/themes/default/css/template.css 2008-04-09 17:12:30 UTC (rev 7888)
@@ -473,6 +473,17 @@
margin: 0 5px 0 5px;
}
+.linkNavigationMenu {
+ display: inline;
+ text-decoration:none;
+ font-size: 85%;
+ font-weight: bold;
+ background: #5a4d46 url(../img/menu.bg.gif) 0 0 repeat-x;
+ border: 1px solid #fff;
+ padding: 2px 5px 2px 5px;
+ margin: 0 5px 0 5px;
+}
+
.linkTab {
text-decoration:none;
font-weight: bold;
@@ -506,6 +517,11 @@
.linkNavigation:hover {color: #ccc}
.linkNavigation:active {color: #aaa}
+.linkNavigationMenu a:link {color: #fff}
+.linkNavigationMenu a:visited {color: #fff}
+.linkNavigationMenu a:hover {color: #ccc}
+.linkNavigationMenu a:active {color: #aaa}
+
.feeds {
padding: 5px;
}
Modified: trunk/examples/wiki/view/themes/inrelationto/css/inrelationto.css
===================================================================
--- trunk/examples/wiki/view/themes/inrelationto/css/inrelationto.css 2008-04-09 12:38:39 UTC (rev 7887)
+++ trunk/examples/wiki/view/themes/inrelationto/css/inrelationto.css 2008-04-09 17:12:30 UTC (rev 7888)
@@ -493,6 +493,18 @@
margin: 0 5px 0 5px;
}
+.linkNavigationMenu {
+ display: inline;
+ text-decoration:none;
+ font-size: 85%;
+ font-weight: bold;
+ background-color: #d55121;
+ border: 1px solid #f3f4e4;
+ border-bottom: 1px solid #f3f4e4;
+ padding: 2px 5px 2px 5px;
+ margin: 0 5px 0 5px;
+}
+
.linkTab {
text-decoration:none;
font-weight: bold;
@@ -526,6 +538,11 @@
.linkNavigation:hover {color: #ccc}
.linkNavigation:active {color: #aaa}
+.linkNavigationMenu a:link {color: #fff}
+.linkNavigationMenu a:visited {color: #fff}
+.linkNavigationMenu a:hover {color: #ccc}
+.linkNavigationMenu a:active {color: #aaa}
+
.feeds {
padding: 5px;
}
Modified: trunk/examples/wiki/view/themes/sfwkorg/css/sfwk.css
===================================================================
--- trunk/examples/wiki/view/themes/sfwkorg/css/sfwk.css 2008-04-09 12:38:39 UTC (rev 7887)
+++ trunk/examples/wiki/view/themes/sfwkorg/css/sfwk.css 2008-04-09 17:12:30 UTC (rev 7888)
@@ -250,6 +250,12 @@
margin: 0 5px 0 5px;
}
+.linkNavigationMenu {
+ display: block;
+ padding: 2px 5px 2px 5px;
+ margin: 0 5px 0 5px;
+}
+
.linkNavigation:visited {color: #576c74}
.workspaceSwitcherContainer {
@@ -1481,7 +1487,6 @@
}
.activetarget {
- font-weight: bold;
cursor: pointer;
}
16 years, 7 months
Seam SVN: r7887 - trunk/doc/reference/en/modules.
by seam-commits@lists.jboss.org
Author: christian.bauer(a)jboss.com
Date: 2008-04-09 08:38:39 -0400 (Wed, 09 Apr 2008)
New Revision: 7887
Modified:
trunk/doc/reference/en/modules/configuration.xml
Log:
Minor
Modified: trunk/doc/reference/en/modules/configuration.xml
===================================================================
--- trunk/doc/reference/en/modules/configuration.xml 2008-04-09 11:32:59 UTC (rev 7886)
+++ trunk/doc/reference/en/modules/configuration.xml 2008-04-09 12:38:39 UTC (rev 7887)
@@ -893,8 +893,8 @@
<literal>/META-INF/seam-deployment.properties</literal>:
</para>
- <programlisting><![CDATA[# A comma separated list of annotation types to handle
-org.jboss.seam.deployment.annotationTypes=com.acme.Foo]]></programlisting>
+ <programlisting><![CDATA[# A colon-separated list of annotation types to handle
+org.jboss.seam.deployment.annotationTypes=com.acme.Foo:com.acme.Bar]]></programlisting>
<para>
Then, during application startup you can get hold of all classes
16 years, 7 months
Seam SVN: r7886 - maven-plugins/trunk/seam-docbook-xslt/src/main/resources/xslt/org/jboss/seam.
by seam-commits@lists.jboss.org
Author: newtonm
Date: 2008-04-09 07:32:59 -0400 (Wed, 09 Apr 2008)
New Revision: 7886
Modified:
maven-plugins/trunk/seam-docbook-xslt/src/main/resources/xslt/org/jboss/seam/main-html.xsl
maven-plugins/trunk/seam-docbook-xslt/src/main/resources/xslt/org/jboss/seam/nochunk-html.xsl
Log:
Added XSL param for header link alternative text in XHTML output.
Modified: maven-plugins/trunk/seam-docbook-xslt/src/main/resources/xslt/org/jboss/seam/main-html.xsl
===================================================================
--- maven-plugins/trunk/seam-docbook-xslt/src/main/resources/xslt/org/jboss/seam/main-html.xsl 2008-04-09 10:55:14 UTC (rev 7885)
+++ maven-plugins/trunk/seam-docbook-xslt/src/main/resources/xslt/org/jboss/seam/main-html.xsl 2008-04-09 11:32:59 UTC (rev 7886)
@@ -17,5 +17,6 @@
<xsl:param name="html.stylesheet" select="'css/seamframework.css'" />
<xsl:param name="jbossOrgHref" select="'http://www.seamframework.org'" />
<xsl:param name="commDocHref" select="'http://www.seamframework.org/Documentation'" />
-
+ <xsl:param name="jbossOrgLinkText" select="'SeamFramework.org'" />
+
</xsl:stylesheet>
Modified: maven-plugins/trunk/seam-docbook-xslt/src/main/resources/xslt/org/jboss/seam/nochunk-html.xsl
===================================================================
--- maven-plugins/trunk/seam-docbook-xslt/src/main/resources/xslt/org/jboss/seam/nochunk-html.xsl 2008-04-09 10:55:14 UTC (rev 7885)
+++ maven-plugins/trunk/seam-docbook-xslt/src/main/resources/xslt/org/jboss/seam/nochunk-html.xsl 2008-04-09 11:32:59 UTC (rev 7886)
@@ -17,5 +17,6 @@
<xsl:param name="html.stylesheet" select="'css/seamframework-nochunk.css'" />
<xsl:param name="jbossOrgHref" select="'http://www.seamframework.org'" />
<xsl:param name="commDocHref" select="'http://www.seamframework.org/Documentation'" />
+ <xsl:param name="jbossOrgLinkText" select="'SeamFramework.org'" />
</xsl:stylesheet>
16 years, 7 months