Seam SVN: r15066 - branches/community/Seam_2_3/seam-integration-tests/src/test/java/org/jboss/seam/test/integration/faces.
by seam-commits@lists.jboss.org
Author: maschmid
Date: 2012-08-23 06:07:12 -0400 (Thu, 23 Aug 2012)
New Revision: 15066
Added:
branches/community/Seam_2_3/seam-integration-tests/src/test/java/org/jboss/seam/test/integration/faces/BoundComponentConversationTest.java
Log:
Test for JBSEAM-5020
Added: branches/community/Seam_2_3/seam-integration-tests/src/test/java/org/jboss/seam/test/integration/faces/BoundComponentConversationTest.java
===================================================================
--- branches/community/Seam_2_3/seam-integration-tests/src/test/java/org/jboss/seam/test/integration/faces/BoundComponentConversationTest.java (rev 0)
+++ branches/community/Seam_2_3/seam-integration-tests/src/test/java/org/jboss/seam/test/integration/faces/BoundComponentConversationTest.java 2012-08-23 10:07:12 UTC (rev 15066)
@@ -0,0 +1,130 @@
+package org.jboss.seam.test.integration.faces;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertTrue;
+
+import java.io.Serializable;
+import java.net.URL;
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
+
+import javax.faces.component.UIInput;
+
+import org.jboss.arquillian.container.test.api.Deployment;
+import org.jboss.arquillian.container.test.api.OverProtocol;
+import org.jboss.arquillian.container.test.api.RunAsClient;
+import org.jboss.arquillian.junit.Arquillian;
+import org.jboss.arquillian.test.api.ArquillianResource;
+import org.jboss.seam.ScopeType;
+import org.jboss.seam.annotations.Begin;
+import org.jboss.seam.annotations.Create;
+import org.jboss.seam.annotations.Name;
+import org.jboss.seam.annotations.Scope;
+import org.jboss.seam.test.integration.Deployments;
+import org.jboss.shrinkwrap.api.Archive;
+import org.jboss.shrinkwrap.api.asset.StringAsset;
+import org.junit.Ignore;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+
+import com.gargoylesoftware.htmlunit.WebClient;
+import com.gargoylesoftware.htmlunit.html.HtmlPage;
+
+
+// JBSEAM-5020
+(a)RunWith(Arquillian.class)
+@RunAsClient
+public class BoundComponentConversationTest
+{
+ private final WebClient client = new WebClient();
+
+ @ArquillianResource
+ URL contextPath;
+
+ @Deployment(name="BoundComponentConversationTest")
+ @OverProtocol("Servlet 3.0")
+ public static Archive<?> createDeployment()
+ {
+ // This is a client test, use a real (non-mocked) Seam deployment
+ return Deployments.realSeamDeployment()
+ .addClasses(MyComponent.class, MyBackingBean.class)
+ .addAsWebResource(new StringAsset(
+ "<html xmlns=\"http://www.w3.org/1999/xhtml\"" +
+ " xmlns:h=\"http://java.sun.com/jsf/html\"" +
+ " xmlns:f=\"http://java.sun.com/jsf/core\"" +
+ " xmlns:ui=\"http://java.sun.com/jsf/facelets\">" +
+ "<h:head></h:head>" +
+ "<h:body>" +
+ "<h:form id='form'>" +
+ "<h:outputText value='Conversation id: #{conversation.id}.'/>" +
+ "<h:inputText value='#{myComponent.value}' binding='#{myBackingBean.input}'/>" +
+ "<h:commandButton id='test' action='test' value='Test' />" +
+ "</h:form>" +
+ "</h:body>" +
+ "</html>"), "test.xhtml");
+ }
+
+ @Ignore
+ @Test
+ public void testConversationRestoration() throws Exception
+ {
+ Pattern conversationIdPattern = Pattern.compile("Conversation id: (\\d+)\\.");
+ HtmlPage page = client.getPage(contextPath + "test.seam");
+
+ Matcher conversationIdMatcher = conversationIdPattern.matcher(page.getBody().getTextContent());
+ assertTrue(conversationIdMatcher.find());
+
+ String firstConversationId = conversationIdMatcher.group(1);
+
+ page = page.getElementById("form:test").click();
+
+ conversationIdMatcher = conversationIdPattern.matcher(page.getBody().getTextContent());
+ assertTrue(conversationIdMatcher.find());
+
+ String secondConversationId = conversationIdMatcher.group(1);
+ assertEquals(firstConversationId, secondConversationId);
+ }
+
+ @Scope(ScopeType.CONVERSATION)
+ @Name("myComponent")
+ public static class MyComponent implements Serializable
+ {
+ private static final long serialVersionUID = 1L;
+
+ public String value;
+
+ @Create
+ @Begin
+ public void begin()
+ {
+ }
+
+ public String getValue()
+ {
+ return value;
+ }
+
+ public void setValue(String value)
+ {
+ this.value = value;
+ }
+
+ }
+
+ @Scope(ScopeType.EVENT)
+ @Name("myBackingBean")
+ public static class MyBackingBean
+ {
+ private UIInput input;
+
+ public UIInput getInput()
+ {
+ return input;
+ }
+
+ public void setInput(UIInput input)
+ {
+ this.input = input;
+ }
+ }
+}
12 years, 4 months
Seam SVN: r15065 - branches/community/Seam_2_3/seam-integration-tests/src/test/java/org/jboss/seam/test/integration/faces.
by seam-commits@lists.jboss.org
Author: maschmid
Date: 2012-08-23 06:04:36 -0400 (Thu, 23 Aug 2012)
New Revision: 15065
Modified:
branches/community/Seam_2_3/seam-integration-tests/src/test/java/org/jboss/seam/test/integration/faces/PageScopedUIIncludeTest.java
Log:
cleanup
Modified: branches/community/Seam_2_3/seam-integration-tests/src/test/java/org/jboss/seam/test/integration/faces/PageScopedUIIncludeTest.java
===================================================================
--- branches/community/Seam_2_3/seam-integration-tests/src/test/java/org/jboss/seam/test/integration/faces/PageScopedUIIncludeTest.java 2012-08-22 13:47:21 UTC (rev 15064)
+++ branches/community/Seam_2_3/seam-integration-tests/src/test/java/org/jboss/seam/test/integration/faces/PageScopedUIIncludeTest.java 2012-08-23 10:04:36 UTC (rev 15065)
@@ -20,7 +20,6 @@
import org.junit.Test;
import org.junit.runner.RunWith;
-import com.gargoylesoftware.htmlunit.FailingHttpStatusCodeException;
import com.gargoylesoftware.htmlunit.WebClient;
import com.gargoylesoftware.htmlunit.html.HtmlPage;
12 years, 4 months
Seam SVN: r15064 - in branches/community/Seam_2_3/examples-ee6/seamdiscs/seamdiscs-web: src/main/webapp and 3 other directories.
by seam-commits@lists.jboss.org
Author: vdedik
Date: 2012-08-22 09:47:21 -0400 (Wed, 22 Aug 2012)
New Revision: 15064
Modified:
branches/community/Seam_2_3/examples-ee6/seamdiscs/seamdiscs-web/pom.xml
branches/community/Seam_2_3/examples-ee6/seamdiscs/seamdiscs-web/src/main/webapp/WEB-INF/web.xml
branches/community/Seam_2_3/examples-ee6/seamdiscs/seamdiscs-web/src/main/webapp/artist.xhtml
branches/community/Seam_2_3/examples-ee6/seamdiscs/seamdiscs-web/src/main/webapp/artists.xhtml
branches/community/Seam_2_3/examples-ee6/seamdiscs/seamdiscs-web/src/main/webapp/disc.xhtml
branches/community/Seam_2_3/examples-ee6/seamdiscs/seamdiscs-web/src/main/webapp/discs.xhtml
branches/community/Seam_2_3/examples-ee6/seamdiscs/seamdiscs-web/src/main/webapp/home.xhtml
branches/community/Seam_2_3/examples-ee6/seamdiscs/seamdiscs-web/src/main/webapp/layout/footer.xhtml
branches/community/Seam_2_3/examples-ee6/seamdiscs/seamdiscs-web/src/main/webapp/layout/menu.xhtml
branches/community/Seam_2_3/examples-ee6/seamdiscs/seamdiscs-web/src/main/webapp/layout/template.xhtml
branches/community/Seam_2_3/examples-ee6/seamdiscs/seamdiscs-web/src/main/webapp/login.xhtml
branches/community/Seam_2_3/examples-ee6/seamdiscs/seamdiscs-web/src/main/webapp/stylesheet/skin.css
branches/community/Seam_2_3/examples-ee6/seamdiscs/seamdiscs-web/src/main/webapp/stylesheet/theme.css
Log:
- JBSEAM-5017
- Richfaces removed due to integration problems with trinidad.
Modified: branches/community/Seam_2_3/examples-ee6/seamdiscs/seamdiscs-web/pom.xml
===================================================================
--- branches/community/Seam_2_3/examples-ee6/seamdiscs/seamdiscs-web/pom.xml 2012-08-21 17:32:44 UTC (rev 15063)
+++ branches/community/Seam_2_3/examples-ee6/seamdiscs/seamdiscs-web/pom.xml 2012-08-22 13:47:21 UTC (rev 15064)
@@ -58,18 +58,6 @@
<artifactId>trinidad-impl</artifactId>
</dependency>
<dependency>
- <groupId>org.richfaces.core</groupId>
- <artifactId>richfaces-core-api</artifactId>
- </dependency>
- <dependency>
- <groupId>org.richfaces.core</groupId>
- <artifactId>richfaces-core-impl</artifactId>
- </dependency>
- <dependency>
- <groupId>org.richfaces.ui</groupId>
- <artifactId>richfaces-components-ui</artifactId>
- </dependency>
- <dependency>
<groupId>org.apache.myfaces.trinidad</groupId>
<artifactId>trinidad-api</artifactId>
<scope>provided</scope>
Modified: branches/community/Seam_2_3/examples-ee6/seamdiscs/seamdiscs-web/src/main/webapp/WEB-INF/web.xml
===================================================================
--- branches/community/Seam_2_3/examples-ee6/seamdiscs/seamdiscs-web/src/main/webapp/WEB-INF/web.xml 2012-08-21 17:32:44 UTC (rev 15063)
+++ branches/community/Seam_2_3/examples-ee6/seamdiscs/seamdiscs-web/src/main/webapp/WEB-INF/web.xml 2012-08-22 13:47:21 UTC (rev 15064)
@@ -7,18 +7,14 @@
<param-value>.xhtml</param-value>
</context-param>
<!-- Facelets development mode (disable in production) -->
+ <!--<context-param>-->
+ <!--<param-name>javax.faces.PROJECT_STAGE</param-name>-->
+ <!--<param-value>Development</param-value>-->
+ <!--</context-param>-->
<context-param>
- <param-name>javax.faces.PROJECT_STAGE</param-name>
- <param-value>Development</param-value>
- </context-param>
- <context-param>
<param-name>org.apache.myfaces.trinidad.CACHE_VIEW_ROOT</param-name>
<param-value>false</param-value>
</context-param>
- <context-param>
- <param-name>org.richfaces.skin</param-name>
- <param-value>blueSky</param-value>
- </context-param>
<filter>
<filter-name>Seam Filter</filter-name>
<filter-class>org.jboss.seam.servlet.SeamFilter</filter-class>
Modified: branches/community/Seam_2_3/examples-ee6/seamdiscs/seamdiscs-web/src/main/webapp/artist.xhtml
===================================================================
--- branches/community/Seam_2_3/examples-ee6/seamdiscs/seamdiscs-web/src/main/webapp/artist.xhtml 2012-08-21 17:32:44 UTC (rev 15063)
+++ branches/community/Seam_2_3/examples-ee6/seamdiscs/seamdiscs-web/src/main/webapp/artist.xhtml 2012-08-22 13:47:21 UTC (rev 15064)
@@ -5,15 +5,12 @@
xmlns:ui="http://java.sun.com/jsf/facelets"
xmlns:f="http://java.sun.com/jsf/core"
xmlns:h="http://java.sun.com/jsf/html"
- xmlns:rich="http://richfaces.org/rich"
xmlns:tr="http://myfaces.apache.org/trinidad"
- xmlns:a="http://richfaces.org/a4j"
template="layout/template.xhtml">
<ui:define name="body">
- <rich:panel>
- <f:facet name="header"><tr:outputText value="#{artist.name} (#{messages[artist.class.name]})" rendered="#{artist.name ne null}" /></f:facet>
+ <tr:panelBox text="Artist" background="medium">
<h:form id="artist">
<s:validateAll>
<tr:panelFormLayout>
@@ -23,11 +20,6 @@
<tr:iterator value="#{artist.bandMembers}" var="bandMember">
<li>
<tr:inputText simple="true" value="#{bandMember.name}" readOnly="#{not identity.loggedIn}" id="bandMember"/>
- <rich:autocomplete for="bandMember" selfRendered="true" minChars="3" suggestionAction="#{bandMemberFinder.getBandMembers}" var="bandMember">
- <h:column>
- <h:outputText value="#{bandMember.name}" />
- </h:column>
- </rich:autocomplete>
</li>
</tr:iterator>
</ul>
@@ -37,7 +29,7 @@
</tr:panelLabelAndMessage>
<tr:panelLabelAndMessage label="Details">
<tr:inputText simple="true" value="#{artist.description}" rendered="#{identity.loggedIn}" rows="4" columns="60" id="description">
- <a:ajax event="keyup" render="description_preview" requestDelay="3000" ignoreDupResponces="true" eventsQueue="previewQueue" />
+ <f:ajax event="keyup" render="description_preview" requestDelay="3000" ignoreDupResponces="true" eventsQueue="previewQueue" />
</tr:inputText>
<s:div style="width: 300px" id="description_preview">
@@ -57,7 +49,7 @@
<f:facet name="header">
Released
</f:facet>
- <tr:inputNumberSpinbox label="Release Date" value="#{disc.release}" minimum="1900" maximum="2010" stepSize="1" readOnly="#{not identity.loggedIn}" />
+ <tr:inputNumberSpinbox label="Release Date" value="#{disc.release}" minimum="1900" maximum="2100" stepSize="1" readOnly="#{not identity.loggedIn}" columns="4" />
</tr:column>
<f:facet name="detailStamp">
<s:div style="width: 300px;">
@@ -79,7 +71,7 @@
<s:button action="cancel" value="Cancel" id="cancel"/>
</tr:panelButtonBar>
</h:form>
- </rich:panel>
+ </tr:panelBox>
</ui:define>
</ui:composition>
Modified: branches/community/Seam_2_3/examples-ee6/seamdiscs/seamdiscs-web/src/main/webapp/artists.xhtml
===================================================================
--- branches/community/Seam_2_3/examples-ee6/seamdiscs/seamdiscs-web/src/main/webapp/artists.xhtml 2012-08-21 17:32:44 UTC (rev 15063)
+++ branches/community/Seam_2_3/examples-ee6/seamdiscs/seamdiscs-web/src/main/webapp/artists.xhtml 2012-08-22 13:47:21 UTC (rev 15064)
@@ -5,28 +5,20 @@
xmlns:ui="http://java.sun.com/jsf/facelets"
xmlns:f="http://java.sun.com/jsf/core"
xmlns:h="http://java.sun.com/jsf/html"
- xmlns:rich="http://richfaces.org/rich"
- xmlns:a="http://richfaces.org/a4j"
xmlns:tr="http://myfaces.apache.org/trinidad"
template="layout/template.xhtml">
<ui:define name="body">
- <rich:panel>
- <f:facet name="header">Artists</f:facet>
+ <tr:panelBox text="Artists" background="medium">
<tr:form>
<tr:inputText value="#{exampleArtist.name}" label="Filter by artist name">
- <a:ajax render="artists" event="keyup" requestDelay="1" />
+ <f:ajax render="artists" event="keyup" requestDelay="1" />
</tr:inputText>
 
