I have a commandbutton on my datatable wich I need that sometimes show a report (.jasper) in a new tab with the target=blank and depending on the situation of the item just put the information in another page (a registration one) without the new tab.
Is that possible or the only solution is two buttons?
Try conditional expression language:
This way you will only get
target="blank"when your bean’s condition is true.