You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@myfaces.apache.org by Joel Wilson <jo...@devotionmedia.com> on 2005/11/16 21:09:02 UTC

h:commandButton won't call method

I have an interesting problem where I have a basic form (just  
starting project so nothing fancy on the server side yet) that  
populates the values from the from into a map, and call a method  
which decides what form is next; absolutely basic and boring.

What happens or doesn't and it somewhat confusing is that when the  
user clicks the next button, it simply returns to the page as if the  
method had returned null; but the method was never called; but if  
they click the commandLink it does get called. It is odd that one  
works and the other doesn't, and that is the basis of my confusion. I  
would assume it has something to do with MyFaces thinking that the  
form was submitted somehow other than via the commandButton component  
and therefore never puts into motion whatever calls the action method.

Here is my faces-config.xml, the JSP I'm toying with, and what I have  
of my BackingBean class.

THE JSP FILE

<%@ page language="java" pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsf/html" prefix="h"%>
<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f"%>
<%@ taglib uri="http://myfaces.apache.org/tomahawk" prefix="t"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<f:view>
	<f:loadBundle  
basename="com.devotion.gpn.subscription.bundles.subscription"  
var="subTerms" />
	<f:loadBundle basename="com.devotion.gpn.subscription.bundles.user"  
var="userTerms" />
	<f:loadBundle  
basename="com.devotion.gpn.subscription.bundles.commands"  
var="commandTerms" />
	<html>
		<head>
			<title>
				My JSF 'beginsub.jspf' starting page
			</title>

			<meta http-equiv="pragma" content="no-cache">
			<meta http-equiv="cache-control" content="no-cache">
			<meta http-equiv="expires" content="0">
			<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
			<meta http-equiv="description" content="This is my page">

			<script type="text/javascript" language="javascript">
		
			var submit = true;
		
			function removeButton() {
				var elementHolder = document.getElementById("submitButton");
				elementHolder.innerHTML = "${commandTerms.processing}";
				submit = false;
				return true;
			}
		
		</script>
			<link href="https://www.gpn.tv/css/global.css" rel="stylesheet"  
type="text/css" />
			<style type="text/css">
body {
	margin-left: 0px;
	margin-top: 0px;
	margin-right: 0px;
	margin-bottom: 0px;
	background-color: #E1E1E1;
	background-image: url(../images/header/backgroung_internal_nt.jpg)  
repeat: repeat-x;
	font-family: Verdana, Arial, sans-serif;
	font-size: x-small;
}
div.register {
	border: 1px solid #CCCCCC;
	padding: 10px;
	background-color: #eeeeee;
}
div.register table tr td {
	border-bottom-width: 1px;
	border-bottom-style: solid;
	border-bottom-color: #CCCCCC;
}

div.register table tr td input {
	font-family: Verdana, Arial, Helvetica, sans-serif;
	color: #666666;
	border: 1px solid #999999;
	font-size: 11px;
}
div.register table tr td select {
	font-family: Verdana, Arial, Helvetica, sans-serif;
	border: 1px solid #999999;
	font-size: 11px;
	color: #666666;
}

div.register table tr td strong {
	color: #CC3333;
}

.required {
	color: #CC3333;
}
		</style>
		</head>

		<body>
			<h:form id="form1" onsubmit="return removeButton();">
				<div class="register">
					<h:messages globalOnly="true" />
					<table cellpadding="5" cellspacing="0" class="register">
						<!--  Membership Type -->
						<tr>
							<td valign="top">
								<h:outputLabel id="membershipTypeLabel" value="# 
{subTerms.subscriptionType}" for="membershipType" />
							</td>
							<td>
								<h:selectOneMenu id="membershipType" value="# 
{createSubBean.subData.subscriptionType}">
									<f:selectItem itemValue="familySub" itemLabel="# 
{subTerms.familySubscription}" />
									<%/*<f:selectItem itemValue="groupSub" itemLabel="# 
{subTerms.groupSubscription}" />
									<f:selectItem itemValue="sponsoredSub" itemLabel="# 
{subTerms.sponsoredSubscription}" />*/%>
								</h:selectOneMenu>
							</td>
						</tr>

						<!--  email -->
						<tr>
							<td>
								<h:outputLabel id="emailLabel" value="#{userTerms.email}"  
for="email" />
							</td>
							<td>
								<h:inputText id="email" value="# 
{createSubBean.subData.mainEmail}" required="true">
									<t:validateEmail />
								</h:inputText><br/>
								<span class="errorMessage"><h:message id="emailMessage"  
