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

Removing scriplets

 
Vishnu Prakash
Ranch Hand
Posts: 1026
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Here is my code.



Can you please suggest me how to avoid scriplets here.
 
John Simpson
Greenhorn
Posts: 25
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
write a <script> tag.
in a function write something along the lines of:


I know its basically the same thing, but you asked...

 
Merrill Higginson
Ranch Hand
Posts: 4864
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Just substitute:

for your assignments to the variable "s". If the type is not specified in a bean:define, it defaults to String. When you want to display "s", you can do so with either the EL expression ${s} or a bean:write tag.
 
Vishnu Prakash
Ranch Hand
Posts: 1026
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks for your response.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic