Win a copy of Think Java: How to Think Like a Computer Scientist this week in the Java in General forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Setting tab-index using scriptlet in html:text

 
Mohit Agarwal
Ranch Hand
Posts: 88
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
author & internet detective
Marshal
Posts: 34372
345
Eclipse IDE Java VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Mohit,
Does it work if you do the following?
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic