Can array of labels be used in JSF
0 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   divya_tangirala
Posted On:   Friday, June 26, 2009 01:20 AM

I have 5 labels label1, label2... on a JSF page. I added them in an ArrayList ArrayList labellist = new ArrayList(); labellist.add(label1); labellist.add(label2); labellist.add(label3); labellist.add(label4); labellist.add(label5); To use them in succession for(int i=0;i { Label name = (Label) pnames.get(i); Products p = (Products) displayList.get(i); name.setVisible(true); name.setText(p.getName().toString()); } There is no error but the label name is not getting updated. Appreciate your help.    More>>

I have 5 labels label1, label2... on a JSF page.
I added them in an ArrayList

			
ArrayList labellist = new ArrayList();

labellist.add(label1);
labellist.add(label2);
labellist.add(label3);
labellist.add(label4);
labellist.add(label5);


To use them in succession

			
for(int i=0;i
{
Label name = (Label) pnames.get(i);
Products p = (Products) displayList.get(i);
name.setVisible(true);
name.setText(p.getName().toString());
}


There is no error but the label name is not getting updated. Appreciate your help.    <<Less
About | Sitemap | Contact