// Generated by the WebObjects Wizard Thu Jul 24 08:46:43 GMT 2003
//
// Created by cliveroberts on Thu Apr 01 2004
//
import com.webobjects.foundation.*;
import com.webobjects.appserver.*;
import com.webobjects.eocontrol.*;
import com.webobjects.eoaccess.*;
public class WORollover extends WOComponent {
public WORollover(WOContext context) {
super(context);
}
/*
* non synching component
*/
public boolean synchronizesVariablesWithBindings() {
return false;
}
/*
* stateless component
*/
public boolean isStateless() {
return true;
}
public String onMouseOver() {
String imageName = (String) valueForBinding("imageName");
return imageName + ".src=""Apple-style-span" face="Monaco" size="2"> + imageName + "_H.src;";
}
public String onMouseOut() {
String imageName = (String) valueForBinding("imageName");
return imageName + ".src=""Apple-style-span" face="Monaco" size="2"> + imageName + "_U.src;";
}
public String scriptString() {
String imageName = (String) valueForBinding("imageName");
String unhighlightedImage = (String) valueForBinding("unhighlightedImage");
String highlightedImage = (String) valueForBinding("highlightedImage");
WOResourceManager resourceManager = application().resourceManager();
String unhighlightedImageURL = resourceManager.urlForResourceNamed(unhighlightedImage, null, null, context().request());
String highlightedImageURL = resourceManager.urlForResourceNamed(highlightedImage, null, null, context().request());
String scriptString = imageName + "_U = new Image();\n" + imageName + "_U.src='';\n" + imageName + "_H = new Image();\n" + imageName + "_H.src='';\n";
return scriptString;
}
}