Announcement

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

    one printpreview only

    hey hello smartgwt team... I need your help please!

    If I call

    Canvas.showPrintPreview(new Object[]{w}, null ,"Titulo", null, new Window(), "Impresion");

    I can get one printpreview.... I mean if I close printpreview window, when I click print preview buttom again... browser is like loading something but no printpreview window show up again.

    calling

    Canvas.showPrintPreview(w);

    shows my window printpreview everytime I want.

    this happens on GC, FF and IE
    I only need to define differents dimension for the printpriview window, that why I can not call Canvas.showPrintPreview(w); (without settings)

    thanks in advance for your help!

    #2
    capture and dev console log

    11:08:39.161 [ERROR] [other] Uncaught exception escaped
    com.google.gwt.core.client.JavaScriptException: (TypeError): Object [PrintCanvas ID:isc_PrintCanvas_0] has no method '__getInnerHTML'
    stack: TypeError: Object [PrintCanvas ID:isc_PrintCanvas_0] has no method '__getInnerHTML'
    at [object Object].<anonymous> (unknown source)
    at __gwt_jsInvoke (http://127.0.0.1:8888/other/hosted.html?other:70:35)
    at eval at eval (native v8natives.js:131:1)
    at Object.<anonymous> (unknown source)
    at unknown source
    at __gwt_jsInvoke (http://127.0.0.1:8888/other/hosted.html?other:70:35)
    at eval at eval (native v8natives.js:131:1)
    at Object.<anonymous> (unknown source)
    at Object.fireCallback (http://127.0.0.1:8888/other/sc/modul...Core.js:270:44)
    at Object.fireCallback (http://127.0.0.1:8888/other/sc/modul...Core.js:362:60)
    type: undefined_method
    arguments: __getInnerHTML,[PrintCanvas ID:isc_PrintCanvas_0]
    __gwt_ObjectId: 202
    at com.google.gwt.dev.shell.BrowserChannelServer.invokeJavascript(BrowserChannelServer.java:195)
    at com.google.gwt.dev.shell.ModuleSpaceOOPHM.doInvoke(ModuleSpaceOOPHM.java:120)
    at com.google.gwt.dev.shell.ModuleSpace.invokeNative(ModuleSpace.java:507)
    at com.google.gwt.dev.shell.ModuleSpace.invokeNativeObject(ModuleSpace.java:264)
    at com.google.gwt.dev.shell.JavaScriptHost.invokeNativeObject(JavaScriptHost.java:91)
    at com.google.gwt.core.client.impl.Impl.apply(Impl.java)
    at com.google.gwt.core.client.impl.Impl.entry0(Impl.java:188)
    ...
    etc
    ...

    and

    11:10:36.117 [ERROR] [other] Uncaught exception escaped
    com.google.gwt.core.client.JavaScriptException: (TypeError): Object [object DOMWindow] has no method 'assignHTML'
    stack: TypeError: Object [object DOMWindow] has no method 'assignHTML'
    at Object.setHTML (http://127.0.0.1:8888/other/sc/modul...ore.js:3085:34)
    at Object.$57j (http://127.0.0.1:8888/other/sc/modul...re.js:3103:129)
    at Object.fireCallback (http://127.0.0.1:8888/other/sc/modul...Core.js:270:44)
    at Object.getPrintHTML (http://127.0.0.1:8888/other/sc/modul...ore.js:2971:13)
    at Object.gotComponentPrintHTML (http://127.0.0.1:8888/other/sc/modul...ore.js:2973:67)
    at Object.fireCallback (http://127.0.0.1:8888/other/sc/modul...Core.js:270:44)
    at Object.fireCallback (http://127.0.0.1:8888/other/sc/modul...Core.js:362:60)
    at http://127.0.0.1:8888/other/sc/modul...tion.js:483:87
    at http://127.0.0.1:8888/other/sc/modul...re.js:1859:333
    at Object.<anonymous> (http://127.0.0.1:8888/other/sc/modul...re.js:1861:115)
    type: undefined_method
    arguments: assignHTML,[object DOMWindow]

    etc

    hope this mean something for you
    thanks!


    using smartgwt 2.1 and GWT 2.0.3
    Attached Files

    Comment


      #3
      Can you try using the latest nightly build and see if the problem still exists?

      Comment


        #4
        thanks so much for your answer... exactly same behaviour

        I downloaded from http://www.smartclient.com/smartgwt/builds/latest/

        the latest nightly release, so I changed smartgwt2.1.jar to the new file downloaded smartgwt.jar (supose that it's 2.2)

        I also try to do my own static showprintpreview method on Canvas extended class. And had the same result.

        After all, is it ok trying to set width of printpreview window... ? I'm on a wrapper and cant use the hole screen

        thanks again!

        hoping your replay

        Comment


          #5
          Please post a minimal standalone testcase.

          Comment


            #6
            test runnable case

            import com.google.gwt.core.client.EntryPoint;
            import com.smartgwt.client.widgets.Canvas;
            import com.smartgwt.client.widgets.HTMLPane;
            import com.smartgwt.client.widgets.Window;
            import com.smartgwt.client.widgets.form.DynamicForm;
            import com.smartgwt.client.widgets.form.fields.ButtonItem;
            import com.smartgwt.client.widgets.form.fields.events.ClickEvent;
            import com.smartgwt.client.widgets.form.fields.events.ClickHandler;

            public class Test implements EntryPoint {
            public void onModuleLoad() {

            final Window w = new Window();
            w.setWidth100();
            w.setHeight100();

            DynamicForm df = new DynamicForm();
            df.setWidth100();
            df.setHeight100();
            ButtonItem b = new ButtonItem();
            b.setName("Click");

            df.setItems(b);
            b.addClickHandler(new ClickHandler(){

            @Override
            public void onClick(ClickEvent event) {
            // TODO Auto-generated method stub
            Canvas.showPrintPreview(new Object[]{w}, null, "Titulo", null, new Window(), "Impresion");
            }

            });
            HTMLPane h = new HTMLPane();
            h.setContents("hola");
            w.addItem(h);
            w.addItem(df);
            w.show();
            }
            }


            the idea is showing more than one time printpreview.... close it and try it again

            Comment


              #7
              sorry ... did you find anything? any idea how can I go on with this, at least a previous dirty solution?

              thanks for your replay!

              Comment


                #8
                should I give up on this?

                nothing I can do about it?

                thanks for your answer!

                Comment


                  #9
                  it would be more than great to drop some lines here about this!

                  thankssss!!!

                  Comment


                    #10
                    I tried again just in case this was fixed with gwt 2.0.3 and smartgwt 2.3

                    var _3=this.getIFrameWindow();_3.assignHTML(_1);this.fireCallback(_2,["printPreview","callback"],[this,_2])}

                    this is what firebug says when I click again to get my print preview

                    _3.assignHTML is not a function

                    Line 3163

                    thanks in advance if you hace some advice on this

                    Comment

                    Working...
                    X