-
1. Re: s:commandButton - does it exist? pass parameters with
ellenzhao Jun 26, 2007 12:32 PM (in response to lpmon)Seam is changing drastically during recently weeks....maybe you want to try out the latest version, Seam 2.0 beta 1 that is.
Yes the feature you wanted exists. I'be veen using s:button in my application and it works just like s:link. :-)
Have a look at here and get the latest CVS snapshot:
http://cruisecontrol.jboss.com/cc/artifacts/jboss-seam-builds
Or you can directly get latest build from CVS...Please see Seam Wiki for the CVS URL.
Regards,
Ellen -
2. Re: s:commandButton - does it exist? pass parameters with
lpmon Jun 26, 2007 1:24 PM (in response to lpmon)Thanks enzhao.
All docs I have seen use commandButton not button. button solves the problem of the tag not being recognized but it does not seem to support parameters like examples I have seen.
I get an error parsing the action argument. (presumably due to the presence of a parameter)
<s:button id="Test" action='#{IButtonMgr.writeSettings("sss"}' value="Write Key"/>
Error parsing '#{IButtonMgr.writeSettings("sss"}'
FYI: I tried reversing the single and double quotes. Same result. -
3. Re: s:commandButton - does it exist? pass parameters with
ellenzhao Jun 26, 2007 3:03 PM (in response to lpmon)did you miss a ) which should come before the } ??
-
4. Re: s:commandButton - does it exist? pass parameters with
lpmon Jun 26, 2007 4:35 PM (in response to lpmon)Yes, I noticed and fixed that earlier but it still did not work.
I found this: http://balusc.xs4all.nl/srv/dev-jep-com.html and tried to use
<h:commandButton value="PARMTEST"
action="#{IButtonMgr.doParm()}">
<f:attribute name="keyserial" value="SERIAL_NUM"/>
</h:commandButton>
along with public void writeSettingsParm(ActionEvent event) so as to retrieve attributes from the event. This did not work either. Traget method is not called. Seam must be taking over and preventing the call. If I remove the parameter from writeSettingsParm it works. -
5. Re: s:commandButton - does it exist? pass parameters with
lpmon Jun 26, 2007 4:48 PM (in response to lpmon)I must not have re-deployed properly. It is working now.
So now I have an example working with a hard-coded string literal ('sss') as a parameter.
<s:button id="Test" action="#{IButtonMgr.writeSettingsP1('sss')}"
value="Write Key"/>
and:
public void writeSettingsP1(String parm);
Now I have to work on how to get a variable into the parameter. I tried a JavaScript call instead of the hard-coded 'sss' and that fails.