Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Embedded expression in custom tags  RSS feed

 
Rick Beaver
Ranch Hand
Posts: 464
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi

Just been asked a question and don't know the answer - can anyone here help?

My colleague is trying to do something like:



It clearly will not work but I think the intent is clear - can anyone think of a solution to this problem?

Cheers
 
Keith Pitty
Ranch Hand
Posts: 32
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Use the JSP Expression Language e.g. ${myBean.myTitle} and you'll never need to use the old JSP expressions again!
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 65826
134
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
In the TLD description for the tag, make sure that the rt-expression entry is set to true.
 
Rick Beaver
Ranch Hand
Posts: 464
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Bear Bibeault:
In the TLD description for the tag, make sure that the rt-expression entry is set to true.


I will give that a try - I have a feeling the error was something like "According to TLD this tag cannot accept expressions of any kind" which mkes me think that you may be on to something

Thanks both - I will try this out now...
 
Rick Beaver
Ranch Hand
Posts: 464
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ahh - my colleague informs me that rtexpression is true for the tag BUT he is putting the tag in a JSF f:verbatim tag - I think I need to investigate what impact that will be having on the custom tag.

Thanks for the help so far...
 
Rick Beaver
Ranch Hand
Posts: 464
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Both

rt-expression was true so that was OK.

The problem eventually, using EL, turned out to be that my colleague was doing:



instead of



I still do not know what was wrong with the:



as the outer tag had the rt-expression tag set to true...

but working is working

Thanks for the help
 
Don't get me started about those stupid light bulbs.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!