h:commandLink and h:commandButton not working

Splash Forums PrettyFaces Users h:commandLink and h:commandButton not working

This topic contains 6 replies, has 2 voices, and was last updated by  Christian Kaltepoth 2 years, 11 months ago.

Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #24785

    neeraj
    Participant

    Hi,

    I have a web application which uses JSF 1.x. Recently I started using pretty faces to have meaningful URLs for pages. I am still in testing phase, it looks every thing works fine except I noticed that none of the h:commandButton and h:commnadLink is working. Basically the action method is not getting invoked. I am not sure what may have caused this.
    Just to isolate issue, I tried few things:

    1) Once I take off, prettfaces, all the commandButton and commandLink works fine.
    2) Change h:commandButton to ajax:commandButton works but I am not sure whether I can do this in all the cases.

    Also, while searching on the internet, I found below link which talks about similar issue:

    http://ocpsoft.org/support/topic/problem-with-hcommandlink-after-configuring-prettyfaces/

    Please help.

    Thanks,
    Neeraj

    #24786

    Which version of PrettyFaces are you using? And are you using the JSF 1.1 or the JSF 1.2 version?

    #24788

    neeraj
    Participant

    Here are the versions:

    Prettyfaces: 3.3.3
    JSF : 1.2_13
    Richfaces: 3.3.1.GA

    thank you.

    #24789

    Could you share your PrettyFaces configuration and some code. Perhaps for some concrete example which isn’t working as expected.

    One thing that you could also check is the postback URL of the form you are submitting. Is it the pretty URL or the plain JSF URL?

    #24798

    neeraj
    Participant

    I was not able to paste my code, I have attached a file with code as required.

    Thanks.

    Attachments:
    1. code.txt
    #24800

    What about the form postback URL in the generated HTML. Is it the pretty URL or the plain JSF URL?

    #24801

    Also, JSF action that aren’t invoked are a very common problem. See this stackoverflow question which has a great summary of reasons why this may happen:

    http://stackoverflow.com/a/2120183/395181

    If this doesn’t help, try to reproduce this issue in a small sample application. If you can reproduce it there, you could upload it here and I’ll have a look.

Viewing 7 posts - 1 through 7 (of 7 total)

You must be logged in to reply to this topic.

Comments are closed.