for="email" /></span>
							</td>
						</tr>
						
						<!--  email confirm -->
						<tr>
							<td>
								<h:outputLabel id="emailCLabel" value="# 
{userTerms.emailconfirm}" for="emailC" />
							</td>
							<td>
								<h:inputText id="emailC" required="true">
									<t:validateEqual for="email"/>
								</h:inputText><br/>
								<span class="errorMessage"><h:message id="emailCMessage"  
for="emailC" /></span>
							</td>
						</tr>
						
						<!--  password -->
						<tr>
							<td>
								<h:outputLabel id="passwordLabel" value="# 
{userTerms.password} *" for="password" />
							</td>
							<td>
								<h:inputSecret id="password" required="true">
									<f:validateLength minimum="6" maximum="20"/>
								</h:inputSecret><br/>
								<span class="errorMessage"><h:message id="passwordMessage"  
for="password" /></span>
							</td>
						</tr>
						
						<!--  password confirm -->
						<tr>
							<td>
								<h:outputLabel id="passwordCLabel" value="# 
{userTerms.passwordconfirm} *" for="passwordC" />
							</td>
							<td>
								<h:inputSecret id="passwordC" value="# 
{createSubBean.subData.mainPassword}" required="true">
									<t:validateEqual for="password"/>
								</h:inputSecret><br/>
								<span class="errorMessage"><h:message id="passwordCMessage"  
for="passwordC" /></span>
							</td>
						</tr>
						
						<tr>
							<td colspan="2">
								<span class="finePrint">* <h:outputText value="# 
{userTerms.passwordDisclaimer}"/></span>
							</td>
						</tr>

						<!--  title -->
						<tr>
							<td valign="top">
								<h:outputLabel id="titleLabel" value="#{userTerms.title}"  
for="title" />
							</td>
							<td>
								<h:selectOneMenu id="title" value="# 
{createSubBean.subData.mainTitle}">
									<f:selectItem itemValue="rev" itemLabel="#{userTerms.rev}"/>
									<f:selectItem itemValue="dr" itemLabel="#{userTerms.dr}"/>
									<f:selectItem itemValue="mr" itemLabel="#{userTerms.mr}"/>
									<f:selectItem itemValue="mrs" itemLabel="#{userTerms.mrs}"/>
									<f:selectItem itemValue="ms" itemLabel="#{userTerms.ms}"/>
								</h:selectOneMenu>
							</td>
						</tr>

						<!--  firstName -->
						<tr>
							<td>
								<h:outputLabel id="firstNameLabel" value="# 
{userTerms.firstName}" for="firstName" />
							</td>
							<td>
								<h:inputText id="firstName" value="# 
{createSubBean.subData.mainFirstName}" required="true"/><br/>
								<span class="errorMessage"><h:message id="firstNameMessage"  
for="firstName" /></span>
							</td>
						</tr>
						
						<!--  lastName -->
						<tr>
							<td>
								<h:outputLabel id="lastNameLabel" value="# 
{userTerms.lastName}" for="lastName" />
							</td>
							<td>
								<h:inputText id="lastName" value="# 
{createSubBean.subData.mainLastName}" required="true"/><br/>
								<span class="errorMessage"><h:message id="lastNameMessage"  
for="lastName" /></span>
							</td>
						</tr>
						
						<!--  address -->
						<tr>
							<td>
								<h:outputLabel id="addressLabel" value="#{userTerms.address}"  
for="address" />
							</td>
							<td>
								<h:inputText id="address" value="# 
{createSubBean.subData.mainAddress}" required="true"/><br/>
								<span class="errorMessage"><h:message id="addressMessage"  
for="address" /></span>
							</td>
						</tr>
						
						<!--  aptsuite -->
						<tr>
							<td>
								<h:outputLabel id="aptsuiteLabel" value="# 
{userTerms.aptsuite}" for="aptsuite" />
							</td>
							<td>
								<h:inputText id="aptsuite" value="# 
{createSubBean.subData.mainAptSuite}" required="false"/><br/>
								<span class="errorMessage"><h:message id="aptsuiteMessage"  
for="aptsuite" /></span>
							</td>
						</tr>
						
						<!--  city -->
						<tr>
							<td>
								<h:outputLabel id="cityLabel" value="#{userTerms.city}"  
