Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

problem with Getter Method

 
michell o'brien
Ranch Hand
Posts: 37
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have this Menu.jsp. I am trying to access from mencategoryArraylist but in my <bean:write > No getter method for property: "Apparel" of bean: "mencategorylist". I have written the same code to access from menarrayList that works fine to me.

Can someone tell me where I am going wrong.

 
David Newton
Author
Rancher
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'd first try using "apparel", since property names used this way should start with a lower-case.
 
michell o'brien
Ranch Hand
Posts: 37
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
By just changing the case it worked. Is it the syntax or any kind of rule that property should be written in smaller case.
 
David Newton
Author
Rancher
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It's standard JavaBean naming conventions.
 
michell o'brien
Ranch Hand
Posts: 37
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks for the info
 
michell o'brien
Ranch Hand
Posts: 37
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Once again I am facing the same problem to another property. It is not displaying any error but not showing the values in the JSP. I googles through the JSP bean naming conventions and found some thing like Javabean property change.



Can someone tell me where I am going wrong.
 
David Newton
Author
Rancher
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
How can anybody help? You're posting only one small piece of the puzzle.

Does the bean class held in mencategorylist gave a "getShow_accessiores()" method? (Note misspelling.)
 
michell o'brien
Ranch Hand
Posts: 37
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yes, sir it does have getShoe_accessiores

 
David Newton
Author
Rancher
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
michell o'brien wrote:Yes, sir it does have getShoe_accessiores

Have you verified there's a value in it?Note that naming a property with a capital letter is pretty confusing to people that normally read Java code that follows normal naming conventions.
 
michell o'brien
Ranch Hand
Posts: 37
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Oops it is showing null value.
 
michell o'brien
Ranch Hand
Posts: 37
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I was actully setting value for a wrong parameter
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic