about oncomplete attribute dynamic invoke el expression

UI Components for JSF
Post Reply
AndrewZhang
Posts: 2
Joined: 03 Aug 2010, 10:01

29 Oct 2010, 04:13

in my company, we used richfaces before, in a4j:commandbutton we can set its oncomplete attribute with a js function that contains a el expression which can dynamicly get a argument through a backend bean mothod after ajax request we triggered by click it...like this oncomplete="addItem(#{beanAction.itemId})" evey time after ajax
request we can get a itemid for addItem function. I know i can workaround this problem with requestContext in using p:commndButton, like that oncomplet="additem(args.itemid)", so i just think aj4:commandbutton is a little more convenient for this situation.

cagatay.civici
Prime
Posts: 18616
Joined: 05 Jan 2009, 00:21
Location: Cybertron
Contact:

29 Oct 2010, 10:02

You can either use RequestContext.addCallbackParam() to execute your scripts based on a condition;

http://www.primefaces.org/showcase/ui/dialogLogin.jsf

or wait for;

http://code.google.com/p/primefaces/iss ... il?id=1342

Post Reply

Return to “PrimeFaces”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 48 guests