I’m trying to conditionally render a table with data retrieved from a backing bean method, inside the same page where the method it’s been invoked, to avoid forwarding to another identical page.
JSF version is 2.1
I can’t figure out how this can be made.
I found something with <f:ajax/>
but can’t really understand how to implement it.
I know that I need a wrapper, like <h:panelGroup/>
, which is rendered anyway, and inside I’ll have the table conditionally rendered by the rendered attribute of <f:ajax/>
.
The backing bean would be @ViewScoped
, which I don’t know if it’s right for what I’m trying to do. I read something about the various kind of scopes, but my project isn’t very well-structured: I have 5 sessions’ scoped beans, 4 extends the main one, which indeed manage almost every method in the others through exec()
, triggered with the varoius action attributes. Basically every page does the same thing with differents implementation. My model beans aren’t managed, actually they comes from the backend through proxies, and almost every online explanation isn’t helping.