Seam SVN: r8731 - trunk/doc/Seam_Reference_Guide/en-US.
by seam-commits@lists.jboss.org
Author: norman.richards(a)jboss.com
Date: 2008-08-18 16:58:19 -0400 (Mon, 18 Aug 2008)
New Revision: 8731
Modified:
trunk/doc/Seam_Reference_Guide/en-US/Configuration.xml
Log:
JBSEAM-274
Modified: trunk/doc/Seam_Reference_Guide/en-US/Configuration.xml
===================================================================
--- trunk/doc/Seam_Reference_Guide/en-US/Configuration.xml 2008-08-18 19:33:26 UTC (rev 8730)
+++ trunk/doc/Seam_Reference_Guide/en-US/Configuration.xml 2008-08-18 20:58:19 UTC (rev 8731)
@@ -187,7 +187,80 @@
<programlisting role="XML"><![CDATA[<web:redirect-filter url-pattern="*.seam"/>]]></programlisting>
</sect3>
+
+
+ <sect3>
+ <title>URL rewriting</title>
+ <para> This filter allows Seam to apply URL rewriting for views based on configuration in the
+ <literal>pages.xml</literal> file. This filter is not activate by default, but can be activated
+ by adding the configuration to <literal>components.xml</literal>: </para>
+ <programlisting role="XML"><![CDATA[<web:rewrite-filter />]]></programlisting>
+
+ <para>
+ Rewriting occurs based on rewrite patterns found for views in <literal>pages.xml</literal>.
+ Seam URL rewriting does both incoming and outgoing URL rewriting based on the same pattern.
+ Here's a simple pattern:
+ </para>
+
+
+ <programlisting role="XML"><![CDATA[
+<page view-id="/home.xhtml">
+ <rewrite pattern="/home" />
+</page>
+]]></programlisting>
+
+ <para>
+ In this case, any incoming request for <literal>/home</literal> will be sent to
+ <literal>/home.xhtml</literal>. More interestingly,
+ any link generated that would normally point to <literal>/home.seam</literal> will
+ instead be rewritten as <literal>/home</literal>. Rewrite patterns only match the portion of the URL
+ before the query parameters. So, <literal>/home.seam?conversationId=13</literal> and
+ <literal>/home.seam?color=red</literal>
+ will both be matched by this rewrite rule.
+ </para>
+
+ <para>
+ Rewrite rules can take these query paramters into consideration, as shown with the following rules.
+ </para>
+ <programlisting role="XML"><![CDATA[
+<page view-id="/home.xhtml">
+ <rewrite pattern="/home/{color}" />
+ <rewrite pattern="/home" />
+</page>
+]]></programlisting>
+
+ <para>
+ In this case, an incoming request for <literal>/home/red</literal> will be served as
+ if it were a request
+ for <literal>/home.seam?color=red</literal>. Similarly, if color is a page parameter an outgoing
+ URL that would normally show as <literal>/home.seam?color=blue</literal> would instead
+ be output as
+ <literal>/home/blue</literal>. Rules are processed in order, so it is important to list
+ more specific rules before more general rules.
+ </para>
+
+ <para>Default Seam query parameters can also be mapped using URL rewriting, allowing for another
+ option for hiding Seam's fingerprints.
+ In the following example, <literal>/search.seam?conversationId=13</literal> would
+ be written as <literal>/search-13</literal>.
+ </para>
+ <programlisting role="XML"><![CDATA[
+<page view-id="/search.xhtml">
+ <rewrite pattern="/search-{conversationId}" />
+ <rewrite pattern="/search" />
+</page>
+]]></programlisting>
+
+ <para>
+ Seam URL rewriting provides simple, bidirectional rewriting on a per-view basis. For more
+ complex rewriting rules that cover non-seam components, Seam applications can continue to
+ use the org.tuckey URLRewriteFilter or apply rewriting rules at the web server.
+ </para>
+
+
+ </sect3>
+
<sect3>
<title>Multipart form submissions</title>
<para> This feature is necessary when using the Seam file upload JSF control. It detects multipart form
@@ -337,6 +410,7 @@
</sect3>
+
<sect3>
<title>Adding custom filters</title>
<para> Seam can install your filters for you, allowing you to specify <emphasis>where</emphasis> in the
15 years, 9 months
Seam SVN: r8730 - trunk/doc/Seam_Reference_Guide/en-US.
by seam-commits@lists.jboss.org
Author: norman.richards(a)jboss.com
Date: 2008-08-18 15:33:26 -0400 (Mon, 18 Aug 2008)
New Revision: 8730
Modified:
trunk/doc/Seam_Reference_Guide/en-US/Itext.xml
Log:
JBSEAM-3220
Modified: trunk/doc/Seam_Reference_Guide/en-US/Itext.xml
===================================================================
--- trunk/doc/Seam_Reference_Guide/en-US/Itext.xml 2008-08-18 18:23:46 UTC (rev 8729)
+++ trunk/doc/Seam_Reference_Guide/en-US/Itext.xml 2008-08-18 19:33:26 UTC (rev 8730)
@@ -10,13 +10,16 @@
controls, which are used to construct views that can render to PDF, and the DocumentStore component, which
serves the rendered documents to the user. To include PDF support in your application, included
<literal>jboss-seam-pdf.jar</literal> in your <literal>WEB-INF/lib</literal> directory along with the
- iText JAR file. There is no further configuration needed to use Seam's ciText supportfon. </para>
+ iText JAR file. There is no further configuration needed to use Seam's iText supportfon. </para>
<para> The Seam iText module requires the use of Facelets as the view technology. Future versions of the library
may also support the use of JSP. Additionally, it requires the use of the seam-ui package.</para>
<para> The <literal>examples/itext</literal> project contains an example of the PDF support in action. It
demonstrates proper deployment packaging, and it contains a number examples that demonstrate the key PDF
generation features current supported. </para>
+
+
+
<section id="itext.document">
<title>Creating a document</title>
@@ -1350,41 +1353,7 @@
</section>
- <section id="itext.configuration">
- <title>Configuring iText</title>
-
- <para>Document generation works out of the box with no additional configuration needed. However, there are a
- few points of configuration that are needed for more serious applications. </para>
-
- <para> The default implementation serves PDF documents from a generic URL,
- <literal>/seam-doc.seam</literal>. Many browsers (and users) would prefer to see URLs that contain the
- actual PDF name like <literal>/myDocument.pdf</literal>. This capability requires some configuration. To
- serve PDF files, all *.pdf resources should be mapped to the DocumentStoreServlet:</para>
-
- <programlisting role="XML"><![CDATA[<servlet>
- <servlet-name>Document Store Servlet</servlet-name>
- <servlet-class>org.jboss.seam.pdf.DocumentStoreServlet</servlet-class>
-</servlet>
-
-<servlet-mapping>
- <servlet-name>Document Store Servlet</servlet-name>
- <url-pattern>*.pdf</url-pattern>
-</servlet-mapping>]]></programlisting>
-
- <para> The <literal>use-extensions</literal> option on the document store component completes the
- functionality by instructing the document store to generate URLs with the correct filename extension for
- the document type being generated. </para>
-
- <programlisting role="XML"><![CDATA[<components xmlns="http://jboss.com/products/seam/components"
- xmlns:pdf="http://jboss.com/products/seam/pdf">
- <pdf:document-store use-extensions="true" />
-</components>]]></programlisting>
-
- <para> Generated documents are stored in conversation scope and will expire when the conversation ends. At
- that point, references to the document will be invalid. To You can specify a default view to be shown
- when a document does not exist using the <literal>error-page</literal> property of the documentStore. </para>
- <programlisting role="XML"><![CDATA[<pdf:document-store use-extensions="true" error-page="/pdfMissing.seam" />]]></programlisting>
- </section>
+
</section>
@@ -2385,6 +2354,42 @@
</section>
+ <section id="itext.configuration">
+ <title>Configuring iText</title>
+
+ <para>Document generation works out of the box with no additional configuration needed. However, there are a
+ few points of configuration that are needed for more serious applications. </para>
+
+ <para> The default implementation serves PDF documents from a generic URL,
+ <literal>/seam-doc.seam</literal>. Many browsers (and users) would prefer to see URLs that contain the
+ actual PDF name like <literal>/myDocument.pdf</literal>. This capability requires some configuration. To
+ serve PDF files, all <literal>*.pdf</literal> resources should be mapped to the DocumentStoreServlet:</para>
+
+ <programlisting role="XML"><![CDATA[<servlet>
+ <servlet-name>Document Store Servlet</servlet-name>
+ <servlet-class>org.jboss.seam.document.DocumentStoreServlet</servlet-class>
+</servlet>
+
+<servlet-mapping>
+ <servlet-name>Document Store Servlet</servlet-name>
+ <url-pattern>*.pdf</url-pattern>
+</servlet-mapping>]]></programlisting>
+
+ <para> The <literal>use-extensions</literal> option on the document store component completes the
+ functionality by instructing the document store to generate URLs with the correct filename extension for
+ the document type being generated. </para>
+
+ <programlisting role="XML"><![CDATA[<components xmlns="http://jboss.com/products/seam/document"
+ xmlns:pdf="http://jboss.com/products/seam/document">
+ <document:document-store use-extensions="true" />
+</components>]]></programlisting>
+
+ <para> The document store stores documents in conversation scope, and documents will expire when the conversation ends. At
+ that point, references to the document will be invalid. You can specify a default view to be shown
+ when a document does not exist using the <literal>error-page</literal> property of the <literal>documentStore</literal>. </para>
+ <programlisting role="XML"><![CDATA[<document:document-store use-extensions="true" error-page="/documentMissing.seam" />]]></programlisting>
+ </section>
+
<section id="itext.links">
<title>Further documentation</title>
15 years, 9 months
Seam SVN: r8729 - trunk/src/main/org/jboss/seam.
by seam-commits@lists.jboss.org
Author: norman.richards(a)jboss.com
Date: 2008-08-18 14:23:46 -0400 (Mon, 18 Aug 2008)
New Revision: 8729
Modified:
trunk/src/main/org/jboss/seam/pages-2.1.xsd
Log:
JBSEAM-274
Modified: trunk/src/main/org/jboss/seam/pages-2.1.xsd
===================================================================
--- trunk/src/main/org/jboss/seam/pages-2.1.xsd 2008-08-18 18:07:18 UTC (rev 8728)
+++ trunk/src/main/org/jboss/seam/pages-2.1.xsd 2008-08-18 18:23:46 UTC (rev 8729)
@@ -72,6 +72,7 @@
<xs:element ref="pages:description"/>
<xs:element ref="pages:param"/>
<xs:element ref="pages:header" />
+ <xs:element ref="pages:rewrite" />
<xs:element ref="pages:begin-conversation"/>
<xs:element ref="pages:end-conversation"/>
<xs:element ref="pages:start-task"/>
@@ -155,6 +156,19 @@
<xs:attribute name="value" />
</xs:attributeGroup>
+ <xs:element name="rewrite">
+ <xs:annotation>
+ <xs:documentation>URL rewriting pattern for this view</xs:documentation>
+ </xs:annotation>
+ <xs:complexType mixed="true">
+ <xs:attributeGroup ref="pages:attlist.rewrite"/>
+ </xs:complexType>
+ </xs:element>
+
+ <xs:attributeGroup name="attlist.rewrite">
+ <xs:attribute name="pattern" use="required"/>
+ </xs:attributeGroup>
+
<xs:element name="action">
<xs:annotation>
<xs:documentation>Page action</xs:documentation>
15 years, 9 months
Seam SVN: r8728 - trunk/src/main/org/jboss/seam/bpm.
by seam-commits@lists.jboss.org
Author: pete.muir(a)jboss.org
Date: 2008-08-18 14:07:18 -0400 (Mon, 18 Aug 2008)
New Revision: 8728
Modified:
trunk/src/main/org/jboss/seam/bpm/Jbpm.java
Log:
minor
Modified: trunk/src/main/org/jboss/seam/bpm/Jbpm.java
===================================================================
--- trunk/src/main/org/jboss/seam/bpm/Jbpm.java 2008-08-18 15:05:43 UTC (rev 8727)
+++ trunk/src/main/org/jboss/seam/bpm/Jbpm.java 2008-08-18 18:07:18 UTC (rev 8728)
@@ -11,7 +11,6 @@
import java.util.Map;
import java.util.Properties;
import java.util.Set;
-import java.util.TreeSet;
import javax.naming.NamingException;
15 years, 9 months
Seam SVN: r8727 - trunk/seam-gen/view.
by seam-commits@lists.jboss.org
Author: dan.j.allen
Date: 2008-08-18 11:05:43 -0400 (Mon, 18 Aug 2008)
New Revision: 8727
Modified:
trunk/seam-gen/view/edit.xhtml
trunk/seam-gen/view/editproperty.xhtml.ftl
trunk/seam-gen/view/form.xhtml
Log:
use Field in the id of <s:decorate> instead of Decoration since it is more applicable
Modified: trunk/seam-gen/view/edit.xhtml
===================================================================
--- trunk/seam-gen/view/edit.xhtml 2008-08-18 15:03:49 UTC (rev 8726)
+++ trunk/seam-gen/view/edit.xhtml 2008-08-18 15:05:43 UTC (rev 8727)
@@ -17,7 +17,7 @@
<rich:panel>
<f:facet name="header">@pageName@</f:facet>
- <s:decorate id="nameDecoration" template="layout/edit.xhtml">
+ <s:decorate id="nameField" template="layout/edit.xhtml">
<ui:define name="label">Name</ui:define>
<h:inputText id="name" required="true"
value="#{@homeName@.instance.name}"/>
Modified: trunk/seam-gen/view/editproperty.xhtml.ftl
===================================================================
--- trunk/seam-gen/view/editproperty.xhtml.ftl 2008-08-18 15:03:49 UTC (rev 8726)
+++ trunk/seam-gen/view/editproperty.xhtml.ftl 2008-08-18 15:05:43 UTC (rev 8727)
@@ -7,7 +7,7 @@
<#foreach componentProperty in property.value.propertyIterator>
<#assign column = componentProperty.columnIterator.next()>
- <s:decorate id="${componentProperty.name}Decoration" template="layout/edit.xhtml">
+ <s:decorate id="${componentProperty.name}Field" template="layout/edit.xhtml">
<ui:define name="label">${componentProperty.name}</ui:define>
<#if isDate(componentProperty)>
<rich:calendar id="${componentProperty.name}"
@@ -26,7 +26,7 @@
</#if>
value="${'#'}{${homeName}.instance.${property.name}.${componentProperty.name}}">
<s:convertDateTime type="time"/>
- <a:support event="onblur" reRender="${componentProperty.name}Decoration" bypassUpdates="true" ajaxSingle="true"/>
+ <a:support event="onblur" reRender="${componentProperty.name}Field" bypassUpdates="true" ajaxSingle="true"/>
</h:inputText>
<#elseif isTimestamp(componentProperty)>
<rich:calendar id="${componentProperty.name}"
@@ -41,7 +41,7 @@
</#if>
value="${'#'}{${homeName}.instance.${property.name}.${componentProperty.name}}"
size="${column.precision+7}">
- <a:support event="onblur" reRender="${componentProperty.name}Decoration" bypassUpdates="true" ajaxSingle="true"/>
+ <a:support event="onblur" reRender="${componentProperty.name}Field" bypassUpdates="true" ajaxSingle="true"/>
</h:inputText>
<#elseif isBigInteger(componentProperty)>
<h:inputText id="${componentProperty.name}"
@@ -53,7 +53,7 @@
</#if>
value="${'#'}{${homeName}.instance.${property.name}.${componentProperty.name}}"
size="${column.precision+6}">
- <a:support event="onblur" reRender="${componentProperty.name}Decoration" bypassUpdates="true" ajaxSingle="true"/>
+ <a:support event="onblur" reRender="${componentProperty.name}Field" bypassUpdates="true" ajaxSingle="true"/>
</h:inputText>
<#elseif isBoolean(componentProperty)>
<h:selectBooleanCheckbox id="${componentProperty.name}"
@@ -97,7 +97,7 @@
size="${size}"
maxlength="${column.length}"
value="${'#'}{${homeName}.instance.${property.name}.${componentProperty.name}}">
- <a:support event="onblur" reRender="${componentProperty.name}Decoration" bypassUpdates="true" ajaxSingle="true"/>
+ <a:support event="onblur" reRender="${componentProperty.name}Field" bypassUpdates="true" ajaxSingle="true"/>
</h:inputText>
</#if>
<#else>
@@ -109,7 +109,7 @@
disabled="${'#'}{${homeName}.managed}"
</#if>
value="${'#'}{${homeName}.instance.${property.name}.${componentProperty.name}}">
- <a:support event="onblur" reRender="${componentProperty.name}Decoration" bypassUpdates="true" ajaxSingle="true"/>
+ <a:support event="onblur" reRender="${componentProperty.name}Field" bypassUpdates="true" ajaxSingle="true"/>
</h:inputText>
</#if>
</s:decorate>
@@ -118,7 +118,7 @@
<#assign column = property.columnIterator.next()>
<#assign property = property.value.typeName>
- <s:decorate id="${property.name}Decoration" template="layout/edit.xhtml">
+ <s:decorate id="${property.name}Field" template="layout/edit.xhtml">
<ui:define name="label">${property.name}</ui:define>
<#if isDate(property)>
<rich:calendar id="${property.name}"
@@ -137,7 +137,7 @@
</#if>
value="${'#'}{${homeName}.instance.${property.name}}">
<s:convertDateTime type="time"/>
- <a:support event="onblur" reRender="${property.name}Decoration" bypassUpdates="true" ajaxSingle="true"/>
+ <a:support event="onblur" reRender="${property.name}Field" bypassUpdates="true" ajaxSingle="true"/>
</h:inputText>
<#elseif isTimestamp(property)>
<rich:calendar id="${property.name}"
@@ -152,7 +152,7 @@
</#if>
value="${'#'}{${homeName}.instance.${property.name}}"
size="${column.precision+7}">
- <a:support event="onblur" reRender="${property.name}Decoration" bypassUpdates="true" ajaxSingle="true"/>
+ <a:support event="onblur" reRender="${property.name}Field" bypassUpdates="true" ajaxSingle="true"/>
</h:inputText>
<#elseif isBigInteger(property)>
<h:inputText id="${property.name}"
@@ -164,7 +164,7 @@
</#if>
value="${'#'}{${homeName}.instance.${property.name}}"
size="${column.precision+6}">
- <a:support event="onblur" reRender="${property.name}Decoration" bypassUpdates="true" ajaxSingle="true"/>
+ <a:support event="onblur" reRender="${property.name}Field" bypassUpdates="true" ajaxSingle="true"/>
</h:inputText>
<#elseif isBoolean(property)>
<h:selectBooleanCheckbox id="${property.name}"
@@ -208,7 +208,7 @@
size="${size}"
maxlength="${column.length}"
value="${'#'}{${homeName}.instance.${property.name}}">
- <a:support event="onblur" reRender="${property.name}Decoration" bypassUpdates="true" ajaxSingle="true"/>
+ <a:support event="onblur" reRender="${property.name}Field" bypassUpdates="true" ajaxSingle="true"/>
</h:inputText>
</#if>
<#else>
@@ -220,7 +220,7 @@
disabled="${'#'}{${homeName}.managed}"
</#if>
value="${'#'}{${homeName}.instance.${property.name}}">
- <a:support event="onblur" reRender="${property.name}Decoration" bypassUpdates="true" ajaxSingle="true"/>
+ <a:support event="onblur" reRender="${property.name}Field" bypassUpdates="true" ajaxSingle="true"/>
</h:inputText>
</#if>
</s:decorate>
Modified: trunk/seam-gen/view/form.xhtml
===================================================================
--- trunk/seam-gen/view/form.xhtml 2008-08-18 15:03:49 UTC (rev 8726)
+++ trunk/seam-gen/view/form.xhtml 2008-08-18 15:05:43 UTC (rev 8727)
@@ -18,7 +18,7 @@
<rich:panel>
<f:facet name="header">@pageName@</f:facet>
- <s:decorate id="valueDecoration" template="layout/edit.xhtml">
+ <s:decorate id="valueField" template="layout/edit.xhtml">
<ui:define name="label">Value</ui:define>
<h:inputText id="value" required="true"
value="#{@componentName@.value}"/>
15 years, 9 months
Seam SVN: r8726 - branches/Seam_2_0/seam-gen/view.
by seam-commits@lists.jboss.org
Author: dan.j.allen
Date: 2008-08-18 11:03:49 -0400 (Mon, 18 Aug 2008)
New Revision: 8726
Modified:
branches/Seam_2_0/seam-gen/view/edit.xhtml
branches/Seam_2_0/seam-gen/view/editproperty.xhtml.ftl
branches/Seam_2_0/seam-gen/view/form.xhtml
Log:
use the word Field in id of decoration instead of Decoration since it is more applicable
Modified: branches/Seam_2_0/seam-gen/view/edit.xhtml
===================================================================
--- branches/Seam_2_0/seam-gen/view/edit.xhtml 2008-08-18 14:18:30 UTC (rev 8725)
+++ branches/Seam_2_0/seam-gen/view/edit.xhtml 2008-08-18 15:03:49 UTC (rev 8726)
@@ -17,7 +17,7 @@
<rich:panel>
<f:facet name="header">@pageName@</f:facet>
- <s:decorate id="nameDecoration" template="layout/edit.xhtml">
+ <s:decorate id="nameField" template="layout/edit.xhtml">
<ui:define name="label">Name</ui:define>
<h:inputText id="name" required="true"
value="#{@homeName@.instance.name}"/>
Modified: branches/Seam_2_0/seam-gen/view/editproperty.xhtml.ftl
===================================================================
--- branches/Seam_2_0/seam-gen/view/editproperty.xhtml.ftl 2008-08-18 14:18:30 UTC (rev 8725)
+++ branches/Seam_2_0/seam-gen/view/editproperty.xhtml.ftl 2008-08-18 15:03:49 UTC (rev 8726)
@@ -7,7 +7,7 @@
<#foreach componentProperty in property.value.propertyIterator>
<#assign column = componentProperty.columnIterator.next()>
- <s:decorate id="${componentProperty.name}Decoration" template="layout/edit.xhtml">
+ <s:decorate id="${componentProperty.name}Field" template="layout/edit.xhtml">
<ui:define name="label">${componentProperty.name}</ui:define>
<#if isDate(componentProperty)>
<rich:calendar id="${componentProperty.name}"
@@ -26,7 +26,7 @@
</#if>
value="${'#'}{${homeName}.instance.${property.name}.${componentProperty.name}}">
<s:convertDateTime type="time"/>
- <a:support event="onblur" reRender="${componentProperty.name}Decoration" bypassUpdates="true" ajaxSingle="true"/>
+ <a:support event="onblur" reRender="${componentProperty.name}Field" bypassUpdates="true" ajaxSingle="true"/>
</h:inputText>
<#elseif isTimestamp(componentProperty)>
<rich:calendar id="${componentProperty.name}"
@@ -41,7 +41,7 @@
</#if>
value="${'#'}{${homeName}.instance.${property.name}.${componentProperty.name}}"
size="${column.precision+7}">
- <a:support event="onblur" reRender="${componentProperty.name}Decoration" bypassUpdates="true" ajaxSingle="true"/>
+ <a:support event="onblur" reRender="${componentProperty.name}Field" bypassUpdates="true" ajaxSingle="true"/>
</h:inputText>
<#elseif isBigInteger(componentProperty)>
<h:inputText id="${componentProperty.name}"
@@ -53,7 +53,7 @@
</#if>
value="${'#'}{${homeName}.instance.${property.name}.${componentProperty.name}}"
size="${column.precision+6}">
- <a:support event="onblur" reRender="${componentProperty.name}Decoration" bypassUpdates="true" ajaxSingle="true"/>
+ <a:support event="onblur" reRender="${componentProperty.name}Field" bypassUpdates="true" ajaxSingle="true"/>
</h:inputText>
<#elseif isBoolean(componentProperty)>
<h:selectBooleanCheckbox id="${componentProperty.name}"
@@ -97,7 +97,7 @@
size="${size}"
maxlength="${column.length}"
value="${'#'}{${homeName}.instance.${property.name}.${componentProperty.name}}">
- <a:support event="onblur" reRender="${componentProperty.name}Decoration" bypassUpdates="true" ajaxSingle="true"/>
+ <a:support event="onblur" reRender="${componentProperty.name}Field" bypassUpdates="true" ajaxSingle="true"/>
</h:inputText>
</#if>
<#else>
@@ -109,7 +109,7 @@
disabled="${'#'}{${homeName}.managed}"
</#if>
value="${'#'}{${homeName}.instance.${property.name}.${componentProperty.name}}">
- <a:support event="onblur" reRender="${componentProperty.name}Decoration" bypassUpdates="true" ajaxSingle="true"/>
+ <a:support event="onblur" reRender="${componentProperty.name}Field" bypassUpdates="true" ajaxSingle="true"/>
</h:inputText>
</#if>
</s:decorate>
@@ -118,7 +118,7 @@
<#assign column = property.columnIterator.next()>
<#assign property = property.value.typeName>
- <s:decorate id="${property.name}Decoration" template="layout/edit.xhtml">
+ <s:decorate id="${property.name}Field" template="layout/edit.xhtml">
<ui:define name="label">${property.name}</ui:define>
<#if isDate(property)>
<rich:calendar id="${property.name}"
@@ -137,7 +137,7 @@
</#if>
value="${'#'}{${homeName}.instance.${property.name}}">
<s:convertDateTime type="time"/>
- <a:support event="onblur" reRender="${property.name}Decoration" bypassUpdates="true" ajaxSingle="true"/>
+ <a:support event="onblur" reRender="${property.name}Field" bypassUpdates="true" ajaxSingle="true"/>
</h:inputText>
<#elseif isTimestamp(property)>
<rich:calendar id="${property.name}"
@@ -152,7 +152,7 @@
</#if>
value="${'#'}{${homeName}.instance.${property.name}}"
size="${column.precision+7}">
- <a:support event="onblur" reRender="${property.name}Decoration" bypassUpdates="true" ajaxSingle="true"/>
+ <a:support event="onblur" reRender="${property.name}Field" bypassUpdates="true" ajaxSingle="true"/>
</h:inputText>
<#elseif isBigInteger(property)>
<h:inputText id="${property.name}"
@@ -164,7 +164,7 @@
</#if>
value="${'#'}{${homeName}.instance.${property.name}}"
size="${column.precision+6}">
- <a:support event="onblur" reRender="${property.name}Decoration" bypassUpdates="true" ajaxSingle="true"/>
+ <a:support event="onblur" reRender="${property.name}Field" bypassUpdates="true" ajaxSingle="true"/>
</h:inputText>
<#elseif isBoolean(property)>
<h:selectBooleanCheckbox id="${property.name}"
@@ -208,7 +208,7 @@
size="${size}"
maxlength="${column.length}"
value="${'#'}{${homeName}.instance.${property.name}}">
- <a:support event="onblur" reRender="${property.name}Decoration" bypassUpdates="true" ajaxSingle="true"/>
+ <a:support event="onblur" reRender="${property.name}Field" bypassUpdates="true" ajaxSingle="true"/>
</h:inputText>
</#if>
<#else>
@@ -220,7 +220,7 @@
disabled="${'#'}{${homeName}.managed}"
</#if>
value="${'#'}{${homeName}.instance.${property.name}}">
- <a:support event="onblur" reRender="${property.name}Decoration" bypassUpdates="true" ajaxSingle="true"/>
+ <a:support event="onblur" reRender="${property.name}Field" bypassUpdates="true" ajaxSingle="true"/>
</h:inputText>
</#if>
</s:decorate>
Modified: branches/Seam_2_0/seam-gen/view/form.xhtml
===================================================================
--- branches/Seam_2_0/seam-gen/view/form.xhtml 2008-08-18 14:18:30 UTC (rev 8725)
+++ branches/Seam_2_0/seam-gen/view/form.xhtml 2008-08-18 15:03:49 UTC (rev 8726)
@@ -18,7 +18,7 @@
<rich:panel>
<f:facet name="header">@pageName@</f:facet>
- <s:decorate id="valueDecoration" template="layout/edit.xhtml">
+ <s:decorate id="valueField" template="layout/edit.xhtml">
<ui:define name="label">Value</ui:define>
<h:inputText id="value" required="true"
value="#{@componentName@.value}"/>
15 years, 9 months
Seam SVN: r8725 - in trunk/src/main/org/jboss/seam: navigation and 1 other directory.
by seam-commits@lists.jboss.org
Author: norman.richards(a)jboss.com
Date: 2008-08-18 10:18:30 -0400 (Mon, 18 Aug 2008)
New Revision: 8725
Modified:
trunk/src/main/org/jboss/seam/mock/MockServletContext.java
trunk/src/main/org/jboss/seam/navigation/Pages.java
Log:
JBSEAM-3277
Modified: trunk/src/main/org/jboss/seam/mock/MockServletContext.java
===================================================================
--- trunk/src/main/org/jboss/seam/mock/MockServletContext.java 2008-08-18 12:57:59 UTC (rev 8724)
+++ trunk/src/main/org/jboss/seam/mock/MockServletContext.java 2008-08-18 14:18:30 UTC (rev 8725)
@@ -253,7 +253,8 @@
public String getRealPath(String relativePath)
{
- return relativePath;
+ // spec says to return null if we can't figure it out
+ return null;
}
public String getServerInfo()
Modified: trunk/src/main/org/jboss/seam/navigation/Pages.java
===================================================================
--- trunk/src/main/org/jboss/seam/navigation/Pages.java 2008-08-18 12:57:59 UTC (rev 8724)
+++ trunk/src/main/org/jboss/seam/navigation/Pages.java 2008-08-18 14:18:30 UTC (rev 8725)
@@ -1662,9 +1662,14 @@
}
public void scanForPages(ServletContext context) {
- HashSet<String> paths = new HashSet<String>();
- paths.add(context.getRealPath("/"));
- handle(paths);
+ if (context!=null) {
+ String path = context.getRealPath("/");
+ if (path != null) {
+ HashSet<String> paths = new HashSet<String>();
+ paths.add(context.getRealPath("/"));
+ handle(paths);
+ }
+ }
}
}
15 years, 9 months
Seam SVN: r8724 - trunk/src/main/org/jboss/seam/deployment.
by seam-commits@lists.jboss.org
Author: pete.muir(a)jboss.org
Date: 2008-08-18 08:57:59 -0400 (Mon, 18 Aug 2008)
New Revision: 8724
Removed:
trunk/src/main/org/jboss/seam/deployment/VFSScanner.java
Modified:
trunk/src/main/org/jboss/seam/deployment/DeploymentStrategy.java
Log:
Remove VFSCanner, migrate to jbossas
Modified: trunk/src/main/org/jboss/seam/deployment/DeploymentStrategy.java
===================================================================
--- trunk/src/main/org/jboss/seam/deployment/DeploymentStrategy.java 2008-08-18 09:41:19 UTC (rev 8723)
+++ trunk/src/main/org/jboss/seam/deployment/DeploymentStrategy.java 2008-08-18 12:57:59 UTC (rev 8724)
@@ -5,7 +5,6 @@
import java.io.IOException;
import java.lang.reflect.Constructor;
import java.lang.reflect.InvocationTargetException;
-import java.lang.reflect.Method;
import java.net.URL;
import java.util.ArrayList;
import java.util.Enumeration;
@@ -189,17 +188,8 @@
return;
}
}
- // Use VFS Scanner if on JBoss 5 and not on Embedded
- if (isVFSAvailable() && !isEmbedded() && isJBoss5())
- {
- log.debug("Using VFS aware scanner on JBoss 5");
- this.scanner = new VFSScanner(this);
- }
- else
- {
- log.debug("Using default URLScanner");
- this.scanner = new URLScanner(this);
- }
+ log.debug("Using default URLScanner");
+ this.scanner = new URLScanner(this);
}
private Scanner instantiateScanner(String className)
@@ -293,54 +283,4 @@
return null;
}
- private static boolean isVFSAvailable()
- {
- try
- {
- Class.forName("org.jboss.virtual.VFS");
- log.trace("VFS detected");
- return true;
- }
- catch (Throwable t)
- {
- return false;
- }
- }
-
- private static boolean isJBoss5()
- {
- try
- {
- Class versionClass = Class.forName("org.jboss.Version");
- Method getVersionInstance = versionClass.getMethod("getInstance");
- Object versionInstance = getVersionInstance.invoke(null);
- Method getMajor = versionClass.getMethod("getMajor");
- Object major = getMajor.invoke(versionInstance);
- boolean isJBoss5 = major != null && major.equals(5);
- if (isJBoss5)
- {
- log.trace("JBoss 5 detected");
- }
- return isJBoss5;
- }
- catch (Throwable t)
- {
- return false;
- }
- }
-
- private static boolean isEmbedded()
- {
- try
- {
- Class.forName("org.jboss.embedded.Bootstrap");
- log.trace("JBoss Embedded detected");
- return true;
- }
- catch (Throwable t)
- {
- return false;
- }
- }
-
}
Deleted: trunk/src/main/org/jboss/seam/deployment/VFSScanner.java
===================================================================
--- trunk/src/main/org/jboss/seam/deployment/VFSScanner.java 2008-08-18 09:41:19 UTC (rev 8723)
+++ trunk/src/main/org/jboss/seam/deployment/VFSScanner.java 2008-08-18 12:57:59 UTC (rev 8724)
@@ -1,191 +0,0 @@
-/*
-* JBoss, Home of Professional Open Source
-* Copyright 2006, JBoss Inc., and individual contributors as indicated
-* by the @authors tag. See the copyright.txt in the distribution for a
-* full listing of individual contributors.
-*
-* This is free software; you can redistribute it and/or modify it
-* under the terms of the GNU Lesser General Public License as
-* published by the Free Software Foundation; either version 2.1 of
-* the License, or (at your option) any later version.
-*
-* This software is distributed in the hope that it will be useful,
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-* Lesser General Public License for more details.
-*
-* You should have received a copy of the GNU Lesser General Public
-* License along with this software; if not, write to the Free
-* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
-*/
-package org.jboss.seam.deployment;
-
-import java.io.File;
-import java.io.IOException;
-import java.net.URL;
-import java.util.Enumeration;
-import java.util.List;
-
-import org.jboss.seam.deployment.AbstractScanner;
-import org.jboss.seam.deployment.DeploymentStrategy;
-import org.jboss.seam.log.LogProvider;
-import org.jboss.seam.log.Logging;
-import org.jboss.virtual.VFS;
-import org.jboss.virtual.VirtualFile;
-
-/**
- * JBoss VSF aware scanner.
- *
- * @author <a href="mailto:ales.justin@jboss.com">Ales Justin</a>
- */
-public class VFSScanner extends AbstractScanner
-{
- private static final LogProvider log = Logging.getLogProvider(VFSScanner.class);
-
- public VFSScanner(DeploymentStrategy deploymentStrategy)
- {
- super(deploymentStrategy);
- }
-
- /**
- * Get the virtual file root.
- *
- * @param url the root URL
- * @param parentDepth level of parent depth
- * @return actual virtual file from url param
- * @throws IOException for any error
- */
- protected static VirtualFile getRoot(URL url, int parentDepth) throws IOException
- {
-
- log.trace("Root url: " + url);
-
- String urlString = url.toString();
- // TODO - this should go away once we figure out why -exp.war is part of CL resources
- if (urlString.startsWith("vfs") == false)
- return null;
-
- int p = urlString.indexOf(":");
- String file = urlString.substring(p + 1);
- URL vfsurl = null;
- String relative;
- File fp = new File(file);
-
- log.trace("File: " + fp);
-
- if (fp.exists())
- {
- vfsurl = fp.getParentFile().toURL();
- relative = fp.getName();
- }
- else
- {
- File curr = fp;
- relative = fp.getName();
- while ((curr = curr.getParentFile()) != null)
- {
- if (curr.exists())
- {
- vfsurl = curr.toURL();
- break;
- }
- else
- {
- relative = curr.getName() + "/" + relative;
- }
- }
- }
-
- log.trace("URL: " + vfsurl + ", relative: " + relative);
-
- VirtualFile top = VFS.getRoot(vfsurl);
- top = top.getChild(relative);
- while(parentDepth > 0)
- {
- if (top == null)
- throw new IllegalArgumentException("Null parent: " + vfsurl + ", relative: " + relative);
- top = top.getParent();
- parentDepth--;
- }
-
- log.trace("Top: " + top);
-
- return top;
- }
-
- public void scanDirectories(File[] directories)
- {
- for (File dir : directories)
- {
- try
- {
- VirtualFile root = getRoot(dir.toURL(), 0);
- if (root != null)
- handleRoot(root);
- else
- log.trace("Null root: " + dir);
- }
- catch (IOException e)
- {
- log.warn("Cannot scan directory " + dir, e);
- }
- }
- }
-
- public void scanResources(String[] resources)
- {
- for (String resourceName : resources)
- {
- try
- {
- Enumeration<URL> urlEnum = getDeploymentStrategy().getClassLoader().getResources(resourceName);
- while (urlEnum.hasMoreElements())
- {
- URL url = urlEnum.nextElement();
- VirtualFile root = getRoot(url, resourceName.lastIndexOf('/') > 0 ? 2 : 1);
- if (root != null)
- handleRoot(root);
- else
- log.trace("Null root: " + url);
- }
- }
- catch (IOException ioe)
- {
- log.warn("Cannot read resource: " + resourceName, ioe);
- }
- }
- }
-
- /**
- * Handle virtual file root.
- *
- * @param root the virtual file root
- * @throws IOException for any error
- */
- protected void handleRoot(VirtualFile root) throws IOException
- {
- if (root.isLeaf())
- {
- getDeploymentStrategy().handle(root.getPathName());
- }
- else
- {
- String rootPathName = root.getPathName();
- int rootPathNameLength = rootPathName.length();
- List<VirtualFile> children = root.getChildrenRecursively();
- for (VirtualFile child : children)
- {
- if (child.isLeaf())
- {
- String name = child.getPathName();
- // move past '/'
- int length = rootPathNameLength;
- if (name.charAt(length) == '/')
- length++;
- getDeploymentStrategy().handle(name.substring(length));
- }
- }
- }
- }
-}
15 years, 9 months
Seam SVN: r8723 - trunk/src/main/org/jboss/seam/navigation.
by seam-commits@lists.jboss.org
Author: shane.bryzak(a)jboss.com
Date: 2008-08-18 05:41:19 -0400 (Mon, 18 Aug 2008)
New Revision: 8723
Modified:
trunk/src/main/org/jboss/seam/navigation/Pages.java
Log:
JBSEAM-3274
Modified: trunk/src/main/org/jboss/seam/navigation/Pages.java
===================================================================
--- trunk/src/main/org/jboss/seam/navigation/Pages.java 2008-08-18 07:50:07 UTC (rev 8722)
+++ trunk/src/main/org/jboss/seam/navigation/Pages.java 2008-08-18 09:41:19 UTC (rev 8723)
@@ -982,6 +982,38 @@
loginViewId = root.attributeValue("login-view-id");
}
+ if (httpPort == null)
+ {
+ try
+ {
+ String value = root.attributeValue("http-port");
+ if (!Strings.isEmpty(value))
+ {
+ httpPort = Integer.parseInt(value);
+ }
+ }
+ catch (NumberFormatException ex)
+ {
+ throw new IllegalStateException("Invalid value specified for http-port attribute in pages.xml");
+ }
+ }
+
+ if (httpsPort == null)
+ {
+ try
+ {
+ String value = root.attributeValue("https-port");
+ if (!Strings.isEmpty(value))
+ {
+ httpsPort = Integer.parseInt(value);
+ }
+ }
+ catch (NumberFormatException ex)
+ {
+ throw new IllegalStateException("Invalid valid specified for https-port attribute in pages.xml");
+ }
+ }
+
List<Element> elements = root.elements("conversation");
for (Element conversation : elements)
{
15 years, 9 months