Skip to Content
Author's profile photo GOVARDAN RAJ SHAMANNA

Setting the IGS URL of Buisness Graphics at Run Time

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

Assigned Tags

      3 Comments
      You must be Logged on to comment or reply to a post.
      Author's profile photo Jun Wu
      Jun Wu

      are you sure it is required?

      in my memory, there is no need to set the url,

      Author's profile photo GOVARDAN RAJ SHAMANNA
      GOVARDAN RAJ SHAMANNA
      Blog Post Author

      yes it it required when u r moving the same application haing business graphics from development to quality .

      Author's profile photo Jun Wu
      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.