for="city" />
							</td>
							<td>
								<h:inputText id="city" value="# 
{createSubBean.subData.mainCity}" required="true"/><br/>
								<span class="errorMessage"><h:message id="cityMessage"  
for="city" /></span>
							</td>
						</tr>
						
						<!--  state -->
						<tr>
							<td>
								<h:outputLabel id="stateLabel" value="#{userTerms.state}"  
for="state" />
							</td>
							<td>
								<h:inputText id="state" value="# 
{createSubBean.subData.mainState}" required="true"/><br/>
								<span class="errorMessage"><h:message id="stateMessage"  
for="state" /></span>
							</td>
						</tr>
						
						<!--  zipcode -->
						<tr>
							<td>
								<h:outputLabel id="zipcodeLabel" value="#{userTerms.zipcode}"  
for="zipcode" />
							</td>
							<td>
								<h:inputText id="zipcode" value="# 
{createSubBean.subData.mainZipcode}" required="true"/><br/>
								<span class="errorMessage"><h:message id="zipcodeMessage"  
for="zipcode" /></span>
							</td>
						</tr>
						
						<!--  country -->
						<tr>
							<td>
								<h:outputLabel id="countryLabel" value="#{userTerms.country}"  
for="country" />
							</td>
							<td>
								<t:selectOneCountry id="country" value="# 
{createSubBean.subData.mainCountry}" /><br/>
								<span class="errorMessage"><h:message id="countryMessage"  
for="country" /></span>
							</td>
						</tr>
						
						

						<!--  Submit link -->
						<tr>
							<td colspan="2">
								<div id="submitButton">
									<t:
									<t:commandButton id="nextButton" value="# 
{commandTerms.next}" type="submit" action="#{createSubBean.process}"  
 ></t:commandButton>
									<h:commandLink id="next" value="#{commandTerms.next}"  
type="submit" action="#{createSubBean.process}" />
								</div>
							</td>
						</tr>
					</table>
				</div>
			</h:form>

		</body>
	</html>
</f:view>


THE JAVA FILE

/*
* Created on Nov 14, 2005
*
*/
package com.devotion.gpn.subscription;

import java.util.ArrayList;
import java.util.Date;
import java.util.HashMap;
import java.util.Map;

import javax.faces.context.FacesContext;

import org.springframework.orm.hibernate3.HibernateTemplate;

import com.devotion.gpn.subscription.model.FamilySubscription;
import com.devotion.gpn.subscription.model.Subscription;
import com.devotion.payment.PaymentServiceUtil;

public class CreateSubscriptionBean {

     public Map subData = new HashMap(30);
     public Map paymentData = new HashMap(30);
     public Subscription subscription;

     private PaymentServiceUtil paymentUtil;
     private HibernateTemplate dao;

     public CreateSubscriptionBean() {
         // put the payment system login variables into the model
         paymentData.putAll(SystemGlobals.authData);
     }

     public String process() {
         // get some meta info and the servlet that this method was  
invoked by
         FacesContext fContext = FacesContext.getCurrentInstance();
         String currentPage = fContext.getExternalContext 
().getRequestServletPath();

         // what subscription type are they after
         String subType = (String)subData.get("subscriptionType");

         // for our first page
         if (currentPage.equals("/beginsub.jhtml")) {

             //TODO logic to check if user was invited to a group

             //TODO check if user should be in sponsored  
international group
             /*if (!subData.get("mainCountry").equals("US")) {
                 if (subType.equals("sponsoredSubscription")) {

                 }
             }*/

             //TODO get rid of this
             if (1==1)
             return "card";

             // for family subscriptions
             if (subType.equals("familySub")) {
                 // create a family subscription
                 subscription = new FamilySubscription();

                 // populate the
                 subscription.setUsers(new ArrayList(2));
                 subscription.setWhenCreated(new Date());
             }
         }


         return null;
     }

     // getters and setters
     public Map getSubData() {
         return subData;
     }

     public void setSubData(Map data) {
         this.subData = data;
     }

     public PaymentServiceUtil getPaymentUtil() {
         return paymentUtil;
     }

     public void setPaymentUtil(PaymentServiceUtil paymentUtil) {
         this.paymentUtil = paymentUtil;
     }

     public Map getPaymentData() {
         return paymentData;
     }

     public void setPaymentData(Map paymentData) {
         this.paymentData = paymentData;
     }

     public HibernateTemplate getDao() {
         return dao;
     }

     public void setDao(HibernateTemplate dao) {
         this.dao = dao;
     }

}


