Hi to All ,

This blog is very simple about the buisness graphics , in general the IGS URL property of Buisness graphics cannot be binded to any context value attribute ,and now we have a requirement to change the URL at RUN time , i.e when you we want to deploy our application from development to quality and then to another server we have to change the IGS URL property and deploy which is tedious .

Hence we can resolve the issue by maintaining the IGS URL in the KM content of the respective Server ,

In KM Content ->documents-> Create a new XML file , here maintain the URL as

<graphics>

<igsurl>http://host:port/</igsurl>

</graphics>

in a Utils dc or a common dc , create a method to read the content of KM , so that igsurl value is obtained .

create a common gloabal variable of type string in the

//@@begin others

String igsURL_globalVariable = “”;

  //@@end

In Component Controller create one method , which access the utils dc km content reading method and returns the value read. here in our case it is igsurl .

public java.lang.String getURL( )

  {

    //@@begin getURL()

    String urlofIGSatKMContent;

    try

    {

      urlofIGSatKMContent = wdThis.wdget***Interface().getKMdata(“/document/info.xml”,”/graphics/igsurl”);

 

    }catch(Exception e)

    {

 

    }finally

    {

    return urlofIGSatKMContent;

    }

    //@@end

  }

now in doInit() of the view , call this method and set the obtained igsurl value to the global variable  igsURL_globalVariable .

Now in the view in which the buisness Graphics is inserted , go to wdDoModifyView()

if(firstTime)

{

  IWDBusinessGraphics graphics = (IWDBusinessGraphics)view.getElement(“BusinessGraphics”);

  graphics.setIgsUrl(“http://host:port/“);

}

in this way we can set the IGSURL dynamically at Run TIme.

Regards

Govardan

To report this post you need to login first.

3 Comments

You must be Logged on to comment or reply to a post.

      1. Jun Wu

        i don’t think you get it.

        wdj know which url to call, no need to set the url.

        unless, your igs and wdj are not the same server.

        (0) 

Leave a Reply