Gavin, maybe we misunderstood each other. It's important to mention that the 
actionMethod above shall perform "complex" validation and then save if 
everything is alright.


  | @Stateful
  | @Scope(CONVERSATION)
  | @Name("whateverEditor")
  | @TransactionAttribute(TransactionAttributeType.NOT_SUPPORTED)
  | public class WhateverEditorBean .... {
  | 
  | ...
  | 
  |     @TransactionAttribute(TransactionAttributeType.REQUIRED)
  |     @End(ifOutcome={"backToListPage"})
  |     public String actionMethod() { 
  | 
  |         if ( ! complexValidationOk() ) {
  |         
  |             ejbCtx.setRollbackOnly();   //no flushing at the end of the 
method
  |             addFacesMessage("Complex validation failed");
  |             return null;   //redisplay editor page
  |         }
  | 
  |     //everything ok? then auto-flushing will be performed at the end of the 
method.
  | 
  |         return "backToListPage";
  |     }
  | 
  | ...
  | }

The flush-mode in the begin annotation is much better, yes... but for a 
non-beta, non-CVS, production environment I need another solution. And I'm 
really interested what you think about the approach above. For me it seemed to 
work perfectly. 

btw: what does "hosed" mean? Sorry, I'm German, and the dictionary doesn't know 
that word *dooooh* ;).


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

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

Reply via email to