THE FACES-CONFIG FILE
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE faces-config PUBLIC "-//Sun Microsystems, Inc.//DTD  
JavaServer Faces Config 1.1//EN" "http://java.sun.com/dtd/web- 
facesconfig_1_1.dtd">

<faces-config>
	<application>
		<variable- 
resolver>org.springframework.web.jsf.DelegatingVariableResolver</ 
variable-resolver>
		<view- 
handler>org.apache.myfaces.application.jsp.JspTilesViewHandlerImpl</ 
view-handler>
		<locale-config>
			<default-locale>en</default-locale>
			<supported-locale>en</supported-locale>
		</locale-config>
	</application>

	<!--  Public Managed Beans -->
	<managed-bean>
		<managed-bean-name>createSubBean</managed-bean-name>
		<managed-bean- 
class>com.devotion.gpn.subscription.CreateSubscriptionBean</managed- 
bean-class>
		<managed-bean-scope>session</managed-bean-scope>
		<!-- <managed-property>
			<property-name>paymentUtil</property-name>
			<value>#{PaymentServiceUtil}</value>
		</managed-property>-->
		<managed-property>
			<property-name>dao</property-name>
			<value></value>
		</managed-property>
	</managed-bean>

	<!--  Navigation Rules -->
	<navigation-rule>
		<from-view-id>/beginsub.jsp</from-view-id>
		<navigation-case>
			<from-outcome>card</from-outcome>
			<to-view-id>/card.jsp</to-view-id>
		</navigation-case>
	</navigation-rule>
</faces-config>


Re: h:commandButton won't call method

Posted by Joel Wilson <jo...@devotionmedia.com>.
Thanks, you were right. Guess I'll have to hide rather than remove it.

On Nov 16, 2005, at 5:28 PM, Grant Smith wrote:

