<%RemovableStorageEventListener listener = new RemovableStorageEventListener() {
public void inserted(Storage storage) {%>
enableButton();
<%}
public void removed(Storage storage) {%>
disableButton();
<%} };
BundleContext bc = AppManager.getInstance().getBundleContext();
StorageManager sm = StorageManager.getInstance(KSFUtility.getInstance().getApplicationContext(bc));
sm.addListener(listener);
%>
我在 Start_jsp.java 中收到错误
out.write("\n\t\tenableButton();\n\t"); 和 out.write("\n\t\tdisableButton();\n\t");
RemovableStorageEventListener listener = new RemovableStorageEventListener() {
public void inserted(Storage storage) {
out.write("\n\t\tenableButton();\n\t");
}
public void removed(Storage storage) {
out.write("\n\t\tdisableButton();\n\t");
} };
BundleContext bc = AppManager.getInstance().getBundleContext();
StorageManager sm = StorageManager.getInstance(KSFUtility.getInstance().getApplicationContext(bc));
sm.addListener(listener);
这是我的 javascript
function enableButton(){
document.getElementById('scan').disabled=false;
}
function disableButton(){
document.getElementById('scan').disabled=true;
}