Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

EL code magnet question from CH 8 HFSJ

 
meera kanekal
Ranch Hand
Posts: 75
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
I am studying thru CH 8 from HFSJ and had a question regarding the Code Magnet Answers from page 382. The authors mention about the "Bonus exercise: write the EL expressions a little differently (forget the magnets), but print the same result". The exercise is for composing the EL for the output:
Leelu's dog Clyde's toys are: stick, neighbor's cat, and a Barbie doll head.
I am wondering if any of you have an answer to that?
Will be much obliged.
Thanks,
Meera
 
Vijitha Kumara
Bartender
Pie
Posts: 3930
21
Chrome Fedora Hibernate
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Please give more details, what is the source we can use to construct this EL ?
 
Ankit Garg
Sheriff
Posts: 9580
33
Android Google Web Toolkit Hibernate IntelliJ IDE Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
That exercise is for you to try. If we provide you a solution, how will you learn. Remember that you can use whatever EL you want.

Hint: try to use [] instead of . or something of that sort to experiment...
 
meera kanekal
Ranch Hand
Posts: 75
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The reason I asked was because I was not able to totally get it. I thought this was a friendly forum where you could ask questions if you could not figure it out.
Meera
 
Vijitha Kumara
Bartender
Pie
Posts: 3930
21
Chrome Fedora Hibernate
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
meera kanekal wrote:The reason I asked was because I was not able to totally get it. I thought this was a friendly forum where you could ask questions if you could not figure it out.

Yes, this is really friendly (perhaps the most ) forum. But you haven't provided enough information for us to give you a clue to solve your issue (not everybody have the book with them when they answer the posts).
 
Ankit Garg
Sheriff
Posts: 9580
33
Android Google Web Toolkit Hibernate IntelliJ IDE Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
meera kanekal wrote:The reason I asked was because I was not able to totally get it. I thought this was a friendly forum where you could ask questions if you could not figure it out.


I think you misunderstood me. I didn't mean to say that we'll not provide you the solution. What I was trying to say was that the question doesn't have a specific solution. You are free to explore EL and try to get the same output using EL. There can be multiple ways of solving that problem. Let me try to give you an example. The code magnets in the answer are (I've separated magnets with | symbol)


I can also write the EL as


or


There can be many more solutions like this...
 
meera kanekal
Ranch Hand
Posts: 75
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank you Ankit for your input.
Regards,
Meera
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic