View Full Version : GXT 3.0 ListView - Icon + String
18 Apr 2012, 4:17 AM
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.
8 Jun 2013, 10:31 AM
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.
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());
Powered by vBulletin® Version 4.2.3 Copyright © 2016 vBulletin Solutions, Inc. All rights reserved.