File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Struts and the fly likes Setting tab-index using scriptlet in html:text Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Setting tab-index using scriptlet in html:text" Watch "Setting tab-index using scriptlet in html:text" New topic
Author

Setting tab-index using scriptlet in html:text

Mohit Agarwal
Ranch Hand

Joined: Mar 30, 2004
Posts: 88
Hi,

I am trying to set tab-index property using a scriptlet variable(initialized at the beginning of the page) in my struts-html elements.
I don't want to hard-code as after time new elements can come in between & then i had to again set the tab-index for all of them.

I am getting the following error :
The method setTabindex(String) in the type BaseHandlerTag is not applicable for the arguments (int)

I am doing this :

int i =1; //initialized at the beginning of the page.
html:text property="aa" tabindex="<%=i++%>"
Jeanne Boyarsky
internet detective
Marshal

Joined: May 26, 2003
Posts: 29255
    
140

Mohit,
Does it work if you do the following?


[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
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Setting tab-index using scriptlet in html:text
 
Similar Threads
String[] in Struts+JSP
Indexed Properties with List of Strings
dynamic beans
Struts 1 -- Wrong data displaying in my JSP page
Spooky tabindex problem...