JBoss Rich Faces SVN: r11170 - in trunk/docs: cdkguide/en/src/main/resources/xslt/org/jboss/richfaces and 4 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: artdaw
Date: 2008-11-14 08:16:56 -0500 (Fri, 14 Nov 2008)
New Revision: 11170
Modified:
trunk/docs/cdkguide/en/src/main/docbook/master.xml
trunk/docs/cdkguide/en/src/main/resources/xslt/org/jboss/richfaces/xhtml-common.xsl
trunk/docs/faq/en/src/main/docbook/master.xml
trunk/docs/faq/en/src/main/resources/xslt/org/jboss/richfaces/xhtml-common.xsl
trunk/docs/migrationguide/en/src/main/resources/xslt/org/jboss/richfaces/xhtml-common.xsl
trunk/docs/userguide/en/src/main/resources/xslt/org/jboss/richfaces/xhtml-common.xsl
Log:
https://jira.jboss.org/jira/browse/RF-4857 - timestamp was added
Modified: trunk/docs/cdkguide/en/src/main/docbook/master.xml
===================================================================
--- trunk/docs/cdkguide/en/src/main/docbook/master.xml 2008-11-14 13:03:34 UTC (rev 11169)
+++ trunk/docs/cdkguide/en/src/main/docbook/master.xml 2008-11-14 13:16:56 UTC (rev 11170)
@@ -41,12 +41,12 @@
<holder>Red Hat</holder>
</copyright>
-<!--abstract>
+<abstract>
<title/>
- <para>
+ <!--para>
<ulink url="http://www.jboss.org/file-access/default/members/jbossrichfaces/freezone/...">PDF version</ulink>
- </para>
-</abstract-->
+ </para-->
+</abstract>
</bookinfo>
@@ -175,4 +175,4 @@
<title>Button component development</title>
<para> Work in progress... </para>
- </chapter> &ide; &namingconv; &ref; &temptags; </book>
+ </chapter> &ide; &namingconv; &ref; &temptags; </book>
Modified: trunk/docs/cdkguide/en/src/main/resources/xslt/org/jboss/richfaces/xhtml-common.xsl
===================================================================
--- trunk/docs/cdkguide/en/src/main/resources/xslt/org/jboss/richfaces/xhtml-common.xsl 2008-11-14 13:03:34 UTC (rev 11169)
+++ trunk/docs/cdkguide/en/src/main/resources/xslt/org/jboss/richfaces/xhtml-common.xsl 2008-11-14 13:16:56 UTC (rev 11170)
@@ -6,7 +6,7 @@
Author: Mark Newton <mark.newton(a)jboss.org>
-->
-<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0" xmlns:date="http://exslt.org/dates-and-times" exclude-result-prefixes="date">
<xsl:import href="collapsing-navigation.xsl"/>
@@ -65,9 +65,17 @@
<xsl:apply-templates select="." mode="head.keywords.content"/>
</xsl:template>
-<xsl:template match="//citebiblio">
+<xsl:template match="abstract" mode="titlepage.mode">
+ <div id="timestamp">
+ <xsl:text>Last published: </xsl:text>
+ <xsl:call-template name="datetime.format">
+ <xsl:with-param name="date" select="date:date-time()"/>
+ <xsl:with-param name="format" select="'B d, Y'"/>
+ </xsl:call-template>
+ </div>
<div>
- <xsl:value-of select="." />
-</div>
+ <xsl:apply-templates select="." mode="class.attribute"/>
+ <xsl:apply-templates mode="titlepage.mode"/>
+ </div>
</xsl:template>
</xsl:stylesheet>
Modified: trunk/docs/faq/en/src/main/docbook/master.xml
===================================================================
--- trunk/docs/faq/en/src/main/docbook/master.xml 2008-11-14 13:03:34 UTC (rev 11169)
+++ trunk/docs/faq/en/src/main/docbook/master.xml 2008-11-14 13:16:56 UTC (rev 11170)
@@ -13,6 +13,11 @@
<year>2008</year>
<holder>Red Hat</holder>
</copyright>
-
+<abstract>
+ <title/>
+ <!--para>
+ <ulink url="#">PDF version</ulink>
+ </para-->
+</abstract>
</bookinfo>
<toc/> &rfcFAQ; </book>
Modified: trunk/docs/faq/en/src/main/resources/xslt/org/jboss/richfaces/xhtml-common.xsl
===================================================================
--- trunk/docs/faq/en/src/main/resources/xslt/org/jboss/richfaces/xhtml-common.xsl 2008-11-14 13:03:34 UTC (rev 11169)
+++ trunk/docs/faq/en/src/main/resources/xslt/org/jboss/richfaces/xhtml-common.xsl 2008-11-14 13:16:56 UTC (rev 11170)
@@ -1,69 +1,82 @@
-<?xml version='1.0'?>
-
-<!--
- Copyright 2008 JBoss, a division of Red Hat
- License: LGPL
- Author: Mark Newton <mark.newton(a)jboss.org>
--->
-
-<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
-
- <xsl:import href="collapsing-navigation.xsl"/>
-
- <xsl:param name="html.stylesheet" select="'css/html.css'"/>
- <xsl:param name="generate.toc" select="'book toc'"/>
-
- <!--
-From: xhtml/docbook.xsl
-Reason: Remove inline style for draft mode
-Version: 1.72.0
--->
-<xsl:template name="head.content">
- <xsl:param name="node" select="."/>
- <xsl:param name="title">
- <xsl:apply-templates select="$node" mode="object.title.markup.textonly"/>
- </xsl:param>
-
- <title xmlns="http://www.w3.org/1999/xhtml" >
- <xsl:copy-of select="$title"/>
- </title>
-
- <xsl:if test="$html.stylesheet != ''">
- <xsl:call-template name="output.html.stylesheets">
- <xsl:with-param name="stylesheets" select="normalize-space($html.stylesheet)"/>
- </xsl:call-template>
- </xsl:if>
-
- <xsl:if test="$link.mailto.url != ''">
- <link rev="made" href="{$link.mailto.url}"/>
- </xsl:if>
-
- <xsl:if test="$html.base != ''">
- <base href="{$html.base}"/>
- </xsl:if>
-
- <meta xmlns="http://www.w3.org/1999/xhtml" name="generator" content="DocBook {$DistroTitle} V{$VERSION}"/>
-
- <xsl:if test="$generate.meta.abstract != 0">
- <xsl:variable name="info" select="(articleinfo |bookinfo |prefaceinfo |chapterinfo |appendixinfo |sectioninfo |sect1info |sect2info |sect3info |sect4info |sect5info |referenceinfo |refentryinfo |partinfo |info |docinfo)[1]"/>
- <xsl:if test="$info and $info/abstract">
- <meta xmlns="http://www.w3.org/1999/xhtml" name="description">
- <xsl:attribute name="content">
- <xsl:for-each select="$info/abstract[1]/*">
- <xsl:value-of select="normalize-space(.)"/>
- <xsl:if test="position() < last()">
- <xsl:text> </xsl:text>
- </xsl:if>
- </xsl:for-each>
- </xsl:attribute>
- </meta>
- </xsl:if>
- </xsl:if>
-
- <link rel="shortcut icon" type="image/vnd.microsoft.icon" href="images/favicon.ico" />
-
- <xsl:apply-templates select="." mode="head.keywords.content"/>
-</xsl:template>
-
-
-</xsl:stylesheet>
+<?xml version='1.0'?>
+
+<!--
+ Copyright 2008 JBoss, a division of Red Hat
+ License: LGPL
+ Author: Mark Newton <mark.newton(a)jboss.org>
+-->
+
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0" xmlns:date="http://exslt.org/dates-and-times" exclude-result-prefixes="date">
+
+ <xsl:import href="collapsing-navigation.xsl"/>
+
+ <xsl:param name="html.stylesheet" select="'css/html.css'"/>
+ <xsl:param name="generate.toc" select="'book toc'"/>
+
+ <!--
+From: xhtml/docbook.xsl
+Reason: Remove inline style for draft mode
+Version: 1.72.0
+-->
+<xsl:template name="head.content">
+ <xsl:param name="node" select="."/>
+ <xsl:param name="title">
+ <xsl:apply-templates select="$node" mode="object.title.markup.textonly"/>
+ </xsl:param>
+
+ <title xmlns="http://www.w3.org/1999/xhtml" >
+ <xsl:copy-of select="$title"/>
+ </title>
+
+ <xsl:if test="$html.stylesheet != ''">
+ <xsl:call-template name="output.html.stylesheets">
+ <xsl:with-param name="stylesheets" select="normalize-space($html.stylesheet)"/>
+ </xsl:call-template>
+ </xsl:if>
+
+ <xsl:if test="$link.mailto.url != ''">
+ <link rev="made" href="{$link.mailto.url}"/>
+ </xsl:if>
+
+ <xsl:if test="$html.base != ''">
+ <base href="{$html.base}"/>
+ </xsl:if>
+
+ <meta xmlns="http://www.w3.org/1999/xhtml" name="generator" content="DocBook {$DistroTitle} V{$VERSION}"/>
+
+ <xsl:if test="$generate.meta.abstract != 0">
+ <xsl:variable name="info" select="(articleinfo |bookinfo |prefaceinfo |chapterinfo |appendixinfo |sectioninfo |sect1info |sect2info |sect3info |sect4info |sect5info |referenceinfo |refentryinfo |partinfo |info |docinfo)[1]"/>
+ <xsl:if test="$info and $info/abstract">
+ <meta xmlns="http://www.w3.org/1999/xhtml" name="description">
+ <xsl:attribute name="content">
+ <xsl:for-each select="$info/abstract[1]/*">
+ <xsl:value-of select="normalize-space(.)"/>
+ <xsl:if test="position() < last()">
+ <xsl:text> </xsl:text>
+ </xsl:if>
+ </xsl:for-each>
+ </xsl:attribute>
+ </meta>
+ </xsl:if>
+ </xsl:if>
+
+ <link rel="shortcut icon" type="image/vnd.microsoft.icon" href="images/favicon.ico" />
+
+ <xsl:apply-templates select="." mode="head.keywords.content"/>
+</xsl:template>
+
+<xsl:template match="abstract" mode="titlepage.mode">
+ <div id="timestamp">
+ <xsl:text>Last published: </xsl:text>
+ <xsl:call-template name="datetime.format">
+ <xsl:with-param name="date" select="date:date-time()"/>
+ <xsl:with-param name="format" select="'B d, Y'"/>
+ </xsl:call-template>
+ </div>
+ <div>
+ <xsl:apply-templates select="." mode="class.attribute"/>
+ <xsl:apply-templates mode="titlepage.mode"/>
+ </div>
+</xsl:template>
+
+</xsl:stylesheet>
Modified: trunk/docs/migrationguide/en/src/main/resources/xslt/org/jboss/richfaces/xhtml-common.xsl
===================================================================
--- trunk/docs/migrationguide/en/src/main/resources/xslt/org/jboss/richfaces/xhtml-common.xsl 2008-11-14 13:03:34 UTC (rev 11169)
+++ trunk/docs/migrationguide/en/src/main/resources/xslt/org/jboss/richfaces/xhtml-common.xsl 2008-11-14 13:16:56 UTC (rev 11170)
@@ -6,7 +6,7 @@
Author: Mark Newton <mark.newton(a)jboss.org>
-->
-<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0" xmlns:date="http://exslt.org/dates-and-times" exclude-result-prefixes="date">
<xsl:import href="collapsing-navigation.xsl"/>
@@ -18,6 +18,7 @@
Reason: Remove inline style for draft mode
Version: 1.72.0
-->
+
<xsl:template name="head.content">
<xsl:param name="node" select="."/>
<xsl:param name="title">
@@ -61,13 +62,23 @@
</xsl:if>
<link rel="shortcut icon" type="image/vnd.microsoft.icon" href="images/favicon.ico" />
-
<xsl:apply-templates select="." mode="head.keywords.content"/>
</xsl:template>
-<xsl:template match="//citebiblio">
+
+
+<xsl:template match="abstract" mode="titlepage.mode">
+ <div id="timestamp">
+ <xsl:text>Last published: </xsl:text>
+ <xsl:call-template name="datetime.format">
+ <xsl:with-param name="date" select="date:date-time()"/>
+ <xsl:with-param name="format" select="'B d, Y'"/>
+ </xsl:call-template>
+ </div>
<div>
- <xsl:value-of select="." />
-</div>
+ <xsl:apply-templates select="." mode="class.attribute"/>
+ <xsl:apply-templates mode="titlepage.mode"/>
+ </div>
</xsl:template>
+
</xsl:stylesheet>
Modified: trunk/docs/userguide/en/src/main/resources/xslt/org/jboss/richfaces/xhtml-common.xsl
===================================================================
--- trunk/docs/userguide/en/src/main/resources/xslt/org/jboss/richfaces/xhtml-common.xsl 2008-11-14 13:03:34 UTC (rev 11169)
+++ trunk/docs/userguide/en/src/main/resources/xslt/org/jboss/richfaces/xhtml-common.xsl 2008-11-14 13:16:56 UTC (rev 11170)
@@ -1,140 +1,146 @@
-<?xml version='1.0'?>
-
-<!--
- Copyright 2008 JBoss, a division of Red Hat
- License: LGPL
- Author: Mark Newton <mark.newton(a)jboss.org>
--->
-
-<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
-
- <xsl:import href="collapsing-navigation.xsl"/>
-
- <xsl:param name="html.stylesheet" select="'css/html.css'"/>
-
- <!--
-From: xhtml/docbook.xsl
-Reason: Remove inline style for draft mode
-Version: 1.72.0
--->
-<xsl:template name="head.content">
- <xsl:param name="node" select="."/>
- <xsl:param name="title">
- <xsl:apply-templates select="$node" mode="object.title.markup.textonly"/>
- </xsl:param>
-
- <title xmlns="http://www.w3.org/1999/xhtml" >
- <xsl:copy-of select="$title"/>
- </title>
-
- <xsl:if test="$html.stylesheet != ''">
- <xsl:call-template name="output.html.stylesheets">
- <xsl:with-param name="stylesheets" select="normalize-space($html.stylesheet)"/>
- </xsl:call-template>
- </xsl:if>
-
- <xsl:if test="$link.mailto.url != ''">
- <link rev="made" href="{$link.mailto.url}"/>
- </xsl:if>
-
- <xsl:if test="$html.base != ''">
- <base href="{$html.base}"/>
- </xsl:if>
-
- <meta xmlns="http://www.w3.org/1999/xhtml" name="generator" content="DocBook {$DistroTitle} V{$VERSION}"/>
-
- <xsl:if test="$generate.meta.abstract != 0">
- <xsl:variable name="info" select="(articleinfo |bookinfo |prefaceinfo |chapterinfo |appendixinfo |sectioninfo |sect1info |sect2info |sect3info |sect4info |sect5info |referenceinfo |refentryinfo |partinfo |info |docinfo)[1]"/>
- <xsl:if test="$info and $info/abstract">
- <meta xmlns="http://www.w3.org/1999/xhtml" name="description">
- <xsl:attribute name="content">
- <xsl:for-each select="$info/abstract[1]/*">
- <xsl:value-of select="normalize-space(.)"/>
- <xsl:if test="position() < last()">
- <xsl:text> </xsl:text>
- </xsl:if>
- </xsl:for-each>
- </xsl:attribute>
- </meta>
- </xsl:if>
- </xsl:if>
-
- <link rel="shortcut icon" type="image/vnd.microsoft.icon" href="images/favicon.ico" />
-
- <xsl:apply-templates select="." mode="head.keywords.content"/>
-</xsl:template>
-<xsl:template name="toc.line">
- <xsl:param name="toc-context" select="."/>
- <xsl:param name="depth" select="1"/>
- <xsl:param name="depth.from.context" select="8"/>
-
- <span>
- <xsl:attribute name="class"><xsl:value-of select="local-name(.)"/></xsl:attribute>
-
- <!-- * if $autotoc.label.in.hyperlink is zero, then output the label -->
- <!-- * before the hyperlinked title (as the DSSSL stylesheet does) -->
- <xsl:if test="$autotoc.label.in.hyperlink = 0">
- <xsl:variable name="label">
- <xsl:apply-templates select="." mode="label.markup"/>
- </xsl:variable>
- <xsl:copy-of select="$label"/>
- <xsl:if test="$label != ''">
- <xsl:value-of select="$autotoc.label.separator"/>
- </xsl:if>
- </xsl:if>
-
- <a>
- <xsl:attribute name="href">
- <xsl:call-template name="href.target">
- <xsl:with-param name="context" select="$toc-context"/>
- <xsl:with-param name="toc-context" select="$toc-context"/>
- </xsl:call-template>
- </xsl:attribute>
-
-<xsl:choose>
-<xsl:when test="@role='new'">
-<xsl:attribute name="class">
-<xsl:value-of select="@role"/>
-</xsl:attribute>
-</xsl:when>
-<xsl:when test="@role='updated'">
-<xsl:attribute name="class">
-<xsl:value-of select="@role"/>
-</xsl:attribute>
-</xsl:when>
-</xsl:choose>
-
- <!-- * if $autotoc.label.in.hyperlink is non-zero, then output the label -->
- <!-- * as part of the hyperlinked title -->
- <xsl:if test="not($autotoc.label.in.hyperlink = 0)">
- <xsl:variable name="label">
- <xsl:apply-templates select="." mode="label.markup"/>
- </xsl:variable>
- <xsl:copy-of select="$label"/>
- <xsl:if test="$label != ''">
- <xsl:value-of select="$autotoc.label.separator"/>
- </xsl:if>
- </xsl:if>
-
- <xsl:apply-templates select="." mode="titleabbrev.markup"/>
- </a>
- </span>
-</xsl:template>
-
-<xsl:template match="book" mode="toc">
- <xsl:param name="toc-context" select="."/>
-
- <xsl:call-template name="subtoc">
- <xsl:with-param name="toc-context" select="$toc-context"/>
- <xsl:with-param name="nodes" select="part|reference |preface|chapter|appendix |article |bibliography|glossary|index |refentry |bridgehead[$bridgehead.in.toc != 0]"/>
- </xsl:call-template>
-</xsl:template>
-
-<xsl:template match="abstract" mode="titlepage.mode">
- <div>
- <xsl:apply-templates select="." mode="class.attribute"/>
- <xsl:apply-templates mode="titlepage.mode"/>
- </div>
-</xsl:template>
-
-</xsl:stylesheet>
+<?xml version='1.0'?>
+
+<!--
+ Copyright 2008 JBoss, a division of Red Hat
+ License: LGPL
+ Author: Mark Newton <mark.newton(a)jboss.org>
+-->
+
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0" xmlns:date="http://exslt.org/dates-and-times" exclude-result-prefixes="date">
+
+ <xsl:import href="collapsing-navigation.xsl"/>
+
+ <xsl:param name="html.stylesheet" select="'css/html.css'"/>
+
+ <!--
+From: xhtml/docbook.xsl
+Reason: Remove inline style for draft mode
+Version: 1.72.0
+-->
+<xsl:template name="head.content">
+ <xsl:param name="node" select="."/>
+ <xsl:param name="title">
+ <xsl:apply-templates select="$node" mode="object.title.markup.textonly"/>
+ </xsl:param>
+
+ <title xmlns="http://www.w3.org/1999/xhtml" >
+ <xsl:copy-of select="$title"/>
+ </title>
+
+ <xsl:if test="$html.stylesheet != ''">
+ <xsl:call-template name="output.html.stylesheets">
+ <xsl:with-param name="stylesheets" select="normalize-space($html.stylesheet)"/>
+ </xsl:call-template>
+ </xsl:if>
+
+ <xsl:if test="$link.mailto.url != ''">
+ <link rev="made" href="{$link.mailto.url}"/>
+ </xsl:if>
+
+ <xsl:if test="$html.base != ''">
+ <base href="{$html.base}"/>
+ </xsl:if>
+
+ <meta xmlns="http://www.w3.org/1999/xhtml" name="generator" content="DocBook {$DistroTitle} V{$VERSION}"/>
+
+ <xsl:if test="$generate.meta.abstract != 0">
+ <xsl:variable name="info" select="(articleinfo |bookinfo |prefaceinfo |chapterinfo |appendixinfo |sectioninfo |sect1info |sect2info |sect3info |sect4info |sect5info |referenceinfo |refentryinfo |partinfo |info |docinfo)[1]"/>
+ <xsl:if test="$info and $info/abstract">
+ <meta xmlns="http://www.w3.org/1999/xhtml" name="description">
+ <xsl:attribute name="content">
+ <xsl:for-each select="$info/abstract[1]/*">
+ <xsl:value-of select="normalize-space(.)"/>
+ <xsl:if test="position() < last()">
+ <xsl:text> </xsl:text>
+ </xsl:if>
+ </xsl:for-each>
+ </xsl:attribute>
+ </meta>
+ </xsl:if>
+ </xsl:if>
+
+ <link rel="shortcut icon" type="image/vnd.microsoft.icon" href="images/favicon.ico" />
+
+ <xsl:apply-templates select="." mode="head.keywords.content"/>
+</xsl:template>
+<xsl:template name="toc.line">
+ <xsl:param name="toc-context" select="."/>
+ <xsl:param name="depth" select="1"/>
+ <xsl:param name="depth.from.context" select="8"/>
+
+ <span>
+ <xsl:attribute name="class"><xsl:value-of select="local-name(.)"/></xsl:attribute>
+
+ <!-- * if $autotoc.label.in.hyperlink is zero, then output the label -->
+ <!-- * before the hyperlinked title (as the DSSSL stylesheet does) -->
+ <xsl:if test="$autotoc.label.in.hyperlink = 0">
+ <xsl:variable name="label">
+ <xsl:apply-templates select="." mode="label.markup"/>
+ </xsl:variable>
+ <xsl:copy-of select="$label"/>
+ <xsl:if test="$label != ''">
+ <xsl:value-of select="$autotoc.label.separator"/>
+ </xsl:if>
+ </xsl:if>
+
+ <a>
+ <xsl:attribute name="href">
+ <xsl:call-template name="href.target">
+ <xsl:with-param name="context" select="$toc-context"/>
+ <xsl:with-param name="toc-context" select="$toc-context"/>
+ </xsl:call-template>
+ </xsl:attribute>
+
+<xsl:choose>
+<xsl:when test="@role='new'">
+<xsl:attribute name="class">
+<xsl:value-of select="@role"/>
+</xsl:attribute>
+</xsl:when>
+<xsl:when test="@role='updated'">
+<xsl:attribute name="class">
+<xsl:value-of select="@role"/>
+</xsl:attribute>
+</xsl:when>
+</xsl:choose>
+
+ <!-- * if $autotoc.label.in.hyperlink is non-zero, then output the label -->
+ <!-- * as part of the hyperlinked title -->
+ <xsl:if test="not($autotoc.label.in.hyperlink = 0)">
+ <xsl:variable name="label">
+ <xsl:apply-templates select="." mode="label.markup"/>
+ </xsl:variable>
+ <xsl:copy-of select="$label"/>
+ <xsl:if test="$label != ''">
+ <xsl:value-of select="$autotoc.label.separator"/>
+ </xsl:if>
+ </xsl:if>
+
+ <xsl:apply-templates select="." mode="titleabbrev.markup"/>
+ </a>
+ </span>
+</xsl:template>
+
+<xsl:template match="book" mode="toc">
+ <xsl:param name="toc-context" select="."/>
+
+ <xsl:call-template name="subtoc">
+ <xsl:with-param name="toc-context" select="$toc-context"/>
+ <xsl:with-param name="nodes" select="part|reference |preface|chapter|appendix |article |bibliography|glossary|index |refentry |bridgehead[$bridgehead.in.toc != 0]"/>
+ </xsl:call-template>
+</xsl:template>
+
+<xsl:template match="abstract" mode="titlepage.mode">
+ <div id="timestamp">
+ <xsl:text>Last published: </xsl:text>
+ <xsl:call-template name="datetime.format">
+ <xsl:with-param name="date" select="date:date-time()"/>
+ <xsl:with-param name="format" select="'B d, Y'"/>
+ </xsl:call-template>
+ </div>
+ <div>
+ <xsl:apply-templates select="." mode="class.attribute"/>
+ <xsl:apply-templates mode="titlepage.mode"/>
+ </div>
+</xsl:template>
+</xsl:stylesheet>
16 years, 10 months
JBoss Rich Faces SVN: r11169 - trunk/sandbox/ui/editor/src/main/java/org/richfaces/renderkit.
by richfaces-svn-commits@lists.jboss.org
Author: alevkovsky
Date: 2008-11-14 08:03:34 -0500 (Fri, 14 Nov 2008)
New Revision: 11169
Modified:
trunk/sandbox/ui/editor/src/main/java/org/richfaces/renderkit/EditorRendererBase.java
Log:
Editor: Adjust code
Modified: trunk/sandbox/ui/editor/src/main/java/org/richfaces/renderkit/EditorRendererBase.java
===================================================================
--- trunk/sandbox/ui/editor/src/main/java/org/richfaces/renderkit/EditorRendererBase.java 2008-11-14 12:59:16 UTC (rev 11168)
+++ trunk/sandbox/ui/editor/src/main/java/org/richfaces/renderkit/EditorRendererBase.java 2008-11-14 13:03:34 UTC (rev 11169)
@@ -145,7 +145,7 @@
ResponseWriter writer = context.getResponseWriter();
String configName = component.getCustomPlugins();
- if (configName != null) {
+ if (configName != null && configName.length() > 0) {
Properties parameters = new Properties();
try {
ClassLoader loader = Thread.currentThread()
16 years, 10 months
JBoss Rich Faces SVN: r11168 - trunk/sandbox/ui/editor/src/main/java/org/richfaces/renderkit.
by richfaces-svn-commits@lists.jboss.org
Author: alevkovsky
Date: 2008-11-14 07:59:16 -0500 (Fri, 14 Nov 2008)
New Revision: 11168
Modified:
trunk/sandbox/ui/editor/src/main/java/org/richfaces/renderkit/EditorRendererBase.java
Log:
Editor: Adjust code
Modified: trunk/sandbox/ui/editor/src/main/java/org/richfaces/renderkit/EditorRendererBase.java
===================================================================
--- trunk/sandbox/ui/editor/src/main/java/org/richfaces/renderkit/EditorRendererBase.java 2008-11-14 12:33:56 UTC (rev 11167)
+++ trunk/sandbox/ui/editor/src/main/java/org/richfaces/renderkit/EditorRendererBase.java 2008-11-14 12:59:16 UTC (rev 11168)
@@ -115,7 +115,7 @@
writer.writeText("var tinyMceParams = ", null);
String configName = component.getConfiguration();
- if (configName != null) {
+ if (configName != null && configName.length() > 0) {
Properties parameters = new Properties();
try {
ClassLoader loader = Thread.currentThread()
16 years, 10 months
JBoss Rich Faces SVN: r11167 - in trunk/sandbox: samples/editor-sample/src/main/resources and 7 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: pyaschenko
Date: 2008-11-14 07:33:56 -0500 (Fri, 14 Nov 2008)
New Revision: 11167
Modified:
trunk/sandbox/samples/editor-sample/src/main/java/org/richfaces/EditorBean.java
trunk/sandbox/samples/editor-sample/src/main/resources/editorFull.properties
trunk/sandbox/samples/editor-sample/src/main/webapp/pages/editor.jsp
trunk/sandbox/ui/editor/src/main/config/component/editor.xml
trunk/sandbox/ui/editor/src/main/java/org/richfaces/component/UIEditor.java
trunk/sandbox/ui/editor/src/main/java/org/richfaces/renderkit/EditorRendererBase.java
trunk/sandbox/ui/editor/src/main/resources/org/richfaces/renderkit/html/scripts/tiny_mce/themes/simple/skins/richfaces/content.xcss
trunk/sandbox/ui/editor/src/main/resources/org/richfaces/renderkit/html/scripts/tiny_mce/themes/simple/skins/richfaces/ui.xcss
trunk/sandbox/ui/editor/src/main/resources/org/richfaces/renderkit/html/scripts/tiny_mce/tiny_mce_src.js
trunk/sandbox/ui/editor/src/main/templates/editor.jspx
Log:
custom plugins support && sample
Modified: trunk/sandbox/samples/editor-sample/src/main/java/org/richfaces/EditorBean.java
===================================================================
--- trunk/sandbox/samples/editor-sample/src/main/java/org/richfaces/EditorBean.java 2008-11-14 12:32:39 UTC (rev 11166)
+++ trunk/sandbox/samples/editor-sample/src/main/java/org/richfaces/EditorBean.java 2008-11-14 12:33:56 UTC (rev 11167)
@@ -10,6 +10,11 @@
private String value = "Some value....";
private UIEditor editor;
private boolean rendered = true;
+ private String theme = "advanced";
+ private String skin = "richfaces";
+ private String language = "en";
+ private boolean readonly = false;
+ private String viewMode = "vision";
private Map<String, Object> dataMap;
@@ -67,6 +72,46 @@
public void setRendered(boolean rendered) {
this.rendered = rendered;
}
+
+ public String getTheme() {
+ return theme;
+ }
+
+ public void setTheme(String theme) {
+ this.theme = theme;
+ }
+
+ public String getSkin() {
+ return skin;
+ }
+
+ public void setSkin(String skin) {
+ this.skin = skin;
+ }
+
+ public String getLanguage() {
+ return language;
+ }
+
+ public void setLanguage(String language) {
+ this.language = language;
+ }
+
+ public boolean isReadonly() {
+ return readonly;
+ }
+
+ public void setReadonly(boolean readonly) {
+ this.readonly = readonly;
+ }
+
+ public String getViewMode() {
+ return viewMode;
+ }
+
+ public void setViewMode(String viewMode) {
+ this.viewMode = viewMode;
+ }
}
Modified: trunk/sandbox/samples/editor-sample/src/main/resources/editorFull.properties
===================================================================
--- trunk/sandbox/samples/editor-sample/src/main/resources/editorFull.properties 2008-11-14 12:32:39 UTC (rev 11166)
+++ trunk/sandbox/samples/editor-sample/src/main/resources/editorFull.properties 2008-11-14 12:33:56 UTC (rev 11167)
@@ -7,5 +7,4 @@
theme_advanced_toolbar_location = "top"
theme_advanced_toolbar_align = "left"
theme_advanced_statusbar_location = "bottom"
-theme_advanced_resizing = true
-skin = "richfaces"
\ No newline at end of file
+theme_advanced_resizing = true
\ No newline at end of file
Modified: trunk/sandbox/samples/editor-sample/src/main/webapp/pages/editor.jsp
===================================================================
--- trunk/sandbox/samples/editor-sample/src/main/webapp/pages/editor.jsp 2008-11-14 12:32:39 UTC (rev 11166)
+++ trunk/sandbox/samples/editor-sample/src/main/webapp/pages/editor.jsp 2008-11-14 12:33:56 UTC (rev 11167)
@@ -30,13 +30,46 @@
height="400"
rendered="#{editorBean.rendered}"
binding="#{editorBean.editor}"
- theme="advanced"
- language="en"
- plugins="safari,spellchecker,pagebreak,style,layer,table,save,advhr,advimage,advlink,emotions,iespell,inlinepopups,insertdatetime,preview,media,searchreplace,print,contextmenu,paste,directionality,fullscreen,noneditable,visualchars,nonbreaking,xhtmlxtras,template,myemotions"
+ theme="#{editorBean.theme}"
+ language="#{editorBean.language}"
configuration="editorFull"
- skin="richfaces"
+ skin="#{editorBean.skin}"
customPlugins="myplugins"
- />
+ readonly="#{editorBean.readonly}"
+ viewMode="#{editorBean.viewMode}"
+ plugins="safari,spellchecker,pagebreak,style,layer,table,save,advhr,advimage,advlink,emotions,iespell,inlinepopups,insertdatetime,preview,media,searchreplace,print,contextmenu,paste,directionality,fullscreen,noneditable,visualchars,nonbreaking,xhtmlxtras,template,myemotions"
+ >
+ </ed:editor>
+
+ <hr/>
+ <h:panelGrid columns="2">
+ <h:outputText value="Select theme:" />
+ <h:selectOneRadio onchange="submit()" value="#{editorBean.theme}">
+ <f:selectItem itemLabel="simple" itemValue="simple"/>
+ <f:selectItem itemLabel="advanced" itemValue="advanced"/>
+ </h:selectOneRadio>
+ <h:outputText value="Select skin:" />
+ <h:selectOneRadio onchange="submit()" value="#{editorBean.skin}">
+ <f:selectItem itemLabel="default" itemValue="default"/>
+ <f:selectItem itemLabel="o2k7" itemValue="o2k7"/>
+ <f:selectItem itemLabel="richfaces" itemValue="richfaces"/>
+ </h:selectOneRadio>
+ <h:outputText value="Select language:" />
+ <h:selectOneRadio onchange="submit()" value="#{editorBean.language}">
+ <f:selectItem itemLabel="default" itemValue="default"/>
+ <f:selectItem itemLabel="o2k7" itemValue="o2k7"/>
+ <f:selectItem itemLabel="richfaces" itemValue="richfaces"/>
+ </h:selectOneRadio>
+ <h:outputText value="Is readonly:" />
+ <h:selectBooleanCheckbox value="#{editorBean.readonly}" onclick="submit()">
+ </h:selectBooleanCheckbox>
+ <h:outputText value="View mode:" />
+ <h:selectOneRadio onchange="submit()" value="#{editorBean.viewMode}">
+ <f:selectItem itemLabel="vision" itemValue="vision"/>
+ <f:selectItem itemLabel="source" itemValue="source"/>
+ </h:selectOneRadio>
+ </h:panelGrid>
+ <hr/>
<h:outputText value="Editor value: #{editorBean.value}" />
<br/>
Modified: trunk/sandbox/ui/editor/src/main/config/component/editor.xml
===================================================================
--- trunk/sandbox/ui/editor/src/main/config/component/editor.xml 2008-11-14 12:32:39 UTC (rev 11166)
+++ trunk/sandbox/ui/editor/src/main/config/component/editor.xml 2008-11-14 12:33:56 UTC (rev 11167)
@@ -148,6 +148,13 @@
Attribute defines configuration properties file name
</description>
</property>
+ <property>
+ <name>customplugins</name>
+ <classname>java.lang.String</classname>
+ <description>
+ Attribute defines property file name witch contains descriptors of custom plugins
+ </description>
+ </property>
<property hidden="true">
<name>localValueSet</name>
<classname>boolean</classname>
Modified: trunk/sandbox/ui/editor/src/main/java/org/richfaces/component/UIEditor.java
===================================================================
--- trunk/sandbox/ui/editor/src/main/java/org/richfaces/component/UIEditor.java 2008-11-14 12:32:39 UTC (rev 11166)
+++ trunk/sandbox/ui/editor/src/main/java/org/richfaces/component/UIEditor.java 2008-11-14 12:33:56 UTC (rev 11167)
@@ -105,6 +105,10 @@
public abstract String getConfiguration();
+ public abstract String getCustomPlugins();
+
+ public abstract void setCustomPlugins(String customplugins);
+
public abstract void setSkin(String skin);
public abstract String getSkin();
Modified: trunk/sandbox/ui/editor/src/main/java/org/richfaces/renderkit/EditorRendererBase.java
===================================================================
--- trunk/sandbox/ui/editor/src/main/java/org/richfaces/renderkit/EditorRendererBase.java 2008-11-14 12:32:39 UTC (rev 11166)
+++ trunk/sandbox/ui/editor/src/main/java/org/richfaces/renderkit/EditorRendererBase.java 2008-11-14 12:33:56 UTC (rev 11167)
@@ -108,7 +108,7 @@
}
return suffix;
}
-
+
public void writeEditorConfigurationParameters(FacesContext context,
UIEditor component) throws IOException {
ResponseWriter writer = context.getResponseWriter();
@@ -129,7 +129,7 @@
+ "' was not found in class path");
}
parameters.load(is);
- writer.writeText(convertProperties(parameters), null);
+ writer.writeText(this.convertProperties(parameters), null);
writer.writeText(";\n", null);
} catch (IOException e) {
throw new FacesException(e);
@@ -139,7 +139,36 @@
writer.writeText("{};\n", null);
}
}
+
+ public void writeEditorCustomPluginsParameters(FacesContext context,
+ UIEditor component) throws IOException {
+ ResponseWriter writer = context.getResponseWriter();
+ String configName = component.getCustomPlugins();
+ if (configName != null) {
+ Properties parameters = new Properties();
+ try {
+ ClassLoader loader = Thread.currentThread()
+ .getContextClassLoader();
+ InputStream is = loader.getResourceAsStream(configName
+ + ".properties");
+ if (is == null) {
+ throw new FacesException(
+ "Editor configuration properties file with name '"
+ + configName
+ + "' was not found in class path");
+ }
+ parameters.load(is);
+ writer.writeText("\n", null);
+ writer.writeText(this.getCustomPluginsCode(context, parameters), null);
+ writer.writeText("\n", null);
+ } catch (IOException e) {
+ throw new FacesException(e);
+ }
+
+ }
+ }
+
@SuppressWarnings("unchecked")
private String convertProperties(Map map) {
StringBuilder ret = new StringBuilder("{");
@@ -159,6 +188,22 @@
return ret.append("} ").toString();
}
+ @SuppressWarnings("unchecked")
+ private String getCustomPluginsCode(FacesContext context, Map map) {
+ StringBuilder ret = new StringBuilder();
+ for (Iterator<Map.Entry<Object, Object>> iter = map.entrySet()
+ .iterator(); iter.hasNext();) {
+ Map.Entry<Object, Object> entry = iter.next();
+
+ ret.append("tinymce.PluginManager.load('");
+ ret.append(entry.getKey());
+ ret.append("','");
+ ret.append(context.getExternalContext().getRequestContextPath()+entry.getValue());
+ ret.append("',null,{richfaces:true});");
+ }
+ return ret.toString();
+ }
+
public void writeEditorConfigurationAttributes(FacesContext context,
UIEditor component) throws IOException {
ResponseWriter writer = context.getResponseWriter();
Modified: trunk/sandbox/ui/editor/src/main/resources/org/richfaces/renderkit/html/scripts/tiny_mce/themes/simple/skins/richfaces/content.xcss
===================================================================
--- trunk/sandbox/ui/editor/src/main/resources/org/richfaces/renderkit/html/scripts/tiny_mce/themes/simple/skins/richfaces/content.xcss 2008-11-14 12:32:39 UTC (rev 11166)
+++ trunk/sandbox/ui/editor/src/main/resources/org/richfaces/renderkit/html/scripts/tiny_mce/themes/simple/skins/richfaces/content.xcss 2008-11-14 12:33:56 UTC (rev 11167)
@@ -4,23 +4,37 @@
xmlns="http://www.w3.org/1999/xhtml" >
<f:verbatim><![CDATA[
-body, td, pre {font-family:Verdana, Arial, Helvetica, sans-serif; font-size:10px;}
-body {background: #FFF;}
-.mceVisualAid {border: 1px dashed #BBB;}
+]]>
+</f:verbatim>
+<u:selector name="body, td, pre">
+ <u:style name="color" skin="generalTextColor"/>
+ <u:style name="font-family" skin="generalFamilyFont"/>
+ <u:style name="font-size" value="10px"/>
+</u:selector>
+
+<u:selector name="body">
+ <u:style name="background" skin="tableBackgroundColor"/>
+</u:selector>
+
+<u:selector name=".mceVisualAid">
+ <u:style name="border-color" value="#BBB"/>
+ <u:style name="border-style" value="dashed"/>
+ <u:style name="border-width" value="1px"/>
+</u:selector>
+
/* IE */
-* html body {
-scrollbar-3dlight-color: #F0F0EE;
-scrollbar-arrow-color: #676662;
-scrollbar-base-color: #F0F0EE;
-scrollbar-darkshadow-color: #DDDDDD;
-scrollbar-face-color: #E0E0DD;
-scrollbar-highlight-color: #F0F0EE;
-scrollbar-shadow-color: #F0F0EE;
-scrollbar-track-color: #F5F5F5;
-}
-]]>
-</f:verbatim>
+<u:selector name="* html body">
+ <u:style name="scrollbar-3dlight-color" value="#F0F0EE"/>
+ <u:style name="scrollbar-arrow-color" value="#676662"/>
+ <u:style name="scrollbar-base-color" value="#F0F0EE"/>
+ <u:style name="scrollbar-darkshadow-color" value="#DDD"/>
+ <u:style name="scrollbar-face-color" value="#E0E0DD"/>
+ <u:style name="scrollbar-highlight-color" value="#F0F0EE"/>
+ <u:style name="scrollbar-shadow-color" value="#F0F0EE"/>
+ <u:style name="scrollbar-track-color" value="#F5F5F5"/>
+</u:selector>
+
</f:template>
Modified: trunk/sandbox/ui/editor/src/main/resources/org/richfaces/renderkit/html/scripts/tiny_mce/themes/simple/skins/richfaces/ui.xcss
===================================================================
--- trunk/sandbox/ui/editor/src/main/resources/org/richfaces/renderkit/html/scripts/tiny_mce/themes/simple/skins/richfaces/ui.xcss 2008-11-14 12:32:39 UTC (rev 11166)
+++ trunk/sandbox/ui/editor/src/main/resources/org/richfaces/renderkit/html/scripts/tiny_mce/themes/simple/skins/richfaces/ui.xcss 2008-11-14 12:33:56 UTC (rev 11167)
@@ -3,42 +3,75 @@
xmlns:u='http:/jsf.exadel.com/template/util'
xmlns="http://www.w3.org/1999/xhtml" >
-<f:verbatim><![CDATA[
/* Reset */
-.richfacesSimpleSkin table, .richfacesSimpleSkin tbody, .richfacesSimpleSkin a, .richfacesSimpleSkin img, .richfacesSimpleSkin tr, .richfacesSimpleSkin div, .richfacesSimpleSkin td, .richfacesSimpleSkin iframe, .richfacesSimpleSkin span, .richfacesSimpleSkin * {border:0; margin:0; padding:0; background:transparent; white-space:nowrap; text-decoration:none; font-weight:normal; cursor:default; color:#000}
+<u:selector name=".richfacesSimpleSkin table, .richSimplefacesSkin tbody, .richfacesSimpleSkin a, .richfacesSimpleSkin img, .richfacesSimpleSkin tr, .richfacesSimpleSkin div, .richfacesSimpleSkin td, .richfacesSimpleSkin iframe, .richfacesSimpleSkin span, .richfacesSimpleSkin *">
+ <u:style name="color" skin="generalTextColor"/>
+ <u:style name="border" value="0"/>
+ <u:style name="margin" value="0"/>
+ <u:style name="padding" value="0"/>
+ <u:style name="background" value="transparent"/>
+ <u:style name="white-space" value="nowrap"/>
+ <u:style name="text-decoration" value="none"/>
+ <u:style name="font-weight" value="normal"/>
+ <u:style name="cursor" value="default"/>
+</u:selector>
+
+<f:verbatim><![CDATA[
/* Containers */
.richfacesSimpleSkin {position:relative}
-.richfacesSimpleSkin table.mceLayout {background:#E5EFFD; border:1px solid #ABC6DD;}
-.richfacesSimpleSkin iframe {display:block; background:#FFF; border-bottom:1px solid #ABC6DD;}
+]]>
+</f:verbatim>
+
+<u:selector name=".richfacesSimpleSkin table.mceLayout">
+ <u:style name="border-width" value="1"/>
+ <u:style name="border-style" value="solid"/>
+ <u:style name="border-color" skin="panelBorderColor"/>
+ <u:style name="background" skin="additionalBackgroundColor"/>
+</u:selector>
+
+<u:selector name=".richfacesSimpleSkin iframe">
+ <u:style name="display" value="block"/>
+ <u:style name="background" skin="tableBackgroundColor"/>
+ <u:style name="border-bottom-width" value="1"/>
+ <u:style name="border-bottom-style" value="solid"/>
+ <u:style name="border-bottom-color" skin="panelBorderColor"/>
+</u:selector>
+
+<f:verbatim><![CDATA[
.richfacesSimpleSkin .mceToolbar {height:26px;}
/* Layout */
.richfacesSimpleSkin .mceToolbar .mceToolbarStart span {display:block; width:1px; height:22px; }
]]>
</f:verbatim>
+
<u:selector name=".richfacesSimpleSkin .mceToolbar .mceToolbarStart span">
<u:style name="background-image">
<f:resource f:key="/org/richfaces/renderkit/html/scripts/tiny_mce/themes/simple/skins/o2k7/img/button_bg.png"/>
</u:style>
<u:style name="background-position" value="-22px 0"/>
</u:selector>
+
<f:verbatim>
<![CDATA[
.richfacesSimpleSkin .mceToolbar .mceToolbarEnd span {display:block; width:1px; height:22px}
]]>
</f:verbatim>
+
<u:selector name=".richfacesSimpleSkin .mceToolbar .mceToolbarEnd span">
<u:style name="background-image">
<f:resource f:key="/org/richfaces/renderkit/html/scripts/tiny_mce/themes/simple/skins/o2k7/img/button_bg.png"/>
</u:style>
<u:style name="background-position" value="-22px 0"/>
</u:selector>
+
<f:verbatim>
<![CDATA[
.richfacesSimpleSkin span.mceIcon, .richfacesSimpleSkin img.mceIcon {display:block; width:20px; height:20px}
]]>
</f:verbatim>
+
<u:selector name=".richfacesSimpleSkin .mceIcon">
<u:style name="background-image">
<f:resource f:key="/org/richfaces/renderkit/html/scripts/tiny_mce/themes/simple/img/icons.gif"/>
@@ -46,6 +79,7 @@
<u:style name="background-repeat" value="no-repeat"/>
<u:style name="background-position" value="20px 20px"/>
</u:selector>
+
<f:verbatim>
<![CDATA[
@@ -53,15 +87,26 @@
.richfacesSimpleSkin .mceButton {display:block; width:22px; height:22px}
]]>
</f:verbatim>
+
<u:selector name=".richfacesSimpleSkin .mceButton">
<u:style name="background-image">
<f:resource f:key="/org/richfaces/renderkit/html/scripts/tiny_mce/themes/simple/skins/o2k7/img/button_bg.png"/>
</u:style>
</u:selector>
+
<f:verbatim>
<![CDATA[
.richfacesSimpleSkin a.mceButton span, .richfacesSimpleSkin a.mceButton img {margin:1px 0 0 1px}
-.richfacesSimpleSkin a.mceButtonEnabled:hover {background-color:#B2BBD0; background-position:0 -22px}
+]]>
+</f:verbatim>
+
+<u:selector name=".richfacesSimpleSkin a.mceButtonEnabled:hover">
+ <u:style name="background-color" value="#B2BBD0"/>
+ <u:style name="background-position" value="0 -22px"/>
+</u:selector>
+
+<f:verbatim>
+<![CDATA[
.richfacesSimpleSkin a.mceButtonActive {background-position:0 -44px}
.richfacesSimpleSkin .mceButtonDisabled span {opacity:0.3; filter:alpha(opacity=30)}
@@ -69,12 +114,14 @@
.richfacesSimpleSkin .mceSeparator {display:block; width:5px; height:22px}
]]>
</f:verbatim>
+
<u:selector name=".richfacesSimpleSkin .mceSeparator">
<u:style name="background-image">
<f:resource f:key="/org/richfaces/renderkit/html/scripts/tiny_mce/themes/simple/skins/o2k7/img/button_bg.png"/>
</u:style>
<u:style name="background-position" value="-22px 0"/>
</u:selector>
+
<f:verbatim>
<![CDATA[
@@ -90,4 +137,5 @@
.richfacesSimpleSkin span.mce_insertorderedlist {background-position:-80px 0}
]]>
</f:verbatim>
+
</f:template>
Modified: trunk/sandbox/ui/editor/src/main/resources/org/richfaces/renderkit/html/scripts/tiny_mce/tiny_mce_src.js
===================================================================
--- trunk/sandbox/ui/editor/src/main/resources/org/richfaces/renderkit/html/scripts/tiny_mce/tiny_mce_src.js 2008-11-14 12:32:39 UTC (rev 11166)
+++ trunk/sandbox/ui/editor/src/main/resources/org/richfaces/renderkit/html/scripts/tiny_mce/tiny_mce_src.js 2008-11-14 12:33:56 UTC (rev 11167)
@@ -410,8 +410,11 @@
// RF: added by PY
var isCSS = false;
- u = u.replace(Richfaces.Editor.REGEXP_CSS, function($1,$2,$3){isCSS=true; return $2+($3=='c' ? "xcss":"XCSS");});
- if (Richfaces && Richfaces.Editor) u += (isCSS ? Richfaces.Editor.extCssSuffix : Richfaces.Editor.extScriptSuffix);
+ if (u.indexOf(tinymce.baseURL)==0)
+ {
+ u = u.replace(Richfaces.Editor.REGEXP_CSS, function($1,$2,$3){isCSS=true; return $2+($3=='c' ? "xcss":"XCSS");});
+ if (Richfaces && Richfaces.Editor) u += (isCSS ? Richfaces.Editor.extCssSuffix : Richfaces.Editor.extScriptSuffix);
+ }
// RF: end
if (!this.query)
Modified: trunk/sandbox/ui/editor/src/main/templates/editor.jspx
===================================================================
--- trunk/sandbox/ui/editor/src/main/templates/editor.jspx 2008-11-14 12:32:39 UTC (rev 11166)
+++ trunk/sandbox/ui/editor/src/main/templates/editor.jspx 2008-11-14 12:33:56 UTC (rev 11167)
@@ -27,12 +27,12 @@
</textarea>
<script type="text/javascript">
+ <f:call name="writeEditorCustomPluginsParameters" />
<f:call name="writeEditorConfigurationParameters" />
<f:call name="writeEditorConfigurationAttributes" />
<f:call name="writeEditorParameters" />
- var richParams = {extScriptSuffix:'#{this:getSriptMappingSuffix(context)}',
- extCssSuffix:'#{this:getCssMappingSuffix(context)}'}
+ var richParams = {extScriptSuffix:'#{this:getSriptMappingSuffix(context)}', extCssSuffix:'#{this:getCssMappingSuffix(context)}'}
new RichEditor('#{clientId}', richParams, tinyMceParams);
</script>
16 years, 10 months
JBoss Rich Faces SVN: r11166 - in trunk/test-applications/seleniumTest/richfaces/src: main/java/org/ajax4jsf/bean/tree and 4 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: dsvyatobatsko
Date: 2008-11-14 07:32:39 -0500 (Fri, 14 Nov 2008)
New Revision: 11166
Modified:
trunk/test-applications/seleniumTest/richfaces/src/main/java/org/ajax4jsf/autotest/bean/AutoTestBean.java
trunk/test-applications/seleniumTest/richfaces/src/main/java/org/ajax4jsf/bean/tree/TreeTestBean.java
trunk/test-applications/seleniumTest/richfaces/src/main/webapp/layout/autotest/autoTestHiddens.xhtml
trunk/test-applications/seleniumTest/richfaces/src/main/webapp/pages/tree/treeAutoTest.xhtml
trunk/test-applications/seleniumTest/richfaces/src/main/webapp/pages/tree/treeTest.xhtml
trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/AutoTester.java
trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/TreeTest.java
Log:
AutoTester:
made most methods public + some new event firing validators added + ...
Tests:
https://jira.jboss.org/jira/browse/RF-4822
https://jira.jboss.org/jira/browse/RF-4823
https://jira.jboss.org/jira/browse/RF-4824
Modified: trunk/test-applications/seleniumTest/richfaces/src/main/java/org/ajax4jsf/autotest/bean/AutoTestBean.java
===================================================================
--- trunk/test-applications/seleniumTest/richfaces/src/main/java/org/ajax4jsf/autotest/bean/AutoTestBean.java 2008-11-14 12:12:04 UTC (rev 11165)
+++ trunk/test-applications/seleniumTest/richfaces/src/main/java/org/ajax4jsf/autotest/bean/AutoTestBean.java 2008-11-14 12:32:39 UTC (rev 11166)
@@ -14,286 +14,314 @@
import javax.faces.event.ValueChangeEvent;
import org.ajax4jsf.javascript.ScriptUtils;
+import org.richfaces.event.NodeExpandedEvent;
+import org.richfaces.event.NodeSelectedEvent;
/**
* Bean for auto test
+ *
* @author Andrey Markavtsov
- *
+ *
*/
public class AutoTestBean {
-
- public static final String INPUT_TEXT = "Text";
- public static final String STATUS_ID = "_auto_status";
- public static final String UPDATE_MODEL_STATUS = "UpdateModel";
- public static final String ACTION_LISTENER_STATUS = "ActionListener";
- public static final String NESTED_ACTION_LISTENER_STATUS = "NestedListener";
- public static final String VALUE_CHANGE_LISTENER_STATUS = "ValueChangeListener";
- public static final String VALIDATOR_ID = "autoTestValidator";
- public static final String VALIDATOR_DEFAULT_ID = "autoTestDefaultValidator";
- public static final String ONCOMPLETE = "window._ajaxOncomplete = true;";
- //private String input = INPUT_TEXT;
+ public static final String INPUT_TEXT = "Text";
- private String reRender = STATUS_ID;
-
- private Boolean limitToList = false;
-
- private Boolean ajaxSingle = false;
-
- private Boolean immediate = false;
-
- private Boolean bypassUpdate= false;
-
- private Boolean rendered = true;
-
- private String status = null;
-
- private String oncomplete = ONCOMPLETE;
-
- private String validatorId = VALIDATOR_DEFAULT_ID;
+ public static final String STATUS_ID = "_auto_status";
- public void actionListener(ActionEvent event) {
- setStatus(getStatus() + ACTION_LISTENER_STATUS);
- }
+ public static final String UPDATE_MODEL_STATUS = "UpdateModel";
- public void valueChangeListener(ValueChangeEvent event) {
- setStatus(getStatus() + VALUE_CHANGE_LISTENER_STATUS);
- }
+ public static final String ACTION_LISTENER_STATUS = "ActionListener";
- public String load () {
- status = null;
- return null;
- }
-
-// public String testRendered() {
-// reset();
-// rendered = false;
-// return null;
-// }
-//
-// public String testReRender() {
-// reset();
-// reRender = TIME_ID + "," + STATUS_ID ;
-// return null;
-// }
-//
-// public String testListeners() {
-// reset();
-// return null;
-// }
-//
-// public String testFalidation() {
-// reset();
-// return null;
-// }
-//
-// public String testAjaxSingle() {
-// reset();
-// ajaxSingle = true;
-// return null;
-// }
-//
-// public String testImmdediate() {
-// reset();
-// immediate = true;
-// return null;
-// }
-//
-// public String testBypassUpdate() {
-// reset();
-// bypassUpdate = true;
-// return null;
-// }
-//
-// public String testLimitToList1() {
-// reset();
-// limitToList = true;
-// return null;
-// }
-//
-// public String testLimitToList2() {
-// reset();
-// limitToList = true;
-// reRender = TIME_ID + "," + STATUS_ID;
-// return null;
-// }
-//
-// public String testValidator() {
-// reset();
-// validatorId = VALIDATOR_ID;
-// return null;
-// }
-//
-// public String testValidatorAndAjaxSingle() {
-// return null;
-// }
-
-
- public Object getRequestParamsMap() {
- FacesContext context = FacesContext.getCurrentInstance();
- if (context != null) {
- ExternalContext ext = context.getExternalContext();
- if (ext != null) {
- return ScriptUtils.toScript(context.getExternalContext().getRequestParameterMap());
- }
- }
- return "";
- }
-
-
- public String getText() {
- return String.valueOf(new Date().getTime());
- }
+ public static final String NESTED_ACTION_LISTENER_STATUS = "NestedListener";
- /**
- * @return the input
- */
- public String getInput() {
- return INPUT_TEXT;
- }
+ public static final String VALUE_CHANGE_LISTENER_STATUS = "ValueChangeListener";
- /**
- * @param input the input to set
- */
- public void setInput(String input) {
- if (input != null && input.equals(INPUT_TEXT)) {
- setStatus(getStatus() + UPDATE_MODEL_STATUS);
- }
- //this.input = input;
- }
+ public static final String NODE_SELECTED_LISTENER_STATUS = "NodeSelectedListener";
- /**
- * @return the reRender
- */
- public String getReRender() {
- return reRender;
- }
+ public static final String NODE_EXPANDED_LISTENER_STATUS = "NodeExpandedListener";
- /**
- * @param reRender the reRender to set
- */
- public void setReRender(String reRender) {
- this.reRender = reRender;
- }
+ public static final String VALIDATOR_ID = "autoTestValidator";
- /**
- * @return the limitToList
- */
- public Boolean getLimitToList() {
- return limitToList;
- }
+ public static final String VALIDATOR_DEFAULT_ID = "autoTestDefaultValidator";
- /**
- * @param limitToList the limitToList to set
- */
- public void setLimitToList(Boolean limitToList) {
- this.limitToList = limitToList;
- }
+ public static final String ONCOMPLETE = "window._ajaxOncomplete = true;";
- /**
- * @return the ajaxSingle
- */
- public Boolean getAjaxSingle() {
- return ajaxSingle;
- }
+ // private String input = INPUT_TEXT;
- /**
- * @param ajaxSingle the ajaxSingle to set
- */
- public void setAjaxSingle(Boolean ajaxSingle) {
- this.ajaxSingle = ajaxSingle;
- }
+ private String reRender = STATUS_ID;
- /**
- * @return the immediate
- */
- public Boolean getImmediate() {
- return immediate;
- }
+ private Boolean limitToList = false;
- /**
- * @param immediate the immediate to set
- */
- public void setImmediate(Boolean immediate) {
- this.immediate = immediate;
- }
+ private Boolean ajaxSingle = false;
- /**
- * @return the bypassUpdate
- */
- public Boolean getBypassUpdate() {
- return bypassUpdate;
- }
+ private Boolean immediate = false;
- /**
- * @param bypassUpdate the bypassUpdate to set
- */
- public void setBypassUpdate(Boolean bypassUpdate) {
- this.bypassUpdate = bypassUpdate;
- }
+ private Boolean bypassUpdate = false;
- /**
- * @return the status
- */
- public String getStatus() {
- if (status == null) {
- status = "";
- }
- return status;
- }
+ private Boolean rendered = true;
- /**
- * @param status the status to set
- */
- public void setStatus(String status) {
- this.status = status;
- }
+ private String status = null;
- /**
- * @return the rendered
- */
- public Boolean getRendered() {
- return rendered;
- }
+ private String oncomplete = ONCOMPLETE;
- /**
- * @param rendered the rendered to set
- */
- public void setRendered(Boolean rendered) {
- this.rendered = rendered;
- }
+ private String validatorId = VALIDATOR_DEFAULT_ID;
- /**
- * @return the oncomplete
- */
- public String getOncomplete() {
- return oncomplete;
- }
+ public void actionListener(ActionEvent event) {
+ setStatus(getStatus() + ACTION_LISTENER_STATUS);
+ }
+ public void valueChangeListener(ValueChangeEvent event) {
+ setStatus(getStatus() + VALUE_CHANGE_LISTENER_STATUS);
+ }
- /**
- * @param oncomplete the oncomplete to set
- */
- public void setOncomplete(String oncomplete) {
- this.oncomplete = oncomplete;
- }
+ public void processSelection(NodeSelectedEvent event) {
+ setStatus(getStatus() + NODE_SELECTED_LISTENER_STATUS);
+ }
+ public void processExpansion(NodeExpandedEvent nodeExpandedEvent) {
+ setStatus(getStatus() + NODE_EXPANDED_LISTENER_STATUS);
+ }
- /**
- * @return the validatorId
- */
- public String getValidatorId() {
- return validatorId;
- }
+ public String load() {
+ status = null;
+ return null;
+ }
+ public String reset() {
+ status = null;
+ return null;
+ }
- /**
- * @param validatorId the validatorId to set
- */
- public void setValidatorId(String validatorId) {
- this.validatorId = validatorId;
- }
+ // public String testRendered() {
+ // reset();
+ // rendered = false;
+ // return null;
+ // }
+ //
+ // public String testReRender() {
+ // reset();
+ // reRender = TIME_ID + "," + STATUS_ID ;
+ // return null;
+ // }
+ //
+ // public String testListeners() {
+ // reset();
+ // return null;
+ // }
+ //
+ // public String testFalidation() {
+ // reset();
+ // return null;
+ // }
+ //
+ // public String testAjaxSingle() {
+ // reset();
+ // ajaxSingle = true;
+ // return null;
+ // }
+ //
+ // public String testImmdediate() {
+ // reset();
+ // immediate = true;
+ // return null;
+ // }
+ //
+ // public String testBypassUpdate() {
+ // reset();
+ // bypassUpdate = true;
+ // return null;
+ // }
+ //
+ // public String testLimitToList1() {
+ // reset();
+ // limitToList = true;
+ // return null;
+ // }
+ //
+ // public String testLimitToList2() {
+ // reset();
+ // limitToList = true;
+ // reRender = TIME_ID + "," + STATUS_ID;
+ // return null;
+ // }
+ //
+ // public String testValidator() {
+ // reset();
+ // validatorId = VALIDATOR_ID;
+ // return null;
+ // }
+ //
+ // public String testValidatorAndAjaxSingle() {
+ // return null;
+ // }
-
+ public Object getRequestParamsMap() {
+ FacesContext context = FacesContext.getCurrentInstance();
+ if (context != null) {
+ ExternalContext ext = context.getExternalContext();
+ if (ext != null) {
+ return ScriptUtils.toScript(context.getExternalContext().getRequestParameterMap());
+ }
+ }
+ return "";
+ }
+ public String getText() {
+ return String.valueOf(new Date().getTime());
+ }
+
+ /**
+ * @return the input
+ */
+ public String getInput() {
+ return INPUT_TEXT;
+ }
+
+ /**
+ * @param input
+ * the input to set
+ */
+ public void setInput(String input) {
+ if (input != null && input.equals(INPUT_TEXT)) {
+ setStatus(getStatus() + UPDATE_MODEL_STATUS);
+ }
+ // this.input = input;
+ }
+
+ /**
+ * @return the reRender
+ */
+ public String getReRender() {
+ return reRender;
+ }
+
+ /**
+ * @param reRender
+ * the reRender to set
+ */
+ public void setReRender(String reRender) {
+ this.reRender = reRender;
+ }
+
+ /**
+ * @return the limitToList
+ */
+ public Boolean getLimitToList() {
+ return limitToList;
+ }
+
+ /**
+ * @param limitToList
+ * the limitToList to set
+ */
+ public void setLimitToList(Boolean limitToList) {
+ this.limitToList = limitToList;
+ }
+
+ /**
+ * @return the ajaxSingle
+ */
+ public Boolean getAjaxSingle() {
+ return ajaxSingle;
+ }
+
+ /**
+ * @param ajaxSingle
+ * the ajaxSingle to set
+ */
+ public void setAjaxSingle(Boolean ajaxSingle) {
+ this.ajaxSingle = ajaxSingle;
+ }
+
+ /**
+ * @return the immediate
+ */
+ public Boolean getImmediate() {
+ return immediate;
+ }
+
+ /**
+ * @param immediate
+ * the immediate to set
+ */
+ public void setImmediate(Boolean immediate) {
+ this.immediate = immediate;
+ }
+
+ /**
+ * @return the bypassUpdate
+ */
+ public Boolean getBypassUpdate() {
+ return bypassUpdate;
+ }
+
+ /**
+ * @param bypassUpdate
+ * the bypassUpdate to set
+ */
+ public void setBypassUpdate(Boolean bypassUpdate) {
+ this.bypassUpdate = bypassUpdate;
+ }
+
+ /**
+ * @return the status
+ */
+ public String getStatus() {
+ if (status == null) {
+ status = "";
+ }
+ return status;
+ }
+
+ /**
+ * @param status
+ * the status to set
+ */
+ public void setStatus(String status) {
+ this.status = status;
+ }
+
+ /**
+ * @return the rendered
+ */
+ public Boolean getRendered() {
+ return rendered;
+ }
+
+ /**
+ * @param rendered the rendered to set
+ */
+ public void setRendered(Boolean rendered) {
+ this.rendered = rendered;
+ }
+
+ /**
+ * @return the oncomplete
+ */
+ public String getOncomplete() {
+ return oncomplete;
+ }
+
+ /**
+ * @param oncomplete the oncomplete to set
+ */
+ public void setOncomplete(String oncomplete) {
+ this.oncomplete = oncomplete;
+ }
+
+ /**
+ * @return the validatorId
+ */
+ public String getValidatorId() {
+ return validatorId;
+ }
+
+ /**
+ * @param validatorId the validatorId to set
+ */
+ public void setValidatorId(String validatorId) {
+ this.validatorId = validatorId;
+ }
+
}
Modified: trunk/test-applications/seleniumTest/richfaces/src/main/java/org/ajax4jsf/bean/tree/TreeTestBean.java
===================================================================
--- trunk/test-applications/seleniumTest/richfaces/src/main/java/org/ajax4jsf/bean/tree/TreeTestBean.java 2008-11-14 12:12:04 UTC (rev 11165)
+++ trunk/test-applications/seleniumTest/richfaces/src/main/java/org/ajax4jsf/bean/tree/TreeTestBean.java 2008-11-14 12:32:39 UTC (rev 11166)
@@ -23,7 +23,6 @@
import java.io.IOException;
import java.io.InputStream;
-import java.net.URL;
import java.util.Properties;
import javax.faces.FacesException;
Modified: trunk/test-applications/seleniumTest/richfaces/src/main/webapp/layout/autotest/autoTestHiddens.xhtml
===================================================================
--- trunk/test-applications/seleniumTest/richfaces/src/main/webapp/layout/autotest/autoTestHiddens.xhtml 2008-11-14 12:12:04 UTC (rev 11165)
+++ trunk/test-applications/seleniumTest/richfaces/src/main/webapp/layout/autotest/autoTestHiddens.xhtml 2008-11-14 12:32:39 UTC (rev 11166)
@@ -9,4 +9,5 @@
<h:outputText id="_auto_time" style="display: none;" value="#{autoTestBean.text}"></h:outputText>
<h:commandButton id="_auto_simple_submit" value="Simple submit" immediate="#{autoTestBean.immediate}" style="display: none;" />
<a4j:commandButton id="_auto_ajax_submit" value="Ajax submit" reRender="componentId" immediate="#{autoTestBean.immediate}" style="display: none;" />
+ <a4j:commandButton id="_auto_ajax_reset" value="Ajax reset" ajaxSingle="true" style="display: none;" action="#{autoTestBean.reset}" />
</html>
\ No newline at end of file
Modified: trunk/test-applications/seleniumTest/richfaces/src/main/webapp/pages/tree/treeAutoTest.xhtml
===================================================================
(Binary files differ)
Modified: trunk/test-applications/seleniumTest/richfaces/src/main/webapp/pages/tree/treeTest.xhtml
===================================================================
(Binary files differ)
Modified: trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/AutoTester.java
===================================================================
--- trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/AutoTester.java 2008-11-14 12:12:04 UTC (rev 11165)
+++ trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/AutoTester.java 2008-11-14 12:32:39 UTC (rev 11166)
@@ -40,6 +40,8 @@
private static final String AJAX_SUBMIT = "_auto_ajax_submit";
+ private static final String AJAX_RESET = "_auto_ajax_reset";
+
// /private String componentName;
SeleniumTestBase base;
@@ -334,7 +336,7 @@
return template.getPrefix() + AUTOTEST_FORM_ID + id;
}
- private void reset() {
+ public void reset() {
if (base.getParentId() == null) {
Assert.fail("Page has not been rendered before test. Invoke 'renderPage' method before !");
}
@@ -344,22 +346,27 @@
}
}
- private void clickLoad() {
+ public void startTracing() {
+ String resetId = base.getParentId() + AUTOTEST_FORM_ID + AJAX_RESET;
+ base.clickAjaxCommandAndWait(resetId);
+ }
+
+ public void clickLoad() {
String commandButtonId = base.getParentId() + AUTOTEST_CONTROLS_FORM_ID + "_auto_load";
base.clickCommandAndWait(commandButtonId);
}
- private void clickAjaxSubmit() {
+ public void clickAjaxSubmit() {
String ajaxSubmitId = base.getParentId() + AUTOTEST_FORM_ID + AJAX_SUBMIT;
base.clickAjaxCommandAndWait(ajaxSubmitId);
}
- private void clickSubmit() {
+ public void clickSubmit() {
String submitId = base.getParentId() + AUTOTEST_FORM_ID + SIMPLE_SUBMIT;
base.clickCommandAndWait(submitId);
}
- private void setExtrenalValidationFailed() {
+ public void setExtrenalValidationFailed() {
base.setValueById(base.getParentId() + AUTOTEST_FORM_ID + INPUT_ID, "");
}
@@ -371,7 +378,7 @@
base.changeValue();
}
- private void setupControl(TestSetupEntry attr, Object o) {
+ public void setupControl(TestSetupEntry attr, Object o) {
final String idPrefix = "_auto_";
String controlId = base.getParentId() + AUTOTEST_CONTROLS_FORM_ID + idPrefix + attr.name;
if (attr.type.equals(String.class)) {
@@ -381,7 +388,7 @@
}
}
- private void checkActionListener(boolean passed) {
+ public void checkActionListener(boolean passed) {
String status = getStatus();
if (passed && status != null && status.indexOf(AutoTestBean.ACTION_LISTENER_STATUS) == -1) {
Assert.fail("ActionListener has been skipped");
@@ -390,7 +397,7 @@
}
}
- private void checkNestedActionListener(boolean passed) {
+ public void checkNestedActionListener(boolean passed) {
String status = getStatus();
if (passed && status != null && status.indexOf(AutoTestBean.NESTED_ACTION_LISTENER_STATUS) == -1) {
Assert.fail("Nested actionListener has been skipped");
@@ -399,7 +406,7 @@
}
}
- private void checkValueChangeListener(boolean passed) {
+ public void checkValueChangeListener(boolean passed) {
String status = getStatus();
if (passed && status != null && status.indexOf(AutoTestBean.VALUE_CHANGE_LISTENER_STATUS) == -1) {
Assert.fail("ValueChangeListener has been skipped");
@@ -408,8 +415,26 @@
}
}
- private void checkUpdateModel(boolean passed) {
+ public void checkNodeSelectedListener(boolean passed) {
String status = getStatus();
+ if (passed && status != null && status.indexOf(AutoTestBean.NODE_SELECTED_LISTENER_STATUS) == -1) {
+ Assert.fail("NodeSelectedListener has been skipped");
+ } else if (!passed && status != null && status.indexOf(AutoTestBean.NODE_SELECTED_LISTENER_STATUS) != -1) {
+ Assert.fail(status);
+ }
+ }
+
+ public void checkNodeExpandedListener(boolean passed) {
+ String status = getStatus();
+ if (passed && status != null && status.indexOf(AutoTestBean.NODE_EXPANDED_LISTENER_STATUS) == -1) {
+ Assert.fail("NodeExpandedListener has been skipped");
+ } else if (!passed && status != null && status.indexOf(AutoTestBean.NODE_EXPANDED_LISTENER_STATUS) != -1) {
+ Assert.fail(status);
+ }
+ }
+
+ public void checkUpdateModel(boolean passed) {
+ String status = getStatus();
if (passed && status != null && status.indexOf(AutoTestBean.UPDATE_MODEL_STATUS) == -1) {
Assert.fail("Update Model phase has been skipped");
} else if (!passed && status != null && status.indexOf(AutoTestBean.UPDATE_MODEL_STATUS) != -1) {
@@ -420,52 +445,52 @@
private String getStatus() {
return base.getTextById(base.getParentId() + AUTOTEST_FORM_ID + STATUS_ID);
}
-}
-class TestSetupEntry {
+ public static class TestSetupEntry {
- String name;
+ String name;
- Class<?> type;
+ Class<?> type;
- Object defaultValue;
+ Object defaultValue;
- public TestSetupEntry(String name, Class<?> type, Object defaultValue) {
- super();
- this.name = name;
- this.type = type;
- this.defaultValue = defaultValue;
- }
+ public TestSetupEntry(String name, Class<?> type, Object defaultValue) {
+ super();
+ this.name = name;
+ this.type = type;
+ this.defaultValue = defaultValue;
+ }
- public static final TestSetupEntry reRender = new TestSetupEntry("reRender", String.class, AutoTester.STATUS_ID);
+ public static final TestSetupEntry reRender = new TestSetupEntry("reRender", String.class, AutoTester.STATUS_ID);
- public static final TestSetupEntry validatorId = new TestSetupEntry("validatorId", String.class,
- AutoTestBean.VALIDATOR_DEFAULT_ID);
+ public static final TestSetupEntry validatorId = new TestSetupEntry("validatorId", String.class,
+ AutoTestBean.VALIDATOR_DEFAULT_ID);
- public static final TestSetupEntry oncomplete = new TestSetupEntry("oncomplete", String.class,
- AutoTestBean.ONCOMPLETE);
+ public static final TestSetupEntry oncomplete = new TestSetupEntry("oncomplete", String.class,
+ AutoTestBean.ONCOMPLETE);
- public static final TestSetupEntry rendered = new TestSetupEntry("rendered", Boolean.class, Boolean.TRUE);
+ public static final TestSetupEntry rendered = new TestSetupEntry("rendered", Boolean.class, Boolean.TRUE);
- public static final TestSetupEntry ajaxSingle = new TestSetupEntry("ajaxSingle", Boolean.class, Boolean.FALSE);
+ public static final TestSetupEntry ajaxSingle = new TestSetupEntry("ajaxSingle", Boolean.class, Boolean.FALSE);
- public static final TestSetupEntry immediate = new TestSetupEntry("immediate", Boolean.class, Boolean.FALSE);
+ public static final TestSetupEntry immediate = new TestSetupEntry("immediate", Boolean.class, Boolean.FALSE);
- public static final TestSetupEntry bypassUpdate = new TestSetupEntry("bypassUpdate", Boolean.class, Boolean.FALSE);
+ public static final TestSetupEntry bypassUpdate = new TestSetupEntry("bypassUpdate", Boolean.class, Boolean.FALSE);
- public static final TestSetupEntry limitToList = new TestSetupEntry("limitToList", Boolean.class, Boolean.FALSE);
+ public static final TestSetupEntry limitToList = new TestSetupEntry("limitToList", Boolean.class, Boolean.FALSE);
- public static final List<TestSetupEntry> list = new ArrayList<TestSetupEntry>();
- static {
- list.add(reRender);
- list.add(validatorId);
- list.add(rendered);
- list.add(ajaxSingle);
- list.add(immediate);
- list.add(bypassUpdate);
- list.add(limitToList);
- list.add(oncomplete);
+ public static final List<TestSetupEntry> list = new ArrayList<TestSetupEntry>();
+ static {
+ list.add(reRender);
+ list.add(validatorId);
+ list.add(rendered);
+ list.add(ajaxSingle);
+ list.add(immediate);
+ list.add(bypassUpdate);
+ list.add(limitToList);
+ list.add(oncomplete);
+ }
+
}
-
-}
+}
\ No newline at end of file
Modified: trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/TreeTest.java
===================================================================
--- trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/TreeTest.java 2008-11-14 12:12:04 UTC (rev 11165)
+++ trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/TreeTest.java 2008-11-14 12:32:39 UTC (rev 11166)
@@ -6,6 +6,7 @@
import org.ajax4jsf.template.Template;
import org.richfaces.AutoTester;
import org.richfaces.SeleniumTestBase;
+import org.richfaces.AutoTester.TestSetupEntry;
import org.testng.annotations.Test;
public class TreeTest extends SeleniumTestBase {
@@ -34,15 +35,49 @@
tester.testRequestParameters(params);
}
+ @Test
+ public void testAjaxSingle(Template template) {
+ AutoTester tester = getAutoTester(this);
+ tester.renderPage(template, null);
+ tester.reset();
+ tester.setupControl(TestSetupEntry.ajaxSingle, Boolean.TRUE);
+ tester.clickLoad();
+ String compId = getAutoTester(this).getClientId(AutoTester.COMPONENT_ID);
+ clickAjaxCommandAndWait("//*[@id='"+ compId + ":childs']/table[1]/tbody/tr/td/div/a");
+ clickAjaxCommandAndWait("//*[@id='"+ compId + ":childs']/div/table[1]/tbody/tr/td/div/a");
+ type("//*[@id='"+ compId + ":childs']/div/div/table[1]/tbody/tr/td[3]/input", "New");
+ tester.setExtrenalValidationFailed();
+ tester.startTracing();
+ writeStatus("Test ajaxSingle attribute");
+ clickAjaxCommandAndWait("//*[@id='"+ compId + ":childs']/div/table[1]/tbody/tr/td/div/a");
+ tester.checkUpdateModel(false);
+ tester.checkNodeExpandedListener(true);
+ }
+
+ @Test
+ public void testAjaxSingleWithInternalValidationFailed(Template template) {
+ AutoTester tester = getAutoTester(this);
+ tester.renderPage(template, null);
+ tester.reset();
+ tester.setupControl(TestSetupEntry.ajaxSingle, Boolean.TRUE);
+ tester.clickLoad();
+ String compId = getAutoTester(this).getClientId(AutoTester.COMPONENT_ID);
+ clickAjaxCommandAndWait("//*[@id='"+ compId + ":childs']/table[1]/tbody/tr/td/div/a");
+ clickAjaxCommandAndWait("//*[@id='"+ compId + ":childs']/div/table[1]/tbody/tr/td/div/a");
+ type("//*[@id='"+ compId + ":childs']/div/div/table[1]/tbody/tr/td[3]/input", "");
+ tester.startTracing();
+ writeStatus("Test ajaxSingle attribute in case of invalid component state");
+ clickAjaxCommandAndWait("//*[@id='"+ compId + ":childs']/div/table[1]/tbody/tr/td/div/a");
+ tester.checkUpdateModel(false);
+ tester.checkNodeExpandedListener(false);
+ }
+
@Override
public void sendAjax() {
- String compId = getAutoTester(this).getClientId(AutoTester.COMPONENT_ID);
- //String node1Id = compId + ":1::_defaultNodeFaceOutput";
- String node1Id = compId + ":1::_defaultNodeFace:text";
- //String node1Id = compId + ":1::_defaultNodeFace";
- selenium.mouseOver(node1Id);
- selenium.mouseDown(node1Id);
- waitForAjaxCompletion();
+ AutoTester tester = getAutoTester(this);
+ //String compId = tester.getClientId(AutoTester.COMPONENT_ID);
+ //clickAjaxCommandAndWait("//*[@id='"+ compId + ":childs']/table[1]/tbody/tr/td/div/a");
+ tester.clickAjaxSubmit();
}
@Override
16 years, 10 months
JBoss Rich Faces SVN: r11165 - in trunk/test-applications: jsp/src/main/webapp/ToolBar and 1 other directory.
by richfaces-svn-commits@lists.jboss.org
Author: tromanovich
Date: 2008-11-14 07:12:04 -0500 (Fri, 14 Nov 2008)
New Revision: 11165
Modified:
trunk/test-applications/facelets/src/main/webapp/ToolBar/ToolBarProperty.xhtml
trunk/test-applications/jsp/src/main/webapp/ToolBar/ToolBarProperty.jsp
Log:
Add width and height attributes to test
Modified: trunk/test-applications/facelets/src/main/webapp/ToolBar/ToolBarProperty.xhtml
===================================================================
--- trunk/test-applications/facelets/src/main/webapp/ToolBar/ToolBarProperty.xhtml 2008-11-14 10:26:33 UTC (rev 11164)
+++ trunk/test-applications/facelets/src/main/webapp/ToolBar/ToolBarProperty.xhtml 2008-11-14 12:12:04 UTC (rev 11165)
@@ -23,6 +23,16 @@
<f:selectItem itemLabel="grid" itemValue="grid" />
<a4j:support event="onclick" reRender="toolBarId"></a4j:support>
</h:selectOneRadio>
+
+ <h:outputText value="Width:"></h:outputText>
+ <h:inputText value="#{toolBar.width}">
+ <a4j:support event="onchange" reRender="toolBarId" />
+ </h:inputText>
+
+ <h:outputText value="Height:"></h:outputText>
+ <h:inputText value="#{toolBar.height}">
+ <a4j:support event="onchange" reRender="toolBarId" />
+ </h:inputText>
<h:outputText value="Switch Styles" />
<a4j:commandButton id="slBtn" value="#{toolBar.btnLabel}"
Modified: trunk/test-applications/jsp/src/main/webapp/ToolBar/ToolBarProperty.jsp
===================================================================
--- trunk/test-applications/jsp/src/main/webapp/ToolBar/ToolBarProperty.jsp 2008-11-14 10:26:33 UTC (rev 11164)
+++ trunk/test-applications/jsp/src/main/webapp/ToolBar/ToolBarProperty.jsp 2008-11-14 12:12:04 UTC (rev 11165)
@@ -23,6 +23,16 @@
<f:selectItem itemLabel="grid" itemValue="grid" />
<a4j:support event="onclick" reRender="toolBarId"></a4j:support>
</h:selectOneRadio>
+
+ <h:outputText value="Width:"></h:outputText>
+ <h:inputText value="#{toolBar.width}">
+ <a4j:support event="onchange" reRender="toolBarId" />
+ </h:inputText>
+
+ <h:outputText value="Height:"></h:outputText>
+ <h:inputText value="#{toolBar.height}">
+ <a4j:support event="onchange" reRender="toolBarId" />
+ </h:inputText>
<h:outputText value="Switch Styles (check contentClass and separatorClass)" />
<a4j:commandButton id="slBtn" value="#{toolBar.btnLabel}"
16 years, 10 months
JBoss Rich Faces SVN: r11164 - trunk/ui/extendedDataTable/src/main/java/org/richfaces/renderkit.
by richfaces-svn-commits@lists.jboss.org
Author: andrei_exadel
Date: 2008-11-14 05:26:33 -0500 (Fri, 14 Nov 2008)
New Revision: 11164
Modified:
trunk/ui/extendedDataTable/src/main/java/org/richfaces/renderkit/AbstractExtendedTableRenderer.java
Log:
RF-4925
Modified: trunk/ui/extendedDataTable/src/main/java/org/richfaces/renderkit/AbstractExtendedTableRenderer.java
===================================================================
--- trunk/ui/extendedDataTable/src/main/java/org/richfaces/renderkit/AbstractExtendedTableRenderer.java 2008-11-14 09:11:35 UTC (rev 11163)
+++ trunk/ui/extendedDataTable/src/main/java/org/richfaces/renderkit/AbstractExtendedTableRenderer.java 2008-11-14 10:26:33 UTC (rev 11164)
@@ -1292,7 +1292,7 @@
}
public void encodeBegin(FacesContext context, UIComponent component)throws IOException {
- UIComponent c = null;
+ UIComponent c = component;
boolean inForm = false;
while((c = c.getParent()) != null) {
if(c instanceof UIForm) {
16 years, 10 months
JBoss Rich Faces SVN: r11162 - trunk/docs/userguide/en/src/main/docbook/included.
by richfaces-svn-commits@lists.jboss.org
Author: atsebro
Date: 2008-11-14 03:55:03 -0500 (Fri, 14 Nov 2008)
New Revision: 11162
Modified:
trunk/docs/userguide/en/src/main/docbook/included/region.xml
Log:
RF-4616: jboss wiki articles links
Modified: trunk/docs/userguide/en/src/main/docbook/included/region.xml
===================================================================
--- trunk/docs/userguide/en/src/main/docbook/included/region.xml 2008-11-14 04:09:52 UTC (rev 11161)
+++ trunk/docs/userguide/en/src/main/docbook/included/region.xml 2008-11-14 08:55:03 UTC (rev 11162)
@@ -141,9 +141,17 @@
</section>
<section>
<title>Relevant resources links</title>
- <para>
- <ulink url="http://livedemo.exadel.com/richfaces-demo/richfaces/region.jsf?c=region">Here</ulink> you can see the example of <emphasis role="bold"
- ><property><a4j:region></property></emphasis> usage and sources for the given example.
+ <para>Visit <ulink url="http://livedemo.exadel.com/richfaces-demo/richfaces/region.jsf?c=region"><a4j:region> demo page</ulink> at
+RichFaces live demo for examples of component usage and their sources.
</para>
+ <para>Useful articles:</para>
+ <itemizedlist>
+ <listitem>
+ <para>
+ <ulink url="http://www.jboss.org/community/docs/DOC-11866"><a4j:region> and two <h:inputTexts></ulink>
+ in RichFaces cookbook at JBoss portal.
+ </para>
+ </listitem>
+ </itemizedlist>
</section>
</chapter>
16 years, 10 months
JBoss Rich Faces SVN: r11161 - in trunk/test-applications: ajaxTest and 10 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: alexsmirnov
Date: 2008-11-13 23:09:52 -0500 (Thu, 13 Nov 2008)
New Revision: 11161
Added:
trunk/test-applications/ajaxTest/
trunk/test-applications/ajaxTest/pom.xml
trunk/test-applications/ajaxTest/src/
trunk/test-applications/ajaxTest/src/main/
trunk/test-applications/ajaxTest/src/main/java/
trunk/test-applications/ajaxTest/src/main/java/Bean.java
trunk/test-applications/ajaxTest/src/main/resources/
trunk/test-applications/ajaxTest/src/test/
trunk/test-applications/ajaxTest/src/test/java/
trunk/test-applications/ajaxTest/src/test/java/org/
trunk/test-applications/ajaxTest/src/test/java/org/richfaces/
trunk/test-applications/ajaxTest/src/test/java/org/richfaces/RepeaterTest.java
trunk/test-applications/ajaxTest/src/test/resources/
trunk/test-applications/ajaxTest/src/test/resources/faces-config.xml
trunk/test-applications/ajaxTest/src/test/resources/org/
trunk/test-applications/ajaxTest/src/test/resources/org/richfaces/
trunk/test-applications/ajaxTest/src/test/resources/org/richfaces/logging.properties
trunk/test-applications/ajaxTest/src/test/resources/repeater.xhtml
Log:
Import test project.
Added: trunk/test-applications/ajaxTest/pom.xml
===================================================================
--- trunk/test-applications/ajaxTest/pom.xml (rev 0)
+++ trunk/test-applications/ajaxTest/pom.xml 2008-11-14 04:09:52 UTC (rev 11161)
@@ -0,0 +1,39 @@
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+ <groupId>org.richfaces</groupId>
+ <artifactId>ajaxTest</artifactId>
+ <name>ajax test</name>
+ <version>0.0.1-SNAPSHOT</version>
+ <build>
+ <plugins>
+ <plugin>
+ <artifactId>maven-compiler-plugin</artifactId>
+ <version>2.0.2</version>
+ <configuration>
+ <source>1.5</source>
+ <target>1.5</target>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+ <dependencies>
+ <dependency>
+ <groupId>org.richfaces.framework</groupId>
+ <artifactId>jsf-test</artifactId>
+ <version>3.3.0-SNAPSHOT</version>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>com.sun.facelets</groupId>
+ <artifactId>jsf-facelets</artifactId>
+ <version>1.1.14</version>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.richfaces.ui</groupId>
+ <artifactId>core</artifactId>
+ <version>3.3.0-SNAPSHOT</version>
+ </dependency>
+ </dependencies>
+</project>
\ No newline at end of file
Property changes on: trunk/test-applications/ajaxTest/pom.xml
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Name: svn:eol-style
+ native
Added: trunk/test-applications/ajaxTest/src/main/java/Bean.java
===================================================================
--- trunk/test-applications/ajaxTest/src/main/java/Bean.java (rev 0)
+++ trunk/test-applications/ajaxTest/src/main/java/Bean.java 2008-11-14 04:09:52 UTC (rev 11161)
@@ -0,0 +1,15 @@
+
+
+import java.io.Serializable;
+
+public class Bean implements Serializable {
+
+ private String text;
+
+ public Bean() {}
+
+ public String getText() { return text;}
+
+ public void setText(String name) { this.text = name; }
+
+}
Property changes on: trunk/test-applications/ajaxTest/src/main/java/Bean.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Name: svn:eol-style
+ native
Added: trunk/test-applications/ajaxTest/src/test/java/org/richfaces/RepeaterTest.java
===================================================================
--- trunk/test-applications/ajaxTest/src/test/java/org/richfaces/RepeaterTest.java (rev 0)
+++ trunk/test-applications/ajaxTest/src/test/java/org/richfaces/RepeaterTest.java 2008-11-14 04:09:52 UTC (rev 11161)
@@ -0,0 +1,57 @@
+/**
+ *
+ */
+package org.richfaces;
+
+import static org.junit.Assert.*;
+
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Test;
+import org.richfaces.test.AbstractFacesTest;
+import org.richfaces.test.LocalWebClient;
+import org.w3c.dom.Element;
+
+import com.gargoylesoftware.htmlunit.BrowserVersion;
+import com.gargoylesoftware.htmlunit.NicelyResynchronizingAjaxController;
+import com.gargoylesoftware.htmlunit.WebClient;
+import com.gargoylesoftware.htmlunit.html.HtmlForm;
+import com.gargoylesoftware.htmlunit.html.HtmlInput;
+import com.gargoylesoftware.htmlunit.html.HtmlPage;
+
+/**
+ * @author asmirnov
+ *
+ */
+public class RepeaterTest extends AbstractFacesTest {
+
+ @Override
+ protected void setupWebContent() {
+ facesServer
+ .addResource("/WEB-INF/faces-config.xml", "faces-config.xml");
+ facesServer.addResource("/repeater.xhtml", "repeater.xhtml");
+ }
+
+ /**
+ * @throws java.lang.Exception
+ */
+
+ @Test
+ public void testHelloFacelets() throws Exception {
+ WebClient webClient = new LocalWebClient(facesServer,BrowserVersion.FIREFOX_3);
+ webClient.setThrowExceptionOnScriptError(true);
+ webClient.setAjaxController(new NicelyResynchronizingAjaxController());
+ HtmlPage page = webClient.getPage("http://localhost/repeater.jsf");
+ page.getEnclosingWindow().getThreadManager().joinAll(10000);
+// System.out.println(page.asXml());
+ HtmlForm htmlForm = page.getFormByName("ajaxForm");
+ HtmlInput htmlInput = htmlForm.getInputByName("ajaxForm:text");
+ assertNotNull(htmlForm);
+ htmlInput.setValueAttribute("foo");
+ htmlInput.click();
+// System.out.println(page.asXml());
+ Element element = page.getElementById("ajaxForm:out");
+ assertEquals("foo", element.getTextContent().trim());
+ }
+
+}
Property changes on: trunk/test-applications/ajaxTest/src/test/java/org/richfaces/RepeaterTest.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Name: svn:eol-style
+ native
Added: trunk/test-applications/ajaxTest/src/test/resources/faces-config.xml
===================================================================
--- trunk/test-applications/ajaxTest/src/test/resources/faces-config.xml (rev 0)
+++ trunk/test-applications/ajaxTest/src/test/resources/faces-config.xml 2008-11-14 04:09:52 UTC (rev 11161)
@@ -0,0 +1,20 @@
+<?xml version='1.0' encoding='UTF-8'?>
+<faces-config version="1.2" xmlns="http://java.sun.com/xml/ns/javaee"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-facesconfig_1_2.xsd">
+
+ <application>
+ <!--
+ <message-bundle>messages</message-bundle>
+ -->
+ <locale-config>
+ <default-locale>en</default-locale>
+ </locale-config>
+ <view-handler>com.sun.facelets.FaceletViewHandler</view-handler>
+ </application>
+ <managed-bean>
+ <managed-bean-name>bean</managed-bean-name>
+ <managed-bean-class>Bean</managed-bean-class>
+ <managed-bean-scope>session</managed-bean-scope>
+ </managed-bean>
+</faces-config>
Property changes on: trunk/test-applications/ajaxTest/src/test/resources/faces-config.xml
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Name: svn:eol-style
+ native
Added: trunk/test-applications/ajaxTest/src/test/resources/org/richfaces/logging.properties
===================================================================
--- trunk/test-applications/ajaxTest/src/test/resources/org/richfaces/logging.properties (rev 0)
+++ trunk/test-applications/ajaxTest/src/test/resources/org/richfaces/logging.properties 2008-11-14 04:09:52 UTC (rev 11161)
@@ -0,0 +1,15 @@
+handlers java.util.logging.ConsoleHandler
+
+############################################################
+# Handler specific properties.
+# Describes specific configuration info for Handlers.
+############################################################
+
+java.util.logging.ConsoleHandler.level ALL
+java.util.logging.ConsoleHandler.formatter java.util.logging.SimpleFormatter
+
+org.ajax4jsf.level=INFO
+javax.enterprise.resource.webcontainer.jsf.level=INFO
+com.gargoylesoftware.htmlunit.level=INFO
+org.richfaces.level=INFO
+
\ No newline at end of file
Property changes on: trunk/test-applications/ajaxTest/src/test/resources/org/richfaces/logging.properties
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: trunk/test-applications/ajaxTest/src/test/resources/repeater.xhtml
===================================================================
--- trunk/test-applications/ajaxTest/src/test/resources/repeater.xhtml (rev 0)
+++ trunk/test-applications/ajaxTest/src/test/resources/repeater.xhtml 2008-11-14 04:09:52 UTC (rev 11161)
@@ -0,0 +1,15 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml"
+ xmlns:a4j="http://richfaces.org/a4j"
+ xmlns:f="http://java.sun.com/jsf/core"
+ xmlns:h="http://java.sun.com/jsf/html">
+ <head><title>Simple repeater in seam</title></head>
+ <body>
+ <h:form id="ajaxForm">
+ <h:inputText id="text" value="#{bean.text}">
+ <a4j:support reRender="out" event="onclick"></a4j:support>
+ </h:inputText>
+ <h:outputText id="out" value="#{bean.text}"></h:outputText>
+ </h:form>
+ </body>
+</html>
Property changes on: trunk/test-applications/ajaxTest/src/test/resources/repeater.xhtml
___________________________________________________________________
Name: svn:mime-type
+ text/plain
16 years, 10 months