There are few changes for Richfaces4.
You need to see the migration guide from Richfaces3.3.3 to Richfaces4 from the following link:
Now to create a4j:commandLink dynamically, we need to use
UICommandLinkcomponent class instead of HtmlAjaxCommandLink
Please follow the component reference guide:
All the best
Thank you for your help, I resolved my problem.