Splash Site Admin
Зарегистрирован: 09.11.2007 Сообщения: 228
|
Добавлено: Чт Мар 19, 2009 4:55 pm Заголовок сообщения: Day4 |
|
|
(!) No write rights by default to newly created application.
(!) "Relation" in table properties could be set to a table only if you click to a filter, but no to a header.
Standard logger:
final private String APPLOGGER = "maximo.application.ASSET"; // example
private MXLogger log;
Q: What is the difference between deployment by file and by folder? When do I need to rebuild maximo EAR?
A: Deploy a folder and you will not have to rebuild EARs each time.
(!) App.Designer - "Export System XML"
для дописывания своих левых методов в Mbo (например Detail) надо дописать abstract DetailRemote class
и там дописать этот метод.
Bean classes
from XML or app.designer
actions, buttins, etc with user interface
"Maximo Developer" can not create beans yet and it compile it to different folder.
Handy path: "C:\IBM\SMP\maximo\applications\maximo\maximouiweb\webmodule\WEB-INF\classes\custom\beans"
App.designer - show presentation - change class.
example: ... public int duplicate() - super.DUPLICATE; ... return 1;
REMOVE IT FROM BUSSINES OBJECTS! Only in Beans.
---
create a dialog (newasset.xml - write a dialog by own hands: class, section, buttons with mxevent, etc.):
package custom.beans.asset;
import java.rmi.RemoteException;
import psdi.app.asset.AssetRemote;
import psdi.util.MXException;
import psdi.webclient.system.beans.*;
import psdi.webclient.system.controller.Utility;
import psdi.webclient.system.controller.WebClientEvent;
public class newDialog extends psdi.webclient.system.beans.DataBean{
public Boolean duplicateDialog() {
AssetRemote asset=(AssetRemote) this.getMbo();
asset.Duplicate;
Utility.showMessageBox(this.sessionContext.getCurrentAsset(),"assetDuplicated",null);
Utility.sendEvent(new WebClientEvent("dialogclose",app.getCurrentPageId(),null,sessionContext);
}
}
---
package custom.beans.asset;
import java.rmi.RemoteException;
import psdi.app.asset.AssetRemote;
import psdi.mbo.MboSetRemote;
import psdi.util.MXApplicationException;
import psdi.util.MXException;
import psdi.webclient.beans.asset.WorkorderBean;
public class newAssetStatusBean extends WorkorderBean{
public synchronized int execute()
throws MXException, RemoteException
{
AssetRemote asset=(AssetRemote)app.getAppBean().getMbo();
if (asset.isNull("DESCRIPTION"))
throw new MXApplicationException("asset","descisnull");
else
return super.execute();
}
}
--- |
|