I am trying to create dynamic id as follows but it says illegal argument exception.
<a:commandLink id="#{_subCategory.subCatId.toString()}" value="#{_subCategory.subCatNm}" action="#{postAdAction.displayAdScreen(_subCategory.subCatId)}"/>
Here subCatId is of type Short.
Id of JSF component may not be dynamic ! It must be hardcoded.