aspose file tools*
The moose likes Struts and the fly likes scriptlets in html:option Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "scriptlets in html:option" Watch "scriptlets in html:option" New topic
Author

scriptlets in html:option

Ritu varada
Ranch Hand

Joined: Sep 08, 2004
Posts: 117
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.


SCJP,SCWCD(1.4)
Jeanne Boyarsky
internet detective
Marshal

Joined: May 26, 2003
Posts: 29237
    
139

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.


[Blog] [JavaRanch FAQ] [How To Ask Questions The Smart Way] [Book Promos]
Blogging on Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, OCAJP, OCPJP beta, TOGAF part 1 and part 2
Merrill Higginson
Ranch Hand

Joined: Feb 15, 2005
Posts: 4864
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.


Merrill
Consultant, Sima Solutions
sreenath reddy
Ranch Hand

Joined: Sep 21, 2003
Posts: 415
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

Joined: Sep 08, 2004
Posts: 117
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

Joined: Sep 08, 2004
Posts: 117
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
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: scriptlets in html:option
 
Similar Threads
how to set option to default ?
Setting a preselected value in a combo
how to fill a combobox with values from objects in an ArrayList...
update html:options
Help me regarding select value in html:select...