Technology Blogs by Members
Explore a vibrant mix of technical expertise, industry insights, and tech buzz in member blogs covering SAP products, technology, and events. Get in the mix!
cancel
Showing results for 
Search instead for 
Did you mean: 
govardan_raj
Contributor
780

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

3 Comments
Labels in this area