Hey guys, i'm not managing to get the selected row from my datatable. I tried to do like the example in the showcase (link here) but I may be missing some tiny detail.
Here's the xhtml:
Here's the code from my bean:
in my onRowSelect I ask it to show me the attribute numOs from the current selected row in the dialog, but nothing is shown.
in the console nothing appears either, not even a null value. I debugged the project, but couldn't discovery anything as well.
I appreciate any help, thanks a lot
Joined: May 12, 2009
Firstly I think you're trying to do too much in one go. Unfortunately it never works with this
infrastructure and is difficult to debug.
Having said that you want to be using view scoped beans with primefaces. Request scoped
beans don't work well with ajax, and most primefaces components are ajax enabled by
default. Are your imports correct? if, for example, you've imported
javax.annoation.ManagedBean then unless you're intentionally using CDI, you've got the
wrong package, but it's not apparent because you've not included the imports in your post.
I would suggest getting rid of the code for the dialog temporarily as dialogs are tricky so
remove onRowSelectComplete. Use <ui:remove> </ui:remove> to take out all but one of
the columns and see if that helps.
a yellow ! warning icon on bottom left of screen), or anything in the server log.