Why not to use pageflows for this. It is convenient and works smoothly for me.

Pageflow
.....
  |     <page name="edit" view-id="/exchange/buy.xhtml">
  |             <description>qqq</description>
  |             <redirect/>
  |             <transition name="save" to="validate"/>
  |             <transition name="cancel" to="end">
  |             </transition>
  |     </page>
  |     
  |     <decision name="validate">
  |             <handler class="org.jboss.seam.drools.DroolsDecisionHandler">
  |                     <workingMemoryName>buyWorkingMemory</workingMemoryName>
  |                     <assertObjects>
  |                             <element>#{exchOrdHome.instance}</element>
  |                             <element>#{facesMessages}</element>
  |                     </assertObjects>
  |             </handler>
  |             <transition to="refresh">
  |                     <action expression="#{exchOrdHome.merge}" />
  |             </transition>
  |             <transition name="invalid" to="edit"/>
  |     </decision>
  | 
  |     <decision name="refresh" expression="1">
  |             <transition name="1" to="browse">
  |                     <action expression="#{exchOrdHome.invalidate}" />
  |             </transition>
  |     </decision>
  | ..........
  | 
Drools
....
  | rule MandatorySum
  |     when
  |             $facesMessages : FacesMessages()
  |             Sum(asFloat<=0)
  |     then 
  |             $facesMessages.add(new FacesMessage("Sum has to be more than 
zero."));
  |             decision.setOutcome("invalid");
  | end
  | .....


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

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

Reply via email to