Experts.,
I created 10 stringItem dynamically. I did setDefaultCommand(cmd) and setItemCommandListener(this).
my code is like
In CommandAction, code is likeCode:for (int i = 0; i < 10; i++) { newsTitle = new StringItem(null, stringNews[i]); this.append(newsTitle); newsTitle.setDefaultCommand(cmdNext); newsTitle.setItemCommandListener(this); }
When i click the stringItem, i get only the last index. of the title.Code:public void commandAction(Command c, Item item) { if(c == cmdNext){ Display.getDisplay(mainPage).setCurrent(new frmNewsDetials(newsTitle.toString(), mainPage)); } }
how can i get the particular index value of particular click action...?
Help me,
kumar.

Reply With Quote

