Hi,

I'm using seam with a4j for dynamic validation etc etc. However, all of my a4j 
enabled parts of the form are actually written to the database on every change.

E.g. 


  |                     <h:form id="webpageForm">
  |                         <f:facet name="afterInvalidField">
  |                             <h:panelGroup><s:message/></h:panelGroup>
  |                         </f:facet>
  |                         <f:facet name="aroundInvalidField">
  |                             <s:span styleClass="error"/>
  |                         </f:facet>                      
  |                     <s:validateAll>                         
  |                                     <h:panelGrid columns="2" 
columnClasses="object, value">
  | 
  |                                     
  |                                             <h:outputText value="Banner 
#1"/>
  |                                             <h:panelGroup id="smallimage1">
  |                                                     <s:decorate>
  |                                                             
<h:selectOneMenu value="#{webpage.banner_image_1}" required="true">
  |                                                                     
<a4j:support event="onchange" reRender="smallimage1" ajaxSingle="true"/>
  |                                                                     
<s:selectItems value="#{bannerImages.resultList}" 
  |                                                                             
var="image" noSelectionLabel="Please select"
  |                                                                             
label="#{image.filename}: #{image.altText}"/>
  |                                                                     
<s:convertEntity/>
  |                                                             
</h:selectOneMenu>      
  |                                                     </s:decorate>           
                                                
  |                                                     <br/>
  |                                                     <h:graphicImage 
value="../images/#{webpage.banner_image_1.filename}" 
alt="#{webpage.banner_image_1.altText}"></h:graphicImage>
  |                                             </h:panelGroup> 
  | 

Changing the drop down will result in the database entry being updated 
instantly. Can someone tell me why this is the case, and what I need to do (or 
have missed doing) to prevent it? I want the model to be updated, naturally, 
but the database should only be written to when I tell it to..

phil

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

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4073622
_______________________________________________
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user

Reply via email to