0

Recently I started using prettyfaces with my web application which uses jsf1.x. While testing I realized that action methods for h:commandButton and h:commandLink is not getting called. Upon searching on the net, I found a link on this site where some suggested to use <f:ajax render="@form" /> it should be ok. Since f:ajax is available in JSF2.x, so I was thinking how can I find the equivalent of <f:ajax render="@form" /> in Jsf1.x

Any help be greatly appreciated as I am completely stuck due to this.

Thanks, Neeraj

Daniel
  • 36,833
  • 10
  • 119
  • 200
  • You could consider using richfaces 3.3 ` – Daniel Sep 01 '13 at 05:52
  • Ajax appears to be least of your problems. You should be more interested in troubleshooting why your command components are not firing. An "equivalent of ``" is very ambiguous and will most likely not do much. Post your code here and describe the concrete use problem – kolossus Sep 01 '13 at 20:06
  • If a normal command button does already not work, `` won't help anything, simply because it requires a working command button. I recommend to take a step back and fix the button invocation failure. Here's a starting point: http://stackoverflow.com/questions/2118656/hcommandlink-hcommandbutton-is-not-being-invoked/2120183#2120183 – BalusC Sep 01 '13 at 21:15

1 Answers1

0

There is something seriously wrong if the actions of the h:commandButton and h:commandLink are not being called anymore. Maybe it's something easy like failed validation, which cancels the call of the action (try immediate="true" in your button/links). If it's not, then you should try to find and fix what causes this instead of switching to Ajax functionality.

As already pointed out, you may use a4j which is delivered with RichFaces 3 and works also with JSF 1.

BUT you cannot throw away this basic functionality. Using Ajax only you will run into a lot of problems later on. a4j:ajax might be the equivalent of f:ajax, but it's certainly not equivalent to the standard post-action functionality.

One common usecase would be a PDF to be displayed. This isn't possible with an Ajax partial-update.

noone
  • 19,520
  • 5
  • 61
  • 76