[jboss-user] [JBoss Seam] - Re: Problem with validation and entityHome

matt.drees do-not-reply at jboss.com
Sun Jan 20 00:03:07 EST 2008


"fjgarmu" wrote : 
  | 
  |   |             <s:button id="mysave" 
  |   |                    value="mysave"
  |   |                     action="#{reportsHome.mysave}"
  |   |                     view="/Reports.xhtml"
  |   |                 rendered="#{reportsHome.managed}"/>
  |   | 
  |   | 
  |  

I think there a couple problems here; I should have noticed them earlier.

For one thing, do you really want an s:button?  Usually for "save" kind of controls, you want an h:commandButton, because you want to submit some data, not just trigger an action.

If you do in fact want an s:button, you shouldn't specify both "action" and "view".  (I think.)  In this case, you want the action, but not the view attribute.

Also, you'll need a navigation rule in your ReportsEdit.page.xml for your "mysave" action that goes to the ReportsList page if the outcome isn't "error".  
(Note that the typical JSF pattern, contrary to your design, is to return null if you want to stay on the same page and a string like "success" if you want to move away.  So you may consider doing that instead.)

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

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



More information about the jboss-user mailing list