Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

how to use ONGL ?

 
Jayaraj Jaganathan
Ranch Hand
Posts: 70
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
i have created a int variable with name index

int index =0;



now next step is i need to increment it by one
so i have written the below code, but that is not working
please some one help me to know what i have made wrong and
how to do it right ?

please help me.

index++




complete code section


 
David Newton
Author
Rancher
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Where did you create the variable "index"? How are you exposing it to the JSP page?

In any case, if you're just using it as an index for the iterator tag, you don't need to; use the iterator tag's "status" attribute.
 
Jayaraj Jaganathan
Ranch Hand
Posts: 70
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
first thanks for your reply.

Where did you create the variable "index"?




How are you exposing it to the JSP page?




In any case, if you're just using it as an index for the iterator tag, you don't need to; use the iterator tag's "status" attribute.


I am using it for index of iteration but
i am iterating a iterator inside a iterator.
i need to track how many time that the check box get created

once again thanks for your reply

 
David Newton
Author
Rancher
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'd still use the "status" attribute and save yourself some trouble. Why won't you do that?

In any case, please see ItDoesntWorkIsUseless. I have no idea what isn't working, so I have no way to assist you.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic