Hi Isomorphic,
please see this v10.0p_2015-10-23 builtInDS based testcase:
BuiltInDS.java:
Screenshot:
As you can see, the filterrow displays the path-string instead of an icon.
If this is not the correct way of dealing with this use-case, could you please describe the correct way? I do think though that this has worked before, but I'm not sure.
Best regards
Blama
please see this v10.0p_2015-10-23 builtInDS based testcase:
BuiltInDS.java:
Code:
package com.smartgwt.sample.client; import java.util.LinkedHashMap; import com.google.gwt.core.client.EntryPoint; import com.smartgwt.client.core.KeyIdentifier; import com.smartgwt.client.data.AdvancedCriteria; import com.smartgwt.client.data.Criterion; import com.smartgwt.client.data.DataSource; import com.smartgwt.client.types.Alignment; import com.smartgwt.client.types.ListGridFieldType; import com.smartgwt.client.types.OperatorId; import com.smartgwt.client.util.Page; import com.smartgwt.client.util.PageKeyHandler; import com.smartgwt.client.util.SC; import com.smartgwt.client.widgets.IButton; import com.smartgwt.client.widgets.Window; import com.smartgwt.client.widgets.events.ClickEvent; import com.smartgwt.client.widgets.events.ClickHandler; import com.smartgwt.client.widgets.grid.ListGrid; import com.smartgwt.client.widgets.grid.ListGridField; import com.smartgwt.client.widgets.layout.VLayout; public class BuiltInDS implements EntryPoint { private VLayout mainLayout; private IButton recreateBtn; public void onModuleLoad() { KeyIdentifier debugKey = new KeyIdentifier(); debugKey.setCtrlKey(true); debugKey.setKeyName("D"); Page.registerKey(debugKey, new PageKeyHandler() { public void execute(String keyName) { SC.showConsole(); } }); mainLayout = new VLayout(20); mainLayout.setWidth100(); mainLayout.setHeight100(); recreateBtn = new IButton("Recreate"); recreateBtn.addClickHandler(new ClickHandler() { @Override public void onClick(ClickEvent event) { recreate(); } }); mainLayout.addMember(recreateBtn); recreate(); mainLayout.draw(); } private void recreate() { Window w = new Window(); w.setWidth("95%"); w.setHeight("95%"); w.setMembersMargin(0); w.setModalMaskOpacity(70); w.setTitle("No icon in filter row SelectItem"); w.setShowMinimizeButton(false); w.setIsModal(true); w.setShowModalMask(true); w.centerInPage(); { final ListGrid testGrid = new ListGrid(DataSource.get("employees")); testGrid.setShowFilterEditor(true); testGrid.setCanEdit(true); ListGridField genderLGF = new ListGridField("Gender"); ListGridField nameLGF = new ListGridField("Name"); ListGridField jobLGF = new ListGridField("Job"); ListGridField salaryLGF = new ListGridField("Salary"); ListGridField orgUnitLGF = new ListGridField("OrgUnit"); ListGridField maritalStatusLGF = new ListGridField("MaritalStatus"); LinkedHashMap<String, String> vM = new LinkedHashMap<String, String>(); vM.put("married", "[SKINIMG]actions/filter.png"); vM.put("single", "[SKINIMG]actions/find.png"); maritalStatusLGF.setValueMap(vM); maritalStatusLGF.setAlign(Alignment.CENTER); maritalStatusLGF.setType(ListGridFieldType.IMAGE); testGrid.setFields(genderLGF, nameLGF, jobLGF, salaryLGF, orgUnitLGF, maritalStatusLGF); testGrid.setSortField("Name"); testGrid.fetchData(new AdvancedCriteria(new Criterion("Name", OperatorId.ISTARTS_WITH, "A"))); w.addItem(testGrid); } w.show(); } }
As you can see, the filterrow displays the path-string instead of an icon.
If this is not the correct way of dealing with this use-case, could you please describe the correct way? I do think though that this has worked before, but I'm not sure.
Best regards
Blama
Comment