-
1. Re: s:link works, h:commandButton doesn't
jfrosch Aug 23, 2007 5:10 PM (in response to dkane)The method signature for JSF actions is public String actionMethod() { ... } I suspect the void return type is the issue with the h:commandButton.
-
2. Re: s:link works, h:commandButton doesn't
norman.richards Aug 24, 2007 2:54 PM (in response to dkane)No - that's not the problem at all. Void return values are perfectly fine in Seam. Both s:link and h:commandButton should work fine here.
-
3. Re: s:link works, h:commandButton doesn't
dkane Aug 27, 2007 3:55 PM (in response to dkane)I've solved the problem myself, but still have questions.
There was h:selectOneMenu right before h:commandButton in my page.
h:selectOneMenu was mapped to the session-scoped Seam component, and dislayed the list of entities with s:convertEntity tag. But this field did not remember the selected value somehow. I.e each time I clicked s:link the selected value returned to first item in list.
I removed this h:selectOneMenu, and magically h:commandButton started to work !
After that, I digged tons of forum threads and found the thesis that s:convertEntities should work in conversation scope only. Found no word abot that in Seam manual, but adding long-running conversation @Begin(join="true") made h:selectOneMenu stateful (no more resets after form submission).
Then, I restored the original view of xhtml page : h:selectOneMenu and h:commandButton next . Everything works well.
Questions :
1) Is it possible, that incorrect processing of preceding JSF controls causes incorrect processing of following controls in the same page? (probably not pure Seam but JFS question)
2) Does s:convertEntities, indeed, require long-running conversation ? If so - why ? -
4. Re: s:link works, h:commandButton doesn't
pmuir Aug 28, 2007 9:39 AM (in response to dkane)"dkane" wrote:
1) Is it possible, that incorrect processing of preceding JSF controls causes incorrect processing of following controls in the same page? (probably not pure Seam but JFS question)
On form submission (which h:commandXXX does), yes, as all sorts of errors can occur (e.g. model update, validation, conversion. You need to output these messages via h:messages2) Does s:convertEntities, indeed, require long-running conversation ? If so - why ?
http://wiki.jboss.org/wiki/Wiki.jsp?page=SeamProblemsFAQ
and search back across the forums, this has been explained many times. I'm going to move this into the reference manual soon.