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. Advertisements

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. shahbaz
    Replies:
    0
    Views:
    1,078
    shahbaz
    Oct 27, 2003
  2. shruds
    Replies:
    1
    Views:
    1,251
    John C. Bollinger
    Jan 27, 2006
  3. Geathaa
    Replies:
    2
    Views:
    895
    Geathaa
    Jul 30, 2003
  4. Replies:
    1
    Views:
    8,670
  5. xmlhelp
    Replies:
    9
    Views:
    589
    Joseph Kesselman
    Oct 20, 2006
  6. ectoplasm
    Replies:
    12
    Views:
    913
    Zorro
    Jul 28, 2005
  7. Michael Plate
    Replies:
    0
    Views:
    1,593
    Michael Plate
    Dec 23, 2007
  8. Replies:
    3
    Views:
    621
    alex23
    May 27, 2008
Loading...