> Joel,
>
> you're removing the submit button from the form before the JSF  
> phase that calls the method on the backing bean executes.
>
> I assume you're trying to circumvent the double submit problem. A  
> better approach would be to use a servlet filter to synchronize the  
> requests.
>
> On 11/16/05, Joel Wilson <jo...@devotionmedia.com> wrote:
> I have an interesting problem where I have a basic form (just  
> starting project so nothing fancy on the server side yet) that  
> populates the values from the from into a map, and call a method  
> which decides what form is next; absolutely basic and boring.
>
> What happens or doesn't and it somewhat confusing is that when the  
> user clicks the next button, it simply returns to the page as if  
> the method had returned null; but the method was never called; but  
> if they click the commandLink it does get called. It is odd that  
> one works and the other doesn't, and that is the basis of my  
> confusion. I would assume it has something to do with MyFaces  
> thinking that the form was submitted somehow other than via the  
> commandButton component and therefore never puts into motion  
> whatever calls the action method.
>
> Here is my faces-config.xml, the JSP I'm toying with, and what I  
> have of my BackingBean class.
>
> THE JSP FILE
>
> <%@ page language= "java" pageEncoding= "UTF-8"%>
> <%@ taglib uri=" http://java.sun.com/jsf/html" prefix= "h"%>
> <%@ taglib uri=" http://java.sun.com/jsf/core" prefix= "f"%>
> <%@ taglib uri=" http://myfaces.apache.org/tomahawk" prefix= "t"%>
> <%@ taglib uri=" http://java.sun.com/jsp/jstl/core" prefix= "c"%>
>
> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
> <f:view >
> 	< f:loadBundle basename=  
> "com.devotion.gpn.subscription.bundles.subscription" var="subTerms" />
> 	< f:loadBundle basename=  
> "com.devotion.gpn.subscription.bundles.user" var="userTerms" />
> 	< f:loadBundle basename=  
> "com.devotion.gpn.subscription.bundles.commands" var="commandTerms" />
> 	< html>
> 	 	<head >
> 			 <title>
> 				 My JSF 'beginsub.jspf' starting page
> 		 	</title >
>
> 		 	<meta http-equiv="pragma" content= "no-cache">
>  			< meta http-equiv= "cache-control" content ="no-cache" >
> 			 <meta http-equiv ="expires" content="0" >
> 			 <meta http-equiv ="keywords"  
> content="keyword1,keyword2,keyword3" >
> 		 	<meta http-equiv="description" content= "This is my page">
>
> 			 <script type ="text/javascript" language="javascript" >
> 		
> 			 var submit = true ;
> 		
> 			 function removeButton() {
> 				 var elementHolder = document.getElementById("submitButton" );
> 		 		elementHolder.innerHTML = "${commandTerms.processing}";
> 	 			submit = false;
> 		 		return true;
> 			 }
> 		
> 		</ script>
> 	 		<link href= "https://www.gpn.tv/css/global.css"  
> rel="stylesheet" type= "text/css" />
>  			< style type= "text/css">
> body {
> 	 margin-left: 0px ;
> 	 margin-top: 0px ;
> 	margin-right : 0px;
> 	margin-bottom : 0px;
>  	background-color: #E1E1E1;
> 	 background-image: url(../images/header/ 
> backgroung_internal_nt.jpg) repeat: repeat-x;
> 	 font-family: Verdana, Arial, sans-serif ;
> 	 font-size: x-small ;
> }
> div.register {
> 	 border: 1px solid #CCCCCC ;
> 	 padding: 10px ;
> 	background-color : #eeeeee;
> }
> div.register table tr td {
> 	 border-bottom-width: 1px ;
> 	border-bottom-style : solid ;
> 	border-bottom-color : #CCCCCC;
> }
>
> div.register table tr td input {
> 	 font-family: Verdana, Arial, Helvetica, sans-serif;
>  	color: #666666;
> 	 border: 1px solid #999999 ;
> 	 font-size: 11px ;
> }
> div.register table tr td select {
> 	 font-family: Verdana, Arial, Helvetica, sans-serif;
>  	border: 1px solid #999999;
> 	 font-size: 11px ;
> 	 color: #666666 ;
> }
>
> div.register table tr td strong {
> 	color: #CC3333;
> }
>
> .required {
> 	color : #CC3333;
> }
> 		 </style >
> 		</ head>
>
> 		< body>
> 	 		<h:form id= "form1" onsubmit ="return removeButton();">
> 				 <div class ="register" >
> 			 		<h:messages globalOnly= "true" />
>  					 <table cellpadding ="5" cellspacing="0" class="register" >
> 		 				<!-- � Membership Type -->
> 					 	<tr >
> 			 				< td valign ="top">
> 					 			< h:outputLabel id= "membershipTypeLabel" value ="# 
> {subTerms.subscriptionType }"  for="membershipType" />
> 		 					 </td>
> 				 			< td>
> 	 						 	<h:selectOneMenu id="membershipType" value= "# 
> {createSubBean.subData.subscriptionType} ">
> 		 					 		<f:selectItem itemValue= "familySub" itemLabel ="# 
> {subTerms.familySubscription} " />
> 				 					 <%/*<f:selectItem itemValue="groupSub" itemLabel="# 
> {subTerms.groupSubscription}" />
> 					 				<f:selectItem itemValue= "sponsoredSub" itemLabel= "# 
> {subTerms.sponsoredSubscription}" />*/ %>
> 				 				</ h:selectOneMenu>
> 					 		</td >
> 		 				</ tr>
>
> 				 		<!-- � email -->
> 	 					 <tr>
> 					 		<td >
> 		 						 <h:outputLabel id="emailLabel" value=" # 
> {userTerms.email}" for= "email" />
>  						 	</td >
> 			 				< td>
>  						 		<h:inputText id= "email" value= "# 
> {createSubBean.subData.mainEmail} " required ="true" >
> 			 						 <t:validateEmail />
> 				 				</ h:inputText>< br/>
> 	 						 	<span class="errorMessage" ><h:message id="emailMessage"  
> for= "email" /></ span>
> 		 					 </td>
> 				 		</tr >
> 	 					
> ...
>
> [Message clipped]
>
>
>
> -- 
> Grant Smith


Re: h:commandButton won't call method

Posted by Grant Smith <wo...@gmail.com>.
Joel,

you're removing the submit button from the form before the JSF phase that
calls the method on the backing bean executes.

I assume you're trying to circumvent the double submit problem. A better
approach would be to use a servlet filter to synchronize the requests.

