• Post Reply Bookmark Topic Watch Topic
  • New Topic

using EL to get at derrived attributes  RSS feed

 
peter cooke
Ranch Hand
Posts: 317
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Prossessing my request, I am adding the following class structure to my request.




In my JSP I can use Scriptlet to get at the data so I know my classes are present.



I am missing something obvious on how to use EL to get at this derrived attribue. I would have thought something like ${vehicle.owner.fullName} or ${vehicle.owner.getFullName()} would have worked but they did not. I also substituted # for $ and that did nothing.


So the question is: How do I use EL to get at derrived full name???

 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 65833
134
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Whether the property value is "derived" or not is moot. All that matters is that there is a properly formatted bean exposing its properties via getters.

You said it "didn't work". What does that mean? Please read this for more information.

Where to look next greatly depends upon exactly what is happening, not what is not.
 
peter cooke
Ranch Hand
Posts: 317
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Nothing comes out.
There is no error in the server log. The browser shows nothing.
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 65833
134
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
So the EL expression is being replaced with the empty string? Have you checked the source HTML? (not just what the browser displays)
 
Kenny Kuriakose
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Pete,

I think the value returned by getter method is nothing.

Can you check the HTML source code and let me know how it is being displayed at that point.

ELs are Null friendly. If the value to be displayed is Null, it does not throw an error. It just does not display anything. I think that is what you are getting.

Thanks,
Kenny Kuriakose
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!