[jboss-user] [JBoss Seam] - Re: Why control IDs in validation messages?

ruettimac do-not-reply at jboss.com
Sat Dec 29 03:34:27 EST 2007


I am fighting with the same problem. I have the following setup:



  | <?xml version="1.0" encoding="UTF-8"?>
  | <faces-config version="1.2"
  |               xmlns="http://java.sun.com/xml/ns/javaee"
  |               xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  |               xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-facesconfig_1_2.xsd">
  |     
  |     <!-- Facelets Setup -->
  |     <application>
  |         <view-handler>com.sun.facelets.FaceletViewHandler</view-handler>
  |         <locale-config>
  |             <default-locale>en</default-locale>
  |             <supported-locale>de</supported-locale>
  |             <supported-locale>de_CH</supported-locale>
  |         </locale-config>
  |     </application>
  | </faces-config>
  | 


<?xml version='1.0' encoding='UTF-8' ?>
  | <!DOCTYPE composition PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  | <html xmlns="http://www.w3.org/1999/xhtml"
  |       xmlns:s="http://jboss.com/products/seam/taglib"
  |       xmlns:f="http://java.sun.com/jsf/core"
  |       xmlns:ui="http://java.sun.com/jsf/facelets"
  |       xmlns:h="http://java.sun.com/jsf/html">
  |     <head>
  |         <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
  |         <title>Training Plattform Register Start</title>
  |         <link href="css/screen.css" rel="stylesheet" type="text/css" />
  |     </head>
  |     <body>
  |         <ui:composition template="template.xhtml">
  |             <ui:define name="content">
  |                 <h:form id="register">
  |                     <s:validateAll>
  |                         <f:facet name="aroundInvalidField">
  |                             <s:span styleClass="errors"/>
  |                         </f:facet>
  |                         <f:facet name="afterInvalidField">
  |                             <s:div styleClass="errors">
  |                                 <s:message />
  |                             </s:div>
  |                         </f:facet>
  |                         <div class="entry">
  |                             <div class="label">
  |                                 <h:outputText value="#{messages.label_firstName}" />
  |                             </div>
  |                             <div class="input">
  |                                 <s:decorate id="firstNameDecorate">
  |                                     <h:inputText id="firstName" value="#{customer.firstName}" required="true" />
  |                                 </s:decorate>
  |                             </div>
  |                         </div>
  |                         </div>
  |                     </s:validateAll>
  |                     <div class="entry errors">
  |                         <h:messages globalOnly="true"/>
  |                     </div>
  |                     <div class="input">
  |                         <h:commandButton id="register" value="#{messages.button_register}" action="#{customerRegistration.preRegisterCustomer}" />
  |                     </div>
  |                 </h:form>
  |             </ui:define>
  |         </ui:composition>
  |     </body>
  | </html>
  | 
  | 



  |     @NotNull
  |     @Length(max = 50)
  |     public String getFirstName() {
  |         return mFirstName;
  |     }
  | 
  | 

I do not see a problem here and no difference between the hotel booking example. But, In my case the formid,containerid and controlid are displayed before the validation message. I did not found a reasonable resolution to this problem. Anyone?

Regards,
Cyrill

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4116013#4116013

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4116013



More information about the jboss-user mailing list