Announcement

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

    #16
    Means I will have to create HTMLFlow for each HLayout then add them to a seperate VLayout and set this VLayout to Canvas.showPrintPreview().

    I thought there would be some easier way to do this.

    Comment


      #17
      No, there is no need to do that. There should be a single call to getPrintHTML() and that result is placed in the HTMLFlow, that's it.

      Comment


        #18
        Single getPrintHTML call to HLayout? If possible can you give the sample code that would be much more helpful.

        Comment


          #19
          ?? Your code above in #13 already shows such a call?

          It doesn't look like you've actually tried creating an HTMLFlow and drawing it. Please actually try this; we'll revisit this thread with further help tomorrow if needed.

          Comment


            #20
            I have been using smartGWT from last 15 months and yes I have used HTMLFlow on few places to display custome html code.

            I need to customize the generated HTML of child elements(i.e. HLayout) of VLayout. I set this VLayout directly to my Canvas.showPrintPreview() method call which will internally call the getPrintHTML of my VLayout. What I am unable to understand is as you mentioned in post#17 that we can do all these by just one single call to getPrintHTML(). How?

            Comment


              #21
              I am waiting for the reply, we have to deliver it to our client in few days so I would appreciate a detailed reply on my below query.

              Comment


                #22
                If you just need to omit certain controls that are contained in the HLayout, you can do so via the PrintProperties argument of getPrintHTML, specifically, setOmitControls().

                If you need to do something more to the HTML of each individual component, you can potentially have one call to getPrintHTML, and then use standard Java string techniques (indexOf(), etc) to manipulate the string.

                If you need to something more or different or manipulating the String of printed HTML after the fact is awkward, then yes, you will need multiple calls to getPrintHTML().

                Comment

                Working...
                X