Hi. I am new to JSF and I am having trouble in creating a search result page in JSF.
This is in my file "/telas/buscar_exame.jsp":
This a snippet of my faces-config.xml:
My managed bean has an attribute called "visualizadorExames" which is a Collection<Visualizador>. There is a getter for this too.
The class Visualizador is an inner class of my managed bean (i.e. a smelly ugly hack) and has an attribute "exame" that is just an entity class already populated (the thing shown in the result).
The class Visualizador has a method prosseguir() which put the corresponding "exame" attribute in another managed bean (used in the next screen) and return the String "prosseguir" (don't looks good too).
Well... The result is a disaster. There are 2 problems here. The first is that my panel is not rendered correctly (the search results looks messy). But my big show-stopper problem is that clicking in a result does not navigate to the next page, instead it reloads the search result page.
About the nesting of the <a4j:form>, this is because the content outside the <a4j:repeat> tag needs to use the external form (ie, it is the search form and the search results needs to be in the middle of it), while the <a4j:form> nested in the <a4j:repeat> tag is intended to be the form that submits to show the next screen.
I am a novice to JSF. I just started to study it seriously three weeks ago.
Can somebody help me?
Edit: debugging it, looks like that the prosseguir() method is never called. So i wonder what is being called when I click the link.
About the rendering problem, I already tried to change the order of the tags, but no success.
Edit 2: I fixed the rendering problem and cleaned up the ugly stuff thanks to this.
But it still not working, it still comes back to the same page. I did what was in the article, but used <a4j:repeat> instead of <h:dataTable> because dataTable did not played well with <a4j:form> (yes, I tried with dataTable).