This week's book giveaway is in the OO, Patterns, UML and Refactoring forum. We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line! See this thread for details.
I've been struggling with this problem for too long.I really can't tell what is wrong with the code.
This is my JSF registerForm.xhtml which is included in the index.xhtml.
You are probably wondering why I used onclick instead of action.Well, action does nothing, I tryed debugging.
It never goes in the method.With onclick it goes in the method, but all my properties are null.
This is my bean:
I made an account on this forum just to post this.Please help me!I would be eternally gratefull.Please excuse my bad english.
Wow, everyone is suddenly asking about PrimeFaces. I'll have to give it a try someday. I think if you put <h:messages /> or <p:messages /> somewhere in your page, it might give you information about why the form values aren't getting to your setters. I'd also change the command button so it had an action again instead of the onclick (or actionListener since your method has a void return value), but take away the parentheses:
In addition to the Java debugger, you can use browser tools to help figure out what's going on. I often rely on the Net tab of Firebug for Firefox, which shows all the requests and responses as they are sent and received. I believe Chrome has similar tools. And IE ... well, don't use IE for development. Get things basically working first, then worry about supporting IE.
I tryed <p:message> <p:messages> and the facelets ones with h: . Nothing shows up. With actionListener it never prints out my values in the console.The console always shows this info
It doesn't say anything else.I really think what i've done is basic.I'm starting to hate JSF.I need to finish this project for a class i'm taking.I even tried simpler forms.Tried without the table and with both primefaces and jsf.The button does nothing with action or actionListener.It only works with onclick but values are null.I don't know why <h:message> or <h:messages> won't pop up.The Glassfish log is useless.Doesn't say anything.Could that warning be relevant? I'm afraid if I start the project from scratch I will run in the same problems. Can the composition thing afect my submit? The composition is rendered with ajax.Any ideas? They would be much apreciated!
I realized the following after hours of research.It seems that <ui:include src="myComposition.xhtml"> actually doesn't change the xhtml code.So html doesn't know i'm pressing the submit. Is there someway to include myRegisterForm.xhtml in the index.xhtml and actually change the code dinamicaly. How do you do this with jsf?
I also recommend using JSF grid formatting instead of raw HTML table tags, but that wouldn't affect functionality.
Customer surveys are for companies who didn't pay proper attention to begin with.