- <a:status>
- <f:facet name="start">
- <h:graphicImage value="/img/spinner.gif" />
- </f:facet>
- </a:status>
</tr:form>
- <a:outputPanel id="artists">
+ <h:panelGroup id="artists">
<tr:form>
<tr:table value="#{artists.dataModel}" var="artist"
rows="#{artists.maxResults}">
@@ -66,7 +58,7 @@
</f:facet>
</tr:table>
</tr:form>
- </a:outputPanel>
+ </h:panelGroup>
<tr:panelButtonBar rendered="#{identity.loggedIn}">
<s:button action="artist" value="Add artist" id="addArtist">
<f:param name="artistId" value="" />
@@ -77,7 +69,7 @@
<f:param name="type" value="band" />
</s:button>
</tr:panelButtonBar>
- </rich:panel>
+ </tr:panelBox>
</ui:define>
</ui:composition>
Modified: branches/community/Seam_2_3/examples-ee6/seamdiscs/seamdiscs-web/src/main/webapp/disc.xhtml
===================================================================
--- branches/community/Seam_2_3/examples-ee6/seamdiscs/seamdiscs-web/src/main/webapp/disc.xhtml 2012-08-21 17:32:44 UTC (rev 15063)
+++ branches/community/Seam_2_3/examples-ee6/seamdiscs/seamdiscs-web/src/main/webapp/disc.xhtml 2012-08-22 13:47:21 UTC (rev 15064)
@@ -5,25 +5,17 @@
xmlns:ui="http://java.sun.com/jsf/facelets"
xmlns:f="http://java.sun.com/jsf/core"
xmlns:h="http://java.sun.com/jsf/html"
- xmlns:rich="http://richfaces.org/rich"
xmlns:tr="http://myfaces.apache.org/trinidad"
- xmlns:a="http://richfaces.org/a4j"
template="layout/template.xhtml">
<ui:define name="body">
-
- <rich:panel>
- <f:facet name="header">
- <s:fragment rendered="#{disc.name ne null}">
- <i><tr:outputText value="#{disc.name}" /></i>
- <tr:outputText value=" by #{disc.artist.name}" />
- </s:fragment>
- </f:facet>
+
+ <tr:panelBox text="Disc" background="medium">
<tr:form id="disc">
<s:validateAll>
<tr:panelFormLayout>
<tr:inputText label="Disc" value="#{disc.name}" readOnly="#{not identity.loggedIn}" required="true" />
- <tr:inputNumberSpinbox label="Release Date" value="#{disc.release}" minimum="1900" maximum="2010" stepSize="1" readOnly="#{not identity.loggedIn}" />
+ <tr:inputNumberSpinbox label="Release Date" value="#{disc.release}" minimum="1900" maximum="2100" stepSize="1" readOnly="#{not identity.loggedIn}" columns="4"/>
<tr:selectOneChoice value="#{disc.artist}" label="Artist" required="true" readOnly="#{not identity.loggedIn}">
<s:selectItems value="#{allArtists.resultList}" var="artist" label="#{artist.name}" noSelectionLabel="Please Select..." hideNoSelectionLabel="true" />
<!--<s:convertEntity />-->
@@ -31,7 +23,7 @@
</tr:selectOneChoice>
<tr:panelLabelAndMessage label="Details">
<tr:inputText simple="true" value="#{disc.description}" rendered="#{identity.loggedIn}" rows="4" columns="60" id="description">
- <a:ajax event="keyup" render="description_preview" requestDelay="3000" ignoreDupResponces="true" eventsQueue="previewQueue" />
+ <f:ajax event="keyup" render="description_preview" requestDelay="3000" ignoreDupResponces="true" eventsQueue="previewQueue" />
</tr:inputText>
<s:div style="width: 300px;" id="description_preview">
<s:formattedText value="#{disc.description}" rendered="#{not empty disc.description}" />
@@ -48,7 +40,7 @@
<s:button action="cancel" value="Cancel" id="cancel"/>
</tr:panelButtonBar>
</tr:form>
- </rich:panel>
+ </tr:panelBox>
</ui:define>
</ui:composition>
Modified: branches/community/Seam_2_3/examples-ee6/seamdiscs/seamdiscs-web/src/main/webapp/discs.xhtml
===================================================================
--- branches/community/Seam_2_3/examples-ee6/seamdiscs/seamdiscs-web/src/main/webapp/discs.xhtml 2012-08-21 17:32:44 UTC (rev 15063)
+++ branches/community/Seam_2_3/examples-ee6/seamdiscs/seamdiscs-web/src/main/webapp/discs.xhtml 2012-08-22 13:47:21 UTC (rev 15064)
@@ -5,14 +5,12 @@
xmlns:ui="http://java.sun.com/jsf/facelets"
xmlns:f="http://java.sun.com/jsf/core"
xmlns:h="http://java.sun.com/jsf/html"
- xmlns:rich="http://richfaces.org/rich"
xmlns:tr="http://myfaces.apache.org/trinidad"
template="layout/template.xhtml">
<ui:define name="body">
-
- <rich:panel id="discs">
- <f:facet name="header">Discs</f:facet>
+
+ <tr:panelBox text="Discs" background="medium" id="discs">
<tr:form>
<tr:table value="#{discs.dataModel}" var="disc" rows="#{discs.maxResults}">
<tr:column sortable="true" sortProperty="disc.name">
@@ -43,7 +41,7 @@
</s:button>
</tr:panelButtonBar>
</tr:form>
- </rich:panel>
+ </tr:panelBox>
</ui:define>
</ui:composition>
Modified: branches/community/Seam_2_3/examples-ee6/seamdiscs/seamdiscs-web/src/main/webapp/home.xhtml
===================================================================
--- branches/community/Seam_2_3/examples-ee6/seamdiscs/seamdiscs-web/src/main/webapp/home.xhtml 2012-08-21 17:32:44 UTC (rev 15063)
+++ branches/community/Seam_2_3/examples-ee6/seamdiscs/seamdiscs-web/src/main/webapp/home.xhtml 2012-08-22 13:47:21 UTC (rev 15064)
@@ -5,14 +5,12 @@
xmlns:ui="http://java.sun.com/jsf/facelets"
xmlns:f="http://java.sun.com/jsf/core"
xmlns:h="http://java.sun.com/jsf/html"
- xmlns:rich="http://richfaces.org/rich"
xmlns:tr="http://myfaces.apache.org/trinidad"
template="layout/template.xhtml">
<ui:define name="body">
- <rich:panel>
- <f:facet name="header">Welcome to Seam Discs!</f:facet>
+ <tr:panelBox text="Welcome to Seam Discs!" background="medium">
<p>This application allows you to catalogue your favourite
bands, and albums they've released. It uses:</p>
@@ -28,12 +26,8 @@
the techniques used in creating this application.</p>
<p>You can log in as <code>administrator</code>/<code>administrator</code>.</p>
- </rich:panel>
- <rich:panel>
- <f:facet name="header">
- <tr:outputText value="Artists & Discs" />
- </f:facet>
-
+ </tr:panelBox>
+ <tr:panelBox text="Artists & Discs" background="medium">
<tr:form>
<tr:tree value="#{artistHome.tree}" var="var">
<f:facet name="nodeStamp">
@@ -51,8 +45,7 @@
</f:facet>
</tr:tree>
</tr:form>
-
- </rich:panel>
+ </tr:panelBox>
</ui:define>
</ui:composition>
Modified: branches/community/Seam_2_3/examples-ee6/seamdiscs/seamdiscs-web/src/main/webapp/layout/footer.xhtml
===================================================================
--- branches/community/Seam_2_3/examples-ee6/seamdiscs/seamdiscs-web/src/main/webapp/layout/footer.xhtml 2012-08-21 17:32:44 UTC (rev 15063)
+++ branches/community/Seam_2_3/examples-ee6/seamdiscs/seamdiscs-web/src/main/webapp/layout/footer.xhtml 2012-08-22 13:47:21 UTC (rev 15064)
@@ -1,424 +1,178 @@
<ui:composition xmlns="http://www.w3.org/1999/xhtml"
- xmlns:s="http://jboss.org/schema/seam/taglib"
xmlns:ui="http://java.sun.com/jsf/facelets"
- xmlns:f="http://java.sun.com/jsf/core"
xmlns:h="http://java.sun.com/jsf/html"
- xmlns:rich="http://richfaces.org/rich"
xmlns:tr="http://myfaces.apache.org/trinidad">
- <rich:popupPanel id="creating" width="450" height="250">
- <f:facet name="header">
- Creating SeamDiscs
- </f:facet>
- <f:facet name="controls">
- <a href="#" onclick="#{rich:component('creating')}.hide()">X</a>
- </f:facet>
- <p>This example was built using seam-gen. To add in Trinidad, the trinidad-api jar was added to
- the ear (and referenced from <a href="#" onclick="#{rich:component('applicationxml')}.show()">
- <code>application.xml</code></a>) and the trinidad-impl jar, <code>jboss-seam-trinidad.jar</code>
- (Seam-Trinidad integration) & <code>a4j-trinidad.jar</code> (RichFaces Ajax-Trinidad integration)
- were added to <code>WEB-INF/lib</code>.</p>
-
- <p>A few alterations were needed in <a href="#" onclick="#{rich:component('webxml')}.show()">
- <code>web.xml</code></a> and <a href="#" onclick="#{rich:component('facesconfigxml')}.show()">
- <code>faces-config.xml</code></a>.</p>
-
- <p>The <code>trinidad-config.xml</code> file was used to disable client-side validation for a
- more consistent user experience.</p>
-
- <p>Of course Trinidad and RichFaces offer some complementary components (e.g. tables, trees)
- - it's up to you which you choose!</p>
- </rich:popupPanel>
-
- <rich:popupPanel id="webxml" width="450" height="500" left="50">
- <f:facet name="header">
- <code>web.xml</code>
- </f:facet>
- <f:facet name="controls">
- <a href="#" onclick="#{rich:component('webxml')}.hide()">X</a>
- </f:facet>
- <pre style="height: 420px;" class="source-code"><code>
-<context-param>
- <param-name>
- org.apache.myfaces.trinidad.ALTERNATE_VIEW_HANDLER
- </param-name>
- <param-value>
- com.sun.facelets.FaceletViewHandler
- </param-value>
-</context-param>
-
-<filter>
- <filter-name>Trinidad</filter-name>
- <filter-class>
- org.apache.myfaces.trinidad.webapp.TrinidadFilter
- </filter-class>
-</filter>
-
-<filter-mapping>
- <filter-name>Trinidad</filter-name>
- <url-pattern>*.seam</url-pattern>
-</filter-mapping>
-
-<servlet>
- <servlet-name>Trinidad Resources</servlet-name>
- <servlet-class>
- org.apache.myfaces.trinidad.webapp.ResourceServlet
- </servlet-class>
-</servlet>
-
-<servlet-mapping>
- <servlet-name>Trinidad Resources</servlet-name>
- <url-pattern>/adf/*</url-pattern>
-</servlet-mapping></code></pre>
- </rich:popupPanel>
-
- <rich:popupPanel id="facesconfigxml" width="450" height="300" left="50">
- <f:facet name="header">
- <code>faces-config.xml</code>
- </f:facet>
- <f:facet name="controls">
- <a href="#" onclick="#{rich:component('facesconfigxml')}.hide()">X</a>
- </f:facet>
- <pre class="source-code"><code>
-<application>
- <!-- Disabled when using RichFaces or Trinidad -->
- <!--
- <view-handler>
- com.sun.facelets.FaceletViewHandler
- </view-handler>
- -->
- <!-- Enable Trinidad renderkit -->
- <default-render-kit-id>
- org.apache.myfaces.trinidad.core
- </default-render-kit-id>
-</application></code></pre>
- </rich:popupPanel>
-
- <rich:popupPanel id="applicationxml" width="450" height="200" left="50">
- <f:facet name="header">
- <code>application.xml</code>
- </f:facet>
- <f:facet name="controls">
- <a href="#" onclick="#{rich:component('applicationxml')}.hide()">X</a>
- </f:facet>
- <pre class="source-code"><code>
-<module>
- <java>trinidad-api-2.0.1.jar</java>
-</module></code></pre>
- </rich:popupPanel>
-
- <rich:popupPanel id="ajax" width="450" height="370">
- <f:facet name="header">
- RichFaces Ajax and Trinidad
- </f:facet>
- <f:facet name="controls">
- <a href="#" onclick="#{rich:component('ajax')}.hide()">X</a>
- </f:facet>
- <p>Trinidad and RichFaces Ajax both provide partial page refresh and submit.</p>
- <p>
- If you want to use RichFaces' partial page refresh with Trinidad
- components then you'll need to disable Trinidad's compressed style
- keys:
- </p>
- <pre class="source-code"><code><context-param>
- <param-name>
- org.apache.myfaces.trinidadinternal.DISABLE_CONTENT_COMPRESSION
- </param-name>
- <param-value>true</param-value>
-</context-param></code></pre>
- </rich:popupPanel>
-
- <rich:popupPanel id="inplace" width="450" height="300">
- <f:facet name="header">
- Inplace editing
- </f:facet>
- <f:facet name="controls">
- <a href="#" onclick="#{rich:component('inplace')}.hide()">X</a>
- </f:facet>
- <p>The example also shows how you can use Trinidad components to achieve "in-place" editing - the same views are used to display and edit
- informtation. A casual visitor to the site navigates around, and see's the components in read only mode; once logged in,
- these components are editable, and button's are rendered to submit information.</p>
-
- <pre class="source-code"><code>
-<tr:inputText
- label="Artist"
- value="#<span>{artist.name}</span>"
- readOnly="#<span>{not identity.loggedIn}</span>"
- required="true"
- autoSubmit="true"/></code></pre>
-
- <p>Trinidad makes it easy by providing a <code>readOnly</code> attribute for components - but you could easily achieve the
- same using Seam's <code><s:decorate /></code> tag.</p>
- </rich:popupPanel>
-
- <rich:popupPanel id="framework" width="450" height="250">
- <f:facet name="header">
- Seam Application Framework
- </f:facet>
- <f:facet name="controls">
- <a href="#" onclick="#{rich:component('framework')}.hide()">X</a>
- </f:facet>
- <p>The example uses the Seam Application Framework. Where possible XML is used,
- using extension only where extra functionality is needed.</p>
-
- <p>An <a href="#" onclick="#{rich:component('componentsxml')}.show()"><code>EntityHome</code></a>
- and is used for each CRUD, and an
- <a href="#" onclick="#{rich:component('componentsxml')}.show()"><code>EntityQuery</code></a>
- for clickable lists.</p>
-
- <p>If you extend <code>EntityHome</code> you can make the component an
- EJB3 stateful session bean by adding <code>@Stateful</code> and a local
- interface. You'll need to declare methods like <code>persist()</code>
- and <code>isManaged()</code> from <code>EntityHome</code> on the
- interface. The <code>ArtistHome</code> is a stateful session bean in
- this example.</p>
-
- <p>Each item in the list can be clicked - an <code><s:link /></code> and an
- <code><f:param /></code> is used to <a href="#" onclick="#{rich:component('clickablelist')}.show()">link</a>
- to the detail view. It's wired using <a href="#" onclick="#{rich:component('clickablelist')}.show()"><code>pages.xml</code></a>.
- </p>
-
- <p>The CRUD page uses the <code>EntityHome</code> object to <a href="#" onclick="#{rich:component('crud')}.show()">create, update or
- delete</a> the entity as necessary. <a href="#" onclick="#{rich:component('crud')}.show()"><code>pages.xml</code></a>
- is used to direct the user back to the list view.</p>
- </rich:popupPanel>
-
- <rich:popupPanel id="clickablelist" width="450" height="350" left="50">
- <f:facet name="header">
- <code>Clickable lists</code>
- </f:facet>
- <f:facet name="controls">
- <a href="#" onclick="#{rich:component('clickablelist')}.hide()">X</a>
- </f:facet>
- <pre class="source-code"><code>
-<s:link action="artist">
- <tr:outputText value="#<span>{artist.name}</span>" />
- <f:param name="artistId" value="#<span>{artist.id}</span>" />
-</s:link></code></pre>
- <pre class="source-code"><code>
-<page>
- <param name="artistId" value="#<span>{artistHome.id}</span>"
- converterId="javax.faces.Integer"/>
- <navigation>
- <rule if-outcome="artist">
- <begin-conversation flush-mode="manual"/>
- <redirect view-id="/artist.xhtml"/>
- </rule>
- </navigation>
-</page></code></pre>
- </rich:popupPanel>
-
- <rich:popupPanel id="componentsxml" width="450" height="330" left="50">
- <f:facet name="header">
- <code>components.xml</code>
- </f:facet>
- <f:facet name="controls">
- <a href="#" onclick="#{rich:component('componentsxml')}.hide()">X</a>
- </f:facet>
-
- <pre class="source-code"><code>
-<framework:entity-home
- entity-class="org.jboss.seam.example.seamdiscs.model.Disc"
- name="discHome"/>
-<factory
- name="disc"
- value="#<span>{discHome.instance}</span>"/></code></pre>
+ <script type="text/javascript">
+ //<![CDATA[
+ var ID;
- <pre class="source-code"><code>
-<framework:entity-query
- name="discs"
- ejbql="select disc from Disc disc"
- order="disc.name ASC"
- max-results="5"/></code></pre>
-
- </rich:popupPanel>
-
- <rich:popupPanel id="crud" width="450" height="480" left="50">
- <f:facet name="header">
- <code>CRUD</code>
- </f:facet>
- <f:facet name="controls">
- <a href="#" onclick="#{rich:component('crud')}.hide()">X</a>
- </f:facet>
-
- <pre class="source-code"><code>
-<h:commandButton action="#<span>{artistHome.update}</span>"
- value="Save" rendered="#<span>{artistHome.managed}</span>" />
-<h:commandButton action="#<span>{artistHome.persist}</span>"
- value="Save" rendered="#<span>{not artistHome.managed}</span>" />
-<s:button action="cancel" value="Cancel" /></code></pre>
+ function popup(id){
+ $("#opaque").toggle();
+ $("#" + id).toggle();
+ ID = id;
+ }
- <pre class="source-code"><code>
-<page>
- <param name="artistId" value="#<span>{artistHome.id}</span>"
- converterId="javax.faces.Integer"/>
- <navigation>
- <rule if-outcome="cancel">
- <end-conversation/>
- <redirect view-id="/artists.xhtml" />
- </rule>
- <rule if-outcome="updated">
- <end-conversation/>
- <redirect view-id="/artists.xhtml" />
- </rule>
- <rule if-outcome="persisted">
- <end-conversation/>
- <redirect view-id="/artists.xhtml" />
- </rule>
- </navigation>
-</page></code></pre>
- </rich:popupPanel>
-
- <rich:popupPanel id="tree" width="450" height="250">
- <f:facet name="header">
- Using Trinidad's Tree
- </f:facet>
- <f:facet name="controls">
- <a href="#" onclick="#{rich:component('tree')}.hide()">X</a>
- </f:facet>
- <p>It's been said that the quality of a tree component is an indication of
- the quality of a component set. Trinidad has a really robust tree component,
- - but it's <code>TreeModel</code> can be a bit confusing. Luckily it provides
- a good default implementation - the <code>ChildPropertyTreeModel</code>.</p>
-
- <p>The <code>ChildPropertyTreeModel</code> takes two parameters - the <code>Collection</code>
- to use for the tree's nodes, and a <code>String</code> property which specifies
- the field or get/set pair to use for accessing each elements child. If the property
- returns <code>null</code>, then the node is a leaf-node.</p>
-
- <p>The example uses a slightly modified
- <a href="#" onclick="#{rich:component('treecode')}.show()"><code>ChildPropertyTreeModel</code></a>
- - one that says discs are the leaves of the tree.
- <a href="#" onclick="#{rich:component('treecode')}.show()">Different labels</a> are
- rendered depending on the type of node.
- </p>
-
- </rich:popupPanel>
+ $(document).ready(function() {
+ $(".closeButton").append('[<a href="#" onclick="popup(ID)">close</a>]');
+ });
+ //]]>
+ </script>
- <rich:popupPanel id="treecode" width="450" height="500" left="50">
- <f:facet name="header">
- <code>Tree</code>
- </f:facet>
- <f:facet name="controls">
- <a href="#" onclick="#{rich:component('treecode')}.hide()">X</a>
- </f:facet>
-
- <pre class="source-code"><code>
-public TreeModel getTree() {
- return new ChildPropertyTreeModel(artists, "discs") {
- protected Object getChildData(Object parentData) {
- if (parentData instanceof Artist) {
- return super.getChildData(parentData);
- } else {
- return null;
- }
- }
- };
-}</code></pre>
-
- <pre class="source-code"><code>
-<tr:tree value="#<span>{artistHome.tree}</span>" var="var">
- <f:facet name="nodeStamp">
- <ui:fragment>
- <s:link
- action="artist"
- rendered="#<span>{var.class.simpleName eq 'Artist'
- or var.class.simpleName eq 'Band'}</span>">
- <tr:outputText value="#<span>{var.name}</span>" />
- <f:param name="artistId" value="#<span>{var.id}</span>" />
- </s:link>
- </ui:fragment>
- </f:facet>
-</tr:tree></code></pre>
-
- </rich:popupPanel>
-
- <rich:popupPanel id="skinning" width="450" height="180">
- <f:facet name="header">
- Look and Feel
- </f:facet>
- <f:facet name="controls">
- <a href="#" onclick="#{rich:component('skinning')}.hide()">X</a>
- </f:facet>
- <p>Both Trinidad and RichFaces have powerful and mature skinning/theming APIs
- - so you all you need to do is write some CSS! For seamdiscs, we took a RichFaces
- skin, and adjusted the trinidad skin to fit with it. To do this, we added
- the skin to <code>trinidad-skins.xml</code>, and told Trinidad to use it in
- <code>trinidad-config.xml</code>. You can find more information about Trinidad
- skinning on the Trinidad wiki.</p>
- <p>You'll notice that Trinidad and RichFaces components don't provide
- a consistent look-and-feel out of the box - there are plans afoot to improve this!</p>
- </rich:popupPanel>
-
- <rich:popupPanel id="datamodel" width="450" height="500">
- <f:facet name="header">
- Enhanced <code>DataModel</code>
- </f:facet>
- <f:facet name="controls">
- <a href="#" onclick="#{rich:component('datamodel')}.hide()">X</a>
- </f:facet>
- <p>JSF component sets like Trinidad, Tomahawk and IceFaces give you an enhanced
- <code>h:dataTable</code> which has built-in sorting, paging and other goodies.
- However, there is one big flaw - the entire data set is loaded and sorted/paged
- in memory, when really you want to get your persistence layer (be it an ORM or
- just a database) to do this for - a sort translates naturally to an <code>ORDER BY</code>,
- and paging translates naturally to a <code>LIMIT</code> clauses.</p>
+ <div id="opaque" onclick="popup(ID)"></div>
- <p>Seam on the other hand provides tight integration to your persistence layer,
- and supports paging and sorting of queries through the <code>Query</code>
- object in the Seam Application Framework - but you have to write a load more JSF
- to get it integrated. We can get the best of both worlds by using the enhanced
- <code>DataModel</code> in Trinidad, which supports paging and sorting backed by
- a <code>Query</code>.</p>
+ <div id="footer">
+ <div class="left">
+ <h:outputText value="Powered by "/><a href="http://www.seamframework.org">Seam</a>
- <p>The <code>jboss-seam-trinidad.jar</code> (built using the build file in the
- <code>trinidad</code> directory in Seam CVS) provides a <code>DataModel</code>
- which, when backed by a <code>Query</code>, provides lazy loading of data for
- paging, sorting in the persistence context and strong row keys. You can use
- it by adding the <code>jboss-seam-trinidad.jar</code> to your <code>WEB-INF/lib</code>
- - no need to alter your facelet. One caveat is that you must ensure the rows property
- on the <code>Query</code> is the same as the <code>maxResults</code> property on
- the <code>Query</code>. Take a look at the seamdiscs example in the
- <code>trinidad/examples</code> directory to see it in action.</p>
- <pre class="source-code"><code>
-<tr:table
- value="#<span>{discs.dataModel}</span>"
- rows="#<span>{discs.maxResults}</span>">
+ <span class="separator">•</span>
+ <a onclick="popup('creating')" href="#">Creating Seamdiscs</a>
+
+ <span class="separator">•</span>
+ <a onclick="popup('inplace')" href="#">Inplace editing</a>
+
+ <span class="separator">•</span>
+ <a onclick="popup('framework')" href="#">Seam Application Framework</a>
+
+ <span class="separator">•</span>
+ <a onclick="popup('tree')" href="#">Using Trinidad's Tree</a>
+
+ <span class="separator">•</span>
+ <a onclick="popup('skinning')" href="#">Look and Feel</a>
+
+ <span class="separator">•</span>
+ <a onclick="popup('datamodel')" href="#">Enhanced DataModel</a>
+ </div>
+ <div class="right">
+ <h:outputText value="Generated by seam-gen"/>
+ </div>
+ </div>
+
+ <div class="popupContainer">
+ <tr:panelBox background="medium" text="Creating Seamdiscs" styleClass="popup" id="creating">
+ <p>This example was built using seam-gen. To add in Trinidad, the trinidad-api jar was added to
+ the ear (and referenced from <code>application.xml</code>) and the trinidad-impl jar,
+ <code>jboss-seam-trinidad.jar</code> (Seam-Trinidad integration) & <code>a4j-trinidad.jar</code>
+ (RichFaces Ajax-Trinidad integration) were added to <code>WEB-INF/lib</code>.</p>
+
+ <p>A few alterations were needed in <code>web.xml</code> and <code>faces-config.xml</code>.</p>
+
+ <p>The <code>trinidad-config.xml</code> file was used to disable client-side validation for a
+ more consistent user experience.</p>
+
+ <p>Of course Trinidad and RichFaces offer some complementary components (e.g. tables, trees)
+ - it's up to you which you choose!</p>
+
+ <div class="closeButton"></div>
+ </tr:panelBox>
+
+ <tr:panelBox background="medium" text="Inplace editing" styleClass="popup" id="inplace">
+ <p>The example also shows how you can use Trinidad components to achieve "in-place" editing - the same views are used to display and edit
+ informtation. A casual visitor to the site navigates around, and see's the components in read only mode; once logged in,
+ these components are editable, and button's are rendered to submit information.</p>
+
+ <pre class="source-code"><code><tr:inputText label="Artist"
+ value="#<span>{artist.name}</span>"
+ readOnly="#<span>{not identity.loggedIn}</span>"
+ required="true"
+ autoSubmit="true"/></code></pre>
+
+ <p>Trinidad makes it easy by providing a <code>readOnly</code> attribute for components - but you could easily achieve the
+ same using Seam's <code><s:decorate /></code> tag.</p>
+
+ <div class="closeButton"></div>
+ </tr:panelBox>
+
+ <tr:panelBox background="medium" text="Seam Application Framework" styleClass="popup" id="framework">
+ <p>The example uses the Seam Application Framework. Where possible XML is used,
+ using extension only where extra functionality is needed.</p>
+
+ <p>An <code>EntityHome</code> and is used for each CRUD, and an <code>EntityQuery</code>
+ for clickable lists.</p>
+
+ <p>If you extend <code>EntityHome</code> you can make the component an
+ EJB3 stateful session bean by adding <code>@Stateful</code> and a local
+ interface. You'll need to declare methods like <code>persist()</code>
+ and <code>isManaged()</code> from <code>EntityHome</code> on the
+ interface. The <code>ArtistHome</code> is a stateful session bean in
+ this example.</p>
+
+ <p>Each item in the list can be clicked - an <code><s:link /></code> and an
+ <code><f:param /></code> is used to link to the detail view.
+ It's wired using <code>pages.xml</code>.
+ </p>
+
+ <p>The CRUD page uses the <code>EntityHome</code> object to create, update or
+ delete the entity as necessary. <code>pages.xml</code>
+ is used to direct the user back to the list view.</p>
+
+ <div class="closeButton"></div>
+ </tr:panelBox>
+
+ <tr:panelBox background="medium" text="Using Trinidad's Tree" styleClass="popup" id="tree">
+ <p>It's been said that the quality of a tree component is an indication of
+ the quality of a component set. Trinidad has a really robust tree component,
+ - but it's <code>TreeModel</code> can be a bit confusing. Luckily it provides
+ a good default implementation - the <code>ChildPropertyTreeModel</code>.</p>
+
+ <p>The <code>ChildPropertyTreeModel</code> takes two parameters - the <code>Collection</code>
+ to use for the tree's nodes, and a <code>String</code> property which specifies
+ the field or get/set pair to use for accessing each elements child. If the property
+ returns <code>null</code>, then the node is a leaf-node.</p>
+
+ <p>The example uses a slightly modified <code>ChildPropertyTreeModel</code>
+ - one that says discs are the leaves of the tree. Different labels are
+ rendered depending on the type of node.
+ </p>
+
+ <div class="closeButton"></div>
+ </tr:panelBox>
+
+ <tr:panelBox background="medium" text="Look and Feel" styleClass="popup" id="skinning">
+ <p>Both Trinidad and RichFaces have powerful and mature skinning/theming APIs
+ - so you all you need to do is write some CSS! For seamdiscs, we took a RichFaces
+ skin, and adjusted the trinidad skin to fit with it. To do this, we added
+ the skin to <code>trinidad-skins.xml</code>, and told Trinidad to use it in
+ <code>trinidad-config.xml</code>. You can find more information about Trinidad
+ skinning on the Trinidad wiki.</p>
+ <p>You'll notice that Trinidad and RichFaces components don't provide
+ a consistent look-and-feel out of the box - there are plans afoot to improve this!</p>
+
+ <div class="closeButton"></div>
+ </tr:panelBox>
+
+ <tr:panelBox background="medium" text="Enhanced DataModel" styleClass="popup" id="datamodel">
+ <p>JSF component sets like Trinidad, Tomahawk and IceFaces give you an enhanced
+ <code>h:dataTable</code> which has built-in sorting, paging and other goodies.
+ However, there is one big flaw - the entire data set is loaded and sorted/paged
+ in memory, when really you want to get your persistence layer (be it an ORM or
+ just a database) to do this for - a sort translates naturally to an <code>ORDER BY</code>,
+ and paging translates naturally to a <code>LIMIT</code> clauses.</p>
+
+ <p>Seam on the other hand provides tight integration to your persistence layer,
+ and supports paging and sorting of queries through the <code>Query</code>
+ object in the Seam Application Framework - but you have to write a load more JSF
+ to get it integrated. We can get the best of both worlds by using the enhanced
+ <code>DataModel</code> in Trinidad, which supports paging and sorting backed by
+ a <code>Query</code>.</p>
+
+ <p>The <code>jboss-seam-trinidad.jar</code> (built using the build file in the
+ <code>trinidad</code> directory in Seam CVS) provides a <code>DataModel</code>
+ which, when backed by a <code>Query</code>, provides lazy loading of data for
+ paging, sorting in the persistence context and strong row keys. You can use
+ it by adding the <code>jboss-seam-trinidad.jar</code> to your <code>WEB-INF/lib</code>
+ - no need to alter your facelet. One caveat is that you must ensure the rows property
+ on the <code>Query</code> is the same as the <code>maxResults</code> property on
+ the <code>Query</code>. Take a look at the seamdiscs example in the
+ <code>trinidad/examples</code> directory to see it in action.</p>
+ <pre class="source-code"><code>
+<tr:table value="#<span>{discs.dataModel}</span>" rows="#<span>{discs.maxResults}</span>">
<tr:column>
- ...
+ ...
</tr:column
</tr:table></code></pre>
- </rich:popupPanel>
- <rich:toolbar itemSeparator="square">
- <rich:toolbarGroup>
- Powered by <a href="http://labs.jboss.com/jbossseam">Seam</a>
- </rich:toolbarGroup>
- <rich:toolbarGroup itemSeparator="square">
- <s:fragment>
- <a href="#" onclick="#{rich:component('creating')}.show()">Creating SeamDiscs</a>
- </s:fragment>
- <s:fragment>
- <a href="#" onclick="#{rich:component('ajax')}.show()">RichFaces Ajax and Trinidad</a>
- </s:fragment>
- <s:fragment>
- <a href="#" onclick="#{rich:component('inplace')}.show()">Inplace Editing</a>
- </s:fragment>
- <s:fragment>
- <a href="#" onclick="#{rich:component('framework')}.show()">Seam Application Framework</a>
- </s:fragment>
- <s:fragment>
- <a href="#" onclick="#{rich:component('skinning')}.show()">Look and Feel</a>
- </s:fragment>
- <s:fragment>
- <a href="#" onclick="#{rich:component('datamodel')}.show()">Enhanced DataModel</a>
- </s:fragment>
- <s:fragment>
- <a href="#" onclick="#{rich:component('tree')}.show()">Tree Component</a>
- </s:fragment>
- </rich:toolbarGroup>
- <rich:toolbarGroup location="right">
- Generated by seam-gen.
- </rich:toolbarGroup>
- </rich:toolbar>
-</ui:composition>
\ No newline at end of file
+ <div class="closeButton"></div>
+ </tr:panelBox>
+ </div>
+</ui:composition>
Modified: branches/community/Seam_2_3/examples-ee6/seamdiscs/seamdiscs-web/src/main/webapp/layout/menu.xhtml
===================================================================
--- branches/community/Seam_2_3/examples-ee6/seamdiscs/seamdiscs-web/src/main/webapp/layout/menu.xhtml 2012-08-21 17:32:44 UTC (rev 15063)
+++ branches/community/Seam_2_3/examples-ee6/seamdiscs/seamdiscs-web/src/main/webapp/layout/menu.xhtml 2012-08-22 13:47:21 UTC (rev 15064)
@@ -1,20 +1,22 @@
-<rich:toolbar
- xmlns="http://www.w3.org/1999/xhtml"
- xmlns:ui="http://java.sun.com/jsf/facelets"
- xmlns:h="http://java.sun.com/jsf/html"
- xmlns:f="http://java.sun.com/jsf/core"
- xmlns:s="http://jboss.org/schema/seam/taglib"
- xmlns:rich="http://richfaces.org/rich"
- itemSeparator="line">
- <rich:toolbarGroup>
+<ui:composition
+ xmlns="http://www.w3.org/1999/xhtml"
+ xmlns:ui="http://java.sun.com/jsf/facelets"
+ xmlns:h="http://java.sun.com/jsf/html"
+ xmlns:f="http://java.sun.com/jsf/core"
+ xmlns:s="http://jboss.org/schema/seam/taglib">
+
+ <div id="navigation">
+ <div class="left">
<h:outputText value="#{projectName}:"/>
<s:link view="/home.xhtml" value="Home" propagation="none"/>
<s:link view="/artists.xhtml" id="manageArtists" value="Artists" propagation="none"/>
<s:link view="/discs.xhtml" id="manageDiscs" value="Discs" propagation="none"/>
- </rich:toolbarGroup>
- <rich:toolbarGroup location="right">
+ </div>
+ <div class="right">
<h:outputText value="Welcome, #{identity.username}" rendered="#{identity.loggedIn}"/>
<s:link view="/login.xhtml" id="loginlink" value="Login" rendered="#{not identity.loggedIn}"/>
- <s:link view="/home.xhtml" id="logout" action="#{identity.logout}" value="Logout" rendered="#{identity.loggedIn}"/>
- </rich:toolbarGroup>
-</rich:toolbar>
+ <s:link view="/home.xhtml" id="logout" action="#{identity.logout}" value="Logout"
+ rendered="#{identity.loggedIn}"/>
+ </div>
+ </div>
+</ui:composition>
Modified: branches/community/Seam_2_3/examples-ee6/seamdiscs/seamdiscs-web/src/main/webapp/layout/template.xhtml
===================================================================
--- branches/community/Seam_2_3/examples-ee6/seamdiscs/seamdiscs-web/src/main/webapp/layout/template.xhtml 2012-08-21 17:32:44 UTC (rev 15063)
+++ branches/community/Seam_2_3/examples-ee6/seamdiscs/seamdiscs-web/src/main/webapp/layout/template.xhtml 2012-08-22 13:47:21 UTC (rev 15064)
@@ -6,13 +6,13 @@
xmlns:f="http://java.sun.com/jsf/core"
xmlns:s="http://jboss.org/schema/seam/taglib"
xmlns:trh="http://myfaces.apache.org/trinidad/html"
- xmlns:tr="http://myfaces.apache.org/trinidad"
- xmlns:rich="http://richfaces.org/rich">
+ xmlns:tr="http://myfaces.apache.org/trinidad">
<h:head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>SeamDiscs</title>
<link href="stylesheet/theme.css" rel="stylesheet" type="text/css" />
<trh:styleSheet />
+ <script type="text/javascript" src="//ajax.googleapis.com/ajax/libs/jquery/1.8.0/jquery.min.js"></script>
</h:head>
<body>
Modified: branches/community/Seam_2_3/examples-ee6/seamdiscs/seamdiscs-web/src/main/webapp/login.xhtml
===================================================================
--- branches/community/Seam_2_3/examples-ee6/seamdiscs/seamdiscs-web/src/main/webapp/login.xhtml 2012-08-21 17:32:44 UTC (rev 15063)
+++ branches/community/Seam_2_3/examples-ee6/seamdiscs/seamdiscs-web/src/main/webapp/login.xhtml 2012-08-22 13:47:21 UTC (rev 15064)
@@ -5,16 +5,14 @@
xmlns:ui="http://java.sun.com/jsf/facelets"
xmlns:f="http://java.sun.com/jsf/core"
xmlns:h="http://java.sun.com/jsf/html"
- xmlns:rich="http://richfaces.org/rich"
+ xmlns:tr="http://myfaces.apache.org/trinidad"
template="layout/template.xhtml">
<ui:define name="body">
<h:form id="login">
-
- <rich:panel>
- <f:facet name="header">Login</f:facet>
-
+
+ <tr:panelBox text="Login" background="medium">
<p>You can log in as administrator/administrator</p>
<div class="dialog">
@@ -31,7 +29,7 @@
</h:panelGrid>
</div>
- </rich:panel>
+ </tr:panelBox>
<div class="actionButtons">
<h:commandButton value="Login" id="loginbutton" action="#{identity.login}"/>
Modified: branches/community/Seam_2_3/examples-ee6/seamdiscs/seamdiscs-web/src/main/webapp/stylesheet/skin.css
===================================================================
--- branches/community/Seam_2_3/examples-ee6/seamdiscs/seamdiscs-web/src/main/webapp/stylesheet/skin.css 2012-08-21 17:32:44 UTC (rev 15063)
+++ branches/community/Seam_2_3/examples-ee6/seamdiscs/seamdiscs-web/src/main/webapp/stylesheet/skin.css 2012-08-22 13:47:21 UTC (rev 15064)
@@ -1,7 +1,15 @@
-af|column::header-text {color: white}
-af|showDetailHeader::level-one {color: grey}
-.AFDarkForeground:alias {color: grey}
+af|column::header-text {
+ color: white
+}
+af|showDetailHeader::level-one {
+ color: grey
+}
+
+.AFDarkForeground:alias {
+ color: grey
+}
+
.source-code {
font-family: Andale Mono, Lucida Console, Monaco, fixed, monospace;
color: #000000;
@@ -11,5 +19,25 @@
line-height: 14px;
padding: 5px;
overflow: auto;
- width: 420px;
+ width: 580px;
+}
+
+af|panelBox::body {
+ font-size: 11px;
+ width: 100%;
+}
+
+af|panelBox::header {
+ background-color: #BED6F8;
+ color: black;
+ font-weight: bold;
+ padding: 5px 10px;
+}
+
+af|panelBox::content {
+ background-color: white;
+ border-width: 1px;
+ border-color: #BED6F8;
+ border-style: solid;
+ padding: 10px;
}
\ No newline at end of file
Modified: branches/community/Seam_2_3/examples-ee6/seamdiscs/seamdiscs-web/src/main/webapp/stylesheet/theme.css
===================================================================
--- branches/community/Seam_2_3/examples-ee6/seamdiscs/seamdiscs-web/src/main/webapp/stylesheet/theme.css 2012-08-21 17:32:44 UTC (rev 15063)
+++ branches/community/Seam_2_3/examples-ee6/seamdiscs/seamdiscs-web/src/main/webapp/stylesheet/theme.css 2012-08-22 13:47:21 UTC (rev 15064)
@@ -1,289 +1,409 @@
a:active, a:link, a:visited {
- color: #0D5798;
+ color: #0D5798;
}
+
a:hover {
- color: #8CAFCD;
+ color: #8CAFCD;
}
input, textarea {
- border: 1px solid #BBBBBB;
- font-size: 10px;
- background: #F0F8FF;
- color: black;
+ border: 1px solid #BBBBBB;
+ font-size: 10px;
+ background: #F0F8FF;
+ color: black;
}
input[type='submit'], input[type='button'] {
- background: #4477AA;
- color: white;
- margin: 5px;
- border-color: gray;
+ background: #4477AA;
+ color: white;
+ margin: 5px;
+ border-color: gray;
}
.tableControl, .actionButtons {
- width: 100%;
+ width: 100%;
}
.tableControl {
- text-align: right;
+ text-align: right;
}
.footer {
- text-align: center;
- font-size: 10px;
+ text-align: center;
+ font-size: 10px;
}
.rich-table {
- width:100%;
+ width: 100%;
}
h1 {
- font-family: Arial,sans-serif;
- color: #578BB8;
- font-size: 1.6em;
- margin-top: 0;
+ font-family: Arial, sans-serif;
+ color: #578BB8;
+ font-size: 1.6em;
+ margin-top: 0;
}
body {
- margin: 0px;
- font-family: Arial,sans-serif;
- color: #616161;
+ margin: 0px;
+ font-family: Arial, sans-serif;
+ color: #616161;
}
.body {
- padding: 30px;
+ padding: 30px;
}
-.columnHeader:hover
-{
- color: #FF6600;
+.columnHeader:hover {
+ color: #FF6600;
}
.message {
- border: 1px solid #FFCC00;
- padding: 5px;
- margin-top: 5px;
- margin-bottom: 5px;
- background-color: #F0F8FF;
- font-size: 12px;
+ border: 1px solid #FFCC00;
+ padding: 5px;
+ margin-top: 5px;
+ margin-bottom: 5px;
+ background-color: #F0F8FF;
+ font-size: 12px;
}
.name {
- vertical-align: top;
- font-weight: bold;
- width: 115px;
- float: left;
- padding: 5px;
- margin-top: 3px;
- clear: left;
+ vertical-align: top;
+ font-weight: bold;
+ width: 115px;
+ float: left;
+ padding: 5px;
+ margin-top: 3px;
+ clear: left;
}
+
.value {
- float: left;
- padding: 5px;
+ float: left;
+ padding: 5px;
}
+
.error {
- margin-left: 20px;
- margin-top: 5px;
- float: left;
- padding: 5px;
- border: 1px solid red;
+ margin-left: 20px;
+ margin-top: 5px;
+ float: left;
+ padding: 5px;
+ border: 1px solid red;
}
.errors {
- color: red;
+ color: red;
}
+
.errors input {
- border: 1px solid red;
+ border: 1px solid red;
}
+
.errors textarea {
- border: 1px solid red;
+ border: 1px solid red;
}
+
.required {
- color: red;
- padding-left: 2px;
+ color: red;
+ padding-left: 2px;
}
/* date picker style */
-div.seam-date
-{
- margin-top: 5px;
- border: 1px solid #AAAAAA;
- background-color: #FFFFFF;
- color: #505050;
- font-family: Tahoma, Arial, Helvetica, sans-serif;
- font-size: 12px;
+div.seam-date {
+ margin-top: 5px;
+ border: 1px solid #AAAAAA;
+ background-color: #FFFFFF;
+ color: #505050;
+ font-family: Tahoma, Arial, Helvetica, sans-serif;
+ font-size: 12px;
}
table.seam-date td {
- font-family: Tahoma, Arial, Helvetica, sans-serif;
- font-weight: 12px;
+ font-family: Tahoma, Arial, Helvetica, sans-serif;
+ font-weight: 12px;
}
-.seam-date-monthNames
-{
- width: 70px;
- border: 1px solid #dddddd;
- border-right: 3px solid #444444;
- border-bottom: 3px solid #444444;
- background-color: #ffffff;
- font-size: 12px;
- cursor: pointer;
- font-family: Tahoma, Arial, Helvetica, sans-serif;
- font-weight: normal;
+.seam-date-monthNames {
+ width: 70px;
+ border: 1px solid #dddddd;
+ border-right: 3px solid #444444;
+ border-bottom: 3px solid #444444;
+ background-color: #ffffff;
+ font-size: 12px;
+ cursor: pointer;
+ font-family: Tahoma, Arial, Helvetica, sans-serif;
+ font-weight: normal;
}
-a.seam-date-monthNameLink, a.seam-date-monthNameLink:visited
-{
- text-align: center;
- display: block;
- color: #555555;
+a.seam-date-monthNameLink, a.seam-date-monthNameLink:visited {
+ text-align: center;
+ display: block;
+ color: #555555;
}
-a.seam-date-monthNameLink:hover
-{
- background-color: #CCCCCC;
- color: red;
+a.seam-date-monthNameLink:hover {
+ background-color: #CCCCCC;
+ color: red;
}
-.seam-date-years
-{
- height: 10em;
- overflow: auto;
- width: 60px;
- border: 1px solid #dddddd;
- border-right: 3px solid #444444;
- border-bottom: 3px solid #444444;
- background-color: #ffffff;
- font-size: 12px;
- cursor: pointer;
- font-family: Tahoma, Arial, Helvetica, sans-serif;
- font-weight: normal;
+.seam-date-years {
+ height: 10em;
+ overflow: auto;
+ width: 60px;
+ border: 1px solid #dddddd;
+ border-right: 3px solid #444444;
+ border-bottom: 3px solid #444444;
+ background-color: #ffffff;
+ font-size: 12px;
+ cursor: pointer;
+ font-family: Tahoma, Arial, Helvetica, sans-serif;
+ font-weight: normal;
}
-a.seam-date-yearLink, a.seam-date-yearLink:visited
-{
- text-align: center;
- display: block;
- color: #555555;
+a.seam-date-yearLink, a.seam-date-yearLink:visited {
+ text-align: center;
+ display: block;
+ color: #555555;
}
-a.seam-date-yearLink:hover
-{
- background-color: #CCCCCC;
- color: red;
-}
+a.seam-date-yearLink:hover {
+ background-color: #CCCCCC;
+ color: red;
+}
-tr.seam-date-header
-{
- padding: 2px 0px 2px 0px;
+tr.seam-date-header {
+ padding: 2px 0px 2px 0px;
}
-
-td.seam-date-header
-{
- padding: 0px 8px 0px 8px;
- text-align: center;
- color: gray;
- font-family: Tahoma, Arial, Helvetica, sans-serif;
- font-weight: bold;
- font-size: 12px;
+
+td.seam-date-header {
+ padding: 0px 8px 0px 8px;
+ text-align: center;
+ color: gray;
+ font-family: Tahoma, Arial, Helvetica, sans-serif;
+ font-weight: bold;
+ font-size: 12px;
}
-td.seam-date-header-prevMonth
-{
- background-image: url("../img/cal-prev.png");
- background-repeat: no-repeat;
- background-position: center;
- padding: 0px 2px 0px 2px;
- width: 17px;
- height: 16px;
- margin-left: 2px;
+td.seam-date-header-prevMonth {
+ background-image: url("../img/cal-prev.png");
+ background-repeat: no-repeat;
+ background-position: center;
+ padding: 0px 2px 0px 2px;
+ width: 17px;
+ height: 16px;
+ margin-left: 2px;
}
-td.seam-date-header-nextMonth
-{
- background-image: url("../img/cal-next.png");
- background-repeat: no-repeat;
- background-position: center;
- padding: 0px 2px 0px 2px;
- width: 17px;
- height: 16px;
- margin-right: 2px;
+td.seam-date-header-nextMonth {
+ background-image: url("../img/cal-next.png");
+ background-repeat: no-repeat;
+ background-position: center;
+ padding: 0px 2px 0px 2px;
+ width: 17px;
+ height: 16px;
+ margin-right: 2px;
}
-tr.seam-date-headerDays
-{
- color: white;
- font-weight: normal;
+tr.seam-date-headerDays {
+ color: white;
+ font-weight: normal;
}
-tr.seam-date-headerDays > td
-{
- background-color: #CCCCCC;
- border: 1px solid #AAAAAA;
- color: white;
- text-align: center;
- width: 26px;
+tr.seam-date-headerDays > td {
+ background-color: #CCCCCC;
+ border: 1px solid #AAAAAA;
+ color: white;
+ text-align: center;
+ width: 26px;
}
-tr.seam-date-footer
-{
- background-color: white;
- color: #505050;
- font-weight: bold;
+tr.seam-date-footer {
+ background-color: white;
+ color: #505050;
+ font-weight: bold;
}
-tr.seam-date-footer > td
-{
- text-align: center;
+tr.seam-date-footer > td {
+ text-align: center;
}
-td.seam-date-inMonth
-{
- background-color: white;
- color: black;
- font-weight: normal;
- cursor: pointer;
- border: 1px solid #ece9d8;
+td.seam-date-inMonth {
+ background-color: white;
+ color: black;
+ font-weight: normal;
+ cursor: pointer;
+ border: 1px solid #ece9d8;
}
-td.seam-date-outMonth
-{
- background-color: white;
- color: #999999;
- font-weight: normal;
- cursor: pointer;
- border: 1px solid #ece9d8;
+td.seam-date-outMonth {
+ background-color: white;
+ color: #999999;
+ font-weight: normal;
+ cursor: pointer;
+ border: 1px solid #ece9d8;
}
-td.seam-date-selected
-{
- background-color: #CCCCCC;
- border: 1px solid #AAAAAA;
- color: black;
- font-weight: normal;
+td.seam-date-selected {
+ background-color: #CCCCCC;
+ border: 1px solid #AAAAAA;
+ color: black;
+ font-weight: normal;
}
-td.seam-date-dayOff-inMonth
-{
- background-color: #efefef;
- color: black;
- font-weight: normal;
- cursor: pointer;
- border: 1px solid #ece9d8;
+td.seam-date-dayOff-inMonth {
+ background-color: #efefef;
+ color: black;
+ font-weight: normal;
+ cursor: pointer;
+ border: 1px solid #ece9d8;
}
-td.seam-date-dayOff-outMonth
-{
- background-color: #efefef;
- color: #999999;
- font-weight: normal;
- cursor: pointer;
- border: 1px solid #ece9d8;
+td.seam-date-dayOff-outMonth {
+ background-color: #efefef;
+ color: #999999;
+ font-weight: normal;
+ cursor: pointer;
+ border: 1px solid #ece9d8;
}
-td.seam-date-hover
-{
- background-color: #CCCCCC;
- border: 1px solid #AAAAAA;
- cursor: pointer;
- color: red;
+td.seam-date-hover {
+ background-color: #CCCCCC;
+ border: 1px solid #AAAAAA;
+ cursor: pointer;
+ color: red;
+}
+
+#navigation, #footer {
+ font-size: 11px;
+ color: black;
+ font-weight: bold;
+ left: 0px;
+ right: 0px;
+ background-color: #BED6F8;
+ padding: 5px;
+ overflow: auto;
+}
+
+#navigation a {
+ padding-left: 5px;
+}
+
+.left {
+ float: left;
+}
+
+.right {
+ float: right;
+}
+
+.separator {
+ padding-left: 10px;
+ padding-right: 10px;
+}
+
+input, select, textarea, button, keygen, isindex, legend, a {
+ font-size: 11px;
+ font-family: Arial, Verdana, sans-serif;
+ color: #000000;
+}
+
+fieldset {
+ border-width: 1px;
+ border-style: solid;
+ padding: 10px;
+ border-color: #BED6F8;
+}
+
+hr {
+ border-width: 1px;
+ border-style: solid;
+ border-color: #BED6F8;
+}
+
+a {
+ color: #0078D0;
+}
+
+a:hover {
+ color: #0090FF;
+}
+
+a:visited {
+ color: #0090FF;
+}
+
+input, select, textarea, button, keygen, isindex {
+ border-width: 1px;
+ border-color: #BED6F8;
+ color: #000000;
+}
+
+button, input[type="reset"], input[type="submit"], input[type="button"] {
+ border-width: 1px;
+ border-color: #BED6F8;
+ font-size: 11px;
+ font-family: Arial, Verdana, sans-serif;
+ color: #000000;
+ background-color: #BED6F8;
+}
+
+button:hover, input[type="reset"]:hover, input[type="submit"]:hover, input[type="button"]:hover {
+ background-color: #BED6F8;
+}
+
+button[disabled], input[type="reset"][disabled], input[type="submit"][disabled], input[type="button"][disabled] {
+ color: #8DB7F3;
+ border-color: #cccccc;
+ background-color: #cccccc;
+}
+
+textarea, input[type="text"], input[type="password"], select {
+ border-width: 1px;
+ border-style: solid;
+ border-color: #BED6F8;
+ font-size: 11px;
+ font-family: Arial, Verdana, sans-serif;
+ color: #000000;
+ background-color: #ffffff;
+}
+
+textarea[disabled], input[type="text"][disabled], input[type="password"][disabled], select[disabled] {
+ color: #BED6F8;
+ cursor: default;
+}
+
+.popupContainer {
+ top: 50%;
+ left: 50%;
+ position: absolute;
+}
+
+.popup {
+ position: relative;
+
+ width: 600px;
+ margin-left: -300px;
+
+ margin-top: -200px;
+
+ display: none;
+
+ z-index: 9999;
+}
+
+.closeButton {
+ text-align: right;
+ width: 100%;
+}
+
+#opaque {
+ position: fixed;
+ top: 0px;
+ left: 0px;
+ width: 100%;
+ height: 100%;
+ z-index: 99;
+ display: none;
+ background-color: black;
+ filter: alpha(opacity = 40);
+ opacity: 0.4;
}
\ No newline at end of file
12 years, 4 months
Seam SVN: r15063 - branches/community/Seam_2_3/seam-integration-tests/src/test/java/org/jboss/seam/test/integration/faces.
by seam-commits@lists.jboss.org
Author: maschmid
Date: 2012-08-21 13:32:44 -0400 (Tue, 21 Aug 2012)
New Revision: 15063
Modified:
branches/community/Seam_2_3/seam-integration-tests/src/test/java/org/jboss/seam/test/integration/faces/SequenceAction.java
Log:
cleanup
Modified: branches/community/Seam_2_3/seam-integration-tests/src/test/java/org/jboss/seam/test/integration/faces/SequenceAction.java
===================================================================
--- branches/community/Seam_2_3/seam-integration-tests/src/test/java/org/jboss/seam/test/integration/faces/SequenceAction.java 2012-08-21 17:31:57 UTC (rev 15062)
+++ branches/community/Seam_2_3/seam-integration-tests/src/test/java/org/jboss/seam/test/integration/faces/SequenceAction.java 2012-08-21 17:32:44 UTC (rev 15063)
@@ -14,7 +14,6 @@
@Create
public void create() {
- System.out.println("XXX: create");
sequence = new LinkedList<Long>();
}
12 years, 4 months
Seam SVN: r15062 - in branches/community/Seam_2_3/seam-integration-tests: src/test/java/org/jboss/seam/test/integration and 1 other directories.
by seam-commits@lists.jboss.org
Author: maschmid
Date: 2012-08-21 13:31:57 -0400 (Tue, 21 Aug 2012)
New Revision: 15062
Added:
branches/community/Seam_2_3/seam-integration-tests/src/test/java/org/jboss/seam/test/integration/faces/RestoreViewComponentAccessTest.java
branches/community/Seam_2_3/seam-integration-tests/src/test/java/org/jboss/seam/test/integration/faces/SequenceAction.java
Modified:
branches/community/Seam_2_3/seam-integration-tests/pom.xml
branches/community/Seam_2_3/seam-integration-tests/src/test/java/org/jboss/seam/test/integration/Deployments.java
Log:
create RestoreViewComponentAccessTest to test issues accessing seam components from JSF validator attributes, related to JBSEAM-4976
Modified: branches/community/Seam_2_3/seam-integration-tests/pom.xml
===================================================================
--- branches/community/Seam_2_3/seam-integration-tests/pom.xml 2012-08-21 07:55:31 UTC (rev 15061)
+++ branches/community/Seam_2_3/seam-integration-tests/pom.xml 2012-08-21 17:31:57 UTC (rev 15062)
@@ -134,6 +134,17 @@
</exclusion>
</exclusions>
</dependency>
+
+ <dependency>
+ <groupId>org.jboss.seam</groupId>
+ <artifactId>jboss-seam-ui</artifactId>
+ <exclusions>
+ <exclusion>
+ <groupId>org.jboss.seam</groupId>
+ <artifactId>jboss-seam-jul</artifactId>
+ </exclusion>
+ </exclusions>
+ </dependency>
<dependency>
<groupId>org.hibernate</groupId>
@@ -284,6 +295,7 @@
<dependency>
<groupId>org.jboss.as</groupId>
<artifactId>jboss-as-arquillian-container-managed</artifactId>
+ <scope>test</scope>
</dependency>
</dependencies>
<build>
@@ -339,6 +351,7 @@
<dependency>
<groupId>org.jboss.as</groupId>
<artifactId>jboss-as-arquillian-container-remote</artifactId>
+ <scope>test</scope>
</dependency>
</dependencies>
<build>
Modified: branches/community/Seam_2_3/seam-integration-tests/src/test/java/org/jboss/seam/test/integration/Deployments.java
===================================================================
--- branches/community/Seam_2_3/seam-integration-tests/src/test/java/org/jboss/seam/test/integration/Deployments.java 2012-08-21 07:55:31 UTC (rev 15061)
+++ branches/community/Seam_2_3/seam-integration-tests/src/test/java/org/jboss/seam/test/integration/Deployments.java 2012-08-21 17:31:57 UTC (rev 15062)
@@ -41,6 +41,7 @@
"<dependencies>" +
"<module name=\"org.javassist\"/>" +
"<module name=\"org.dom4j\"/>" +
+ "<module name=\"org.apache.commons.collections\"/>" +
"</dependencies>" +
"</deployment>" +
"</jboss-deployment-structure>"), "jboss-deployment-structure.xml")
Added: branches/community/Seam_2_3/seam-integration-tests/src/test/java/org/jboss/seam/test/integration/faces/RestoreViewComponentAccessTest.java
===================================================================
--- branches/community/Seam_2_3/seam-integration-tests/src/test/java/org/jboss/seam/test/integration/faces/RestoreViewComponentAccessTest.java (rev 0)
+++ branches/community/Seam_2_3/seam-integration-tests/src/test/java/org/jboss/seam/test/integration/faces/RestoreViewComponentAccessTest.java 2012-08-21 17:31:57 UTC (rev 15062)
@@ -0,0 +1,139 @@
+package org.jboss.seam.test.integration.faces;
+
+import static org.junit.Assert.assertTrue;
+import static org.junit.Assert.assertFalse;
+
+
+import java.net.URL;
+
+import org.jboss.arquillian.container.test.api.Deployment;
+import org.jboss.arquillian.container.test.api.OverProtocol;
+import org.jboss.arquillian.container.test.api.RunAsClient;
+import org.jboss.arquillian.junit.Arquillian;
+import org.jboss.arquillian.test.api.ArquillianResource;
+import org.jboss.seam.test.integration.Deployments;
+import org.jboss.shrinkwrap.api.asset.Asset;
+import org.jboss.shrinkwrap.api.asset.StringAsset;
+import org.jboss.shrinkwrap.api.spec.WebArchive;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+
+import com.gargoylesoftware.htmlunit.WebClient;
+import com.gargoylesoftware.htmlunit.html.HtmlPage;
+import com.gargoylesoftware.htmlunit.html.HtmlTextInput;
+
+(a)RunWith(Arquillian.class)
+@RunAsClient
+public class RestoreViewComponentAccessTest
+{
+ private final WebClient client = new WebClient();
+ private static final String[] testScopes = {"page", "conversation", "session", "application"};
+ private static final String componentNamePrefix = "sequence_";
+
+ @ArquillianResource
+ URL contextPath;
+
+ @Deployment(name="RestoreViewComponentAccessTest")
+ @OverProtocol("Servlet 3.0")
+ public static WebArchive createDeployment()
+ {
+
+ // This is a client test, use a real (non-mocked) Seam deployment
+ WebArchive war = Deployments.realSeamDeployment()
+ .addClasses(SequenceAction.class);
+
+ war.delete("WEB-INF/pages.xml");
+ war.delete("WEB-INF/components.xml");
+
+ for (String scope : testScopes) {
+ war.addAsWebResource(createView(scope), "test_" + scope + ".xhtml");
+ }
+
+ StringBuilder componentsXmlBuilder = new StringBuilder();
+
+ componentsXmlBuilder.append("<components xmlns=\"http://jboss.org/schema/seam/components\">");
+
+ for (String scope : testScopes) {
+ String cname = componentNamePrefix + scope;
+ componentsXmlBuilder.append("<component name='" + cname + "' scope='" + scope + "' class='org.jboss.seam.test.integration.faces.SequenceAction' />");
+ }
+
+ componentsXmlBuilder.append("</components>");
+
+ war.addAsWebInfResource(new StringAsset(componentsXmlBuilder.toString()), "components.xml");
+
+ war.addAsWebInfResource(new StringAsset(
+ "<pages xmlns=\"http://jboss.org/schema/seam/pages\""+
+ " xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\">"+
+ "<page view-id='/test_conversation.xhtml'>" +
+ "<begin-conversation join='true'/>" +
+ "</page>" +
+ "</pages>"), "pages.xml");
+
+ return war;
+ }
+
+ private static Asset createView(String scope) {
+ String cname = componentNamePrefix + scope;
+ return new StringAsset(
+ "<html xmlns=\"http://www.w3.org/1999/xhtml\"" +
+ " xmlns:h=\"http://java.sun.com/jsf/html\"" +
+ " xmlns:f=\"http://java.sun.com/jsf/core\"" +
+ " xmlns:s=\"http://jboss.org/schema/seam/taglib\"" +
+ " xmlns:ui=\"http://java.sun.com/jsf/facelets\">" +
+ "<h:head></h:head>" +
+ "<h:body>" +
+ "<h:form id='form'>" +
+ "<h:messages/>" +
+ "<h:outputText id='output' value='Sequence: #{" + cname + ".output}'/>" +
+ "<h:inputText id='input' value='#{" + cname + ".input}'>" +
+ "<f:validateLongRange minimum='#{" + cname + ".minimum}' />" +
+ "</h:inputText>" +
+ "<h:commandButton id='append' value='Append' action='#{" + cname + ".append}'/>" +
+ "</h:form>" +
+ "</h:body>" +
+ "</html>");
+ }
+
+
+ public void testBase(String scope) throws Exception {
+ HtmlPage page = client.getPage(contextPath + "test_" + scope + ".seam");
+ assertTrue(page.getBody().getTextContent().contains("Sequence: "));
+
+ ((HtmlTextInput)page.getElementById("form:input")).setText("1");
+ page = page.getElementById("form:append").click();
+
+ assertTrue(page.getBody().getTextContent().contains("Sequence: 1"));
+
+ ((HtmlTextInput)page.getElementById("form:input")).setText("2");
+ page = page.getElementById("form:append").click();
+
+ assertTrue(page.getBody().getTextContent().contains("Sequence: 1, 2"));
+
+ ((HtmlTextInput)page.getElementById("form:input")).setText("1");
+ page = page.getElementById("form:append").click();
+
+ assertFalse(page.getBody().getTextContent().contains("Sequence: 1, 2, 1"));
+ assertTrue(page.getBody().getTextContent().contains("value must be greater than or equal to 2"));
+ }
+
+ @Test
+ public void testPage() throws Exception {
+ testBase("page");
+ }
+
+ @Test
+ public void testConversation() throws Exception {
+ testBase("conversation");
+ }
+
+ @Test
+ public void testSession() throws Exception {
+ testBase("session");
+ }
+
+ @Test
+ public void testApplication() throws Exception {
+ testBase("application");
+ }
+}
Added: branches/community/Seam_2_3/seam-integration-tests/src/test/java/org/jboss/seam/test/integration/faces/SequenceAction.java
===================================================================
--- branches/community/Seam_2_3/seam-integration-tests/src/test/java/org/jboss/seam/test/integration/faces/SequenceAction.java (rev 0)
+++ branches/community/Seam_2_3/seam-integration-tests/src/test/java/org/jboss/seam/test/integration/faces/SequenceAction.java 2012-08-21 17:31:57 UTC (rev 15062)
@@ -0,0 +1,52 @@
+package org.jboss.seam.test.integration.faces;
+
+import java.io.Serializable;
+import java.util.Deque;
+import java.util.LinkedList;
+
+import org.jboss.seam.annotations.Create;
+
+public class SequenceAction implements Serializable {
+ private static final long serialVersionUID = 1L;
+
+ private Deque<Long> sequence;
+ private Long input;
+
+ @Create
+ public void create() {
+ System.out.println("XXX: create");
+ sequence = new LinkedList<Long>();
+ }
+
+ public String getOutput() {
+ StringBuilder sb = new StringBuilder();
+ for (Long n : sequence) {
+ sb.append(n);
+ sb.append(", ");
+ }
+
+ return sb.toString();
+ }
+
+ public void append() {
+ sequence.add(input);
+ }
+
+ public Long getInput()
+ {
+ return input;
+ }
+
+ public void setInput(Long input)
+ {
+ this.input = input;
+ }
+
+ public Long getMinimum() {
+ if (sequence.isEmpty()) {
+ return 0L;
+ }
+
+ return sequence.getLast();
+ }
+}
\ No newline at end of file
12 years, 4 months
Seam SVN: r15061 - branches/community/Seam_2_3/examples-ee6.
by seam-commits@lists.jboss.org
Author: manaRH
Date: 2012-08-21 03:55:31 -0400 (Tue, 21 Aug 2012)
New Revision: 15061
Modified:
branches/community/Seam_2_3/examples-ee6/pom.xml
Log:
fixed name of new jee6 example
Modified: branches/community/Seam_2_3/examples-ee6/pom.xml
===================================================================
--- branches/community/Seam_2_3/examples-ee6/pom.xml 2012-08-20 14:14:25 UTC (rev 15060)
+++ branches/community/Seam_2_3/examples-ee6/pom.xml 2012-08-21 07:55:31 UTC (rev 15061)
@@ -98,7 +98,6 @@
</properties>
<modules>
- <module>booking-ee6</module>
<module>blog</module>
<module>booking</module>
<module>contactlist</module>
@@ -110,6 +109,7 @@
<module>hibernate</module>
<module>icefaces</module>
<module>itext</module>
+ <module>jee6</module>
<module>jpa</module>
<module>mail</module>
<module>messages</module>
12 years, 4 months
Seam SVN: r15059 - branches/community/Seam_2_3/seam-reference-guide/src/docbook/en-US.
by seam-commits@lists.jboss.org
Author: manaRH
Date: 2012-08-20 08:10:48 -0400 (Mon, 20 Aug 2012)
New Revision: 15059
Modified:
branches/community/Seam_2_3/seam-reference-guide/src/docbook/en-US/Configuration.xml
Log:
JBSEAM-4856 added doc for initialize-in-order requirement when multiple modules
Modified: branches/community/Seam_2_3/seam-reference-guide/src/docbook/en-US/Configuration.xml
===================================================================
--- branches/community/Seam_2_3/seam-reference-guide/src/docbook/en-US/Configuration.xml 2012-08-20 11:24:57 UTC (rev 15058)
+++ branches/community/Seam_2_3/seam-reference-guide/src/docbook/en-US/Configuration.xml 2012-08-20 12:10:48 UTC (rev 15059)
@@ -975,7 +975,7 @@
<para>Seam 2.3 requires to have setup special deployment metada file <filename>jboss-deployment-structure.xml</filename>
for correct initialization. Minimal content for EAR is:
- <example>
+ <example>
<title>jboss-deployment-structure.xml</title>
<programlisting><![CDATA[<jboss-deployment-structure xmlns="urn:jboss:deployment-structure:1.0">
<deployment>
@@ -986,11 +986,93 @@
</dependencies>
</deployment>
</jboss-deployment-structure>]]></programlisting>
- </example>
-
- More details about new AS 7 classloading can be found at
- <ulink url="https://docs.jboss.org/author/display/AS7/Developer+Guide#DeveloperGuide-...">https://docs.jboss.org/author/display/AS7/Developer+Guide#DeveloperGuide-...</ulink>
-</para>
+ </example>
+ More details about new AS 7 classloading can be found at
+ <ulink url="https://docs.jboss.org/author/display/AS7/Developer+Guide#DeveloperGuide-...">https://docs.jboss.org/author/display/AS7/Developer+Guide#DeveloperGuide-...</ulink>
+ </para>
+
+ <warning>
+ <title>Deployment of multiple modules in one EAR</title>
+ <para>There is a significant enhancement for speed up the application deployment in AS 7. This unfortunatelly can
+ cause some issues while you have multiple war/ejb modules in your application.</para>
+ <para>
+ This situation requires to use and set up new Java EE 6 configuration parameter -
+ <emphasis>Module initialization order</emphasis>
+ - in
+ <filename>application.xml</filename>
+ -
+ <literal>initialize-in-order</literal>
+ to true.
+ This causes that initialization will happen in defined order like it is in
+ <filename>application.xml</filename>.
+ Example of <filename>application.xml</filename>:
+ <programlisting><![CDATA[<?xml version="1.0" encoding="UTF-8"?>
+<application xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ version="6" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/application_6.xsd">
+ <application-name>test-app</application-name>
+ <initialize-in-order>true</initialize-in-order>
+ <module>
+ <ejb>jboss-seam.jar</ejb>
+ </module>
+ <module>
+ <web>
+ <web-uri>test-web1.war</web-uri>
+ <context-root>test</context-root>
+ </web>
+ <web>
+ <web-uri>test-web2.war</web-uri>
+ <context-root>test</context-root>
+ </web>
+ </module>
+</application>]]></programlisting>
+ </para>
+
+ <para>
+ If you are using <literal>maven-ear-plugin</literal> for generation of your application,
+ you can use this plugin configuration:
+ <programlisting><![CDATA[<plugin>
+ <artifactId>maven-ear-plugin</artifactId>
+ <!-- from version 2.6 the plugin supports Java EE 6 descriptor -->
+ <version>2.7</version>
+ <configuration>
+ <version>6</version>
+ <generateApplicationXml>true</generateApplicationXml>
+ <defaultLibBundleDir>lib</defaultLibBundleDir>
+ <initializeInOrder>true</initializeInOrder>
+ <modules>
+ <jarModule>
+ <groupId>org.jboss.el</groupId>
+ <artifactId>jboss-el</artifactId>
+ <includeInApplicationXml>false</includeInApplicationXml>
+ <bundleDir>lib</bundleDir>
+ </jarModule>
+ <ejbModule>
+ <groupId>org.jboss.seam</groupId>
+ <artifactId>jboss-seam</artifactId>
+ <bundleFileName>jboss-seam.jar</bundleFileName>
+ </ejbModule>
+ <ejbModule>
+ <groupId>some.user.module</groupId>
+ <artifactId>hello-ejbs</artifactId>
+ <bundleFileName>hello-ejbs.jar</bundleFileName>
+ </ejbModule>
+ <webModule>
+ <groupId>some.user.module</groupId>
+ <artifactId>hello-web1</artifactId>
+ <contextRoot>/hello1</contextRoot>
+ <bundleFileName>hello-web1.war</bundleFileName>
+ </webModule>
+ <webModule>
+ <groupId>some.user.module</groupId>
+ <artifactId>hello-web2</artifactId>
+ <contextRoot>/hello2</contextRoot>
+ <bundleFileName>hello-web2.war</bundleFileName>
+ </webModule>
+ </modules>
+ </configuration>
+</plugin>]]></programlisting>
+ </para>
+ </warning>
</section>
<section>
12 years, 4 months
Seam SVN: r15058 - in branches/community/Seam_2_3: examples-ee6/blog/blog-web/src/main/webapp and 12 other directories.
by seam-commits@lists.jboss.org
Author: manaRH
Date: 2012-08-20 07:24:57 -0400 (Mon, 20 Aug 2012)
New Revision: 15058
Added:
branches/community/Seam_2_3/seam-cdk-helper/
branches/community/Seam_2_3/seam-cdk-helper/README.md
branches/community/Seam_2_3/seam-cdk-helper/pom.xml
branches/community/Seam_2_3/seam-cdk-helper/src/
branches/community/Seam_2_3/seam-cdk-helper/src/main/
branches/community/Seam_2_3/seam-cdk-helper/src/main/java/
branches/community/Seam_2_3/seam-cdk-helper/src/main/java/org/
branches/community/Seam_2_3/seam-cdk-helper/src/main/java/org/jboss/
branches/community/Seam_2_3/seam-cdk-helper/src/main/java/org/jboss/seam/
branches/community/Seam_2_3/seam-cdk-helper/src/main/java/org/jboss/seam/maven/
branches/community/Seam_2_3/seam-cdk-helper/src/main/java/org/jboss/seam/maven/helper/
branches/community/Seam_2_3/seam-cdk-helper/src/main/java/org/jboss/seam/maven/helper/ConverterGenerator.java
branches/community/Seam_2_3/seam-cdk-helper/src/main/java/org/jboss/seam/maven/helper/SeamGeneratorValidatorAndConvertersMojo.java
branches/community/Seam_2_3/seam-cdk-helper/src/main/java/org/jboss/seam/maven/helper/ValidatorGenerator.java
branches/community/Seam_2_3/seam-cdk-helper/src/main/java/org/jboss/seam/maven/helper/XMLGenerator.java
Modified:
branches/community/Seam_2_3/examples-ee6/blog/blog-web/src/main/webapp/post.xhtml
branches/community/Seam_2_3/examples-ee6/contactlist/contactlist-web/src/main/webapp/viewContact.xhtml
branches/community/Seam_2_3/jboss-seam-ui/pom.xml
branches/community/Seam_2_3/pom.xml
branches/community/Seam_2_3/seam-reference-guide/src/docbook/en-US/Controls.xml
Log:
JBSEAM-4955 added seam-cdk-helper
Modified: branches/community/Seam_2_3/examples-ee6/blog/blog-web/src/main/webapp/post.xhtml
===================================================================
--- branches/community/Seam_2_3/examples-ee6/blog/blog-web/src/main/webapp/post.xhtml 2012-08-20 10:02:48 UTC (rev 15057)
+++ branches/community/Seam_2_3/examples-ee6/blog/blog-web/src/main/webapp/post.xhtml 2012-08-20 11:24:57 UTC (rev 15058)
@@ -21,16 +21,16 @@
<s:decorate template="edit.xhtml" id="title">
<ui:define name="label">Title</ui:define>
<h:inputText value="#{blogEntry.title}" size="70" maxlength="70" required="true" id="titleInput">
-<!-- <s:validateFormattedText /> -->
- <f:validator validatorId="org.jboss.seam.ui.FormattedTextValidator" />
+ <s:validateFormattedText />
+<!-- <f:validator validatorId="org.jboss.seam.ui.FormattedTextValidator" /> -->
</h:inputText>
</s:decorate>
<s:decorate template="edit.xhtml" id="excerpt">
<ui:define name="label">Excerpt (optional)</ui:define>
<h:inputTextarea value="#{blogEntry.excerpt}" cols="68" rows="3" id="excerptInput">
-<!-- <s:validateFormattedText /> -->
- <f:validator validatorId="org.jboss.seam.ui.FormattedTextValidator" />
+ <s:validateFormattedText />
+<!-- <f:validator validatorId="org.jboss.seam.ui.FormattedTextValidator" /> -->
</h:inputTextarea>
</s:decorate>
Modified: branches/community/Seam_2_3/examples-ee6/contactlist/contactlist-web/src/main/webapp/viewContact.xhtml
===================================================================
--- branches/community/Seam_2_3/examples-ee6/contactlist/contactlist-web/src/main/webapp/viewContact.xhtml 2012-08-20 10:02:48 UTC (rev 15057)
+++ branches/community/Seam_2_3/examples-ee6/contactlist/contactlist-web/src/main/webapp/viewContact.xhtml 2012-08-20 11:24:57 UTC (rev 15058)
@@ -86,8 +86,8 @@
<h:column>
<f:facet name="header">Posted</f:facet>
<h:outputText value="#{c.created}">
-<!-- <s:convertDateTime type="both"/>-->
- <f:convertDateTime type="both" />
+ <s:convertDateTime type="both"/>
+<!-- JSF 2 way <f:convertDateTime type="both" /> -->
</h:outputText>
</h:column>
<h:column>
Modified: branches/community/Seam_2_3/jboss-seam-ui/pom.xml
===================================================================
--- branches/community/Seam_2_3/jboss-seam-ui/pom.xml 2012-08-20 10:02:48 UTC (rev 15057)
+++ branches/community/Seam_2_3/jboss-seam-ui/pom.xml 2012-08-20 11:24:57 UTC (rev 15058)
@@ -40,7 +40,21 @@
</library>
</configuration>
</plugin>
+ <!-- This need to be after Richfaces CDK plugin -->
<plugin>
+ <groupId>org.jboss.seam</groupId>
+ <artifactId>seam-cdk-helper</artifactId>
+ <version>1.0-SNAPSHOT</version>
+ <executions>
+ <execution>
+ <phase>generate-sources</phase>
+ <goals>
+ <goal>execute</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+ <plugin>
<artifactId>maven-javadoc-plugin</artifactId>
<configuration>
<links>
Modified: branches/community/Seam_2_3/pom.xml
===================================================================
--- branches/community/Seam_2_3/pom.xml 2012-08-20 10:02:48 UTC (rev 15057)
+++ branches/community/Seam_2_3/pom.xml 2012-08-20 11:24:57 UTC (rev 15058)
@@ -44,6 +44,7 @@
<pdf.name>${project.artifactId}.pdf</pdf.name>
<!-- Version string properties -->
+ <version.seam>2.3.0.CR1-SNAPSHOT</version.seam>
<version.arquillian_core>1.0.1.Final</version.arquillian_core>
<version.wicket>1.4.14</version.wicket>
<version.testng>5.14.10</version.testng>
@@ -71,7 +72,7 @@
<dependency>
<groupId>org.jboss.seam</groupId>
<artifactId>bom</artifactId>
- <version>${project.version}</version>
+ <version>${version.seam}</version>
<type>pom</type>
<scope>import</scope>
</dependency>
@@ -410,25 +411,26 @@
</plugins>
</build>
- <modules>
+ <modules>
<module>bom</module>
+ <module>seam-cdk-helper</module>
<module>jboss-seam</module>
- <module>jboss-seam-ui</module>
- <module>jboss-seam-debug</module>
- <module>jboss-seam-gen</module>
- <module>jboss-seam-excel</module>
- <module>jboss-seam-flex</module>
- <module>jboss-seam-mail</module>
- <module>jboss-seam-pdf</module>
- <module>jboss-seam-remoting</module>
- <module>jboss-seam-resteasy</module>
- <module>jboss-seam-rss</module>
- <module>jboss-seam-wicket</module>
- <module>jboss-seam-ioc</module>
- <module>jboss-seam-jul</module>
+ <module>jboss-seam-ui</module>
+ <module>jboss-seam-debug</module>
+ <module>jboss-seam-gen</module>
+ <module>jboss-seam-excel</module>
+ <module>jboss-seam-flex</module>
+ <module>jboss-seam-mail</module>
+ <module>jboss-seam-pdf</module>
+ <module>jboss-seam-remoting</module>
+ <module>jboss-seam-resteasy</module>
+ <module>jboss-seam-rss</module>
+ <module>jboss-seam-wicket</module>
+ <module>jboss-seam-ioc</module>
+ <module>jboss-seam-jul</module>
<module>functional-tests</module>
- <module>seam-integration-tests</module>
- </modules>
+ <module>seam-integration-tests</module>
+ </modules>
<profiles>
<!-- Profile for generating Seam reference documentation -->
Added: branches/community/Seam_2_3/seam-cdk-helper/README.md
===================================================================
--- branches/community/Seam_2_3/seam-cdk-helper/README.md (rev 0)
+++ branches/community/Seam_2_3/seam-cdk-helper/README.md 2012-08-20 11:24:57 UTC (rev 15058)
@@ -0,0 +1,43 @@
+Seam CDK Helper
+=============
+Author: Rafael Benevides
+
+Maven Plugin to generate Validators and Converters for Seam 2.3 - Workaround for Richfaces 4 CDK
+
+Why this Maven Plugin was created?
+----------------------------------
+
+The converters and validators wasn't available as related at https://issues.jboss.org/browse/JBSEAM-4955
+
+There is a related issue with Richfaces 4 the prevents this generation https://issues.jboss.org/browse/RF-12271
+
+This plugin generates the conveters by looking for classes annotated with @FacesConvertes and the looks for its configs to generate its tag on s.taglib.xml
+
+For validators the source of the information is the correspondent xml files
+
+
+How to use this plugin ?
+-----------------------
+
+Just at the plugin information on jboss-seam-ui pom.xml
+
+
+ <build>
+ <plugins>
+ ...
+ <!-- This need to be after Richfaces CDK plugin -->
+ <plugin>
+ <groupId>org.jboss.seam</groupId>
+ <artifactId>seam-cdk-helper</artifactId>
+ <version>1.0-SNAPSHOT</version>
+ <executions>
+ <execution>
+ <phase>generate-sources</phase>
+ <goals>
+ <goal>execute</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+ ...
+
Added: branches/community/Seam_2_3/seam-cdk-helper/pom.xml
===================================================================
--- branches/community/Seam_2_3/seam-cdk-helper/pom.xml (rev 0)
+++ branches/community/Seam_2_3/seam-cdk-helper/pom.xml 2012-08-20 11:24:57 UTC (rev 15058)
@@ -0,0 +1,29 @@
+<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>
+
+ <parent>
+ <artifactId>jboss-seam-parent</artifactId>
+ <groupId>org.jboss.seam</groupId>
+ <version>2.3.0.CR1-SNAPSHOT</version>
+ <relativePath>../pom.xml</relativePath>
+ </parent>
+
+ <artifactId>seam-cdk-helper</artifactId>
+ <packaging>maven-plugin</packaging>
+ <version>1.0-SNAPSHOT</version>
+ <name>Seam 2.3 CDK Helper for using RF 4 CDK</name>
+ <url>http://seamframework.org</url>
+ <dependencies>
+ <dependency>
+ <groupId>org.apache.maven</groupId>
+ <artifactId>maven-plugin-api</artifactId>
+ <version>2.0</version>
+ </dependency>
+ <dependency>
+ <groupId>junit</groupId>
+ <artifactId>junit</artifactId>
+ <scope>test</scope>
+ </dependency>
+ </dependencies>
+</project>
Added: branches/community/Seam_2_3/seam-cdk-helper/src/main/java/org/jboss/seam/maven/helper/ConverterGenerator.java
===================================================================
--- branches/community/Seam_2_3/seam-cdk-helper/src/main/java/org/jboss/seam/maven/helper/ConverterGenerator.java (rev 0)
+++ branches/community/Seam_2_3/seam-cdk-helper/src/main/java/org/jboss/seam/maven/helper/ConverterGenerator.java 2012-08-20 11:24:57 UTC (rev 15058)
@@ -0,0 +1,99 @@
+package org.jboss.seam.maven.helper;
+
+import java.io.File;
+import java.io.FileNotFoundException;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Scanner;
+
+import org.apache.maven.plugin.logging.Log;
+import org.w3c.dom.Element;
+
+/**
+ *
+ * Generates JSF taglib descriptor for all FacesConverter annotated classes
+ *
+ * @author Rafael Benevides <https://community.jboss.org/people/rafabene>
+ * @author Marek Novotny <https://community.jboss.org/people/manaRH>
+ *
+ */
+public class ConverterGenerator
+{
+
+ private List<File> converterSources = new ArrayList<File>();
+ private Log log;
+ private String sourceDirectory;
+ private String targetDirectory;
+
+ public ConverterGenerator(String sourceDirectory, String targetDirectory, Log log)
+ {
+ this.sourceDirectory = sourceDirectory;
+ this.targetDirectory = targetDirectory;
+ this.log = log;
+ }
+
+ public void addFile(File file) throws FileNotFoundException
+ {
+ if (fileIsConverterSource(file))
+ {
+ converterSources.add(file);
+ }
+ }
+
+ private boolean fileIsConverterSource(File file) throws FileNotFoundException
+ {
+ if (file.getName().endsWith(".java"))
+ {
+ Scanner scanner = new Scanner(file);
+ String find = scanner.findWithinHorizon("@FacesConverter", 0);
+ if (find != null)
+ {
+ log.info("Identified " + file.getName() + " as Converter source code");
+ return true;
+ }
+ }
+ return false;
+ }
+
+ public void generateConverters() throws Exception
+ {
+ log.info("Generating Converters");
+ XMLGenerator xmlGenerator = new XMLGenerator(log);
+ File outXML = new File(targetDirectory + "/generated-sources/main/resources/META-INF", "s.taglib.xml");
+ List<Element> tagsToAdd = new ArrayList<Element>();
+ for (File source : converterSources)
+ {
+ String classFromSource = source.getAbsolutePath().replace(sourceDirectory, "").replace(File.separatorChar, '.').replace(".java", "").substring(1);
+ File facesConfigXML = findCorrespondentConfig(classFromSource);
+ if (facesConfigXML != null)
+ {
+ Element tag = xmlGenerator.getFaceletsTagElementFromFacesconfig(facesConfigXML, facesConfigXML.getName().replace(".xml", ""), "converter");
+ tagsToAdd.add(tag);
+ }
+ }
+ xmlGenerator.updateFile(outXML, tagsToAdd);
+
+ }
+
+ private File findCorrespondentConfig(String classFromSource) throws FileNotFoundException
+ {
+ String whereToFind = sourceDirectory.replace("/java", "/config/component");
+ log.debug("Searching correspondent config for " + classFromSource + " in " + whereToFind);
+ File componentFolder = new File(whereToFind);
+ for (File f : componentFolder.listFiles())
+ {
+ // Search only files
+ if (f.isFile())
+ {
+ Scanner scanner = new Scanner(f);
+ String find = scanner.findWithinHorizon(classFromSource, 0);
+ if (find != null)
+ {
+ return f;
+ }
+ }
+ }
+ return null;
+ }
+
+}
Added: branches/community/Seam_2_3/seam-cdk-helper/src/main/java/org/jboss/seam/maven/helper/SeamGeneratorValidatorAndConvertersMojo.java
===================================================================
--- branches/community/Seam_2_3/seam-cdk-helper/src/main/java/org/jboss/seam/maven/helper/SeamGeneratorValidatorAndConvertersMojo.java (rev 0)
+++ branches/community/Seam_2_3/seam-cdk-helper/src/main/java/org/jboss/seam/maven/helper/SeamGeneratorValidatorAndConvertersMojo.java 2012-08-20 11:24:57 UTC (rev 15058)
@@ -0,0 +1,79 @@
+package org.jboss.seam.maven.helper;
+
+
+import java.io.File;
+import java.io.FileNotFoundException;
+
+import org.apache.maven.plugin.AbstractMojo;
+import org.apache.maven.plugin.MojoExecutionException;
+
+/**
+ *
+ * Goal which appends validator and converter custom tag file into face.
+ *
+ * @goal execute
+ *
+ * @phase generate-sources
+ *
+ * @author Rafael Benevides <https://community.jboss.org/people/rafabene>
+ * @author Marek Novotny <https://community.jboss.org/people/manaRH>
+ *
+ */
+public class SeamGeneratorValidatorAndConvertersMojo extends AbstractMojo
+{
+ /**
+ * The source directories containing the sources to be compiled.
+ *
+ * @parameter expression="${project.build.sourceDirectory}"
+ * @required
+ * @readonly
+ */
+ protected String sourceDirectory;
+
+ /**
+ * Output directory for processed resources
+ *
+ * @parameter expression="${project.build.directory}"
+ * @required
+ */
+ private String targetDirectory;
+
+ private ConverterGenerator converterGenerator;
+ private ValidatorGenerator validatorGenerator;
+
+ public void execute() throws MojoExecutionException
+ {
+ converterGenerator = new ConverterGenerator(sourceDirectory, targetDirectory, getLog());
+ validatorGenerator = new ValidatorGenerator(targetDirectory, getLog());
+ try
+ {
+ File sourceFolder = new File(sourceDirectory);
+ getLog().info("Source Folder: " + sourceFolder);
+ visitFolder(sourceFolder);
+ converterGenerator.generateConverters();
+ visitFolder(new File(sourceFolder.getParent(), "config/component"));
+ validatorGenerator.generateValidators();
+ }
+ catch (Exception e)
+ {
+ throw new MojoExecutionException("Error on Generator", e);
+ }
+
+ }
+
+ private void visitFolder(File sourceFolder) throws FileNotFoundException
+ {
+ for (File file : sourceFolder.listFiles())
+ {
+ if (file.isDirectory())
+ {
+ visitFolder(file);
+ }
+ else
+ {
+ converterGenerator.addFile(file);
+ validatorGenerator.addFile(file);
+ }
+ }
+ }
+}
Added: branches/community/Seam_2_3/seam-cdk-helper/src/main/java/org/jboss/seam/maven/helper/ValidatorGenerator.java
===================================================================
--- branches/community/Seam_2_3/seam-cdk-helper/src/main/java/org/jboss/seam/maven/helper/ValidatorGenerator.java (rev 0)
+++ branches/community/Seam_2_3/seam-cdk-helper/src/main/java/org/jboss/seam/maven/helper/ValidatorGenerator.java 2012-08-20 11:24:57 UTC (rev 15058)
@@ -0,0 +1,75 @@
+package org.jboss.seam.maven.helper;
+
+import java.io.File;
+import java.io.FileNotFoundException;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.Scanner;
+
+import org.apache.maven.plugin.logging.Log;
+import org.w3c.dom.Element;
+
+/**
+ *
+ * Generates JSF taglib descriptor for all Validators classes
+ *
+ * @author Rafael Benevides <https://community.jboss.org/people/rafabene>
+ * @author Marek Novotny <https://community.jboss.org/people/manaRH>
+ *
+ */
+public class ValidatorGenerator
+{
+
+ private List<File> validatorXMLs = new ArrayList<File>();
+ private Log log;
+ private String targetDirectory;
+ private Map<String, String> validatorNames = new HashMap<String, String>();
+
+ public ValidatorGenerator(String targetDirectory, Log log)
+ {
+ this.targetDirectory = targetDirectory;
+ this.log = log;
+ validatorNames.put("formattedTextValidator.xml", "validateFormattedText");
+ validatorNames.put("modelValidator.xml", "validate");
+ }
+
+ public void addFile(File file) throws FileNotFoundException
+ {
+ if (fileIsValidatorXML(file))
+ {
+ validatorXMLs.add(file);
+ }
+ }
+
+ private boolean fileIsValidatorXML(File file) throws FileNotFoundException
+ {
+ if (file.getName().endsWith(".xml"))
+ {
+ Scanner scanner = new Scanner(file);
+ String find = scanner.findWithinHorizon("<validator>", 0);
+ if (find != null)
+ {
+ log.info("Identified " + file.getName() + " as Validator XML");
+ return true;
+ }
+ }
+ return false;
+ }
+
+ public void generateValidators() throws Exception
+ {
+ log.info("Generating Validators");
+ XMLGenerator xmlGenerator = new XMLGenerator(log);
+ File outXML = new File(targetDirectory + "/generated-sources/main/resources/META-INF", "s.taglib.xml");
+ List<Element> tagsToAdd = new ArrayList<Element>();
+ for (File xml : validatorXMLs)
+ {
+ Element tag = xmlGenerator.getFaceletsTagElementFromFacesconfig(xml, validatorNames.get(xml.getName()), "validator");
+ tagsToAdd.add(tag);
+ }
+ xmlGenerator.updateFile(outXML, tagsToAdd);
+ }
+
+}
Added: branches/community/Seam_2_3/seam-cdk-helper/src/main/java/org/jboss/seam/maven/helper/XMLGenerator.java
===================================================================
--- branches/community/Seam_2_3/seam-cdk-helper/src/main/java/org/jboss/seam/maven/helper/XMLGenerator.java (rev 0)
+++ branches/community/Seam_2_3/seam-cdk-helper/src/main/java/org/jboss/seam/maven/helper/XMLGenerator.java 2012-08-20 11:24:57 UTC (rev 15058)
@@ -0,0 +1,183 @@
+package org.jboss.seam.maven.helper;
+
+import java.io.File;
+import java.io.FileOutputStream;
+import java.io.IOException;
+import java.io.StringWriter;
+import java.util.List;
+
+import javax.xml.parsers.DocumentBuilder;
+import javax.xml.parsers.DocumentBuilderFactory;
+import javax.xml.transform.OutputKeys;
+import javax.xml.transform.Transformer;
+import javax.xml.transform.TransformerFactory;
+import javax.xml.xpath.XPath;
+import javax.xml.xpath.XPathConstants;
+import javax.xml.xpath.XPathFactory;
+
+import org.apache.maven.plugin.logging.Log;
+import org.w3c.dom.Comment;
+import org.w3c.dom.DOMConfiguration;
+import org.w3c.dom.DOMImplementation;
+import org.w3c.dom.Document;
+import org.w3c.dom.Element;
+import org.w3c.dom.Node;
+import org.w3c.dom.NodeList;
+import org.w3c.dom.ls.DOMImplementationLS;
+import org.w3c.dom.ls.LSOutput;
+import org.w3c.dom.ls.LSSerializer;
+
+/**
+ *
+ * Generates JSF taglib descriptor xml
+ *
+ * @author Rafael Benevides <https://community.jboss.org/people/rafabene>
+ * @author Marek Novotny <https://community.jboss.org/people/manaRH>
+ *
+ */
+public class XMLGenerator
+{
+
+ private Log log;
+
+ public XMLGenerator(Log log)
+ {
+ this.log = log;
+ }
+
+ public Element getFaceletsTagElementFromFacesconfig(File xml, String tagName, String converterOrValidator) throws Exception
+ {
+ log.info("Generating taglib from " + xml);
+
+ DocumentBuilder dstDB = DocumentBuilderFactory.newInstance().newDocumentBuilder();
+ DocumentBuilder srcDB = DocumentBuilderFactory.newInstance().newDocumentBuilder();
+ Document destDocument = dstDB.newDocument();
+ Document srcDocument = srcDB.parse(xml);
+
+ XPath xpath = XPathFactory.newInstance().newXPath();
+
+ Element tagElement = destDocument.createElement("tag");
+ Node tagNode = destDocument.appendChild(tagElement);
+ Element tagNameElement = destDocument.createElement("tag-name");
+ tagNameElement.setTextContent(tagName);
+ tagNode.appendChild(tagNameElement);
+
+ Element component = destDocument.createElement(converterOrValidator);
+ Node componentNode = tagNode.appendChild(component);
+
+ Element description = destDocument.createElement("description");
+ String descriptionContent = xpath.evaluate("//" + converterOrValidator + "/description/text()", srcDocument);
+ description.setTextContent(descriptionContent);
+
+ componentNode.appendChild(description);
+
+ Element componentType = destDocument.createElement(converterOrValidator + "-id");
+ String componentTypeContent = xpath.evaluate("//" + converterOrValidator + "-id/text()", srcDocument);
+ componentType.setTextContent(componentTypeContent);
+
+ componentNode.appendChild(componentType);
+
+ NodeList propertyNodes = (NodeList) xpath.evaluate("//property", srcDocument, XPathConstants.NODESET);
+
+ for (int i = 0; i < propertyNodes.getLength(); i++)
+ {
+ Node nNode = propertyNodes.item(i);
+ if (nNode.getNodeType() == Node.ELEMENT_NODE)
+ {
+
+ Element eElement = (Element) nNode;
+ String propDescription = getTagValue("description", eElement);
+ String propName = getTagValue("property-name", eElement);
+ String propClass = getTagValue("property-class", eElement);
+
+ Element attribute = destDocument.createElement("attribute");
+ Element atributeDescription = destDocument.createElement("description");
+ atributeDescription.setTextContent(propDescription);
+ attribute.appendChild(atributeDescription);
+
+ Element attributeName = destDocument.createElement("name");
+ attributeName.setTextContent(propName);
+ attribute.appendChild(attributeName);
+
+ Element attributeClass = destDocument.createElement("type");
+ attributeClass.setTextContent(propClass);
+ attribute.appendChild(attributeClass);
+
+ tagElement.appendChild(attribute);
+ }
+
+ }
+
+ return tagElement;
+
+ }
+
+ private static String getTagValue(String sTag, Element eElement)
+ {
+ NodeList nlList = eElement.getElementsByTagName(sTag).item(0).getChildNodes();
+
+ Node nValue = (Node) nlList.item(0);
+
+ return nValue.getNodeValue();
+ }
+
+ private void writeFileContent(File outXML, String content) throws IOException
+ {
+ log.info("Updating " + outXML);
+ FileOutputStream fos = new FileOutputStream(outXML);
+ fos.write(content.getBytes());
+
+ }
+
+ public void updateFile(File outXML, List<Element> tags) throws Exception
+ {
+ DocumentBuilderFactory docFactory = DocumentBuilderFactory.newInstance();
+ DocumentBuilder docBuilder = docFactory.newDocumentBuilder();
+ Document doc = docBuilder.parse(outXML);
+
+ for (Element tag : tags)
+ {
+ Comment comment = doc.createComment("Converter added by seam-cdk-helper plugin");
+ Node firstchild = doc.getFirstChild();
+ firstchild.appendChild(comment);
+ firstchild.appendChild(doc.importNode(tag, true));
+ }
+
+ // ///////////////
+ // Output the XML
+ TransformerFactory tf = TransformerFactory.newInstance();
+ tf.setAttribute("indent-number", new Integer(4));
+
+ Transformer transformer = tf.newTransformer();
+ transformer.setOutputProperty(OutputKeys.ENCODING, "utf-8");
+ transformer.setOutputProperty(OutputKeys.OMIT_XML_DECLARATION, "no");
+ transformer.setOutputProperty(OutputKeys.INDENT, "yes");
+ transformer.setOutputProperty("{http://xml.apache.org/xslt}indent-amount", "4");
+
+ DOMImplementation domImplementation = doc.getImplementation();
+ if (domImplementation.hasFeature("LS", "3.0") && domImplementation.hasFeature("Core", "2.0"))
+ {
+ DOMImplementationLS domImplementationLS = (DOMImplementationLS) domImplementation.getFeature("LS", "3.0");
+ LSSerializer lsSerializer = domImplementationLS.createLSSerializer();
+ DOMConfiguration domConfiguration = lsSerializer.getDomConfig();
+ if (domConfiguration.canSetParameter("format-pretty-print", true))
+ {
+ lsSerializer.getDomConfig().setParameter("format-pretty-print", true);
+ LSOutput lsOutput = domImplementationLS.createLSOutput();
+ lsOutput.setEncoding("UTF-8");
+ StringWriter stringWriter = new StringWriter();
+ lsOutput.setCharacterStream(stringWriter);
+ lsSerializer.write(doc, lsOutput);
+ writeFileContent(outXML, stringWriter.toString());
+ }
+ else
+ {
+ throw new RuntimeException("DOMConfiguration 'format-pretty-print' parameter isn't settable.");
+ }
+ }
+ else
+ {
+ throw new RuntimeException("DOM 3.0 LS and/or DOM 2.0 Core not supported.");
+ }
+ }
+}
Modified: branches/community/Seam_2_3/seam-reference-guide/src/docbook/en-US/Controls.xml
===================================================================
--- branches/community/Seam_2_3/seam-reference-guide/src/docbook/en-US/Controls.xml 2012-08-20 10:02:48 UTC (rev 15057)
+++ branches/community/Seam_2_3/seam-reference-guide/src/docbook/en-US/Controls.xml 2012-08-20 11:24:57 UTC (rev 15058)
@@ -304,7 +304,7 @@
<section>
<title>Converters and Validators</title>
-<!-- <section>
+ <section>
<title><literal><s:convertDateTime></literal></title>
<para><emphasis>Description</emphasis></para>
@@ -318,14 +318,11 @@
<s:convertDateTime type="both" dateStyle="full"/>
</h:outputText>]]></programlisting>
- <warning><para>This is not supported, use f:convertDateTime instead</para></warning>
</section>
<section>
<title><literal><s:convertEntity></literal></title>
- <warning><para>This is not supported, use <![CDATA[<f:converter converterId="your_converter" />]]> instead</para></warning>
-
<para><emphasis>Description</emphasis></para>
<para>
Assigns an entity converter to the current component. This is
@@ -494,7 +491,6 @@
</h:outputText>]]></programlisting>
</section>
- -->
<section>
<title><literal><s:validateEquality></literal></title>
@@ -973,7 +969,8 @@
<programlisting role="XHTML"><![CDATA[<h:selectOneRadio id="radioList"
layout="lineDirection"
value="#{newPayment.paymentFrequency}">
- <f:converter converterId="org.jboss.seam.ui.EnumConverter" />
+ <!-- JSF 2 way <f:converter converterId="org.jboss.seam.ui.EnumConverter" />-->
+ <s:convertEnum />
<s:enumItem enumValue="ONCE" label="Only Once" />
<s:enumItem enumValue="EVERY_MINUTE" label="Every Minute" />
<s:enumItem enumValue="HOURLY" label="Every Hour" />
12 years, 4 months
Seam SVN: r15056 - branches/community/Seam_2_3/jboss-seam/src/main/java/org/jboss/seam.
by seam-commits@lists.jboss.org
Author: maschmid
Date: 2012-08-17 07:30:51 -0400 (Fri, 17 Aug 2012)
New Revision: 15056
Modified:
branches/community/Seam_2_3/jboss-seam/src/main/java/org/jboss/seam/Component.java
Log:
JBSEAM-5006 fix
Modified: branches/community/Seam_2_3/jboss-seam/src/main/java/org/jboss/seam/Component.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam/src/main/java/org/jboss/seam/Component.java 2012-08-16 14:13:24 UTC (rev 15055)
+++ branches/community/Seam_2_3/jboss-seam/src/main/java/org/jboss/seam/Component.java 2012-08-17 11:30:51 UTC (rev 15056)
@@ -315,7 +315,7 @@
log.warn("Interceptors are disabled for @Synchronized component - synchronization will be disabled for: " + name);
}
- if (hasAnnotation && type != ComponentType.STATEFUL_SESSION_BEAN)
+ if (hasAnnotation && type == ComponentType.STATEFUL_SESSION_BEAN)
{
log.warn("Seam synchronization interceptor is disabled for @Synchronized @Stateful component - Seam synchronization will be disabled for: " + name);
}
12 years, 5 months
Seam SVN: r15055 - in branches/community/Seam_2_3/examples-ee6/dvdstore/dvdstore-tests: src and 4 other directories.
by seam-commits@lists.jboss.org
Author: maschmid
Date: 2012-08-16 10:13:24 -0400 (Thu, 16 Aug 2012)
New Revision: 15055
Added:
branches/community/Seam_2_3/examples-ee6/dvdstore/dvdstore-tests/src/main/
branches/community/Seam_2_3/examples-ee6/dvdstore/dvdstore-tests/src/main/webapp/
branches/community/Seam_2_3/examples-ee6/dvdstore/dvdstore-tests/src/main/webapp/WEB-INF/
branches/community/Seam_2_3/examples-ee6/dvdstore/dvdstore-tests/src/main/webapp/WEB-INF/components.xml
branches/community/Seam_2_3/examples-ee6/dvdstore/dvdstore-tests/src/main/webapp/WEB-INF/web.xml
Modified:
branches/community/Seam_2_3/examples-ee6/dvdstore/dvdstore-tests/pom.xml
branches/community/Seam_2_3/examples-ee6/dvdstore/dvdstore-tests/src/test/java/com/jboss/dvd/seam/test/BestSellersTest.java
branches/community/Seam_2_3/examples-ee6/dvdstore/dvdstore-tests/src/test/java/com/jboss/dvd/seam/test/OrderTest.java
branches/community/Seam_2_3/examples-ee6/dvdstore/dvdstore-tests/src/test/java/com/jboss/dvd/seam/test/ProductUnitTest.java
branches/community/Seam_2_3/examples-ee6/dvdstore/dvdstore-tests/src/test/java/com/jboss/dvd/seam/test/SearchTest.java
branches/community/Seam_2_3/examples-ee6/dvdstore/dvdstore-tests/src/test/java/com/jboss/dvd/seam/test/StoreManagerTest.java
Log:
dvdstore-tests, deploy tests as a war
Modified: branches/community/Seam_2_3/examples-ee6/dvdstore/dvdstore-tests/pom.xml
===================================================================
--- branches/community/Seam_2_3/examples-ee6/dvdstore/dvdstore-tests/pom.xml 2012-08-16 10:52:51 UTC (rev 15054)
+++ branches/community/Seam_2_3/examples-ee6/dvdstore/dvdstore-tests/pom.xml 2012-08-16 14:13:24 UTC (rev 15055)
@@ -11,6 +11,11 @@
<groupId>org.jboss.seam.examples-ee6.dvdstore</groupId>
<artifactId>dvdstore-tests</artifactId>
<name>Dvdstore Integration Tests Module (EE6)</name>
+ <packaging>war</packaging>
+
+ <properties>
+ <jndiPattern>java:app/seam-dvdstore/#{ejbName}</jndiPattern>
+ </properties>
<dependencies>
<dependency>
@@ -18,13 +23,73 @@
<artifactId>dvdstore-ejb</artifactId>
<type>ejb</type>
<scope>test</scope>
- </dependency>
+ </dependency>
+
<dependency>
+ <groupId>org.jbpm.jbpm3</groupId>
+ <artifactId>jbpm-jpdl</artifactId>
+ <exclusions>
+ <exclusion>
+ <groupId>org.apache.jackrabbit</groupId>
+ <artifactId>jackrabbit-core</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>cglib</groupId>
+ <artifactId>cglib</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>org.slf4j</groupId>
+ <artifactId>slf4j-api</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>org.slf4j</groupId>
+ <artifactId>slf4j-log4j12</artifactId>
+ </exclusion>
+ <exclusion>
+ <artifactId>hibernate-ehcache</artifactId>
+ <groupId>org.hibernate</groupId>
+ </exclusion>
+ <exclusion>
+ <artifactId>dom4j</artifactId>
+ <groupId>dom4j</groupId>
+ </exclusion>
+ </exclusions>
+ </dependency>
+
+ <dependency>
+ <groupId>org.hibernate</groupId>
+ <artifactId>hibernate-search</artifactId>
+ <exclusions>
+ <exclusion>
+ <groupId>org.hibernate</groupId>
+ <artifactId>hibernate-core</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>org.hibernate</groupId>
+ <artifactId>ejb3-persistence</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>javax.transaction</groupId>
+ <artifactId>jta</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>hsqldb</groupId>
+ <artifactId>hsqldb</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>org.jboss.logging</groupId>
+ <artifactId>jboss-logging</artifactId>
+ </exclusion>
+ </exclusions>
+ </dependency>
+
+ <dependency>
<groupId>org.jboss.seam</groupId>
<artifactId>jboss-seam</artifactId>
<type>ejb</type>
- <scope>test</scope>
+ <scope>compile</scope>
</dependency>
+
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-log4j12</artifactId>
@@ -38,10 +103,12 @@
<dependency>
<groupId>org.seleniumhq.selenium</groupId>
<artifactId>selenium-server</artifactId>
+ <scope>test</scope>
</dependency>
<dependency>
<groupId>org.seleniumhq.selenium</groupId>
<artifactId>selenium-java</artifactId>
+ <scope>test</scope>
</dependency>
<dependency>
<groupId>org.jboss.seam</groupId>
@@ -53,7 +120,7 @@
<artifactId>hibernate-jpa-2.0-api</artifactId>
<scope>provided</scope>
</dependency>
- <dependency>
+ <dependency>
<groupId>org.jboss.arquillian.junit</groupId>
<artifactId>arquillian-junit-container</artifactId>
<scope>test</scope>
@@ -66,14 +133,15 @@
</dependency>
<dependency>
- <groupId>log4j</groupId>
- <artifactId>log4j</artifactId>
- <scope>test</scope>
+ <groupId>log4j</groupId>
+ <artifactId>log4j</artifactId>
+ <scope>test</scope>
</dependency>
<dependency>
<groupId>org.jboss.spec.javax.el</groupId>
<artifactId>jboss-el-api_2.2_spec</artifactId>
+ <scope>provided</scope>
</dependency>
<dependency>
@@ -85,6 +153,17 @@
</dependencies>
<build>
+ <finalName>seam-dvdstore</finalName>
+
+ <resources>
+ <resource>
+ <directory>src/main/resources</directory>
+ </resource>
+ <resource>
+ <directory>../dvdstore-ejb/src/main/resources</directory>
+ </resource>
+ </resources>
+
<testResources>
<testResource>
<directory>src/test/resources</directory>
@@ -109,6 +188,37 @@
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-war-plugin</artifactId>
+ <configuration>
+ <webResources>
+ <resource>
+ <directory>src/main/webapp</directory>
+ <filtering>true</filtering>
+ </resource>
+ <resource>
+ <!-- Get jboss-deployment-strucutre.xml and the datasource. -->
+ <targetPath>WEB-INF</targetPath>
+ <directory>../dvdstore-ear/src/main/application/META-INF/</directory>
+ </resource>
+ <resource>
+ <!-- Get ejb-jar.xml -->
+ <targetPath>WEB-INF</targetPath>
+ <directory>../dvdstore-ejb/src/main/resources/META-INF/</directory>
+ <includes>
+ <include>ejb-jar.xml</include>
+ </includes>
+ </resource>
+ <resource>
+ <directory>../dvdstore-web/src/main/webapp</directory>
+ <includes>
+ <include>WEB-INF/pages.xml</include>
+ </includes>
+ </resource>
+ </webResources>
+ </configuration>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
<skip>true</skip>
Added: branches/community/Seam_2_3/examples-ee6/dvdstore/dvdstore-tests/src/main/webapp/WEB-INF/components.xml
===================================================================
--- branches/community/Seam_2_3/examples-ee6/dvdstore/dvdstore-tests/src/main/webapp/WEB-INF/components.xml (rev 0)
+++ branches/community/Seam_2_3/examples-ee6/dvdstore/dvdstore-tests/src/main/webapp/WEB-INF/components.xml 2012-08-16 14:13:24 UTC (rev 15055)
@@ -0,0 +1,68 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<components xmlns="http://jboss.org/schema/seam/components"
+ xmlns:core="http://jboss.org/schema/seam/core"
+ xmlns:bpm="http://jboss.org/schema/seam/bpm"
+ xmlns:persistence="http://jboss.org/schema/seam/persistence"
+ xmlns:security="http://jboss.org/schema/seam/security"
+ xmlns:framework="http://jboss.org/schema/seam/framework"
+ xmlns:transaction="http://jboss.org/schema/seam/transaction"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation=
+ "http://jboss.org/schema/seam/core http://jboss.org/schema/seam/core-2.3.xsd
+ http://jboss.org/schema/seam/framework http://jboss.org/schema/seam/transaction-2.3.xsd
+ http://jboss.org/schema/seam/bpm http://jboss.org/schema/seam/bpm-2.3.xsd
+ http://jboss.org/schema/seam/persistence http://jboss.org/schema/seam/persistence-2.3.xsd
+ http://jboss.org/schema/seam/security http://jboss.org/schema/seam/security-2.3.xsd
+ http://jboss.org/schema/seam/framework http://jboss.org/schema/seam/framework-2.3.xsd
+ http://jboss.org/schema/seam/components http://jboss.org/schema/seam/components-2.3.xsd">
+
+ <core:init debug="true" jndi-pattern="@jndiPattern@"/>
+ <transaction:ejb-transaction/>
+
+ <!-- 120 second conversation timeout -->
+ <core:manager conversation-timeout="120000"/>
+
+ <bpm:jbpm>
+ <bpm:process-definitions>
+ <value>ordermanagement1.jpdl.xml</value>
+ </bpm:process-definitions>
+ </bpm:jbpm>
+
+ <security:identity authenticate-method="#{authenticator.authenticate}"/>
+
+ <persistence:managed-persistence-context name="entityManager"
+ auto-create="true"
+ persistence-unit-jndi-name="java:/dvdstoreEntityManagerFactory" />
+
+ <factory name="order"
+ value="#{orderHome.instance}"
+ scope="stateless"
+ auto-create="true"/>
+ <framework:entity-home name="orderHome"
+ entity-class="com.jboss.dvd.seam.Order"
+ scope="conversation"
+ auto-create="true">
+ <framework:id>#{orderId}</framework:id>
+ </framework:entity-home>
+
+
+ <framework:entity-query name="allCategories"
+ ejbql="select c from Category c"
+ order="c.name">
+ <!-- waiting for hibernate issue EJB-277
+ <framework:hints>
+ <key>org.hibernate.cacheable</key>
+ <value>true</value>
+ </framework:hints>
+ -->
+ </framework:entity-query>
+
+
+ <factory name="topProducts"
+ value="#{topQuery.resultList}" />
+ <framework:entity-query name="topQuery"
+ ejbql="select p from Product p"
+ order="p.inventory.sales desc"
+ max-results="8" />
+
+</components>
Added: branches/community/Seam_2_3/examples-ee6/dvdstore/dvdstore-tests/src/main/webapp/WEB-INF/web.xml
===================================================================
--- branches/community/Seam_2_3/examples-ee6/dvdstore/dvdstore-tests/src/main/webapp/WEB-INF/web.xml (rev 0)
+++ branches/community/Seam_2_3/examples-ee6/dvdstore/dvdstore-tests/src/main/webapp/WEB-INF/web.xml 2012-08-16 14:13:24 UTC (rev 15055)
@@ -0,0 +1,12 @@
+<?xml version="1.0" ?>
+
+<web-app version="3.0"
+ 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-app_3_0.xsd">
+
+ <listener>
+ <listener-class>org.jboss.seam.mock.MockSeamListener</listener-class>
+ </listener>
+
+</web-app>
Modified: branches/community/Seam_2_3/examples-ee6/dvdstore/dvdstore-tests/src/test/java/com/jboss/dvd/seam/test/BestSellersTest.java
===================================================================
--- branches/community/Seam_2_3/examples-ee6/dvdstore/dvdstore-tests/src/test/java/com/jboss/dvd/seam/test/BestSellersTest.java 2012-08-16 10:52:51 UTC (rev 15054)
+++ branches/community/Seam_2_3/examples-ee6/dvdstore/dvdstore-tests/src/test/java/com/jboss/dvd/seam/test/BestSellersTest.java 2012-08-16 14:13:24 UTC (rev 15055)
@@ -11,12 +11,12 @@
import org.jboss.shrinkwrap.api.Archive;
import org.jboss.shrinkwrap.api.ShrinkWrap;
import org.jboss.shrinkwrap.api.importer.ZipImporter;
-import org.jboss.shrinkwrap.api.spec.EnterpriseArchive;
import org.jboss.shrinkwrap.api.spec.WebArchive;
import org.junit.Assert;
import org.junit.Test;
import org.junit.runner.RunWith;
+import com.jboss.dvd.seam.Accept;
import com.jboss.dvd.seam.Product;
@RunWith(Arquillian.class)
@@ -28,15 +28,10 @@
@OverProtocol("Servlet 3.0")
public static Archive<?> createDeployment()
{
- EnterpriseArchive er = ShrinkWrap.create(ZipImporter.class, "seam-dvdstore.ear").importFrom(new File("../dvdstore-ear/target/seam-dvdstore.ear")).as(EnterpriseArchive.class);
- WebArchive web = er.getAsType(WebArchive.class, "dvdstore-web.war");
- web.addClasses(BestSellersTest.class);
-
- // Install org.jboss.seam.mock.MockSeamListener
- web.delete("/WEB-INF/web.xml");
- web.addAsWebInfResource("web.xml");
+ WebArchive web = ShrinkWrap.create(ZipImporter.class, "seam-dvdstore.war").importFrom(new File("target/seam-dvdstore.war")).as(WebArchive.class);
+ web.addPackages(true, Accept.class.getPackage());
- return er;
+ return web;
}
Modified: branches/community/Seam_2_3/examples-ee6/dvdstore/dvdstore-tests/src/test/java/com/jboss/dvd/seam/test/OrderTest.java
===================================================================
--- branches/community/Seam_2_3/examples-ee6/dvdstore/dvdstore-tests/src/test/java/com/jboss/dvd/seam/test/OrderTest.java 2012-08-16 10:52:51 UTC (rev 15054)
+++ branches/community/Seam_2_3/examples-ee6/dvdstore/dvdstore-tests/src/test/java/com/jboss/dvd/seam/test/OrderTest.java 2012-08-16 14:13:24 UTC (rev 15055)
@@ -16,13 +16,13 @@
import org.jboss.shrinkwrap.api.Archive;
import org.jboss.shrinkwrap.api.ShrinkWrap;
import org.jboss.shrinkwrap.api.importer.ZipImporter;
-import org.jboss.shrinkwrap.api.spec.EnterpriseArchive;
import org.jboss.shrinkwrap.api.spec.WebArchive;
import org.junit.Test;
import org.junit.runner.RunWith;
import com.jboss.dvd.seam.Order;
import com.jboss.dvd.seam.Order.Status;
+import com.jboss.dvd.seam.Accept;
import com.jboss.dvd.seam.Product;
import com.jboss.dvd.seam.ShoppingCart;
import com.jboss.dvd.seam.User;
@@ -36,15 +36,10 @@
@OverProtocol("Servlet 3.0")
public static Archive<?> createDeployment()
{
- EnterpriseArchive er = ShrinkWrap.create(ZipImporter.class, "seam-dvdstore.ear").importFrom(new File("../dvdstore-ear/target/seam-dvdstore.ear")).as(EnterpriseArchive.class);
- WebArchive web = er.getAsType(WebArchive.class, "dvdstore-web.war");
- web.addClasses(OrderTest.class);
-
- // Install org.jboss.seam.mock.MockSeamListener
- web.delete("/WEB-INF/web.xml");
- web.addAsWebInfResource("web.xml");
+ WebArchive web = ShrinkWrap.create(ZipImporter.class, "seam-dvdstore.war").importFrom(new File("target/seam-dvdstore.war")).as(WebArchive.class);
+ web.addPackages(true, Accept.class.getPackage());
- return er;
+ return web;
}
@Test
Modified: branches/community/Seam_2_3/examples-ee6/dvdstore/dvdstore-tests/src/test/java/com/jboss/dvd/seam/test/ProductUnitTest.java
===================================================================
--- branches/community/Seam_2_3/examples-ee6/dvdstore/dvdstore-tests/src/test/java/com/jboss/dvd/seam/test/ProductUnitTest.java 2012-08-16 10:52:51 UTC (rev 15054)
+++ branches/community/Seam_2_3/examples-ee6/dvdstore/dvdstore-tests/src/test/java/com/jboss/dvd/seam/test/ProductUnitTest.java 2012-08-16 14:13:24 UTC (rev 15055)
@@ -12,33 +12,27 @@
import org.jboss.shrinkwrap.api.Archive;
import org.jboss.shrinkwrap.api.ShrinkWrap;
import org.jboss.shrinkwrap.api.importer.ZipImporter;
-import org.jboss.shrinkwrap.api.spec.EnterpriseArchive;
import org.jboss.shrinkwrap.api.spec.WebArchive;
import org.junit.Assert;
import org.junit.Ignore;
import org.junit.Test;
import org.junit.runner.RunWith;
+import com.jboss.dvd.seam.Accept;
import com.jboss.dvd.seam.Product;
@RunWith(Arquillian.class)
public class ProductUnitTest
extends JUnitSeamTest
-{
-
+{
@Deployment(name = "ProductUnitTest")
@OverProtocol("Servlet 3.0")
public static Archive<?> createDeployment()
{
- EnterpriseArchive er = ShrinkWrap.create(ZipImporter.class, "seam-dvdstore.ear").importFrom(new File("../dvdstore-ear/target/seam-dvdstore.ear")).as(EnterpriseArchive.class);
- WebArchive web = er.getAsType(WebArchive.class, "dvdstore-web.war");
- web.addClasses(ProductUnitTest.class);
-
- // Install org.jboss.seam.mock.MockSeamListener
- web.delete("/WEB-INF/web.xml");
- web.addAsWebInfResource("web.xml");
+ WebArchive web = ShrinkWrap.create(ZipImporter.class, "seam-dvdstore.war").importFrom(new File("target/seam-dvdstore.war")).as(WebArchive.class);
+ web.addPackages(true, Accept.class.getPackage());
- return er;
+ return web;
}
@Ignore //AS7-4576
Modified: branches/community/Seam_2_3/examples-ee6/dvdstore/dvdstore-tests/src/test/java/com/jboss/dvd/seam/test/SearchTest.java
===================================================================
--- branches/community/Seam_2_3/examples-ee6/dvdstore/dvdstore-tests/src/test/java/com/jboss/dvd/seam/test/SearchTest.java 2012-08-16 10:52:51 UTC (rev 15054)
+++ branches/community/Seam_2_3/examples-ee6/dvdstore/dvdstore-tests/src/test/java/com/jboss/dvd/seam/test/SearchTest.java 2012-08-16 14:13:24 UTC (rev 15055)
@@ -12,12 +12,12 @@
import org.jboss.shrinkwrap.api.Archive;
import org.jboss.shrinkwrap.api.ShrinkWrap;
import org.jboss.shrinkwrap.api.importer.ZipImporter;
-import org.jboss.shrinkwrap.api.spec.EnterpriseArchive;
import org.jboss.shrinkwrap.api.spec.WebArchive;
import org.junit.Assert;
import org.junit.Test;
import org.junit.runner.RunWith;
+import com.jboss.dvd.seam.Accept;
import com.jboss.dvd.seam.FullTextSearch;
import com.jboss.dvd.seam.Product;
@@ -29,15 +29,10 @@
@OverProtocol("Servlet 3.0")
public static Archive<?> createDeployment()
{
- EnterpriseArchive er = ShrinkWrap.create(ZipImporter.class, "seam-dvdstore.ear").importFrom(new File("../dvdstore-ear/target/seam-dvdstore.ear")).as(EnterpriseArchive.class);
- WebArchive web = er.getAsType(WebArchive.class, "dvdstore-web.war");
- web.addClasses(SearchTest.class);
-
- // Install org.jboss.seam.mock.MockSeamListener
- web.delete("/WEB-INF/web.xml");
- web.addAsWebInfResource("web.xml");
+ WebArchive web = ShrinkWrap.create(ZipImporter.class, "seam-dvdstore.war").importFrom(new File("target/seam-dvdstore.war")).as(WebArchive.class);
+ web.addPackages(true, Accept.class.getPackage());
- return er;
+ return web;
}
@Test
Modified: branches/community/Seam_2_3/examples-ee6/dvdstore/dvdstore-tests/src/test/java/com/jboss/dvd/seam/test/StoreManagerTest.java
===================================================================
--- branches/community/Seam_2_3/examples-ee6/dvdstore/dvdstore-tests/src/test/java/com/jboss/dvd/seam/test/StoreManagerTest.java 2012-08-16 10:52:51 UTC (rev 15054)
+++ branches/community/Seam_2_3/examples-ee6/dvdstore/dvdstore-tests/src/test/java/com/jboss/dvd/seam/test/StoreManagerTest.java 2012-08-16 14:13:24 UTC (rev 15055)
@@ -10,12 +10,12 @@
import org.jboss.shrinkwrap.api.Archive;
import org.jboss.shrinkwrap.api.ShrinkWrap;
import org.jboss.shrinkwrap.api.importer.ZipImporter;
-import org.jboss.shrinkwrap.api.spec.EnterpriseArchive;
import org.jboss.shrinkwrap.api.spec.WebArchive;
import org.junit.Assert;
import org.junit.Test;
import org.junit.runner.RunWith;
+import com.jboss.dvd.seam.Accept;
import com.jboss.dvd.seam.StoreManager;
@RunWith(Arquillian.class)
@@ -27,15 +27,10 @@
@OverProtocol("Servlet 3.0")
public static Archive<?> createDeployment()
{
- EnterpriseArchive er = ShrinkWrap.create(ZipImporter.class, "seam-dvdstore.ear").importFrom(new File("../dvdstore-ear/target/seam-dvdstore.ear")).as(EnterpriseArchive.class);
- WebArchive web = er.getAsType(WebArchive.class, "dvdstore-web.war");
- web.addClasses(StoreManagerTest.class);
-
- // Install org.jboss.seam.mock.MockSeamListener
- web.delete("/WEB-INF/web.xml");
- web.addAsWebInfResource("web.xml");
+ WebArchive web = ShrinkWrap.create(ZipImporter.class, "seam-dvdstore.war").importFrom(new File("target/seam-dvdstore.war")).as(WebArchive.class);
+ web.addPackages(true, Accept.class.getPackage());
- return er;
+ return web;
}
@Test
12 years, 5 months