Announcement

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

    Calling Canvas.showPrintPreview() giving error

    java.lang.IllegalStateException: Cannot change configuration property 'ID' to isc_Window_2 now that component isc_Window_2 has been created.

    Window w = new Window();
    w.setShowCloseButton(true);
    w.setWidth("90%");
    w.setHeight("90%");
    w.centerInPage();
    Canvas.showPrintPreview(new Object[]{printGrid}, null, constants.printPreview(), null, w, constants.print());

    What is wrong with above code, what can i do to resolve this problem




    #2
    Please help on this

    Comment


      #3
      As the error message states, it looks like you are somehow, directly or indirectly, trying to call setID() on a component that has already been drawn or created.

      Your code doesn't show an obvious error, so if you suspect a framework issue, we need a way to reproduce the problem.

      See the FAQ and the Debugging overview to understand what you need to post. You are also missing required basics such as what product and version you are using, what browser, contents of the Developer Console, etc.

      Comment


        #4
        Thank you for the reply
        i just created a button and on click of that i am calling above lines of code nothing more then that, so if i am calling setID() indirectly also how do i track it where exactly its calling.
        is there any way i can track it. apart from this i am not doing anything extra

        Comment


          #5
          We can't run your code, since it depends on other code you haven't shown. So we need a way to reproduce the problem.

          It looks like you, at best, skimmed over the FAQ and Debugging overview, since you're still failing to post anything that would allow us to help you. You should revisit those now.

          Comment

          Working...
          X