On 11/16/05, Joel Wilson <jo...@devotionmedia.com> wrote:
>
> I have an interesting problem where I have a basic form (just starting
> project so nothing fancy on the server side yet) that populates the values
> from the from into a map, and call a method which decides what form is next;
> absolutely basic and boring.
> What happens or doesn't and it somewhat confusing is that when the user
> clicks the next button, it simply returns to the page as if the method had
> returned null; but the method was never called; but if they click the
> commandLink it does get called. It is odd that one works and the other
> doesn't, and that is the basis of my confusion. I would assume it has
> something to do with MyFaces thinking that the form was submitted somehow
> other than via the commandButton component and therefore never puts into
> motion whatever calls the action method.
>
> Here is my faces-config.xml, the JSP I'm toying with, and what I have of
> my BackingBean class.
>
> THE JSP FILE
>
> <%@ page language="java" pageEncoding="UTF-8"%>
> <%@ taglib uri="http://java.sun.com/jsf/html" prefix="h"%>
> <%@ taglib uri="http://java.sun.com/jsf/core" prefix="f"%>
> <%@ taglib uri="http://myfaces.apache.org/tomahawk" prefix="t"%>
> <%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
>
> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
> <f:view>
> <f:loadBundle basename="com.devotion.gpn.subscription.bundles.subscription"
> var="subTerms" />
> <f:loadBundle basename="com.devotion.gpn.subscription.bundles.user" var="userTerms"
> />
> <f:loadBundle basename="com.devotion.gpn.subscription.bundles.commands"
> var="commandTerms" />
> <html>
>  <head>
>  <title>
>   My JSF 'beginsub.jspf' starting page
>  </title>
>
>  <meta http-equiv="pragma" content="no-cache">
>  <meta http-equiv="cache-control" content="no-cache">
>  <meta http-equiv="expires" content="0">
>  <meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
>  <meta http-equiv="description" content="This is my page">
>
>  <script type="text/javascript" language="javascript">
>
>
>  var submit = true;
>
>
>  function removeButton() {
>   var elementHolder = document.getElementById("submitButton");
>   elementHolder.innerHTML = "${commandTerms.processing}";
>   submit = false;
>   return true;
>  }
>
>
>  </script>
>  <link href="https://www.gpn.tv/css/global.css" rel="stylesheet" type="text/css"
> />
>  <style type="text/css">
> body {
> margin-left: 0px;
> margin-top: 0px;
> margin-right: 0px;
> margin-bottom: 0px;
> background-color: #E1E1E1;
> background-image: url(../images/header/backgroung_internal_nt.jpg) repeat:
> repeat-x;
> font-family: Verdana, Arial, sans-serif;
> font-size: x-small;
> }
> div.register {
> border: 1px solid #CCCCCC;
> padding: 10px;
> background-color: #eeeeee;
> }
> div.register table tr td {
> border-bottom-width: 1px;
> border-bottom-style: solid;
> border-bottom-color: #CCCCCC;
> }
>
> div.register table tr td input {
> font-family: Verdana, Arial, Helvetica, sans-serif;
> color: #666666;
> border: 1px solid #999999;
> font-size: 11px;
> }
> div.register table tr td select {
> font-family: Verdana, Arial, Helvetica, sans-serif;
> border: 1px solid #999999;
> font-size: 11px;
> color: #666666;
> }
>
> div.register table tr td strong {
> color: #CC3333;
> }
>
> .required {
> color: #CC3333;
> }
>  </style>
>  </head>
>
>  <body>
>  <h:form id="form1" onsubmit="return removeButton();">
>   <div class="register">
>   <h:messages globalOnly="true" />
>   <table cellpadding="5" cellspacing="0" class="register">
>    <!--� Membership Type -->
>    <tr>
>    <td valign="top">
>     <h:outputLabel id="membershipTypeLabel" value="#{
> subTerms.subscriptionType}" for="membershipType" />
>    </td>
>    <td>
>     <h:selectOneMenu id="membershipType" value="#{
> createSubBean.subData.subscriptionType}">
>     <f:selectItem itemValue="familySub" itemLabel="#{
> subTerms.familySubscription}" />
>     <%/*<f:selectItem itemValue="groupSub" itemLabel="#{
> subTerms.groupSubscription}" />
>     <f:selectItem itemValue="sponsoredSub" itemLabel="#{
> subTerms.sponsoredSubscription}" />*/%>
>     </h:selectOneMenu>
>    </td>
>    </tr>
>
>    <!--� email -->
>    <tr>
>    <td>
>     <h:outputLabel id="emailLabel" value="#{userTerms.email}" for="email"
> />
>    </td>
>    <td>
>     <h:inputText id="email" value="#{createSubBean.subData.mainEmail}"
> required="true">
>     <t:validateEmail />
>     </h:inputText><br/>
>     <span class="errorMessage"><h:message id="emailMessage" for="email"
> /></span>
>    </td>
>    </tr>
>
>
> ...
>
> [Message clipped]
>



--
Grant Smith