Seam SVN: r9566 - in trunk/src/main/org/jboss/seam/security: openid and 1 other directory.
by seam-commits@lists.jboss.org
Author: norman.richards(a)jboss.com
Date: 2008-11-15 00:05:30 -0500 (Sat, 15 Nov 2008)
New Revision: 9566
Added:
trunk/src/main/org/jboss/seam/security/openid/
trunk/src/main/org/jboss/seam/security/openid/OpenId.java
trunk/src/main/org/jboss/seam/security/openid/OpenIdPhaseListener.java
trunk/src/main/org/jboss/seam/security/openid/OpenIdPrincipal.java
Modified:
trunk/src/main/org/jboss/seam/security/Identity.java
Log:
JBSEAM-2655
Modified: trunk/src/main/org/jboss/seam/security/Identity.java
===================================================================
--- trunk/src/main/org/jboss/seam/security/Identity.java 2008-11-15 05:00:59 UTC (rev 9565)
+++ trunk/src/main/org/jboss/seam/security/Identity.java 2008-11-15 05:05:30 UTC (rev 9566)
@@ -178,6 +178,12 @@
return attemptLogin ? tryLogin() : isLoggedIn();
}
+
+ public void acceptExternallyAuthenticatedPrincipal(Principal principal) {
+ getSubject().getPrincipals().add(principal);
+ this.principal = principal;
+ }
+
public Principal getPrincipal()
{
return principal;
@@ -309,6 +315,8 @@
}
}
+
+
/**
*
* @throws LoginException
@@ -325,6 +333,7 @@
}
}
+
protected void authenticate(LoginContext loginContext)
throws LoginException
{
Added: trunk/src/main/org/jboss/seam/security/openid/OpenId.java
===================================================================
--- trunk/src/main/org/jboss/seam/security/openid/OpenId.java (rev 0)
+++ trunk/src/main/org/jboss/seam/security/openid/OpenId.java 2008-11-15 05:05:30 UTC (rev 9566)
@@ -0,0 +1,191 @@
+package org.jboss.seam.security.openid;
+
+
+
+import org.openid4java.*;
+import org.openid4java.consumer.*;
+import org.openid4java.discovery.*;
+import org.openid4java.message.*;
+import org.openid4java.message.ax.*;
+
+import java.util.List;
+import java.io.IOException;
+
+import javax.servlet.http.*;
+
+import org.jboss.seam.annotations.*;
+import org.jboss.seam.*;
+import org.jboss.seam.faces.*;
+import org.jboss.seam.core.*;
+import org.jboss.seam.security.*;
+
+import javax.faces.context.ExternalContext;
+import javax.faces.context.FacesContext;
+
+@Name("openid")
+(a)Install(precedence=Install.BUILT_IN, classDependencies="org.openid4java.consumer.ConsumerManager")
+(a)Scope(ScopeType.SESSION)
+public class OpenId
+{
+ String id;
+ String validatedId;
+
+ ConsumerManager manager;
+ DiscoveryInformation discovered;
+
+ @Create
+ public void init()
+ throws ConsumerException
+ {
+ manager = new ConsumerManager();
+ }
+
+
+ public String getId() {
+ return id;
+ }
+
+ public void setId(String id) {
+ this.id = id;
+ }
+
+
+ public String returnToUrl() {
+ FacesContext context = FacesContext.getCurrentInstance();
+ HttpServletRequest request = (HttpServletRequest) context.getExternalContext().getRequest();
+ String returnToUrl = "http://" + request.getServerName() + ":" + request.getServerPort() +
+ context.getApplication().getViewHandler().getActionURL(context, "/openid.xhtml");
+ return returnToUrl;
+ }
+ public void login()
+ throws IOException
+ {
+ validatedId = null;
+
+ String returnToUrl = returnToUrl();
+
+ System.out.println("return to " + returnToUrl);
+ String url = authRequest(id, returnToUrl);
+ System.out.println("auth to --> " + url);
+
+ Redirect redirect = Redirect.instance();
+ redirect.captureCurrentView();
+
+ FacesManager.instance().redirectToExternalURL(url);
+ }
+
+
+ // --- placing the authentication request ---
+ @SuppressWarnings("unchecked")
+ protected String authRequest(String userSuppliedString, String returnToUrl)
+ throws IOException
+ {
+ try {
+ // perform discovery on the user-supplied identifier
+ List discoveries = manager.discover(userSuppliedString);
+
+ // attempt to associate with the OpenID provider
+ // and retrieve one service endpoint for authentication
+ discovered = manager.associate(discoveries);
+
+ //// store the discovery information in the user's session
+ // httpReq.getSession().setAttribute("openid-disc", discovered);
+
+ // obtain a AuthRequest message to be sent to the OpenID provider
+ AuthRequest authReq = manager.authenticate(discovered, returnToUrl);
+
+ // Attribute Exchange example: fetching the 'email' attribute
+ FetchRequest fetch = FetchRequest.createFetchRequest();
+ fetch.addAttribute("email",
+ "http://schema.openid.net/contact/email", // type URI
+ true); // required
+
+ // attach the extension to the authentication request
+ authReq.addExtension(fetch);
+
+ return authReq.getDestinationUrl(true);
+ // httpResp.sendRedirect(authReq.getDestinationUrl(true));
+ } catch (OpenIDException e) {
+ e.printStackTrace();
+ }
+
+ return null;
+ }
+
+ public void verify()
+ {
+ ExternalContext context = javax.faces.context.FacesContext.getCurrentInstance().getExternalContext();
+ HttpServletRequest request = (HttpServletRequest) context.getRequest();
+
+ validatedId = verifyResponse(request);
+ }
+
+
+ public boolean loginImmediately() {
+ System.out.println("* LOGIN IMMEDIATELY! " + validatedId);
+ if (validatedId !=null) {
+ Identity.instance().acceptExternallyAuthenticatedPrincipal((new OpenIdPrincipal(validatedId)));
+ return true;
+ }
+
+ return false;
+ }
+
+ public boolean isValid() {
+ System.out.println("is valid?" + validatedId);
+ return validatedId != null;
+ }
+
+ public String validatedId() {
+ return validatedId;
+ }
+
+ @SuppressWarnings("unchecked")
+ public String verifyResponse(HttpServletRequest httpReq)
+ {
+ try {
+ // extract the parameters from the authentication response
+ // (which comes in as a HTTP request from the OpenID provider)
+ ParameterList response =
+ new ParameterList(httpReq.getParameterMap());
+
+
+ System.out.println("DISCOVERED IS " + discovered);
+
+ // extract the receiving URL from the HTTP request
+ StringBuffer receivingURL = httpReq.getRequestURL();
+ String queryString = httpReq.getQueryString();
+ if (queryString != null && queryString.length() > 0)
+ receivingURL.append("?").append(httpReq.getQueryString());
+
+ // verify the response; ConsumerManager needs to be the same
+ // (static) instance used to place the authentication request
+ VerificationResult verification = manager.verify(
+ receivingURL.toString(),
+ response, discovered);
+
+ // examine the verification result and extract the verified identifier
+ Identifier verified = verification.getVerifiedId();
+ if (verified != null) {
+ AuthSuccess authSuccess =
+ (AuthSuccess) verification.getAuthResponse();
+
+ if (authSuccess.hasExtension(AxMessage.OPENID_NS_AX)) {
+ FetchResponse fetchResp = (FetchResponse) authSuccess
+ .getExtension(AxMessage.OPENID_NS_AX);
+
+ List emails = fetchResp.getAttributeValues("email");
+ String email = (String) emails.get(0);
+ System.out.println("XXX email is " + email);
+ }
+
+ return verified.getIdentifier();
+ }
+ } catch (OpenIDException e) {
+ // present error to the user
+ }
+
+ return null;
+ }
+
+}
Added: trunk/src/main/org/jboss/seam/security/openid/OpenIdPhaseListener.java
===================================================================
--- trunk/src/main/org/jboss/seam/security/openid/OpenIdPhaseListener.java (rev 0)
+++ trunk/src/main/org/jboss/seam/security/openid/OpenIdPhaseListener.java 2008-11-15 05:05:30 UTC (rev 9566)
@@ -0,0 +1,75 @@
+package org.jboss.seam.security.openid;
+
+
+import javax.faces.context.*;
+import javax.faces.event.*;
+import javax.servlet.http.*;
+import java.io.*;
+
+import org.jboss.seam.Component;
+import org.jboss.seam.navigation.Pages;
+
+@SuppressWarnings("serial")
+public class OpenIdPhaseListener
+ implements PhaseListener
+{
+
+ @SuppressWarnings("unchecked")
+ public void beforePhase(PhaseEvent event)
+ {
+ String viewId = Pages.getCurrentViewId();
+
+ if (viewId==null || !viewId.startsWith("/openid.")) {
+ return;
+ }
+
+ OpenId open = (OpenId) Component.getInstance(OpenId.class);
+ if (open.getId() == null) {
+ try {
+ sendXRDS();
+ } catch (IOException e) {
+ // TODO Auto-generated catch block
+ e.printStackTrace();
+ }
+ return;
+ }
+
+ OpenId openid = (OpenId) Component.getInstance(OpenId.class);
+
+ openid.verify();
+
+ Pages.handleOutcome(event.getFacesContext(), null, "/openid.xhtml");
+ }
+
+
+
+ public void sendXRDS()
+ throws IOException
+ {
+ FacesContext context = FacesContext.getCurrentInstance();
+ ExternalContext extContext = context.getExternalContext();
+ HttpServletResponse response = (HttpServletResponse) extContext.getResponse();
+
+ response.setContentType("application/xrds+xml");
+ PrintWriter out = response.getWriter();
+
+ // XXX ENCODE THE URL!
+ OpenId open = (OpenId) Component.getInstance(OpenId.class);
+
+ out.println("<XRDS xmlns=\"xri://$xrd*($v*2.0)\"><XRD><Service>" +
+ "<Type>http://specs.openid.net/auth/2.0/return_to</Type><URI>" +
+ open.returnToUrl() + "</URI></Service></XRD></XRDS>");
+
+ context.responseComplete();
+ }
+
+
+ public void afterPhase(PhaseEvent event) {
+ }
+
+ public PhaseId getPhaseId()
+ {
+ return PhaseId.RENDER_RESPONSE;
+ }
+}
+
Added: trunk/src/main/org/jboss/seam/security/openid/OpenIdPrincipal.java
===================================================================
--- trunk/src/main/org/jboss/seam/security/openid/OpenIdPrincipal.java (rev 0)
+++ trunk/src/main/org/jboss/seam/security/openid/OpenIdPrincipal.java 2008-11-15 05:05:30 UTC (rev 9566)
@@ -0,0 +1,11 @@
+package org.jboss.seam.security.openid;
+
+import org.jboss.seam.security.SimplePrincipal;
+
+public class OpenIdPrincipal
+ extends SimplePrincipal
+{
+ public OpenIdPrincipal(String name) {
+ super(name);
+ }
+}
16 years
Seam SVN: r9565 - trunk/build.
by seam-commits@lists.jboss.org
Author: norman.richards(a)jboss.com
Date: 2008-11-15 00:00:59 -0500 (Sat, 15 Nov 2008)
New Revision: 9565
Modified:
trunk/build/core.pom.xml
trunk/build/root.pom.xml
Log:
JBSEAM-2655
Modified: trunk/build/core.pom.xml
===================================================================
--- trunk/build/core.pom.xml 2008-11-14 06:34:03 UTC (rev 9564)
+++ trunk/build/core.pom.xml 2008-11-15 05:00:59 UTC (rev 9565)
@@ -338,6 +338,12 @@
<artifactId>jboss-common-core</artifactId>
<optional>true</optional>
</dependency>
+
+ <dependency>
+ <groupId>org.openid4java</groupId>
+ <artifactId>openid4java</artifactId>
+ <optional>true</optional>
+ </dependency>
</dependencies>
Modified: trunk/build/root.pom.xml
===================================================================
--- trunk/build/root.pom.xml 2008-11-14 06:34:03 UTC (rev 9564)
+++ trunk/build/root.pom.xml 2008-11-15 05:00:59 UTC (rev 9565)
@@ -990,6 +990,59 @@
</dependency>
<dependency>
+ <groupId>org.openid4java</groupId>
+ <artifactId>openid4java</artifactId>
+ <version>0.9.4.339</version>
+ <exclusions>
+ <exclusion>
+ <groupId>com.ibm.icu</groupId>
+ <artifactId>icu4j</artifactId>
+ </exclusion>
+
+ <exclusion>
+ <groupId>xerces</groupId>
+ <artifactId>xercesImpl</artifactId>
+ </exclusion>
+
+ <exclusion>
+ <groupId>xml-security</groupId>
+ <artifactId>xmlsec</artifactId>
+ </exclusion>
+
+ <exclusion>
+ <groupId>commons-codec</groupId>
+ <artifactId>commons-codec</artifactId>
+ </exclusion>
+
+ <exclusion>
+ <groupId>commons-httpclient</groupId>
+ <artifactId>commons-httpclient</artifactId>
+ </exclusion>
+
+ <exclusion>
+ <groupId>log4j</groupId>
+ <artifactId>log4j</artifactId>
+ </exclusion>
+
+ <exclusion>
+ <groupId>jug</groupId>
+ <artifactId>jug</artifactId>
+ </exclusion>
+
+ <exclusion>
+ <groupId>xml-apis</groupId>
+ <artifactId>xml-apis</artifactId>
+ </exclusion>
+
+ <exclusion>
+ <groupId>xalan</groupId>
+ <artifactId>xalan</artifactId>
+ </exclusion>
+ </exclusions>
+ </dependency>
+
+
+ <dependency>
<groupId>com.google.gwt</groupId>
<artifactId>gwt-servlet</artifactId>
<version>1.5.2</version>
16 years
Seam SVN: r9563 - in trunk/src/main/org/jboss/seam: util and 1 other directory.
by seam-commits@lists.jboss.org
Author: shane.bryzak(a)jboss.com
Date: 2008-11-14 00:59:09 -0500 (Fri, 14 Nov 2008)
New Revision: 9563
Modified:
trunk/src/main/org/jboss/seam/deployment/FileDescriptor.java
trunk/src/main/org/jboss/seam/util/Resources.java
Log:
JBSEAM-3589
Modified: trunk/src/main/org/jboss/seam/deployment/FileDescriptor.java
===================================================================
--- trunk/src/main/org/jboss/seam/deployment/FileDescriptor.java 2008-11-14 05:30:17 UTC (rev 9562)
+++ trunk/src/main/org/jboss/seam/deployment/FileDescriptor.java 2008-11-14 05:59:09 UTC (rev 9563)
@@ -2,6 +2,9 @@
import java.net.URL;
+import org.jboss.seam.contexts.ServletLifecycle;
+import org.jboss.seam.util.Resources;
+
public class FileDescriptor
{
@@ -21,7 +24,7 @@
{
throw new NullPointerException("Name cannot be null, loading from " + classLoader);
}
- this.url = classLoader.getResource(name);
+ this.url = Resources.getResource(name, ServletLifecycle.getServletContext());
if (this.url == null)
{
throw new NullPointerException("Cannot find URL from classLoader for " + name + ", loading from " + classLoader);
Modified: trunk/src/main/org/jboss/seam/util/Resources.java
===================================================================
--- trunk/src/main/org/jboss/seam/util/Resources.java 2008-11-14 05:30:17 UTC (rev 9562)
+++ trunk/src/main/org/jboss/seam/util/Resources.java 2008-11-14 05:59:09 UTC (rev 9563)
@@ -43,6 +43,11 @@
public static URL getResource(String resource, ServletContext servletContext)
{
+ if (!resource.startsWith("/"))
+ {
+ resource = "/" + resource;
+ }
+
String stripped = resource.startsWith("/") ?
resource.substring(1) : resource;
16 years
Seam SVN: r9562 - trunk/src/main/org/jboss/seam.
by seam-commits@lists.jboss.org
Author: dan.j.allen
Date: 2008-11-14 00:30:17 -0500 (Fri, 14 Nov 2008)
New Revision: 9562
Modified:
trunk/src/main/org/jboss/seam/Component.java
Log:
JBSEAM-3652
Modified: trunk/src/main/org/jboss/seam/Component.java
===================================================================
--- trunk/src/main/org/jboss/seam/Component.java 2008-11-14 03:26:13 UTC (rev 9561)
+++ trunk/src/main/org/jboss/seam/Component.java 2008-11-14 05:30:17 UTC (rev 9562)
@@ -301,8 +301,8 @@
{
boolean hasAnnotation = getBeanClass().isAnnotationPresent(Synchronized.class);
- synchronize = ( scope==SESSION /*&& ! beanClass.isAnnotationPresent(ReadOnly.class)*/ ) ||
- hasAnnotation;
+ // Technically, we don't need to synchronize page-scoped components if StateManager#isSavingStateInClient(FacesContext) is true
+ synchronize = ( scope==SESSION || scope==PAGE || hasAnnotation );
if (synchronize)
{
16 years
Seam SVN: r9561 - in trunk/src: test/unit/org/jboss/seam/test/unit and 1 other directory.
by seam-commits@lists.jboss.org
Author: dan.j.allen
Date: 2008-11-13 22:26:13 -0500 (Thu, 13 Nov 2008)
New Revision: 9561
Added:
trunk/src/test/unit/org/jboss/seam/test/unit/InvocationControl.java
Modified:
trunk/src/main/org/jboss/seam/core/BijectionInterceptor.java
trunk/src/test/unit/org/jboss/seam/test/unit/FooBar.java
trunk/src/test/unit/org/jboss/seam/test/unit/InterceptorTest.java
Log:
JBSEAM-3652
Also, fixed the bijection reentry test so that it actually tests the injection correctly
Modified: trunk/src/main/org/jboss/seam/core/BijectionInterceptor.java
===================================================================
--- trunk/src/main/org/jboss/seam/core/BijectionInterceptor.java 2008-11-14 00:47:05 UTC (rev 9560)
+++ trunk/src/main/org/jboss/seam/core/BijectionInterceptor.java 2008-11-14 03:26:13 UTC (rev 9561)
@@ -27,7 +27,7 @@
private boolean injecting;
- private int counter = 0;
+ private int clients = 0;
private ReentrantLock lock = new ReentrantLock();
@@ -67,7 +67,7 @@
injected = true;
}
- counter++;
+ clients++;
}
finally
{
@@ -79,9 +79,7 @@
lock.lock();
try
{
- counter--;
-
- if (counter == 0)
+ if (clients == 1)
{
try
{
@@ -93,6 +91,7 @@
if (injected)
{
injected = false;
+ clients--;
component.disinject( invocation.getTarget() );
}
}
@@ -126,9 +125,9 @@
lock.lock();
try
{
- counter--;
+ clients--;
- if (counter == 0)
+ if (clients == 0)
{
injected = false;
component.disinject( invocation.getTarget() );
Modified: trunk/src/test/unit/org/jboss/seam/test/unit/FooBar.java
===================================================================
--- trunk/src/test/unit/org/jboss/seam/test/unit/FooBar.java 2008-11-14 00:47:05 UTC (rev 9560)
+++ trunk/src/test/unit/org/jboss/seam/test/unit/FooBar.java 2008-11-14 03:26:13 UTC (rev 9561)
@@ -1,7 +1,5 @@
package org.jboss.seam.test.unit;
-import java.util.concurrent.CountDownLatch;
-
import org.jboss.seam.ScopeType;
import org.jboss.seam.annotations.In;
import org.jboss.seam.annotations.Name;
@@ -13,14 +11,12 @@
{
@In Foo foo;
- public Foo delayedGetFoo(CountDownLatch latch)
+ public Foo delayedGetFoo(InvocationControl invocationControl)
{
- try
- {
- latch.await();
- }
- catch (InterruptedException ex) {}
-
+ //System.out.println("enter: " + invocationControl.getName() + " " + foo);
+ invocationControl.init();
+ invocationControl.markStarted();
+ //System.out.println("exit: " + invocationControl.getName() + " " + foo);
return foo;
}
}
Modified: trunk/src/test/unit/org/jboss/seam/test/unit/InterceptorTest.java
===================================================================
--- trunk/src/test/unit/org/jboss/seam/test/unit/InterceptorTest.java 2008-11-14 00:47:05 UTC (rev 9560)
+++ trunk/src/test/unit/org/jboss/seam/test/unit/InterceptorTest.java 2008-11-14 03:26:13 UTC (rev 9561)
@@ -2,7 +2,8 @@
package org.jboss.seam.test.unit;
import java.lang.reflect.Method;
-import java.util.concurrent.CountDownLatch;
+import java.util.HashMap;
+import java.util.Map;
import javax.faces.context.ExternalContext;
import javax.faces.event.PhaseId;
@@ -33,6 +34,8 @@
import org.jboss.seam.mock.MockFacesContext;
import org.jboss.seam.mock.MockServletContext;
import org.jboss.seam.persistence.PersistenceContexts;
+import org.jboss.seam.util.Reflections;
+import org.testng.Assert;
import org.testng.annotations.Test;
public class InterceptorTest
@@ -275,27 +278,38 @@
final BijectionInterceptor bi = new BijectionInterceptor();
bi.setComponent( new Component(FooBar.class, appContext) );
- final Method m = FooBar.class.getMethod("delayedGetFoo", CountDownLatch.class);
+ final Method m = FooBar.class.getMethod("delayedGetFoo", InvocationControl.class);
- final CountDownLatch latchA = new CountDownLatch(1);
- final CountDownLatch latchB = new CountDownLatch(1);
- final CountDownLatch latchC = new CountDownLatch(1);
- final CountDownLatch latchD = new CountDownLatch(1);
+ final InvocationControl invocationAControl = new InvocationControl("A");
+ final InvocationControl invocationBControl = new InvocationControl("B");
+ final InvocationControl invocationCControl = new InvocationControl("C");
+ final Map<String, Foo> invocationResults = new HashMap<String, Foo>();
+
final InvocationContext invocationA = new MockInvocationContext() {
@Override public Object getTarget() { return fooBar; }
@Override public Method getMethod() { return m; }
- @Override public Object[] getParameters() { return new Object[] { latchA }; }
+ @Override public Object[] getParameters() { return new Object[] { invocationAControl }; }
+ @Override public Object proceed() throws Exception { return Reflections.invoke(getMethod(), getTarget(), getParameters()); }
};
final InvocationContext invocationB = new MockInvocationContext() {
@Override public Object getTarget() { return fooBar; }
@Override public Method getMethod() { return m; }
- @Override public Object[] getParameters() { return new Object[] { latchB }; }
- };
+ @Override public Object[] getParameters() { return new Object[] { invocationBControl }; }
+ @Override public Object proceed() throws Exception { return Reflections.invoke(getMethod(), getTarget(), getParameters()); }
+ };
+ final InvocationContext invocationC = new MockInvocationContext() {
+ @Override public Object getTarget() { return fooBar; }
+ @Override public Method getMethod() { return m; }
+ @Override public Object[] getParameters() { return new Object[] { invocationCControl }; }
+ @Override public Object proceed() throws Exception { return Reflections.invoke(getMethod(), getTarget(), getParameters()); }
+ };
+
final WrappedException thread1Exception = new WrappedException();
final WrappedException thread2Exception = new WrappedException();
+ final WrappedException thread3Exception = new WrappedException();
new Thread(new Runnable() {
public void run() {
@@ -306,10 +320,9 @@
FacesLifecycle.resumeConversation(externalContext);
FacesLifecycle.setPhaseId(PhaseId.RENDER_RESPONSE);
- Contexts.getSessionContext().set("foo", foo);
-
+ Contexts.getSessionContext().set("foo", foo);
Foo result = (Foo) bi.aroundInvoke( invocationA );
- assert result == foo;
+ invocationResults.put("A", result);
}
catch (Exception ex)
{
@@ -317,7 +330,7 @@
}
finally
{
- latchC.countDown();
+ invocationAControl.markFinished();
}
}
}).start();
@@ -334,7 +347,7 @@
Contexts.getSessionContext().set("foo", foo);
Foo result = (Foo) bi.aroundInvoke( invocationB );
- assert result == foo;
+ invocationResults.put("B", result);
}
catch (Exception ex)
{
@@ -342,25 +355,51 @@
}
finally
{
- latchD.countDown();
+ invocationBControl.markFinished();
}
}
- }).start();
+ }).start();
- // Allow invocationA to complete
- latchA.countDown();
+ new Thread(new Runnable() {
+ public void run() {
+ try
+ {
+ FacesLifecycle.beginRequest(externalContext);
+ Manager.instance().setCurrentConversationId("1");
+ FacesLifecycle.resumeConversation(externalContext);
+ FacesLifecycle.setPhaseId(PhaseId.RENDER_RESPONSE);
+
+ Contexts.getSessionContext().set("foo", foo);
+
+ Foo result = (Foo) bi.aroundInvoke( invocationC );
+ invocationResults.put("C", result);
+ }
+ catch (Exception ex)
+ {
+ thread3Exception.exception = ex;
+ }
+ finally
+ {
+ invocationCControl.markFinished();
+ }
+ }
+ }).start();
- // Wait for invocationA to finalise
- latchC.await();
+ invocationAControl.start();
+ invocationBControl.start();
+ invocationCControl.start();
- // Allow invocationB to proceed
- latchB.countDown();
+ invocationAControl.finish();
+ invocationBControl.finish();
+ invocationCControl.finish();
- // Wait for invocationB
- latchD.await();
-
if (thread1Exception.exception != null) throw thread1Exception.exception;
if (thread2Exception.exception != null) throw thread2Exception.exception;
+ if (thread3Exception.exception != null) throw thread3Exception.exception;
+
+ Assert.assertEquals(invocationResults.get("A"), foo, "Injected value not accurate at end of method invocation A.");
+ Assert.assertEquals(invocationResults.get("B"), foo, "Injected value not accurate at end of method invocation B.");
+ Assert.assertEquals(invocationResults.get("C"), foo, "Injected value not accurate at end of method invocation C.");
}
@Test
Added: trunk/src/test/unit/org/jboss/seam/test/unit/InvocationControl.java
===================================================================
--- trunk/src/test/unit/org/jboss/seam/test/unit/InvocationControl.java (rev 0)
+++ trunk/src/test/unit/org/jboss/seam/test/unit/InvocationControl.java 2008-11-14 03:26:13 UTC (rev 9561)
@@ -0,0 +1,53 @@
+package org.jboss.seam.test.unit;
+
+import java.util.concurrent.CountDownLatch;
+
+public class InvocationControl
+{
+ private String name;
+ private CountDownLatch start = new CountDownLatch(1);
+ private CountDownLatch started = new CountDownLatch(1);
+ private CountDownLatch finish = new CountDownLatch(1);
+ private CountDownLatch finished = new CountDownLatch(1);
+
+ public InvocationControl(String name) {
+ this.name = name;
+ }
+
+ public String getName() {
+ return this.name;
+ }
+
+ public void init() {
+ await(start);
+ }
+
+ public void start() {
+ start.countDown();
+ await(started);
+ }
+
+ public void markStarted() {
+ started.countDown();
+ await(finish);
+ }
+
+ public void finish() {
+ finish.countDown();
+ await(finished);
+ }
+
+ public void markFinished() {
+ finished.countDown();
+ }
+
+ private void await(CountDownLatch l) {
+ try
+ {
+ l.await();
+ }
+ catch (InterruptedException e)
+ {
+ }
+ }
+}
\ No newline at end of file
16 years
Seam SVN: r9560 - trunk/src/test/unit/org/jboss/seam/test/unit.
by seam-commits@lists.jboss.org
Author: dan.j.allen
Date: 2008-11-13 19:47:05 -0500 (Thu, 13 Nov 2008)
New Revision: 9560
Modified:
trunk/src/test/unit/org/jboss/seam/test/unit/AbstractPageTest.java
trunk/src/test/unit/org/jboss/seam/test/unit/PageActionsTest.java
Log:
update PageActionsTest to override the correct redirect() method on FacesManager
Modified: trunk/src/test/unit/org/jboss/seam/test/unit/AbstractPageTest.java
===================================================================
--- trunk/src/test/unit/org/jboss/seam/test/unit/AbstractPageTest.java 2008-11-13 16:55:11 UTC (rev 9559)
+++ trunk/src/test/unit/org/jboss/seam/test/unit/AbstractPageTest.java 2008-11-14 00:47:05 UTC (rev 9560)
@@ -63,7 +63,7 @@
Lifecycle.unmockApplication();
}
- private void installComponents(Context appContext)
+ protected void installComponents(Context appContext)
{
Init init = new Init();
init.setTransactionManagementEnabled(false);
@@ -72,13 +72,10 @@
appContext.set(Component.PROPERTIES, properties);
properties.put(Seam.getComponentName(Pages.class) + ".resources", new Conversions.FlatPropertyValue(TEST_PAGES_DOT_XML));
- installComponent(appContext, NoRedirectFacesManager.class);
installComponent(appContext, ResourceLoader.class);
installComponent(appContext, Expressions.class);
installComponent(appContext, Pages.class);
installComponent(appContext, Interpolator.class);
-
- installComponent(appContext, TestActions.class);
}
/**
Modified: trunk/src/test/unit/org/jboss/seam/test/unit/PageActionsTest.java
===================================================================
--- trunk/src/test/unit/org/jboss/seam/test/unit/PageActionsTest.java 2008-11-13 16:55:11 UTC (rev 9559)
+++ trunk/src/test/unit/org/jboss/seam/test/unit/PageActionsTest.java 2008-11-14 00:47:05 UTC (rev 9560)
@@ -5,6 +5,7 @@
import org.jboss.seam.annotations.Name;
import org.jboss.seam.annotations.Scope;
import org.jboss.seam.annotations.intercept.BypassInterceptors;
+import org.jboss.seam.contexts.Context;
import org.jboss.seam.contexts.Contexts;
import org.jboss.seam.faces.FacesManager;
import org.jboss.seam.mock.MockHttpServletRequest;
@@ -24,6 +25,14 @@
*/
public class PageActionsTest extends AbstractPageTest
{
+ @Override
+ protected void installComponents(Context appContext)
+ {
+ super.installComponents(appContext);
+ installComponent(appContext, NoRedirectFacesManager.class);
+ installComponent(appContext, TestActions.class);
+ }
+
/**
* This test verifies that a non-null outcome will short-circuit the page
* actions. It tests two difference variations. The first variation includes
@@ -205,7 +214,7 @@
public static class NoRedirectFacesManager extends FacesManager {
@Override
- public void redirect(String viewId, Map<String, Object> parameters, boolean includeConversationId)
+ public void redirect(String viewId, Map<String, Object> parameters, boolean includeConversationId, boolean includePageParams)
{
Contexts.getEventContext().set("lastRedirectViewId", viewId);
// a lot of shit happens we don't need; the important part is that the
16 years
Seam SVN: r9559 - in branches/enterprise/JBPAPP_4_3_FP01/examples: dvdstore/view and 10 other directories.
by seam-commits@lists.jboss.org
Author: manaRH
Date: 2008-11-13 11:55:11 -0500 (Thu, 13 Nov 2008)
New Revision: 9559
Modified:
branches/enterprise/JBPAPP_4_3_FP01/examples/contactlist/view/editContact.xhtml
branches/enterprise/JBPAPP_4_3_FP01/examples/contactlist/view/search.xhtml
branches/enterprise/JBPAPP_4_3_FP01/examples/contactlist/view/viewContact.xhtml
branches/enterprise/JBPAPP_4_3_FP01/examples/dvdstore/view/WEB-INF/incl/admin_nav.xhtml
branches/enterprise/JBPAPP_4_3_FP01/examples/dvdstore/view/WEB-INF/incl/cart.xhtml
branches/enterprise/JBPAPP_4_3_FP01/examples/dvdstore/view/WEB-INF/incl/login.xhtml
branches/enterprise/JBPAPP_4_3_FP01/examples/dvdstore/view/WEB-INF/incl/processmenu.xhtml
branches/enterprise/JBPAPP_4_3_FP01/examples/dvdstore/view/WEB-INF/incl/searchbox.xhtml
branches/enterprise/JBPAPP_4_3_FP01/examples/dvdstore/view/WEB-INF/incl/stats.xhtml
branches/enterprise/JBPAPP_4_3_FP01/examples/dvdstore/view/WEB-INF/incl/store_nav.xhtml
branches/enterprise/JBPAPP_4_3_FP01/examples/dvdstore/view/confirm.xhtml
branches/enterprise/JBPAPP_4_3_FP01/examples/dvdstore/view/newuser/card.xhtml
branches/enterprise/JBPAPP_4_3_FP01/examples/groovybooking/view/book.xhtml
branches/enterprise/JBPAPP_4_3_FP01/examples/groovybooking/view/conversations.xhtml
branches/enterprise/JBPAPP_4_3_FP01/examples/groovybooking/view/main.xhtml
branches/enterprise/JBPAPP_4_3_FP01/examples/groovybooking/view/password.xhtml
branches/enterprise/JBPAPP_4_3_FP01/examples/groovybooking/view/register.xhtml
branches/enterprise/JBPAPP_4_3_FP01/examples/hibernate/view/book.xhtml
branches/enterprise/JBPAPP_4_3_FP01/examples/hibernate/view/conversations.xhtml
branches/enterprise/JBPAPP_4_3_FP01/examples/hibernate/view/main.xhtml
branches/enterprise/JBPAPP_4_3_FP01/examples/hibernate/view/password.xhtml
branches/enterprise/JBPAPP_4_3_FP01/examples/hibernate/view/register.xhtml
branches/enterprise/JBPAPP_4_3_FP01/examples/icefaces/view/conversations.xhtml
branches/enterprise/JBPAPP_4_3_FP01/examples/icefaces/view/edit.xhtml
branches/enterprise/JBPAPP_4_3_FP01/examples/icefaces/view/main.xhtml
branches/enterprise/JBPAPP_4_3_FP01/examples/icefaces/view/password.xhtml
branches/enterprise/JBPAPP_4_3_FP01/examples/icefaces/view/register.xhtml
branches/enterprise/JBPAPP_4_3_FP01/examples/jpa/view/book.xhtml
branches/enterprise/JBPAPP_4_3_FP01/examples/jpa/view/conversations.xhtml
branches/enterprise/JBPAPP_4_3_FP01/examples/jpa/view/password.xhtml
branches/enterprise/JBPAPP_4_3_FP01/examples/nestedbooking/view/edit.xhtml
branches/enterprise/JBPAPP_4_3_FP01/examples/nestedbooking/view/main.xhtml
branches/enterprise/JBPAPP_4_3_FP01/examples/nestedbooking/view/password.xhtml
branches/enterprise/JBPAPP_4_3_FP01/examples/nestedbooking/view/register.xhtml
branches/enterprise/JBPAPP_4_3_FP01/examples/quartz/view/search.xhtml
branches/enterprise/JBPAPP_4_3_FP01/examples/seampay/view/search.xhtml
branches/enterprise/JBPAPP_4_3_FP01/examples/spring/view/book.xhtml
branches/enterprise/JBPAPP_4_3_FP01/examples/spring/view/conversations.xhtml
branches/enterprise/JBPAPP_4_3_FP01/examples/spring/view/main.xhtml
branches/enterprise/JBPAPP_4_3_FP01/examples/spring/view/password.xhtml
branches/enterprise/JBPAPP_4_3_FP01/examples/spring/view/register.xhtml
Log:
added ids for functional testing framework
Modified: branches/enterprise/JBPAPP_4_3_FP01/examples/contactlist/view/editContact.xhtml
===================================================================
--- branches/enterprise/JBPAPP_4_3_FP01/examples/contactlist/view/editContact.xhtml 2008-11-13 12:26:08 UTC (rev 9558)
+++ branches/enterprise/JBPAPP_4_3_FP01/examples/contactlist/view/editContact.xhtml 2008-11-13 16:55:11 UTC (rev 9559)
@@ -13,21 +13,21 @@
<body>
<div class="menuButtons">
- <s:link view="/search.xhtml" value="Search Contacts"/>
- <s:link view="/editContact.xhtml" value="Create New Contact">
+ <s:link id="search" view="/search.xhtml" value="Search Contacts"/>
+ <s:link id="create" view="/editContact.xhtml" value="Create New Contact">
<f:param name="contactId"/> <!-- suppress propagation of contact id page parameter -->
</s:link>
- <s:link view="/viewContact.xhtml" value="View Contact" rendered="#{contactHome.managed}"/>
- <s:link view="/editContact.xhtml" value="Edit Contact" rendered="#{contactHome.managed}"/>
+ <s:link id="view" view="/viewContact.xhtml" value="View Contact" rendered="#{contactHome.managed}"/>
+ <s:link id="edit" view="/editContact.xhtml" value="Edit Contact" rendered="#{contactHome.managed}"/>
</div>
<div class="body">
<h1>Edit Contact</h1>
- <h:form>
+ <h:form id="editForm">
- <h:messages globalOnly="true" styleClass="message"/>
+ <h:messages id="messages" globalOnly="true" styleClass="message"/>
<!-- editable fields -->
<s:validateAll>
@@ -44,55 +44,55 @@
<tr class="prop">
<td class="name">First Name:</td>
<td class="value">
- <s:decorate><h:inputText id="firstName" value="#{contact.firstName}" required="true"/></s:decorate>
+ <s:decorate id="firstNameDecorate"><h:inputText id="firstName" value="#{contact.firstName}" required="true"/></s:decorate>
</td>
</tr>
<tr class="prop">
<td class="name">Last Name:</td>
<td class="value">
- <s:decorate><h:inputText id="lastName" value="#{contact.lastName}" required="true"/></s:decorate>
+ <s:decorate id="lastNameDecorate"><h:inputText id="lastName" value="#{contact.lastName}" required="true"/></s:decorate>
</td>
</tr>
<tr class="prop">
<td class="name">Cell Phone:</td>
<td class="value">
- <s:decorate><h:inputText id="cellPhone" value="#{contact.cellPhone}"/></s:decorate>
+ <s:decorate id="cellPhoneDecorate"><h:inputText id="cellPhone" value="#{contact.cellPhone}"/></s:decorate>
</td>
</tr>
<tr class="prop">
<td class="name">Home Phone:</td>
<td class="value">
- <s:decorate><h:inputText id="homePhone" value="#{contact.homePhone}"/></s:decorate>
+ <s:decorate id="homePhoneDecorate"><h:inputText id="homePhone" value="#{contact.homePhone}"/></s:decorate>
</td>
</tr>
<tr class="prop">
<td class="name">Address:</td>
<td class="value">
- <s:decorate><h:inputText id="address" value="#{contact.address}"/></s:decorate>
+ <s:decorate id="addressDecorate"><h:inputText id="address" value="#{contact.address}"/></s:decorate>
</td>
</tr>
<tr class="prop">
<td class="name">City:</td>
<td class="value">
- <s:decorate><h:inputText id="city" value="#{contact.city}"/></s:decorate>
+ <s:decorate id="cityDecorate"><h:inputText id="city" value="#{contact.city}"/></s:decorate>
</td>
</tr>
<tr class="prop">
<td class="name">State:</td>
<td class="value">
- <s:decorate><h:inputText id="state" value="#{contact.state}"/></s:decorate>
+ <s:decorate id="stateDecorate"><h:inputText id="state" value="#{contact.state}"/></s:decorate>
</td>
</tr>
<tr class="prop">
<td class="name">Zip:</td>
<td class="value">
- <s:decorate><h:inputText id="zip" value="#{contact.zip}"/></s:decorate>
+ <s:decorate id="zipDecorate"><h:inputText id="zip" value="#{contact.zip}"/></s:decorate>
</td>
</tr>
<tr class="prop">
<td class="name">Country:</td>
<td class="value">
- <s:decorate><h:inputText id="country" value="#{contact.country}"/></s:decorate>
+ <s:decorate id="countryDecorate"><h:inputText id="country" value="#{contact.country}"/></s:decorate>
</td>
</tr>
</table>
@@ -103,12 +103,12 @@
<!-- actions -->
<div class="actionButtons">
- <h:commandLink action="#{contactHome.update}" value="Update Contact" rendered="#{contactHome.managed}"/>
- <s:link action="#{contactHome.remove}" value="Delete Contact" rendered="#{contactHome.managed}"/>
- <s:link view="/viewContact.xhtml" value="Cancel" rendered="#{contactHome.managed}"/>
+ <h:commandLink id="updateContact" action="#{contactHome.update}" value="Update Contact" rendered="#{contactHome.managed}"/>
+ <s:link id="deleteContact" action="#{contactHome.remove}" value="Delete Contact" rendered="#{contactHome.managed}"/>
+ <s:link id="cancelManaged" view="/viewContact.xhtml" value="Cancel" rendered="#{contactHome.managed}"/>
- <h:commandLink action="#{contactHome.persist}" value="Create Contact" rendered="#{!contactHome.managed}"/>
- <s:link view="/search.xhtml" value="Cancel" rendered="#{!contactHome.managed}"/>
+ <h:commandLink id="createContact" action="#{contactHome.persist}" value="Create Contact" rendered="#{!contactHome.managed}"/>
+ <s:link id="cancel" view="/search.xhtml" value="Cancel" rendered="#{!contactHome.managed}"/>
</div>
Modified: branches/enterprise/JBPAPP_4_3_FP01/examples/contactlist/view/search.xhtml
===================================================================
--- branches/enterprise/JBPAPP_4_3_FP01/examples/contactlist/view/search.xhtml 2008-11-13 12:26:08 UTC (rev 9558)
+++ branches/enterprise/JBPAPP_4_3_FP01/examples/contactlist/view/search.xhtml 2008-11-13 16:55:11 UTC (rev 9559)
@@ -12,13 +12,13 @@
<body>
<div class="menuButtons">
- <s:link view="/search.xhtml" value="Search Contacts">
+ <s:link id="search" view="/search.xhtml" value="Search Contacts">
<f:param name="firstName" />
<f:param name="lastName" />
<f:param name="firstResult" />
</s:link>
- <s:link view="/editContact.xhtml" value="Create New Contact">
+ <s:link id="create" view="/editContact.xhtml" value="Create New Contact">
<f:param name="contactId"/> <!-- suppress propagation of contact id page parameter -->
</s:link>
</div>
@@ -27,22 +27,22 @@
<h1>ContactList</h1>
- <h:messages styleClass="message"/>
+ <h:messages id="messages" styleClass="message"/>
<!-- search box -->
<div class="dialog">
- <h:form>
+ <h:form id="searchForm">
<span class="prop">
<span class="name">First Name:</span>
- <span class="value"><h:inputText value="#{exampleContact.firstName}"/></span>
+ <span class="value"><h:inputText id="firstName" value="#{exampleContact.firstName}"/></span>
</span>
<span class="prop">
<span class="name">Last Name :</span>
- <span class="value"><h:inputText value="#{exampleContact.lastName}"/></span>
+ <span class="value"><h:inputText id="lastName" value="#{exampleContact.lastName}"/></span>
</span>
- <h:commandButton value="Search" action="newsearch"/>
+ <h:commandButton id="submit" value="Search" action="newsearch"/>
</h:form>
</div>
@@ -58,20 +58,20 @@
<th>Zip</th>
<th>Country</th>
</tr>
- <ui:repeat value="#{contacts.resultList}" var="cont">
+ <ui:repeat id="searchResult" value="#{contacts.resultList}" var="cont">
<tr>
<td>
- <s:link view="/viewContact.xhtml" value="#{cont.firstName} #{cont.lastName}">
+ <s:link id="link" view="/viewContact.xhtml" value="#{cont.firstName} #{cont.lastName}">
<f:param name="contactId" value="#{cont.id}"/>
</s:link>
</td>
- <td>#{cont.cellPhone}</td>
- <td>#{cont.homePhone}</td>
- <td>#{cont.address}</td>
- <td>#{cont.city}</td>
- <td>#{cont.state}</td>
- <td>#{cont.zip}</td>
- <td>#{cont.country}</td>
+ <td><h:outputText id="cellPhone" value="#{cont.cellPhone}" /></td>
+ <td><h:outputText id="homePhone" value="#{cont.homePhone}" /></td>
+ <td><h:outputText id="address" value="#{cont.address}" /></td>
+ <td><h:outputText id="city" value="#{cont.city}" /></td>
+ <td><h:outputText id="state" value="#{cont.state}" /></td>
+ <td><h:outputText id="zip" value="#{cont.zip}" /></td>
+ <td><h:outputText id="country" value="#{cont.country}" /></td>
</tr>
</ui:repeat>
</table>
Modified: branches/enterprise/JBPAPP_4_3_FP01/examples/contactlist/view/viewContact.xhtml
===================================================================
--- branches/enterprise/JBPAPP_4_3_FP01/examples/contactlist/view/viewContact.xhtml 2008-11-13 12:26:08 UTC (rev 9558)
+++ branches/enterprise/JBPAPP_4_3_FP01/examples/contactlist/view/viewContact.xhtml 2008-11-13 16:55:11 UTC (rev 9559)
@@ -13,19 +13,19 @@
<body>
<div class="menuButtons">
- <s:link view="/search.xhtml" value="Search Contacts"/>
- <s:link view="/editContact.xhtml" value="Create New Contact">
+ <s:link id="search" view="/search.xhtml" value="Search Contacts"/>
+ <s:link id="create" view="/editContact.xhtml" value="Create New Contact">
<f:param name="contactId"/> <!-- suppress propagation of contact id page parameter -->
</s:link>
- <s:link view="/viewContact.xhtml" value="View Contact"/>
- <s:link view="/editContact.xhtml" value="Edit Contact"/>
+ <s:link id="view" view="/viewContact.xhtml" value="View Contact"/>
+ <s:link id="edit" view="/editContact.xhtml" value="Edit Contact"/>
</div>
<div class="body">
<h1>View Contact</h1>
- <h:messages styleClass="message"/>
+ <h:messages id="messages" styleClass="message"/>
<!-- fields -->
<div class="dialog">
@@ -71,8 +71,8 @@
<!-- actions -->
<div class="actionButtons">
- <s:link view="/editContact.xhtml" value="Edit Contact"/>
- <s:link action="#{contactHome.remove}" value="Delete Contact" rendered="#{contactHome.managed}"/>
+ <s:link id="editContact" view="/editContact.xhtml" value="Edit Contact"/>
+ <s:link id="deleteContact" action="#{contactHome.remove}" value="Delete Contact" rendered="#{contactHome.managed}"/>
</div>
<!-- associations -->
@@ -95,7 +95,7 @@
</h:column>
</h:dataTable>
- <h:form>
+ <h:form id="commentForm">
<!-- editable fields -->
<div class="dialog">
@@ -115,7 +115,7 @@
<!-- actions -->
<div class="actionButtons">
- <h:commandLink action="#{commentHome.persist}" value="Create Comment"/>
+ <h:commandLink id="submit" action="#{commentHome.persist}" value="Create Comment"/>
</div>
</h:form>
Modified: branches/enterprise/JBPAPP_4_3_FP01/examples/dvdstore/view/WEB-INF/incl/admin_nav.xhtml
===================================================================
--- branches/enterprise/JBPAPP_4_3_FP01/examples/dvdstore/view/WEB-INF/incl/admin_nav.xhtml 2008-11-13 12:26:08 UTC (rev 9558)
+++ branches/enterprise/JBPAPP_4_3_FP01/examples/dvdstore/view/WEB-INF/incl/admin_nav.xhtml 2008-11-13 16:55:11 UTC (rev 9559)
@@ -1,9 +1,9 @@
<div xmlns="http://www.w3.org/1999/xhtml"
xmlns:s="http://jboss.com/products/seam/taglib">
- <ul>
- <li id="page_admin"><s:link view="/admin/admin.xhtml" value="Manage Orders" propagation="none"/></li>
- <li id="page_process"><s:link view="/admin/process.xhtml" value="Process Status" propagation="none"/></li>
+ <ul id="AdminNavigation">
+ <li id="page_admin"><s:link id="ManageOrders" view="/admin/admin.xhtml" value="Manage Orders" propagation="none"/></li>
+ <li id="page_process"><s:link id="ProcessStatus" view="/admin/process.xhtml" value="Process Status" propagation="none"/></li>
</ul>
<script type="text/javascript" language="JavaScript">
Modified: branches/enterprise/JBPAPP_4_3_FP01/examples/dvdstore/view/WEB-INF/incl/cart.xhtml
===================================================================
--- branches/enterprise/JBPAPP_4_3_FP01/examples/dvdstore/view/WEB-INF/incl/cart.xhtml 2008-11-13 12:26:08 UTC (rev 9558)
+++ branches/enterprise/JBPAPP_4_3_FP01/examples/dvdstore/view/WEB-INF/incl/cart.xhtml 2008-11-13 16:55:11 UTC (rev 9559)
@@ -30,14 +30,14 @@
<dd>
<h:outputText value="#{messages.checkoutTotal}" />
- <h:outputText value="#{cart.total}">
+ <h:outputText id="CartTotal" value="#{cart.total}">
<f:convertNumber type="currency" currencySymbol="$" />
</h:outputText>
</dd>
- <h:form>
+ <h:form id="Cart">
<dd>
- <h:commandButton action="checkout" value="#{messages.checkoutButton}"
+ <h:commandButton id="Checkout" action="checkout" value="#{messages.checkoutButton}"
styleClass="formButton" style="width: 166px;" />
</dd>
</h:form>
Modified: branches/enterprise/JBPAPP_4_3_FP01/examples/dvdstore/view/WEB-INF/incl/login.xhtml
===================================================================
--- branches/enterprise/JBPAPP_4_3_FP01/examples/dvdstore/view/WEB-INF/incl/login.xhtml 2008-11-13 12:26:08 UTC (rev 9558)
+++ branches/enterprise/JBPAPP_4_3_FP01/examples/dvdstore/view/WEB-INF/incl/login.xhtml 2008-11-13 16:55:11 UTC (rev 9559)
@@ -5,18 +5,18 @@
xmlns:f="http://java.sun.com/jsf/core"
xmlns:h="http://java.sun.com/jsf/html">
- <h:form rendered="#{not identity.loggedIn}">
+ <h:form id="LoginForm" rendered="#{not identity.loggedIn}">
<dl>
<dt class="menuHeader">#{messages.loginPagePrompt}</dt>
<dd class="menuForm">
<dl>
<dt><h:outputText value="#{messages.loginUser}" /></dt>
- <dd><h:inputText value="#{identity.username}" size="16" /></dd>
+ <dd><h:inputText id="Username" value="#{identity.username}" size="16" /></dd>
<dt><h:outputText value="#{messages.loginPass}" /></dt>
- <dd><h:inputSecret value="#{identity.password}" size="16"/></dd>
+ <dd><h:inputSecret id="Password" value="#{identity.password}" size="16"/></dd>
<dd>
- <h:commandButton action="#{identity.login}" value="#{messages.loginPrompt}"
+ <h:commandButton id="Login" action="#{identity.login}" value="#{messages.loginPrompt}"
styleClass="formButton" style="width: 166px;"/>
</dd>
@@ -25,19 +25,19 @@
</dl>
<dl>
<dt class="menuFooter">
- <h:commandLink action="#{editCustomer.startEdit}">Create Account</h:commandLink>
+ <h:commandLink id="CreateAccount" action="#{editCustomer.startEdit}">Create Account</h:commandLink>
</dt>
</dl>
</h:form>
- <h:form rendered="#{identity.loggedIn}">
+ <h:form id="LogoutForm" rendered="#{identity.loggedIn}">
<dl>
<dt class="menuHeader">Welcome, #{currentUser.firstName}</dt>
<dd class="menuForm">
<dl>
<dd>Thank you for choosing the DVD Store</dd>
<dd>
- <h:commandButton action="#{identity.logout}" value="Logout"
+ <h:commandButton id="Logout" action="#{identity.logout}" value="Logout"
styleClass="formButton" style="width: 166px;"/>
</dd>
</dl>
Modified: branches/enterprise/JBPAPP_4_3_FP01/examples/dvdstore/view/WEB-INF/incl/processmenu.xhtml
===================================================================
--- branches/enterprise/JBPAPP_4_3_FP01/examples/dvdstore/view/WEB-INF/incl/processmenu.xhtml 2008-11-13 12:26:08 UTC (rev 9558)
+++ branches/enterprise/JBPAPP_4_3_FP01/examples/dvdstore/view/WEB-INF/incl/processmenu.xhtml 2008-11-13 16:55:11 UTC (rev 9559)
@@ -13,12 +13,12 @@
<dl>
<dt>Process Management</dt>
<dd>
- <h:selectOneMenu value="#{processDefinitionSwitcher.currentProcessDefinition}">
+ <h:selectOneMenu id="Menu" value="#{processDefinitionSwitcher.currentProcessDefinition}">
<f:selectItems value="#{processDefinitionSwitcher.processDefinitions}"/>
</h:selectOneMenu>
</dd>
<dd>
- <h:commandButton action="#{processDefinitionSwitcher.switchProcess}"
+ <h:commandButton id="Switch" action="#{processDefinitionSwitcher.switchProcess}"
value="Switch Order Process"
styleClass="formButton" style="width: 166px;"/>
</dd>
Modified: branches/enterprise/JBPAPP_4_3_FP01/examples/dvdstore/view/WEB-INF/incl/searchbox.xhtml
===================================================================
--- branches/enterprise/JBPAPP_4_3_FP01/examples/dvdstore/view/WEB-INF/incl/searchbox.xhtml 2008-11-13 12:26:08 UTC (rev 9558)
+++ branches/enterprise/JBPAPP_4_3_FP01/examples/dvdstore/view/WEB-INF/incl/searchbox.xhtml 2008-11-13 16:55:11 UTC (rev 9559)
@@ -6,7 +6,7 @@
xmlns:h="http://java.sun.com/jsf/html">
<dl>
<dt class="menuHeader">#{messages.browseSearchHeader}</dt>
- <dd class="menuForm"><h:form>
+ <dd class="menuForm"><h:form id="SearchForm">
<dl>
<ui:remove>
<dt><h:outputText value="#{messages.searchCategory}"/></dt>
@@ -20,18 +20,18 @@
</dd>
</ui:remove>
- <dt><h:outputText value="#{messages.searchTerm}" /></dt>
- <dd><h:inputText value="#{search.searchQuery}" size="15" /></dd>
+ <dt><h:outputText id="QueryLabel" value="#{messages.searchTerm}" /></dt>
+ <dd><h:inputText id="Query" value="#{search.searchQuery}" size="15" /></dd>
- <dt><h:outputText value="#{messages.searchPageSize}" /></dt>
- <dd><h:selectOneMenu value="#{search.pageSize}">
+ <dt><h:outputText id="PageSizeLabel" value="#{messages.searchPageSize}" /></dt>
+ <dd><h:selectOneMenu id="PageSize" value="#{search.pageSize}">
<f:selectItem itemLabel="10" itemValue="10" />
<f:selectItem itemLabel="15" itemValue="15" />
<f:selectItem itemLabel="20" itemValue="20" />
<f:selectItem itemLabel="30" itemValue="30" />
</h:selectOneMenu></dd>
- <dd><h:commandButton action="#{search.doSearch}"
+ <dd><h:commandButton id="Search" action="#{search.doSearch}"
value="#{messages.searchButton}" styleClass="formButton"
style="width: 166px;" /></dd>
</dl>
Modified: branches/enterprise/JBPAPP_4_3_FP01/examples/dvdstore/view/WEB-INF/incl/stats.xhtml
===================================================================
--- branches/enterprise/JBPAPP_4_3_FP01/examples/dvdstore/view/WEB-INF/incl/stats.xhtml 2008-11-13 12:26:08 UTC (rev 9558)
+++ branches/enterprise/JBPAPP_4_3_FP01/examples/dvdstore/view/WEB-INF/incl/stats.xhtml 2008-11-13 16:55:11 UTC (rev 9559)
@@ -11,10 +11,15 @@
<dd class="menuSection">
<dl>
<dt>Inventory</dt>
- <dd>#{stats.unitsSold} sold, #{stats.totalInventory} in stock</dd>
+ <dd>
+ <h:outputText id="TotalSold" value="#{stats.unitsSold}" />
+ sold,
+ <h:outputText id="TotalInventory" value="#{stats.totalInventory}" />
+ in stock
+ </dd>
<dt>Sales</dt>
<dd>
- <h:outputText value="#{stats.totalSales}">
+ <h:outputText id="TotalSales" value="#{stats.totalSales}">
<f:convertNumber type="currency" currencySymbol="$" />
</h:outputText>
from #{stats.numberOrders} orders
Modified: branches/enterprise/JBPAPP_4_3_FP01/examples/dvdstore/view/WEB-INF/incl/store_nav.xhtml
===================================================================
--- branches/enterprise/JBPAPP_4_3_FP01/examples/dvdstore/view/WEB-INF/incl/store_nav.xhtml 2008-11-13 12:26:08 UTC (rev 9558)
+++ branches/enterprise/JBPAPP_4_3_FP01/examples/dvdstore/view/WEB-INF/incl/store_nav.xhtml 2008-11-13 16:55:11 UTC (rev 9559)
@@ -3,16 +3,16 @@
xmlns:ui="http://java.sun.com/jsf/facelets"
xmlns:f="http://java.sun.com/jsf/core"
xmlns:h="http://java.sun.com/jsf/html">
-
- <ul>
- <li id="page_home"><s:link view="/home.xhtml" value="Home" propagation="none"/></li>
- <li id="page_shop"><s:link view="/browse.xhtml" value="Shop" propagation="none"/></li>
- <f:subview id="my_orders_link" rendered="#{identity.loggedIn}">
- <li id="page_orders"><s:link view="/showorders.xhtml" value="My Orders" propagation="none"/></li>
- </f:subview>
- <li id="page_cart"><s:link view="/checkout.xhtml" value="Cart" propagation="none"/></li>
- </ul>
-
+
+ <ul id="Navigation">
+ <li id="page_home"><s:link id="Home" view="/home.xhtml" value="Home" propagation="none"/></li>
+ <li id="page_shop"><s:link id="Shop" view="/browse.xhtml" value="Shop" propagation="none"/></li>
+ <f:subview rendered="#{identity.loggedIn}">
+ <li id="page_orders"><s:link id="MyOrders" view="/showorders.xhtml" value="My Orders" propagation="none"/></li>
+ </f:subview>
+ <li id="page_cart"><s:link id="Cart" view="/checkout.xhtml" value="Cart" propagation="none"/></li>
+ </ul>
+
<script type="text/javascript" language="JavaScript">
function setClass(id, className) {
var obj = document.getElementById(id);
Modified: branches/enterprise/JBPAPP_4_3_FP01/examples/dvdstore/view/confirm.xhtml
===================================================================
--- branches/enterprise/JBPAPP_4_3_FP01/examples/dvdstore/view/confirm.xhtml 2008-11-13 12:26:08 UTC (rev 9558)
+++ branches/enterprise/JBPAPP_4_3_FP01/examples/dvdstore/view/confirm.xhtml 2008-11-13 16:55:11 UTC (rev 9559)
@@ -80,9 +80,9 @@
</h:panelGrid>
<h:form>
- <h:commandButton action="purchase" value="Confirm" />
+ <h:commandButton id="Confirm" action="purchase" value="Confirm" />
 
- <h:commandButton action="cancel" value="Cancel" />
+ <h:commandButton id="Cancel" action="cancel" value="Cancel" />
</h:form>
</div>
</div>
Modified: branches/enterprise/JBPAPP_4_3_FP01/examples/dvdstore/view/newuser/card.xhtml
===================================================================
--- branches/enterprise/JBPAPP_4_3_FP01/examples/dvdstore/view/newuser/card.xhtml 2008-11-13 12:26:08 UTC (rev 9558)
+++ branches/enterprise/JBPAPP_4_3_FP01/examples/dvdstore/view/newuser/card.xhtml 2008-11-13 16:55:11 UTC (rev 9559)
@@ -22,7 +22,7 @@
<p><em><h:outputText value="#{messages.newCustomerInfo}" /></em></p>
- <h:form>
+ <h:form id="NewAccountForm">
<table border="0">
<tr>
<td>#{messages.newCustomerCCT}</td>
Modified: branches/enterprise/JBPAPP_4_3_FP01/examples/groovybooking/view/book.xhtml
===================================================================
--- branches/enterprise/JBPAPP_4_3_FP01/examples/groovybooking/view/book.xhtml 2008-11-13 12:26:08 UTC (rev 9558)
+++ branches/enterprise/JBPAPP_4_3_FP01/examples/groovybooking/view/book.xhtml 2008-11-13 16:55:11 UTC (rev 9559)
@@ -49,10 +49,10 @@
<s:validateAll>
<f:facet name="aroundInvalidField">
- <s:span styleClass="errors"/>
+ <s:span id="Error" styleClass="errors"/>
</f:facet>
<f:facet name="afterInvalidField">
- <s:div styleClass="errors">
+ <s:div id="Message" styleClass="errors">
<s:message/>
</s:div>
</f:facet>
@@ -78,7 +78,7 @@
<div class="entry">
<div class="label"><h:outputLabel for="beds">Room Preference:</h:outputLabel></div>
<div class="input">
- <s:decorate>
+ <s:decorate id="bedsDecorate">
<h:selectOneMenu id="beds" value="#{booking.beds}">
<f:selectItem itemLabel="One king-size bed" itemValue="1"/>
<f:selectItem itemLabel="Two double beds" itemValue="2"/>
@@ -91,7 +91,7 @@
<div class="entry">
<div class="label"><h:outputLabel for="smoking">Smoking Preference:</h:outputLabel></div>
<div id="radio" class="input">
- <s:decorate>
+ <s:decorate id="smokingDecorate">
<h:selectOneRadio id="smoking" value="#{booking.smoking}" layout="pageDirection">
<f:selectItem itemLabel="Smoking" itemValue="true"/>
<f:selectItem itemLabel="Non Smoking" itemValue="false"/>
@@ -125,7 +125,7 @@
<div class="entry">
<div class="label"><h:outputLabel for="creditCardExpiryMonth">Credit Card Expiry:</h:outputLabel></div>
<div class="input">
- <s:decorate>
+ <s:decorate id="creditCardExpiryDecorate">
<h:selectOneMenu id="creditCardExpiryMonth" value="#{booking.creditCardExpiryMonth}">
<f:selectItem itemLabel="Jan" itemValue="1"/>
<f:selectItem itemLabel="Feb" itemValue="2"/>
Modified: branches/enterprise/JBPAPP_4_3_FP01/examples/groovybooking/view/conversations.xhtml
===================================================================
--- branches/enterprise/JBPAPP_4_3_FP01/examples/groovybooking/view/conversations.xhtml 2008-11-13 12:26:08 UTC (rev 9558)
+++ branches/enterprise/JBPAPP_4_3_FP01/examples/groovybooking/view/conversations.xhtml 2008-11-13 16:55:11 UTC (rev 9559)
@@ -11,19 +11,19 @@
</div>
<div class="section">
- <h:form>
- <h:dataTable value="#{conversationList}" var="entry">
- <h:column>
- <h:commandLink action="#{entry.select}" value="#{entry.description}"/>
+ <h:form id="ConversationListForm">
+ <h:dataTable id="ConversationListDataTable" value="#{conversationList}" var="entry">
+ <h:column id="column1">
+ <h:commandLink id="EntryDescriptionLink" action="#{entry.select}" value="#{entry.description}"/>
 
- <h:outputText value="[current]" rendered="#{entry.current}"/>
+ <h:outputText id="CurrentEntry" value="[current]" rendered="#{entry.current}"/>
</h:column>
- <h:column>
- <h:outputText value="#{entry.startDatetime}">
+ <h:column id="column2">
+ <h:outputText id="EntryStartDateTime" value="#{entry.startDatetime}">
<s:convertDateTime type="time" pattern="hh:mm"/>
</h:outputText>
-
- <h:outputText value="#{entry.lastDatetime}">
+ <h:outputText id="EntryLastDateTime" value="#{entry.lastDatetime}">
<s:convertDateTime type="time" pattern="hh:mm"/>
</h:outputText>
</h:column>
Modified: branches/enterprise/JBPAPP_4_3_FP01/examples/groovybooking/view/main.xhtml
===================================================================
--- branches/enterprise/JBPAPP_4_3_FP01/examples/groovybooking/view/main.xhtml 2008-11-13 12:26:08 UTC (rev 9558)
+++ branches/enterprise/JBPAPP_4_3_FP01/examples/groovybooking/view/main.xhtml 2008-11-13 16:55:11 UTC (rev 9559)
@@ -14,7 +14,7 @@
<h:form id="main">
<span class="errors">
- <h:messages globalOnly="true"/>
+ <h:messages id="messages" globalOnly="true"/>
</span>
<h1>Search Hotels</h1>
@@ -27,7 +27,7 @@
 
<a:status>
<f:facet name="start">
- <h:graphicImage value="/img/spinner.gif"/>
+ <h:graphicImage id="Spinner" value="/img/spinner.gif"/>
</f:facet>
</a:status>
<br/>
@@ -44,7 +44,7 @@
<a:outputPanel id="searchResults">
<div class="section">
- <h:outputText value="No Hotels Found" rendered="#{hotels != null and hotels.rowCount==0}"/>
+ <h:outputText id="NoHotelsFoundMessage" value="No Hotels Found" rendered="#{hotels != null and hotels.rowCount==0}"/>
<h:dataTable id="hotels" value="#{hotels}" var="hot" rendered="#{hotels.rowCount>0}">
<h:column>
<f:facet name="header">Name</f:facet>
@@ -67,7 +67,7 @@
<s:link id="viewHotel" value="View Hotel" action="#{hotelBooking.selectHotel(hot)}"/>
</h:column>
</h:dataTable>
- <s:link value="More results" action="#{hotelSearch.nextPage}" rendered="#{hotelSearch.nextPageAvailable}"/>
+ <s:link id="MoreResultsLink" value="More results" action="#{hotelSearch.nextPage}" rendered="#{hotelSearch.nextPageAvailable}"/>
</div>
</a:outputPanel>
Modified: branches/enterprise/JBPAPP_4_3_FP01/examples/groovybooking/view/password.xhtml
===================================================================
--- branches/enterprise/JBPAPP_4_3_FP01/examples/groovybooking/view/password.xhtml 2008-11-13 12:26:08 UTC (rev 9558)
+++ branches/enterprise/JBPAPP_4_3_FP01/examples/groovybooking/view/password.xhtml 2008-11-13 16:55:11 UTC (rev 9559)
@@ -15,10 +15,10 @@
<h:form id="setpassword">
<f:facet name="aroundInvalidField">
- <s:span styleClass="errors"/>
+ <s:span id="Error" styleClass="errors"/>
</f:facet>
<f:facet name="afterInvalidField">
- <s:div styleClass="errors">
+ <s:div id="Message" styleClass="errors">
<s:message/>
</s:div>
</f:facet>
@@ -28,7 +28,7 @@
<div class="entry">
<div class="label"><h:outputLabel for="password">Password:</h:outputLabel></div>
<div class="input">
- <s:decorate>
+ <s:decorate id="PasswordDecorate">
<h:inputSecret id="password" value="#{user.password}" required="true">
<s:validate/>
</h:inputSecret>
@@ -39,14 +39,14 @@
<div class="entry">
<div class="label"><h:outputLabel for="verify">Verify:</h:outputLabel></div>
<div class="input">
- <s:decorate>
+ <s:decorate id="VerifyDecorate">
<h:inputSecret id="verify" value="#{changePassword.verify}" required="true"/>
</s:decorate>
</div>
</div>
<div class="entry errors">
- <h:messages globalOnly="true"/>
+ <h:messages id="Messages" globalOnly="true"/>
</div>
<div class="entry">
Modified: branches/enterprise/JBPAPP_4_3_FP01/examples/groovybooking/view/register.xhtml
===================================================================
--- branches/enterprise/JBPAPP_4_3_FP01/examples/groovybooking/view/register.xhtml 2008-11-13 12:26:08 UTC (rev 9558)
+++ branches/enterprise/JBPAPP_4_3_FP01/examples/groovybooking/view/register.xhtml 2008-11-13 16:55:11 UTC (rev 9559)
@@ -61,7 +61,7 @@
<div class="entry">
<div class="label"><h:outputLabel for="password">Password:</h:outputLabel></div>
<div class="input">
- <s:decorate>
+ <s:decorate id="passwordDecorate">
<h:inputSecret id="password" value="#{user.password}" required="true"/>
</s:decorate>
</div>
@@ -70,7 +70,7 @@
<div class="entry">
<div class="label"><h:outputLabel for="verify">Verify Password:</h:outputLabel></div>
<div class="input">
- <s:decorate>
+ <s:decorate id="verifyDecorate">
<h:inputSecret id="verify" value="#{register.verify}" required="true"/>
</s:decorate>
</div>
@@ -79,7 +79,7 @@
</s:validateAll>
<div class="entry errors">
- <h:messages globalOnly="true"/>
+ <h:messages id="messages" globalOnly="true"/>
</div>
<div class="entry">
Modified: branches/enterprise/JBPAPP_4_3_FP01/examples/hibernate/view/book.xhtml
===================================================================
--- branches/enterprise/JBPAPP_4_3_FP01/examples/hibernate/view/book.xhtml 2008-11-13 12:26:08 UTC (rev 9558)
+++ branches/enterprise/JBPAPP_4_3_FP01/examples/hibernate/view/book.xhtml 2008-11-13 16:55:11 UTC (rev 9559)
@@ -49,10 +49,10 @@
<s:validateAll>
<f:facet name="aroundInvalidField">
- <s:span styleClass="errors"/>
+ <s:span id="Error" styleClass="errors"/>
</f:facet>
<f:facet name="afterInvalidField">
- <s:div styleClass="errors">
+ <s:div id="Message" styleClass="errors">
<s:message/>
</s:div>
</f:facet>
@@ -78,7 +78,7 @@
<div class="entry">
<div class="label"><h:outputLabel for="beds">Room Preference:</h:outputLabel></div>
<div class="input">
- <s:decorate>
+ <s:decorate id="bedsDecorate">
<h:selectOneMenu id="beds" value="#{booking.beds}">
<f:selectItem itemLabel="One king-size bed" itemValue="1"/>
<f:selectItem itemLabel="Two double beds" itemValue="2"/>
@@ -91,7 +91,7 @@
<div class="entry">
<div class="label"><h:outputLabel for="smoking">Smoking Preference:</h:outputLabel></div>
<div id="radio" class="input">
- <s:decorate>
+ <s:decorate id="smokingDecorate">
<h:selectOneRadio id="smoking" value="#{booking.smoking}" layout="pageDirection">
<f:selectItem itemLabel="Smoking" itemValue="true"/>
<f:selectItem itemLabel="Non Smoking" itemValue="false"/>
@@ -125,7 +125,7 @@
<div class="entry">
<div class="label"><h:outputLabel for="creditCardExpiryMonth">Credit Card Expiry:</h:outputLabel></div>
<div class="input">
- <s:decorate>
+ <s:decorate id="creditCardExpiryDecorate">
<h:selectOneMenu id="creditCardExpiryMonth" value="#{booking.creditCardExpiryMonth}">
<f:selectItem itemLabel="Jan" itemValue="1"/>
<f:selectItem itemLabel="Feb" itemValue="2"/>
Modified: branches/enterprise/JBPAPP_4_3_FP01/examples/hibernate/view/conversations.xhtml
===================================================================
--- branches/enterprise/JBPAPP_4_3_FP01/examples/hibernate/view/conversations.xhtml 2008-11-13 12:26:08 UTC (rev 9558)
+++ branches/enterprise/JBPAPP_4_3_FP01/examples/hibernate/view/conversations.xhtml 2008-11-13 16:55:11 UTC (rev 9559)
@@ -11,19 +11,19 @@
</div>
<div class="section">
- <h:form>
- <h:dataTable value="#{conversationList}" var="entry">
- <h:column>
- <h:commandLink action="#{entry.select}" value="#{entry.description}"/>
+ <h:form id="ConversationListForm">
+ <h:dataTable id="ConversationListDataTable" value="#{conversationList}" var="entry">
+ <h:column id="column1">
+ <h:commandLink id="EntryDescriptionLink" action="#{entry.select}" value="#{entry.description}"/>
 
- <h:outputText value="[current]" rendered="#{entry.current}"/>
+ <h:outputText id="CurrentEntry" value="[current]" rendered="#{entry.current}"/>
</h:column>
- <h:column>
- <h:outputText value="#{entry.startDatetime}">
+ <h:column id="column2">
+ <h:outputText id="EntryStartDateTime" value="#{entry.startDatetime}">
<s:convertDateTime type="time" pattern="hh:mm"/>
</h:outputText>
-
- <h:outputText value="#{entry.lastDatetime}">
+ <h:outputText id="EntryLastDateTime" value="#{entry.lastDatetime}">
<s:convertDateTime type="time" pattern="hh:mm"/>
</h:outputText>
</h:column>
Modified: branches/enterprise/JBPAPP_4_3_FP01/examples/hibernate/view/main.xhtml
===================================================================
--- branches/enterprise/JBPAPP_4_3_FP01/examples/hibernate/view/main.xhtml 2008-11-13 12:26:08 UTC (rev 9558)
+++ branches/enterprise/JBPAPP_4_3_FP01/examples/hibernate/view/main.xhtml 2008-11-13 16:55:11 UTC (rev 9559)
@@ -14,7 +14,7 @@
<h:form id="main">
<span class="errors">
- <h:messages globalOnly="true"/>
+ <h:messages id="messages" globalOnly="true"/>
</span>
<h1>Search Hotels</h1>
@@ -27,7 +27,7 @@
 
<a:status>
<f:facet name="start">
- <h:graphicImage value="/img/spinner.gif"/>
+ <h:graphicImage id="Spinner" value="/img/spinner.gif"/>
</f:facet>
</a:status>
<br/>
@@ -44,7 +44,7 @@
<a:outputPanel id="searchResults">
<div class="section">
- <h:outputText value="No Hotels Found" rendered="#{hotels != null and hotels.rowCount==0}"/>
+ <h:outputText id="NoHotelsFoundMessage" value="No Hotels Found" rendered="#{hotels != null and hotels.rowCount==0}"/>
<h:dataTable id="hotels" value="#{hotels}" var="hot" rendered="#{hotels.rowCount>0}">
<h:column>
<f:facet name="header">Name</f:facet>
Modified: branches/enterprise/JBPAPP_4_3_FP01/examples/hibernate/view/password.xhtml
===================================================================
--- branches/enterprise/JBPAPP_4_3_FP01/examples/hibernate/view/password.xhtml 2008-11-13 12:26:08 UTC (rev 9558)
+++ branches/enterprise/JBPAPP_4_3_FP01/examples/hibernate/view/password.xhtml 2008-11-13 16:55:11 UTC (rev 9559)
@@ -15,11 +15,11 @@
<h:form id="setpassword">
<f:facet name="aroundInvalidField">
- <s:span styleClass="errors"/>
+ <s:span id="Error" styleClass="errors"/>
</f:facet>
<f:facet name="afterInvalidField">
<s:div styleClass="errors">
- <s:message/>
+ <s:message id="Message"/>
</s:div>
</f:facet>
@@ -28,7 +28,7 @@
<div class="entry">
<div class="label"><h:outputLabel for="password">Password:</h:outputLabel></div>
<div class="input">
- <s:decorate>
+ <s:decorate id="PasswordDecorate">
<h:inputSecret id="password" value="#{user.password}" required="true">
<s:validate/>
</h:inputSecret>
@@ -39,7 +39,7 @@
<div class="entry">
<div class="label"><h:outputLabel for="verify">Verify:</h:outputLabel></div>
<div class="input">
- <s:decorate>
+ <s:decorate id="VerifyDecorate">
<h:inputSecret id="verify" value="#{changePassword.verify}" required="true"/>
</s:decorate>
</div>
Modified: branches/enterprise/JBPAPP_4_3_FP01/examples/hibernate/view/register.xhtml
===================================================================
--- branches/enterprise/JBPAPP_4_3_FP01/examples/hibernate/view/register.xhtml 2008-11-13 12:26:08 UTC (rev 9558)
+++ branches/enterprise/JBPAPP_4_3_FP01/examples/hibernate/view/register.xhtml 2008-11-13 16:55:11 UTC (rev 9559)
@@ -34,7 +34,7 @@
</f:facet>
<f:facet name="afterInvalidField">
<s:div styleClass="errors">
- <s:message/>
+ <s:message id="message"/>
</s:div>
</f:facet>
@@ -63,7 +63,7 @@
<div class="entry">
<div class="label"><h:outputLabel for="password">Password:</h:outputLabel></div>
<div class="input">
- <s:decorate>
+ <s:decorate id="passwordDecorate">
<h:inputSecret id="password" value="#{user.password}" required="true"/>
</s:decorate>
</div>
@@ -72,7 +72,7 @@
<div class="entry">
<div class="label"><h:outputLabel for="verify">Verify Password:</h:outputLabel></div>
<div class="input">
- <s:decorate>
+ <s:decorate id="verifyDecorate">
<h:inputSecret id="verify" value="#{register.verify}" required="true"/>
</s:decorate>
</div>
@@ -81,7 +81,7 @@
</s:validateAll>
<div class="entry errors">
- <h:messages globalOnly="true"/>
+ <h:messages id="messages" globalOnly="true"/>
</div>
<div class="entry">
Modified: branches/enterprise/JBPAPP_4_3_FP01/examples/icefaces/view/conversations.xhtml
===================================================================
--- branches/enterprise/JBPAPP_4_3_FP01/examples/icefaces/view/conversations.xhtml 2008-11-13 12:26:08 UTC (rev 9558)
+++ branches/enterprise/JBPAPP_4_3_FP01/examples/icefaces/view/conversations.xhtml 2008-11-13 16:55:11 UTC (rev 9559)
@@ -12,19 +12,19 @@
</div>
<div class="section">
- <h:form>
- <h:dataTable value="#{conversationList}" var="entry">
- <h:column>
- <h:commandLink action="#{entry.select}" value="#{entry.description}"/>
+ <h:form id="ConversationListForm">
+ <h:dataTable id="ConversationListDataTable" value="#{conversationList}" var="entry">
+ <h:column id="column1">
+ <h:commandLink id="EntryDescriptionLink" action="#{entry.select}" value="#{entry.description}"/>
 
- <h:outputText value="[current]" rendered="#{entry.current}"/>
+ <h:outputText id="CurrentEntry" value="[current]" rendered="#{entry.current}"/>
</h:column>
- <h:column>
- <h:outputText value="#{entry.startDatetime}">
+ <h:column id="column2">
+ <h:outputText id="EntryStartDateTime" value="#{entry.startDatetime}">
<s:convertDateTime type="time" pattern="hh:mm"/>
</h:outputText>
-
- <h:outputText value="#{entry.lastDatetime}">
+ <h:outputText id="EntryLastDateTime" value="#{entry.lastDatetime}">
<s:convertDateTime type="time" pattern="hh:mm"/>
</h:outputText>
</h:column>
Modified: branches/enterprise/JBPAPP_4_3_FP01/examples/icefaces/view/edit.xhtml
===================================================================
--- branches/enterprise/JBPAPP_4_3_FP01/examples/icefaces/view/edit.xhtml 2008-11-13 12:26:08 UTC (rev 9558)
+++ branches/enterprise/JBPAPP_4_3_FP01/examples/icefaces/view/edit.xhtml 2008-11-13 16:55:11 UTC (rev 9559)
@@ -14,7 +14,7 @@
<ui:insert/>
</s:validateAll>
</span>
- <s:message styleClass="error errors"/>
+ <s:message id="message" styleClass="error errors"/>
</div>
</ui:composition>
\ No newline at end of file
Modified: branches/enterprise/JBPAPP_4_3_FP01/examples/icefaces/view/main.xhtml
===================================================================
--- branches/enterprise/JBPAPP_4_3_FP01/examples/icefaces/view/main.xhtml 2008-11-13 12:26:08 UTC (rev 9558)
+++ branches/enterprise/JBPAPP_4_3_FP01/examples/icefaces/view/main.xhtml 2008-11-13 16:55:11 UTC (rev 9559)
@@ -13,7 +13,7 @@
<div class="section">
<span class="errors">
- <h:messages globalOnly="true"/>
+ <h:messages id="messages" globalOnly="true"/>
</span>
<h1>Search Hotels</h1>
@@ -26,7 +26,7 @@
 
<ice:commandButton id="findHotels" value="Find Hotels" action="#{hotelSearch.find}" />
 
- <ice:outputConnectionStatus activeLabel="requesting..." styleClass="connectionStatus"/>
+ <ice:outputConnectionStatus id="Spinner" activeLabel="requesting..." styleClass="connectionStatus"/>
<br/>
<h:outputLabel for="pageSize">Maximum results:</h:outputLabel> 
@@ -42,34 +42,34 @@
</h:form>
</div>
-<ice:form>
+<ice:form id="searchResults">
<ice:panelGroup id="searchResults">
<div class="section" style="overflow:auto">
- <h:outputText value="No Hotels Found" rendered="#{hotels != null and hotels.rowCount==0}"/>
+ <h:outputText id="NoHotelsFoundMessage" value="No Hotels Found" rendered="#{hotels != null and hotels.rowCount==0}"/>
<ice:outputText value="Search Results"/>
<ice:dataTable id="hotels" value="#{hotels}" var="hot" rendered="#{hotels.rowCount>0}">
<h:column>
<f:facet name="header">Name</f:facet>
- <ice:outputText value="#{hot.name}" onmouseovereffect="#{highlight}"/>
+ <ice:outputText id="name" value="#{hot.name}" onmouseovereffect="#{highlight}"/>
</h:column>
<h:column>
<f:facet name="header">Address</f:facet>
- <ice:outputText value="#{hot.address}" onmouseovereffect="#{highlight}"/>
+ <ice:outputText id="address" value="#{hot.address}" onmouseovereffect="#{highlight}"/>
</h:column>
<h:column>
<f:facet name="header">City, State</f:facet>
- <ice:outputText value="#{hot.city}, #{hot.state}, #{hot.country}" onmouseovereffect="#{highlight}"/>
+ <ice:outputText id="city" value="#{hot.city}, #{hot.state}, #{hot.country}" onmouseovereffect="#{highlight}"/>
</h:column>
<h:column>
<f:facet name="header">Zip</f:facet>
- <ice:outputText value="#{hot.zip}" onmouseovereffect="#{highlight}"/>
+ <ice:outputText id="zip" value="#{hot.zip}" onmouseovereffect="#{highlight}"/>
</h:column>
<h:column>
<f:facet name="header">Action</f:facet>
<ice:commandLink id="viewHotel" value="View Hotel" action="#{hotelBooking.selectHotel(hot)}"/>
</h:column>
</ice:dataTable>
- <s:link value="More results" action="#{hotelSearch.nextPage}" rendered="#{hotelSearch.nextPageAvailable}"/>
+ <s:link value="More results" id="moreResults" action="#{hotelSearch.nextPage}" rendered="#{hotelSearch.nextPageAvailable}"/>
</div>
</ice:panelGroup>
</ice:form>
@@ -82,27 +82,27 @@
<ice:dataTable id="bookings" value="#{bookings}" var="book" rendered="#{bookings.rowCount>0}">
<h:column>
<f:facet name="header">Name</f:facet>
- <ice:outputText value="#{book.hotel.name}" onmouseovereffect="#{highlight}"/>
+ <ice:outputText id="name" value="#{book.hotel.name}" onmouseovereffect="#{highlight}"/>
</h:column>
<h:column>
<f:facet name="header">Address</f:facet>
- <ice:outputText value="#{book.hotel.address}" onmouseovereffect="#{highlight}"/>
+ <ice:outputText id="address" value="#{book.hotel.address}" onmouseovereffect="#{highlight}"/>
</h:column>
<h:column>
<f:facet name="header">City, State</f:facet>
- <ice:outputText value="#{book.hotel.city}, #{book.hotel.state}" onmouseovereffect="#{highlight}"/>
+ <ice:outputText id="city" value="#{book.hotel.city}, #{book.hotel.state}" onmouseovereffect="#{highlight}"/>
</h:column>
<h:column>
<f:facet name="header">Check in date</f:facet>
- <h:outputText value="#{book.checkinDate}" onmouseovereffect="#{highlight}"/>
+ <h:outputText id="checkIn" value="#{book.checkinDate}" onmouseovereffect="#{highlight}"/>
</h:column>
<h:column>
<f:facet name="header">Check out date</f:facet>
- <h:outputText value="#{book.checkoutDate}" onmouseovereffect="#{highlight}"/>
+ <h:outputText id="checkOut" value="#{book.checkoutDate}" onmouseovereffect="#{highlight}"/>
</h:column>
<h:column>
<f:facet name="header">Confirmation number</f:facet>
- <ice:outputText value="#{book.id}" onmouseovereffect="#{highlight}"/>
+ <ice:outputText id="confirmation" value="#{book.id}" onmouseovereffect="#{highlight}"/>
</h:column>
<h:column>
<f:facet name="header">Action</f:facet>
Modified: branches/enterprise/JBPAPP_4_3_FP01/examples/icefaces/view/password.xhtml
===================================================================
--- branches/enterprise/JBPAPP_4_3_FP01/examples/icefaces/view/password.xhtml 2008-11-13 12:26:08 UTC (rev 9558)
+++ branches/enterprise/JBPAPP_4_3_FP01/examples/icefaces/view/password.xhtml 2008-11-13 16:55:11 UTC (rev 9559)
@@ -23,7 +23,7 @@
<div class="entry errors">
- <h:messages globalOnly="true"/>
+ <h:messages id="messages" globalOnly="true"/>
</div>
<h:form id="setpassword">
@@ -34,7 +34,7 @@
- <s:decorate template="edit.xhtml">
+ <s:decorate id="PasswordDecorate" template="edit.xhtml">
<ui:define name="label">Password:</ui:define>
@@ -44,7 +44,7 @@
- <s:decorate template="edit.xhtml">
+ <s:decorate id="VerifyDecorate" template="edit.xhtml">
<ui:define name="label">Verify:</ui:define>
<ice:inputSecret id="verify" value="#{changePassword.verify}"
redisplay="true" required="true"/>
Modified: branches/enterprise/JBPAPP_4_3_FP01/examples/icefaces/view/register.xhtml
===================================================================
--- branches/enterprise/JBPAPP_4_3_FP01/examples/icefaces/view/register.xhtml 2008-11-13 12:26:08 UTC (rev 9558)
+++ branches/enterprise/JBPAPP_4_3_FP01/examples/icefaces/view/register.xhtml 2008-11-13 16:55:11 UTC (rev 9559)
@@ -48,7 +48,7 @@
<div class="section" style="overflow:auto">
<div class="entry errors">
- <h:messages globalOnly="true"/>
+ <h:messages id="messages" globalOnly="true"/>
</div>
<h:form id="registration">
Modified: branches/enterprise/JBPAPP_4_3_FP01/examples/jpa/view/book.xhtml
===================================================================
--- branches/enterprise/JBPAPP_4_3_FP01/examples/jpa/view/book.xhtml 2008-11-13 12:26:08 UTC (rev 9558)
+++ branches/enterprise/JBPAPP_4_3_FP01/examples/jpa/view/book.xhtml 2008-11-13 16:55:11 UTC (rev 9559)
@@ -49,10 +49,10 @@
<s:validateAll>
<f:facet name="aroundInvalidField">
- <s:span styleClass="errors"/>
+ <s:span id="Error" styleClass="errors"/>
</f:facet>
<f:facet name="afterInvalidField">
- <s:div styleClass="errors">
+ <s:div id="Message" styleClass="errors">
<s:message/>
</s:div>
</f:facet>
@@ -77,7 +77,7 @@
<div class="entry">
<div class="label"><h:outputLabel for="beds">Room Preference:</h:outputLabel></div>
<div class="input">
- <s:decorate>
+ <s:decorate id="bedsDecorate">
<h:selectOneMenu id="beds" value="#{booking.beds}">
<f:selectItem itemLabel="One king-size bed" itemValue="1"/>
<f:selectItem itemLabel="Two double beds" itemValue="2"/>
@@ -90,7 +90,7 @@
<div class="entry">
<div class="label"><h:outputLabel for="smoking">Smoking Preference:</h:outputLabel></div>
<div id="radio" class="input">
- <s:decorate>
+ <s:decorate id="smokingDecorate">
<h:selectOneRadio id="smoking" value="#{booking.smoking}" layout="pageDirection">
<f:selectItem itemLabel="Smoking" itemValue="true"/>
<f:selectItem itemLabel="Non Smoking" itemValue="false"/>
Modified: branches/enterprise/JBPAPP_4_3_FP01/examples/jpa/view/conversations.xhtml
===================================================================
--- branches/enterprise/JBPAPP_4_3_FP01/examples/jpa/view/conversations.xhtml 2008-11-13 12:26:08 UTC (rev 9558)
+++ branches/enterprise/JBPAPP_4_3_FP01/examples/jpa/view/conversations.xhtml 2008-11-13 16:55:11 UTC (rev 9559)
@@ -12,12 +12,12 @@
</div>
<div class="section">
- <h:form>
- <h:dataTable value="#{conversationList}" var="entry">
+ <h:form id="ConversationListForm">
+ <h:dataTable id="ConversationListDataTable" value="#{conversationList}" var="entry">
<h:column>
<h:commandLink action="#{entry.select}" value="#{entry.description}"/>
 
- <h:outputText value="[current]" rendered="#{entry.current}"/>
+ <h:outputText id="CurrentEntry" value="[current]" rendered="#{entry.current}"/>
</h:column>
<h:column>
<h:outputText value="#{entry.startDatetime}">
Modified: branches/enterprise/JBPAPP_4_3_FP01/examples/jpa/view/password.xhtml
===================================================================
--- branches/enterprise/JBPAPP_4_3_FP01/examples/jpa/view/password.xhtml 2008-11-13 12:26:08 UTC (rev 9558)
+++ branches/enterprise/JBPAPP_4_3_FP01/examples/jpa/view/password.xhtml 2008-11-13 16:55:11 UTC (rev 9559)
@@ -19,7 +19,7 @@
</f:facet>
<f:facet name="afterInvalidField">
<s:div styleClass="errors">
- <s:message/>
+ <s:message id="Message"/>
</s:div>
</f:facet>
@@ -28,7 +28,7 @@
<div class="entry">
<div class="label"><h:outputLabel for="password">Password:</h:outputLabel></div>
<div class="input">
- <s:decorate>
+ <s:decorate id="PasswordDecorate">
<h:inputSecret id="password" value="#{user.password}" required="true">
<s:validate/>
</h:inputSecret>
@@ -39,7 +39,7 @@
<div class="entry">
<div class="label"><h:outputLabel for="verify">Verify:</h:outputLabel></div>
<div class="input">
- <s:decorate>
+ <s:decorate id="VerifyDecorate">
<h:inputSecret id="verify" value="#{changePassword.verify}" required="true"/>
</s:decorate>
</div>
Modified: branches/enterprise/JBPAPP_4_3_FP01/examples/nestedbooking/view/edit.xhtml
===================================================================
--- branches/enterprise/JBPAPP_4_3_FP01/examples/nestedbooking/view/edit.xhtml 2008-11-13 12:26:08 UTC (rev 9558)
+++ branches/enterprise/JBPAPP_4_3_FP01/examples/nestedbooking/view/edit.xhtml 2008-11-13 16:55:11 UTC (rev 9559)
@@ -6,16 +6,16 @@
xmlns:s="http://jboss.com/products/seam/taglib">
<div class="entry">
- <s:label styleClass="label #{invalid?'errors':''}">
+ <s:label id="Label" styleClass="label #{invalid?'errors':''}">
<ui:insert name="label"/>
- <s:span styleClass="required" rendered="#{required}">*</s:span>
+ <s:span id="RequiredStyle" styleClass="required" rendered="#{required}">*</s:span>
</s:label>
<span class="input #{invalid?'errors':''}">
- <s:validateAll>
+ <s:validateAll id="ValidateAll">
<ui:insert/>
</s:validateAll>
</span>
- <s:message styleClass="error errors"/>
+ <s:message id="message" styleClass="error errors"/>
</div>
</ui:composition>
\ No newline at end of file
Modified: branches/enterprise/JBPAPP_4_3_FP01/examples/nestedbooking/view/main.xhtml
===================================================================
--- branches/enterprise/JBPAPP_4_3_FP01/examples/nestedbooking/view/main.xhtml 2008-11-13 12:26:08 UTC (rev 9558)
+++ branches/enterprise/JBPAPP_4_3_FP01/examples/nestedbooking/view/main.xhtml 2008-11-13 16:55:11 UTC (rev 9559)
@@ -26,7 +26,7 @@
 
<a:status>
<f:facet name="start">
- <h:graphicImage value="/img/spinner.gif"/>
+ <h:graphicImage id="SpinnerGif" value="/img/spinner.gif"/>
</f:facet>
</a:status>
<br/>
@@ -43,26 +43,26 @@
<a:outputPanel id="searchResults">
<div class="section">
- <h:outputText value="No Hotels Found" rendered="#{hotels != null and hotels.rowCount==0}"/>
+ <h:outputText id="NoBookingsFoundMessage" value="No Hotels Found" rendered="#{hotels != null and hotels.rowCount==0}"/>
<h:dataTable id="hotels" value="#{hotels}" var="hot" rendered="#{hotels.rowCount>0}">
- <h:column>
- <f:facet name="header">Name</f:facet>
+ <h:column id="column1">
+ <f:facet id="NameFacet" name="header">Name</f:facet>
#{hot.name}
</h:column>
- <h:column>
- <f:facet name="header">Address</f:facet>
+ <h:column id="column2">
+ <f:facet id="AddressFacet" name="header">Address</f:facet>
#{hot.address}
</h:column>
- <h:column>
- <f:facet name="header">City, State</f:facet>
+ <h:column id="column3">
+ <f:facet id="CityStateFacet" name="header">City, State</f:facet>
#{hot.city}, #{hot.state}, #{hot.country}
</h:column>
- <h:column>
- <f:facet name="header">Zip</f:facet>
+ <h:column id="column4">
+ <f:facet id="ZipFacet" name="header">Zip</f:facet>
#{hot.zip}
</h:column>
- <h:column>
- <f:facet name="header">Action</f:facet>
+ <h:column id="column5">
+ <f:facet id="ActionFacet" name="header">Action</f:facet>
<s:link id="viewHotel" value="View Hotel" action="#{hotelBooking.selectHotel(hot)}"/>
</h:column>
</h:dataTable>
Modified: branches/enterprise/JBPAPP_4_3_FP01/examples/nestedbooking/view/password.xhtml
===================================================================
--- branches/enterprise/JBPAPP_4_3_FP01/examples/nestedbooking/view/password.xhtml 2008-11-13 12:26:08 UTC (rev 9558)
+++ branches/enterprise/JBPAPP_4_3_FP01/examples/nestedbooking/view/password.xhtml 2008-11-13 16:55:11 UTC (rev 9559)
@@ -14,18 +14,18 @@
<h:form id="setpassword">
<fieldset>
- <s:decorate template="edit.xhtml">
+ <s:decorate id="PasswordDecorate" template="edit.xhtml">
<ui:define name="label">Password</ui:define>
<h:inputSecret id="password" value="#{user.password}" required="true" />
</s:decorate>
- <s:decorate template="edit.xhtml">
+ <s:decorate id="VerifyDecorate" template="edit.xhtml">
<ui:define name="label">Verify:</ui:define>
<h:inputSecret id="verify" value="#{changePassword.verify}" required="true"/>
</s:decorate>
<div class="entry errors">
- <h:messages globalOnly="true"/>
+ <h:messages id="messages" globalOnly="true"/>
</div>
<div class="entry">
Modified: branches/enterprise/JBPAPP_4_3_FP01/examples/nestedbooking/view/register.xhtml
===================================================================
--- branches/enterprise/JBPAPP_4_3_FP01/examples/nestedbooking/view/register.xhtml 2008-11-13 12:26:08 UTC (rev 9558)
+++ branches/enterprise/JBPAPP_4_3_FP01/examples/nestedbooking/view/register.xhtml 2008-11-13 16:55:11 UTC (rev 9559)
@@ -40,18 +40,18 @@
</h:inputText>
</s:decorate>
- <s:decorate template="edit.xhtml">
+ <s:decorate id="passwordDecorate" template="edit.xhtml">
<ui:define name="label">Password:</ui:define>
<h:inputSecret id="password" value="#{user.password}" required="true"/>
</s:decorate>
- <s:decorate template="edit.xhtml">
+ <s:decorate id="verifyDecorate" template="edit.xhtml">
<ui:define name="label">Verify Password:</ui:define>
<h:inputSecret id="verify" value="#{register.verify}" required="true"/>
</s:decorate>
<div class="entry errors">
- <h:messages globalOnly="true"/>
+ <h:messages id="messages" globalOnly="true"/>
</div>
<div class="entry">
Modified: branches/enterprise/JBPAPP_4_3_FP01/examples/quartz/view/search.xhtml
===================================================================
--- branches/enterprise/JBPAPP_4_3_FP01/examples/quartz/view/search.xhtml 2008-11-13 12:26:08 UTC (rev 9558)
+++ branches/enterprise/JBPAPP_4_3_FP01/examples/quartz/view/search.xhtml 2008-11-13 16:55:11 UTC (rev 9559)
@@ -30,16 +30,16 @@
<th>Account Number</th>
<th>Balance</th>
</tr>
- <ui:repeat value="#{accounts.resultList}" var="account">
+ <ui:repeat id="accountTable" value="#{accounts.resultList}" var="account">
<tr>
<td>
- <s:link view="/search.xhtml" value="#{account.id}">
+ <s:link id="link" view="/search.xhtml" value="#{account.id}">
<f:param name="accountId" value="#{account.id}"/>
</s:link>
</td>
<td>#{account.accountNumber}</td>
<td>
- <h:outputText value="#{account.balance}">
+ <h:outputText id="balance" value="#{account.balance}">
<f:convertNumber type="currency" currencySymbol="$"/>
</h:outputText>
</td>
@@ -51,54 +51,58 @@
<f:subview id="accountView" rendered="#{accountHome.idDefined}">
<h2>Payments from Account #{accountHome.instance.accountNumber}</h2>
- <table class="results">
- <tr>
- <th>Status</th>
- <th>Payee</th>
- <th>Payment Amount</th>
- <th>Created Date</th>
- <th>Scheduled Date</th>
- <th>Cron</th>
- <th>Frequency</th>
- <th>Last Paid On</th>
- </tr>
- <ui:repeat value="#{accountHome.instance.payments}" var="payment">
- <tr>
- <td>
- <s:button action="#{paymentHome.cancel}" value="Cancel" rendered="#{payment.active}">
- <f:param name="paymentId" value="#{payment.id}"/>
- </s:button>
- <h:outputText value="not active" rendered="#{!payment.active}" />
- </td>
- <td>#{payment.payee}</td>
- <td>
- <h:outputText value="#{payment.amount}">
- <f:convertNumber type="currency" currencySymbol="$"/>
- </h:outputText>
- </td>
- <td>
- <h:outputText value="#{payment.createdDate}">
- <f:convertDateTime type="date" dateStyle="medium" />
- </h:outputText>
- </td>
- <td>
- <h:outputText value="#{payment.paymentDate}">
- <f:convertDateTime type="date" dateStyle="medium" />
- </h:outputText>
- </td>
- <td>#{payment.paymentCron}</td>
- <td>#{payment.paymentFrequency}</td>
- <td>
- <h:outputText value="#{payment.lastPaid}">
- <f:convertDateTime type="date" dateStyle="medium" />
- </h:outputText>
- </td>
- </tr>
- </ui:repeat>
+ <table id="payments" class="results">
+ <thead>
+ <tr>
+ <th>Status</th>
+ <th>Payee</th>
+ <th>Payment Amount</th>
+ <th>Created Date</th>
+ <th>Scheduled Date</th>
+ <th>Cron</th>
+ <th>Frequency</th>
+ <th>Last Paid On</th>
+ </tr>
+ </thead>
+ <tbody>
+ <ui:repeat value="#{accountHome.instance.payments}" var="payment">
+ <tr>
+ <td>
+ <s:button action="#{paymentHome.cancel}" value="Cancel" rendered="#{payment.active}">
+ <f:param name="paymentId" value="#{payment.id}"/>
+ </s:button>
+ <h:outputText value="not active" rendered="#{!payment.active}" />
+ </td>
+ <td>#{payment.payee}</td>
+ <td>
+ <h:outputText value="#{payment.amount}">
+ <f:convertNumber type="currency" currencySymbol="$"/>
+ </h:outputText>
+ </td>
+ <td>
+ <h:outputText value="#{payment.createdDate}">
+ <f:convertDateTime type="date" dateStyle="medium" />
+ </h:outputText>
+ </td>
+ <td>
+ <h:outputText value="#{payment.paymentDate}">
+ <f:convertDateTime type="date" dateStyle="medium" />
+ </h:outputText>
+ </td>
+ <td>#{payment.paymentCron}</td>
+ <td>#{payment.paymentFrequency}</td>
+ <td>
+ <h:outputText value="#{payment.lastPaid}">
+ <f:convertDateTime type="date" dateStyle="medium" />
+ </h:outputText>
+ </td>
+ </tr>
+ </ui:repeat>
+ </tbody>
</table>
<h2>Make a payment from account #{accountHome.instance.accountNumber}:</h2>
- <h:form>
+ <h:form id="paymentForm">
<s:validateAll>
<table>
<tr>
@@ -142,7 +146,7 @@
<p><b>Now, choose one of the following repeat payment schemes</b></p>
<p>Cron:
<h:inputText id="paymentCron" value="#{newPayment.paymentCron}"/><br/>
- <h:commandButton value="Schedule Cron Job"
+ <h:commandButton id="cronSubmit" value="Schedule Cron Job"
action="#{paymentHome.saveAndScheduleCron}" />
</p>
@@ -160,7 +164,7 @@
<f:selectItems value="#{newPayment.frequencies}" />
</ui:remove>
</h:selectOneRadio><br/>
- <h:commandButton value="Schedule at Fixed Interval"
+ <h:commandButton id="submit" value="Schedule at Fixed Interval"
action="#{paymentHome.saveAndSchedule}" />
</p>
Modified: branches/enterprise/JBPAPP_4_3_FP01/examples/seampay/view/search.xhtml
===================================================================
--- branches/enterprise/JBPAPP_4_3_FP01/examples/seampay/view/search.xhtml 2008-11-13 12:26:08 UTC (rev 9558)
+++ branches/enterprise/JBPAPP_4_3_FP01/examples/seampay/view/search.xhtml 2008-11-13 16:55:11 UTC (rev 9559)
@@ -31,16 +31,16 @@
<th>Account Number</th>
<th>Balance</th>
</tr>
- <ui:repeat value="#{accounts.resultList}" var="account">
+ <ui:repeat id="accountTable" value="#{accounts.resultList}" var="account">
<tr>
<td>
- <s:link view="/search.xhtml" value="#{account.id}">
+ <s:link id="link" view="/search.xhtml" value="#{account.id}">
<f:param name="accountId" value="#{account.id}"/>
</s:link>
</td>
<td>#{account.accountNumber}</td>
<td>
- <h:outputText value="#{account.balance}">
+ <h:outputText id="balance" value="#{account.balance}">
<f:convertNumber type="currency" currencySymbol="$"/>
</h:outputText>
</td>
@@ -52,52 +52,56 @@
<f:subview id="accountView" rendered="#{accountHome.idDefined}">
<h2>Payments from Account #{accountHome.instance.accountNumber}</h2>
- <table class="results">
- <tr>
- <th>Status</th>
- <th>Payee</th>
- <th>Payment Amount</th>
- <th>Created Date</th>
- <th>Scheduled Date</th>
- <th>Frequency</th>
- <th>Last Paid On</th>
- </tr>
- <ui:repeat value="#{accountHome.instance.payments}" var="payment">
- <tr>
- <td>
- <s:button action="#{paymentHome.cancel}" value="Cancel" rendered="#{payment.active}">
- <f:param name="paymentId" value="#{payment.id}"/>
- </s:button>
- <h:outputText value="not active" rendered="#{!payment.active}" />
- </td>
- <td>#{payment.payee}</td>
- <td>
- <h:outputText value="#{payment.amount}">
- <f:convertNumber type="currency" currencySymbol="$"/>
- </h:outputText>
- </td>
- <td>
- <h:outputText value="#{payment.createdDate}">
- <f:convertDateTime type="date" dateStyle="medium" />
- </h:outputText>
- </td>
- <td>
- <h:outputText value="#{payment.paymentDate}">
- <f:convertDateTime type="date" dateStyle="medium" />
- </h:outputText>
- </td>
- <td>#{payment.paymentFrequency}</td>
- <td>
- <h:outputText value="#{payment.lastPaid}">
- <f:convertDateTime type="date" dateStyle="medium" />
- </h:outputText>
- </td>
- </tr>
- </ui:repeat>
+ <table id="payments" class="results">
+ <thead>
+ <tr>
+ <th>Status</th>
+ <th>Payee</th>
+ <th>Payment Amount</th>
+ <th>Created Date</th>
+ <th>Scheduled Date</th>
+ <th>Frequency</th>
+ <th>Last Paid On</th>
+ </tr>
+ </thead>
+ <tbody>
+ <ui:repeat value="#{accountHome.instance.payments}" var="payment">
+ <tr>
+ <td>
+ <s:button action="#{paymentHome.cancel}" value="Cancel" rendered="#{payment.active}">
+ <f:param name="paymentId" value="#{payment.id}"/>
+ </s:button>
+ <h:outputText value="not active" rendered="#{!payment.active}" />
+ </td>
+ <td>#{payment.payee}</td>
+ <td>
+ <h:outputText value="#{payment.amount}">
+ <f:convertNumber type="currency" currencySymbol="$"/>
+ </h:outputText>
+ </td>
+ <td>
+ <h:outputText value="#{payment.createdDate}">
+ <f:convertDateTime type="date" dateStyle="medium" />
+ </h:outputText>
+ </td>
+ <td>
+ <h:outputText value="#{payment.paymentDate}">
+ <f:convertDateTime type="date" dateStyle="medium" />
+ </h:outputText>
+ </td>
+ <td>#{payment.paymentFrequency}</td>
+ <td>
+ <h:outputText value="#{payment.lastPaid}">
+ <f:convertDateTime type="date" dateStyle="medium" />
+ </h:outputText>
+ </td>
+ </tr>
+ </ui:repeat>
+ </tbody>
</table>
<h2>Make a payment from account #{accountHome.instance.accountNumber}:</h2>
- <h:form>
+ <h:form id="paymentForm">
<s:validateAll>
<table>
<tr>
@@ -129,11 +133,11 @@
layout="lineDirection"
value="#{newPayment.paymentFrequency}">
<s:convertEnum />
- <s:enumItem enumValue="ONCE" label="Only Once" />
- <s:enumItem enumValue="EVERY_MINUTE" label="Every Minute (testing)" />
- <s:enumItem enumValue="HOURLY" label="Every Hour (testing)" />
- <s:enumItem enumValue="DAILY" label="Every Day" />
- <s:enumItem enumValue="WEEKLY" label="Every Week" />
+ <s:enumItem id="once" enumValue="ONCE" label="Only Once" />
+ <s:enumItem id="everyMinute" enumValue="EVERY_MINUTE" label="Every Minute (testing)" />
+ <s:enumItem id="hourly" enumValue="HOURLY" label="Every Hour (testing)" />
+ <s:enumItem id="daily" enumValue="DAILY" label="Every Day" />
+ <s:enumItem id="weekly" enumValue="WEEKLY" label="Every Week" />
<ui:remove>
<f:selectItems value="#{newPayment.frequencies}" />
</ui:remove>
@@ -143,7 +147,7 @@
</table>
</s:validateAll>
- <h:commandButton value="Schedule"
+ <h:commandButton id="submit" value="Schedule"
action="#{paymentHome.saveAndSchedule}" />
</h:form>
</f:subview>
Modified: branches/enterprise/JBPAPP_4_3_FP01/examples/spring/view/book.xhtml
===================================================================
--- branches/enterprise/JBPAPP_4_3_FP01/examples/spring/view/book.xhtml 2008-11-13 12:26:08 UTC (rev 9558)
+++ branches/enterprise/JBPAPP_4_3_FP01/examples/spring/view/book.xhtml 2008-11-13 16:55:11 UTC (rev 9559)
@@ -48,13 +48,13 @@
<s:validateAll>
<f:facet name="aroundInvalidField">
- <s:span styleClass="errors"/>
+ <s:span id="Error" styleClass="errors"/>
</f:facet>
<div class="entry">
<div class="label"><h:outputLabel for="checkinDate">Check In Date:</h:outputLabel></div>
<div class="input">
- <s:decorate>
+ <s:decorate id="checkinDateDecorate">
<rich:calendar id="checkinDate" value="#{booking.checkinDate}" required="true" datePattern="MM/dd/yyyy" event="onblur" reRender="checkinDateDecorate" />
<br/>
<s:message/>
@@ -65,7 +65,7 @@
<div class="entry">
<div class="label"><h:outputLabel for="checkoutDate">Check Out Date:</h:outputLabel></div>
<div class="input">
- <s:decorate>
+ <s:decorate id="checkoutDateDecorate">
<rich:calendar id="checkoutDate" value="#{booking.checkoutDate}" required="true" datePattern="MM/dd/yyyy" event="onblur" reRender="checkoutDateDecorate" />
<br/>
<s:message/>
@@ -76,7 +76,7 @@
<div class="entry">
<div class="label"><h:outputLabel for="beds">Room Preference:</h:outputLabel></div>
<div class="input">
- <s:decorate>
+ <s:decorate id="bedsDecorate">
<h:selectOneMenu id="beds" value="#{booking.beds}">
<f:selectItem itemLabel="One king-size bed" itemValue="1"/>
<f:selectItem itemLabel="Two double beds" itemValue="2"/>
@@ -90,7 +90,7 @@
<div class="entry">
<div class="label"><h:outputLabel for="smoking">Smoking Preference:</h:outputLabel></div>
<div id="radio" class="input">
- <s:decorate>
+ <s:decorate id="smokingDecorate">
<h:selectOneRadio id="smoking" value="#{booking.smoking}" layout="pageDirection">
<f:selectItem itemLabel="Smoking" itemValue="true"/>
<f:selectItem itemLabel="Non Smoking" itemValue="false"/>
@@ -103,7 +103,7 @@
<div class="entry">
<div class="label"><h:outputLabel for="creditCard">Credit Card #:</h:outputLabel></div>
<div class="input">
- <s:decorate>
+ <s:decorate id="creditCardDecorate">
<h:inputText id="creditCard" value="#{booking.creditCard}" required="true">
</h:inputText>
<br/>
@@ -115,7 +115,7 @@
<div class="entry">
<div class="label"><h:outputLabel for="creditCardName">Credit Card Name:</h:outputLabel></div>
<div class="input">
- <s:decorate>
+ <s:decorate id="creditCardNameDecorate">
<h:inputText id="creditCardName" value="#{booking.creditCardName}" required="true">
</h:inputText>
<br/>
@@ -127,7 +127,7 @@
<div class="entry">
<div class="label"><h:outputLabel for="creditCardExpiryMonth">Credit Card Expiry:</h:outputLabel></div>
<div class="input">
- <s:decorate>
+ <s:decorate id="creditCardExpiryDecorate">
<h:selectOneMenu id="creditCardExpiryMonth" value="#{booking.creditCardExpiryMonth}">
<f:selectItem itemLabel="Jan" itemValue="1"/>
<f:selectItem itemLabel="Feb" itemValue="2"/>
@@ -157,7 +157,7 @@
</s:validateAll>
<div class="entry errors">
- <h:messages globalOnly="true"/>
+ <h:messages id="Messages" globalOnly="true"/>
</div>
<div class="entry">
Modified: branches/enterprise/JBPAPP_4_3_FP01/examples/spring/view/conversations.xhtml
===================================================================
--- branches/enterprise/JBPAPP_4_3_FP01/examples/spring/view/conversations.xhtml 2008-11-13 12:26:08 UTC (rev 9558)
+++ branches/enterprise/JBPAPP_4_3_FP01/examples/spring/view/conversations.xhtml 2008-11-13 16:55:11 UTC (rev 9559)
@@ -12,19 +12,19 @@
</div>
<div class="section">
- <h:form>
- <h:dataTable value="#{conversationList}" var="entry">
- <h:column>
- <h:commandLink action="#{entry.select}" value="#{entry.description}"/>
+ <h:form id="ConversationListForm">
+ <h:dataTable id="ConversationListDataTable" value="#{conversationList}" var="entry">
+ <h:column id="column1">
+ <h:commandLink id="EntryDescriptionLink" action="#{entry.select}" value="#{entry.description}"/>
 
- <h:outputText value="[current]" rendered="#{entry.current}"/>
+ <h:outputText id="CurrentEntry" value="[current]" rendered="#{entry.current}"/>
</h:column>
- <h:column>
- <h:outputText value="#{entry.startDatetime}">
+ <h:column id="column2">
+ <h:outputText id="EntryStartDateTime" value="#{entry.startDatetime}">
<s:convertDateTime type="time" pattern="hh:mm"/>
</h:outputText>
-
- <h:outputText value="#{entry.lastDatetime}">
+ <h:outputText id="EntryLastDateTime" value="#{entry.lastDatetime}">
<s:convertDateTime type="time" pattern="hh:mm"/>
</h:outputText>
</h:column>
Modified: branches/enterprise/JBPAPP_4_3_FP01/examples/spring/view/main.xhtml
===================================================================
--- branches/enterprise/JBPAPP_4_3_FP01/examples/spring/view/main.xhtml 2008-11-13 12:26:08 UTC (rev 9558)
+++ branches/enterprise/JBPAPP_4_3_FP01/examples/spring/view/main.xhtml 2008-11-13 16:55:11 UTC (rev 9559)
@@ -12,7 +12,7 @@
<h:form id="main">
<span class="errors">
- <h:messages globalOnly="true"/>
+ <h:messages id="messages" globalOnly="true"/>
</span>
<h1>Search Hotels</h1>
@@ -36,7 +36,7 @@
<div class="section">
- <h:outputText value="No Hotels Found" rendered="#{hotels != null and hotels.rowCount==0}"/>
+ <h:outputText id="NoHotelsFoundMessage" value="No Hotels Found" rendered="#{hotels != null and hotels.rowCount==0}"/>
<h:dataTable id="hotels" value="#{hotels}" var="hot" rendered="#{hotels.rowCount>0}">
<h:column>
<f:facet name="header">Name</f:facet>
@@ -59,7 +59,7 @@
<s:link id="viewHotel" value="View Hotel" action="#{hotelBooking.selectHotel(hot)}"/>
</h:column>
</h:dataTable>
- <s:link value="More results" action="#{hotelSearch.nextPage}" rendered="#{hotelSearch.nextPageAvailable}"/>
+ <s:link id="MoreResultsLink" value="More results" action="#{hotelSearch.nextPage}" rendered="#{hotelSearch.nextPageAvailable}"/>
</div>
<div class="section">
Modified: branches/enterprise/JBPAPP_4_3_FP01/examples/spring/view/password.xhtml
===================================================================
--- branches/enterprise/JBPAPP_4_3_FP01/examples/spring/view/password.xhtml 2008-11-13 12:26:08 UTC (rev 9558)
+++ branches/enterprise/JBPAPP_4_3_FP01/examples/spring/view/password.xhtml 2008-11-13 16:55:11 UTC (rev 9559)
@@ -12,13 +12,13 @@
<h1>Change Your Password</h1>
</div>
<div class="section">
- <h:form id="password">
+ <h:form id="setpassword">
<f:facet name="afterInvalidField">
- <s:message/>
+ <s:message id="Message"/>
</f:facet>
<f:facet name="aroundInvalidField">
- <s:span styleClass="errors"/>
+ <s:span id="Error" styleClass="errors"/>
</f:facet>
<fieldset>
@@ -26,7 +26,7 @@
<div class="entry">
<div class="label"><h:outputLabel for="password">New Password:</h:outputLabel></div>
<div class="input">
- <s:decorate>
+ <s:decorate id="PasswordDecorate">
<h:inputSecret id="password" value="#{user.password}" required="true">
<s:validate />
</h:inputSecret>
@@ -38,7 +38,7 @@
<div class="entry">
<div class="label"><h:outputLabel for="password">Old Password:</h:outputLabel></div>
<div class="input">
- <s:decorate>
+ <s:decorate id="VerifyDecorate">
<h:inputSecret id="verify" value="#{changePassword.verify}" required="true"/>
<br/>
</s:decorate>
@@ -46,7 +46,7 @@
</div>
<div class="entry errors">
- <h:messages globalOnly="true"/>
+ <h:messages id="Messages" globalOnly="true"/>
</div>
<div class="entry">
Modified: branches/enterprise/JBPAPP_4_3_FP01/examples/spring/view/register.xhtml
===================================================================
--- branches/enterprise/JBPAPP_4_3_FP01/examples/spring/view/register.xhtml 2008-11-13 12:26:08 UTC (rev 9558)
+++ branches/enterprise/JBPAPP_4_3_FP01/examples/spring/view/register.xhtml 2008-11-13 16:55:11 UTC (rev 9559)
@@ -46,7 +46,7 @@
<div class="entry">
<div class="label"><h:outputLabel for="username">Username:</h:outputLabel></div>
<div class="input">
- <s:decorate>
+ <s:decorate id="usernameDecorate">
<h:inputText id="username" value="#{user.username}" required="true">
<a:support event="onblur" reRender="usernameErrors"/>
</h:inputText>
@@ -59,7 +59,7 @@
<div class="entry">
<div class="label"><h:outputLabel for="name">Real Name:</h:outputLabel></div>
<div class="input">
- <s:decorate>
+ <s:decorate id="nameDecorate">
<h:inputText id="name" value="#{user.name}" required="true">
<a:support event="onblur" reRender="nameErrors"/>
</h:inputText>
@@ -72,7 +72,7 @@
<div class="entry">
<div class="label"><h:outputLabel for="password">Password:</h:outputLabel></div>
<div class="input">
- <s:decorate>
+ <s:decorate id="passwordDecorate">
<h:inputSecret id="password" value="#{user.password}" required="true"/>
<br/>
<h:message for="password"/>
@@ -83,7 +83,7 @@
<div class="entry">
<div class="label"><h:outputLabel for="verify">Verify Password:</h:outputLabel></div>
<div class="input">
- <s:decorate>
+ <s:decorate id="verifyDecorate">
<h:inputSecret id="verify" value="#{register.verify}" required="true"/>
<br/>
<h:message for="verify"/>
@@ -94,7 +94,7 @@
</s:validateAll>
<div class="entry errors">
- <h:messages globalOnly="true"/>
+ <h:messages id="messages" globalOnly="true"/>
</div>
<div class="entry">
16 years
Seam SVN: r9558 - branches/enterprise/JBPAPP_4_3_FP01/src/main/org/jboss/seam/faces.
by seam-commits@lists.jboss.org
Author: manaRH
Date: 2008-11-13 07:26:08 -0500 (Thu, 13 Nov 2008)
New Revision: 9558
Modified:
branches/enterprise/JBPAPP_4_3_FP01/src/main/org/jboss/seam/faces/Switcher.java
Log:
JBSEAM-2881
Modified: branches/enterprise/JBPAPP_4_3_FP01/src/main/org/jboss/seam/faces/Switcher.java
===================================================================
--- branches/enterprise/JBPAPP_4_3_FP01/src/main/org/jboss/seam/faces/Switcher.java 2008-11-12 03:57:33 UTC (rev 9557)
+++ branches/enterprise/JBPAPP_4_3_FP01/src/main/org/jboss/seam/faces/Switcher.java 2008-11-13 12:26:08 UTC (rev 9558)
@@ -99,7 +99,9 @@
public String select()
{
- boolean isOutcome = conversationIdOrOutcome==null || !Character.isDigit( conversationIdOrOutcome.charAt(0) );
+ boolean isOutcome = conversationIdOrOutcome==null ||
+ (!Character.isDigit(conversationIdOrOutcome.charAt(0)) && conversationIdOrOutcome.indexOf(':') < 0);
+
String actualOutcome;
if (isOutcome)
{
16 years
Seam SVN: r9557 - trunk/doc/Seam_Reference_Guide/en-US.
by seam-commits@lists.jboss.org
Author: shane.bryzak(a)jboss.com
Date: 2008-11-11 22:57:33 -0500 (Tue, 11 Nov 2008)
New Revision: 9557
Modified:
trunk/doc/Seam_Reference_Guide/en-US/Events.xml
Log:
JBSEAM-3558
Modified: trunk/doc/Seam_Reference_Guide/en-US/Events.xml
===================================================================
--- trunk/doc/Seam_Reference_Guide/en-US/Events.xml 2008-11-12 03:00:50 UTC (rev 9556)
+++ trunk/doc/Seam_Reference_Guide/en-US/Events.xml 2008-11-12 03:57:33 UTC (rev 9557)
@@ -1174,7 +1174,21 @@
session expiration if you are inside a conversation.
</para>
</section>
-
- </section>
+ </section>
+
+ <section>
+ <title>conversation-required</title>
+
+ <para>
+ When specified as the attribute of a <literal>page</literal> element in <literal>pages.xml</literal>,
+ this setting controls whether a page requires an active long-running or nested conversation before
+ being rendered. If there is not an active long-running or nested conversation when trying to access
+ the page, you will be redirected to the <literal>no-conversation-view-id</literal> view (which is specified
+ in the root <literal>pages</literal> element) instead.
+ </para>
+
+ <programlisting><![CDATA[ <page view-id="/foo.xhtml" conversation-required="true"/>]]></programlisting>
+
+ </section>
</chapter>
16 years
Seam SVN: r9556 - trunk/src/main/org/jboss/seam/util.
by seam-commits@lists.jboss.org
Author: shane.bryzak(a)jboss.com
Date: 2008-11-11 22:00:50 -0500 (Tue, 11 Nov 2008)
New Revision: 9556
Modified:
trunk/src/main/org/jboss/seam/util/Naming.java
Log:
JBSEAM-3485
Modified: trunk/src/main/org/jboss/seam/util/Naming.java
===================================================================
--- trunk/src/main/org/jboss/seam/util/Naming.java 2008-11-11 21:44:58 UTC (rev 9555)
+++ trunk/src/main/org/jboss/seam/util/Naming.java 2008-11-12 03:00:50 UTC (rev 9556)
@@ -16,13 +16,13 @@
public final class Naming
{
-
private static final LogProvider log = Logging.getLogProvider(Naming.class);
private static Hashtable initialContextProperties;
+
+ private static InitialContext initialContext;
public static InitialContext getInitialContext(Hashtable<String, String> props) throws NamingException
{
-
if (props==null)
{
throw new IllegalStateException("JNDI properties not initialized, Seam was not started correctly");
@@ -47,20 +47,30 @@
public static InitialContext getInitialContext() throws NamingException
{
- return getInitialContext(initialContextProperties);
+ if (initialContext == null) initInitialContext();
+
+ return initialContext;
}
+
+ private static synchronized void initInitialContext() throws NamingException
+ {
+ if (initialContext == null)
+ {
+ initialContext = getInitialContext(initialContextProperties);
+ }
+ }
private Naming() {}
public static void setInitialContextProperties(Hashtable initialContextProperties)
{
Naming.initialContextProperties = initialContextProperties;
+ initialContext = null;
}
public static Hashtable getInitialContextProperties()
{
return initialContextProperties;
}
-
}
16 years