cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

GenerateWebSite() call in Java

Solved
Highlighted
Occasional Contributor

GenerateWebSite() call in Java

Hi,

 

I am trying to autogenerate the website in java.

But when I call GenerateWebSite() method, it says "the method GenerateWebSite() is undefined for the type MegaObject".

Below the code snippet:

 

MegaObject oWebs = null;

cWebs = oMegaRoot.getCollection("Web Site");
sWebSite = properties.getProperty("WebSiteNm");
if (cWebs.size() > 0) {
// Get existing web site ojbet (we assume that is can be

oWebs = cWebs.get(sWebSite);


// trigger web site generation

System.out.println("Website Name..." + sWebSite);
System.out.println("Starting the website generation..."
+ date.toString());

 

oWebs.GenerateWebSite();

 

Please advice on this

 

2 Replies
Highlighted

Re: GenerateWebSite() call in Java

Hi,

 

To autogenerate website in java, you can do this:

 

MegaCollection cWebs = oMegaRoot.getCollection("Web Site");

MegaObject oWeb = cWebs.item("WebSiteNm");

oWeb.invokeMethod("GenerateWebsite");

 

 

<script id="F5_watermark"></script>
Highlighted
Occasional Contributor

Re: GenerateWebSite() call in Java

thxs..:)

It worked