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

Removing scriplets  RSS feed

 
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
Boost this thread!