• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

scriptlets in html:option

 
Ranch Hand
Posts: 119
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I am trying to using a constants file while using the options tag in html library. I am not able to figure out the syntax.

I am saying

<html ption value= "<%= Constants.STATUS_CD_DUP %>" >DUPLICATE</html ption>

I have imported the neccessary class but I am having trouble with the syntax. Is there a better way to do this ? Thanks.
 
author & internet detective
Posts: 41860
908
Eclipse IDE VI Editor Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Ritu,
The syntax is correct. What error message do you get?

A better way to do this would be to put the names/values in a List and access that through the Struts tags.
 
Ranch Hand
Posts: 4864
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
When using scriptlets inside html:xxxx tags, it does make a difference which version you use. In some cases, I was unable to get them to work with Version 1.1, but version 1.2 is much better about this.
 
Ranch Hand
Posts: 415
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hi ritu

The syntax is very much fine and it works in all the versions starting from 1.0 version.let us know whats the error u r getting
 
Ritu varada
Ranch Hand
Posts: 119
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I am actually getting a parser error. Let me try that once more and let you guys know. Thanks a lot for your help.
 
Ritu varada
Ranch Hand
Posts: 119
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I had a closing tag missing and I thought that the syntax was wrong. But, good to know that I was right on the syntax. Thank you guys
 
reply
    Bookmark Topic Watch Topic
  • New Topic