jsf core tag <f:param> doesnt work with <h:commandButton> but work with <h:commandLink>

Discussion in 'Java' started by Janaka Perera, Oct 29, 2007.

  1. Hi All,

    I tried to get a input parameter for the server side using the jsf
    core libabray tag 'param' as shown in below with a <h:commandButton>,
    but it never worked. The serverside variable was always null. All the
    examples i saw on the internet was described using <h:commandLink>. So
    when i check the 'param' tag using <h:commandLink> it worked. I got
    the value in the serverside properly.

    It there a way to use the <param> tag with <h:commandButton> as well.
    or is it just for the <h:commandLink>?

    Thanks
    Janaka


    Doesnt Work
    <h:commandButton value=" [Remove Package] "
    action="#{PackageManagementBean.deletePackage}">
    <f:param value="#{package.id}" name="packageIdParam"/>
    </h:commandButton >


    Working
    <h:commandLink value=" [Remove Package] "
    action="#{PackageManagementBean.deletePackage}">
    <f:param value="#{package.id}" name="packageIdParam"/>
    </h:commandLink>
     
    Janaka Perera, Oct 29, 2007
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Replies:
    1
    Views:
    8,528
  2. xmlhelp
    Replies:
    9
    Views:
    443
    Joseph Kesselman
    Oct 20, 2006
  3. Michael Plate
    Replies:
    0
    Views:
    1,464
    Michael Plate
    Dec 23, 2007
  4. jai- nigam
    Replies:
    1
    Views:
    535
    pradhip
    Feb 13, 2008
  5. Replies:
    3
    Views:
    443
    alex23
    May 27, 2008
Loading...

Share This Page