Quantcast
Channel: SCN : All Content - Web Dynpro Java
Viewing all articles
Browse latest Browse all 1288

Setting the IGS URL of Buisness Graphics at Run Time

$
0
0

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


Viewing all articles
Browse latest Browse all 1288

Latest Images

Trending Articles



Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>