This content has been marked as final.
Show 3 replies
-
1. Re: Unable to pass parameters to h:commandButton
thokuest May 1, 2010 3:14 PM (in response to vgs)What exactly doesn't work? Did you use @RequestParameter in your bean?
-
2. Re: Unable to pass parameters to h:commandButton
shravanou May 2, 2010 5:17 AM (in response to vgs)This is the way we used -
<ice:panelSeries var="icon">
<ice:commandButton id="name" value="#{icon.name}" action="#{Test.execute(icon)}">
<f:param name="iconId" value="#{icon.id.iconId}" />
</ice:commandButton>
</ice:panelSeries> -
3. Re: Unable to pass parameters to h:commandButton
sappo May 3, 2010 2:56 PM (in response to vgs)Hi Shravan,
there are two way to catch the your f:param.
Either you annotate a variable with @RequestParameter in your bean:
@RequestParameter private Long iconId; @Out private Icon icon //do some action public void execute() { icon = entityManager.find(Icon.class, iconId); }
Or you declare the parameter within your page.xml
<?xml version="1.0" encoding="UTF-8"?> <page view-id="/receiver.xhtml" xmlns="http://jboss.com/products/seam/pages" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://jboss.com/products/seam/pages http://jboss.com/products/seam/pages-2.2.xsd"> <param name= "iconId"/> </page>
//Kevin