Skip to Content
avatar image
Former Member

Create Business Graphics at runtime

Hi,

I am trying to create a business graphic ui element at the runtime and I am getting an error after I bind it to context and so on. I was wondering if anyone else had done this or some code example to assure that I am doing it properly.

Thanks in advance.

Add comment
10|10000 characters needed characters exceeded

  • Follow
  • Get RSS Feed

5 Answers

  • avatar image
    Former Member
    Aug 04, 2004 at 11:35 PM

    I forgot to mention, I am getting an error:

    java.lang.NullPointerException

    at com.sap.tc.webdynpro.clientserver.uielib.graphics.impl.BusinessGraphics.putSimpleSeriesInGraphicsDC(BusinessGraphics.java:563)

    at com.sap.tc.webdynpro.clientserver.uielib.graphics.impl.BusinessGraphics.createData(BusinessGraphics.java:661)

    at com.sap.tc.webdynpro.clientserver.uielib.graphics.impl.BusinessGraphics.createImage(BusinessGraphics.java:682)

    at com.sap.tc.webdynpro.clientimpl.html.uielib.graphics.uradapter.BusinessGraphicsAdapter.getSrc(BusinessGraphicsAdapter.java:211)

    at com.sap.tc.webdynpro.clientimpl.html.renderer.uielements.ie6.ImageRenderer.render(ImageRenderer.java:45)

    at com.sap.tc.webdynpro.clientimpl.html.renderer.uielements.base.AbstractRenderManager.render(AbstractRenderManager.java:268)

    at com.sap.tc.webdynpro.clientimpl.html.renderer.uielements.base.AbstractRenderManager.render(AbstractRenderManager.java:94)

    at com.sap.tc.webdynpro.clientimpl.html.renderer.uielements.ie6.FlowLayoutRenderer.renderFlowLayoutItemFragment(FlowLayoutRenderer.java:167)

    at com.sap.tc.webdynpro.clientimpl.html.renderer.uielements.ie6.FlowLayoutRenderer.renderFlowLayoutFragment(FlowLayoutRenderer.java:138)

    at com.sap.tc.webdynpro.clientimpl.html.renderer.uielements.ie6.FlowLayoutRenderer.render(FlowLayoutRenderer.java:33)

    at com.sap.tc.webdynpro.clientimpl.html.renderer.uielements.base.AbstractRenderManager.render(AbstractRenderManager.java:268)

    at com.sap.tc.webdynpro.clientimpl.html.renderer.uielements.base.AbstractRenderManager.render(AbstractRenderManager.java:94)

    at com.sap.tc.webdynpro.clientimpl.html.renderer.uielements.ie6.ScrollContainerRenderer.renderScrollContainerFragment(ScrollContainerRenderer.java:235)

    at com.sap.tc.webdynpro.clientimpl.html.renderer.uielements.ie6.ScrollContainerRenderer.render(ScrollContainerRenderer.java:41)

    at com.sap.tc.webdynpro.clientimpl.html.renderer.uielements.base.AbstractRenderManager.render(AbstractRenderManager.java:268)

    at com.sap.tc.webdynpro.clientimpl.html.renderer.uielements.base.AbstractRenderManager.render(AbstractRenderManager.java:94)

    at com.sap.tc.webdynpro.clientimpl.html.renderer.uielements.ie6.GridLayoutRenderer.renderGridLayoutCellFragment(GridLayoutRenderer.java:609)

    at com.sap.tc.webdynpro.clientimpl.html.renderer.uielements.ie6.GridLayoutRenderer.renderGridLayoutRowFragment(GridLayoutRenderer.java:312)

    at com.sap.tc.webdynpro.clientimpl.html.renderer.uielements.ie6.GridLayoutRenderer.renderGridLayoutFragment(GridLayoutRenderer.java:250)

    at com.sap.tc.webdynpro.clientimpl.html.renderer.uielements.ie6.GridLayoutRenderer.render(GridLayoutRenderer.java:57)

    at com.sap.tc.webdynpro.clientimpl.html.renderer.uielements.base.AbstractRenderManager.render(AbstractRenderManager.java:268)

    at com.sap.tc.webdynpro.clientimpl.html.renderer.uielements.base.AbstractRenderManager.render(AbstractRenderManager.java:94)

    at com.sap.tc.webdynpro.clientimpl.html.renderer.uielements.ie6.ScrollContainerRenderer.renderScrollContainerFragment(ScrollContainerRenderer.java:235)

    at com.sap.tc.webdynpro.clientimpl.html.renderer.uielements.ie6.ScrollContainerRenderer.render(ScrollContainerRenderer.java:41)

    at com.sap.tc.webdynpro.clientimpl.html.renderer.uielements.base.AbstractRenderManager.render(AbstractRenderManager.java:268)

    .......bla bla bla.

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Aug 05, 2004 at 12:27 AM
    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Aug 05, 2004 at 05:54 AM

    Hi Michael,

    a easy way to check the necessary steps for runtime creation of arbitrary UIs is to build the UI (at least partially) at design time and have a look at the generated view class.

    To view this class you open the Package Explorer view and navigate to project->gen_wdp/packages-><yourPackage>.wdp->Internal<YourViewName>.java

    The method which builds the UI declared at design time is wdCreateUITree().

    Since you are not sure what's wrong, i suggest to build the BusinessGfx element at design time and when it works properly, look at the statements mentioned above.

    Hope that helps.

    Regards

    Stefan

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Aug 05, 2004 at 05:41 PM

    Hi Gentlemen,

    Thanks for your help. The content of the link is the same as in the WD Help for business graphics. It, unfortunately doesn't provide much help when it comes to runtime stuff, but thank you anyways.

    Stefan,

    I will look at that, and see if I can determine what I am doing wrong.

    Thanks,

    Michael

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Aug 06, 2004 at 04:35 PM

    Hi Stefan,

    I just wanted to thank you for your help. Your response was quite adequate in pointing me to the right direction and eventually finding my solution.

    Best Regards,

    Michael P.

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member

      Hi Michael,

      well, that was exactly my intention 😉

      Best regards,

      Stefan

      PS: Don't forget to mark the question answered, if you feel it is.