I'm exporting to PDF via the RPCManager, and my FloatItem and TextItem values aren't being displayed in the PDF. If I call Canvas.showPrintPreview(), the values are displayed.
I'm running SNAPSHOT_v8.3d_2012-09-04/Enterprise Deployment (built 2012-09-04) in Firefox 13.0.1 on MacOSX.
Here is sample code to reproduce the problem.
If you enter values in the 3 form fields, and then press the Print to PDF button, you'll see the generated PDF shows the fields as empty.
Any ideas?
Thanks,
Chris
I'm running SNAPSHOT_v8.3d_2012-09-04/Enterprise Deployment (built 2012-09-04) in Firefox 13.0.1 on MacOSX.
Here is sample code to reproduce the problem.
Code:
package com.smartgwt.sample.client; import java.util.Date; import com.google.gwt.core.client.EntryPoint; import com.smartgwt.client.data.DSRequest; import com.smartgwt.client.rpc.RPCManager; import com.smartgwt.client.types.ExportDisplay; import com.smartgwt.client.widgets.Canvas; import com.smartgwt.client.widgets.IButton; import com.smartgwt.client.widgets.events.ClickEvent; import com.smartgwt.client.widgets.events.ClickHandler; import com.smartgwt.client.widgets.form.DynamicForm; import com.smartgwt.client.widgets.form.fields.FloatItem; import com.smartgwt.client.widgets.form.fields.TextItem; import com.smartgwt.client.widgets.layout.VLayout; /** * Entry point classes define <code>onModuleLoad()</code>. */ public class BuiltInDS implements EntryPoint { /** * This is the entry point method. */ public void onModuleLoad() { final VLayout example = new VLayout(); IButton pdfButton = new IButton("Print to PDF", new ClickHandler() { @Override public void onClick(ClickEvent event) { DSRequest requestProperties = new DSRequest(); requestProperties.setExportFilename("formprint" + (new Date()).getTime() + ".pdf"); requestProperties.setExportDisplay(ExportDisplay.DOWNLOAD); requestProperties.setContentType("application/pdf"); requestProperties.setDownloadResult(true); RPCManager.exportContent(example, requestProperties); } }); example.addMember(pdfButton); IButton printButton = new IButton("Print", new ClickHandler() { @Override public void onClick(ClickEvent event) { Canvas.showPrintPreview(example); } }); example.addMember(printButton); DynamicForm form = new DynamicForm(); FloatItem f1 = new FloatItem("f1", "f1"); TextItem t2 = new TextItem("t2", "t2"); FloatItem f3 = new FloatItem("f3", "f3"); form.setFields(f1, t2, f3); example.addMember(form); example.draw(); } }
Any ideas?
Thanks,
Chris
Comment