Hello all-
Jeff Graham started a thread here [
forum.mysnip.de] discussing the relative merits of Activex as compared to java and/or .NET. In that thread I mentioned a simple WB project I have that utiilzes a java applet that was written in WD to retrieve workstation information for the system accessing the WB app, such as windows username and/or workstation name.
This was a basic project that Fabrice worked on to utilize the cross-platform functionality of WD/WB. The WD project can be downloaded here [
www.windev-us.com]
On the WB side, all that was necessary was to define a java applet control on the page that accessed the .jar archive. You can then reference the global variable from the WD applet through the following browser javascript procedure:
function GetAppletVariable(sAppletFieldName,sVariableName)
// Javascript function (browser) in charge of geting the value of a global variable declared in awindev generated java aplet
//- sAppletFieldNale is the name of the Java applet field in the page
//- sVariableName is the name fo the variable we want to retrieve
//
// Example:
// Info(GetAppletVariable("JAVA_Get_User_Info","gsWindowsUserName"))
{
//Get the pllat in a vailable
var AppletField = document.applets[sAppletFieldName];
//Applet OK ?
if (AppletField != null)
{
return eval("AppletField.get"+sVariableName+"()");
}
else
{
//Returns an empty string
return "";
}
}
This is a fairly simple example but it does show how the two products can work together to complement each other.
Hopefully this may help someone.
Regards,
-Marc