Hi,
I am new to GWT/GXT and I need to create a ListView which shows list of Strings with Icons to the Left.
Using templates it seems do able, but not sure how. Need help.
Thanks in advance!
Printable View
Hi,
I am new to GWT/GXT and I need to create a ListView which shows list of Strings with Icons to the Left.
Using templates it seems do able, but not sure how. Need help.
Thanks in advance!
I would use a CompositeCell that containts the ImageResourceCell and a SafeHtmlCell. All comming from GWT.
Hi Sven,
I am trying to do the same thing. I got it working with a static icon, but what if I want to use the icon from the model? i.e I have a model that provides an ImageResource, how can I show the image next to the the model string.. Here is what I have so far.. but like i said this will only show a single image, how can I pull the image from the model.
Code:resources = GWT.create(AppResources.class);
navStore = new ListStore<NavigationPaneSectionModel>(props.key());
navStore.add(new NavigationPaneSectionModel("accounts", resources.note(), "Accounts"));
navStore.add(new NavigationPaneSectionModel("tickets", resources.bino_search(), "Tickets"));
navStore.add(new NavigationPaneSectionModel("leads", resources.email_add(), "Leads"));
IconCellDecorator<String> iconCell = new IconCellDecorator<String>(resources.note(), new TextCell());
navList = new ListView<NavigationPaneSectionModel, String>(navStore, props.displayLabel());
navList.setCell(iconCell);
this.setWidget(navList);