Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
Clear All
new posts

    PDFExport of grid with ValueIcons - ValueIcons missing

    I'm attempting to export a TreeGrid with valueIcons to PDF and I'm not getting the ValueIcons to show up in the output PDF. I've put together a fairly simple test case useing RPCManager.exportContent() that demonstrates the issue.
    Code:
    		VLayout layout = new VLayout();
    		layout.setHeight(300);
    		layout.setWidth(1200);
    
    		final ListGrid grid = new TreeGrid() {
    			{
    			}
    
    			@Override
    			public String getValueIcon(ListGridField field, Object value, ListGridRecord record) {
    				String icon = null;
    				if (field.getName().equals("status")) {
    					if (value != null) {
    						if (value.equals("Endangered") || value.equals("Threatened")) {
    							icon = "[SKINIMG]/actions/exclamation.png";
    						} else {
    							icon = "[SKINIMG]/actions/approve.png";
    						}
    					}
    				}
    				return icon; // TODO Auto-generated method stub
    			}
    		};
    
    		grid.setDataSource(DataSource.get("animals"));
    
    		grid.setAutoFetchData(true);
    		grid.setUseAllDataSourceFields(true);
    		IButton button = new IButton("export");
    		button.addClickHandler(new ClickHandler() {
    
    			@Override
    			public void onClick(ClickEvent event) {
    				RPCManager.exportContent(grid);
    			}
    		});
    
    		layout.setMembers(grid, button);
    		layout.draw();
    I don't think it's a setup issue since I'm getting the Tree open/close and folder icons and I don't see any errors/warnings in the console output of note. Any suggestions? or is this a potential bug/issue in SmartGWT? I'm using the 01/05 nightly build of SmartGWT 4.1d.

    #2
    This is now fixed for tomorrow's affected builds.

    Background: we recently had to adjust the HTML for valueIcons to work around an IE memory leak, and that revealed a bug in the iText PDF exporter, now we're outputting HTML that avoids both issues.

    Comment

    Working...
    X