parent
155e3a3b54
commit
c487f3ea5a
@ -0,0 +1,54 @@
|
|||||||
|
package de.tvo.workplace;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
|
||||||
|
import org.eclnt.editor.annotations.CCGenClass;
|
||||||
|
import org.eclnt.workplace.IWorkpageDispatcher;
|
||||||
|
import org.eclnt.workplace.WorkpageDispatchedPageBean;
|
||||||
|
|
||||||
|
@CCGenClass (expressionBase="#{d.HomeBean}")
|
||||||
|
|
||||||
|
public class HomeBean
|
||||||
|
extends WorkpageDispatchedPageBean
|
||||||
|
implements Serializable
|
||||||
|
{
|
||||||
|
// ------------------------------------------------------------------------
|
||||||
|
// inner classes
|
||||||
|
// ------------------------------------------------------------------------
|
||||||
|
|
||||||
|
/* Listener to the user of the page bean. */
|
||||||
|
public interface IListener extends Serializable
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
// ------------------------------------------------------------------------
|
||||||
|
// members
|
||||||
|
// ------------------------------------------------------------------------
|
||||||
|
|
||||||
|
private IListener m_listener;
|
||||||
|
|
||||||
|
// ------------------------------------------------------------------------
|
||||||
|
// constructors & initialization
|
||||||
|
// ------------------------------------------------------------------------
|
||||||
|
|
||||||
|
public HomeBean(IWorkpageDispatcher dispatcher) {
|
||||||
|
super(dispatcher);
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getPageName() { return "/workplace/home.xml"; }
|
||||||
|
public String getRootExpressionUsedInPage() { return "#{d.HomeBean}"; }
|
||||||
|
|
||||||
|
// ------------------------------------------------------------------------
|
||||||
|
// public usage
|
||||||
|
// ------------------------------------------------------------------------
|
||||||
|
|
||||||
|
/* Initialization of the bean. Add any parameter that is required within your scenario. */
|
||||||
|
public void prepare(IListener listener)
|
||||||
|
{
|
||||||
|
m_listener = listener;
|
||||||
|
}
|
||||||
|
|
||||||
|
// ------------------------------------------------------------------------
|
||||||
|
// private usage
|
||||||
|
// ------------------------------------------------------------------------
|
||||||
|
}
|
||||||
@ -0,0 +1,71 @@
|
|||||||
|
package de.tvo.workplace;
|
||||||
|
|
||||||
|
import org.eclnt.workplace.WorkpageStartInfo;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* DE:
|
||||||
|
*
|
||||||
|
* EN:
|
||||||
|
*
|
||||||
|
*
|
||||||
|
* Program changes
|
||||||
|
* **************************************************************************************
|
||||||
|
* Date * Ticket * KonzFirm * Responsible * programmer *
|
||||||
|
* Change *
|
||||||
|
* **************************************************************************************
|
||||||
|
*
|
||||||
|
* @author VogelT
|
||||||
|
* @version 1.0
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
public class WorkpageDefaultStarterInfo extends WorkpageStartInfo {
|
||||||
|
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
// @XmlTransient
|
||||||
|
// private SessionVars m_sessionVars;
|
||||||
|
// @XmlTransient
|
||||||
|
// public SessionVars getSessionVars() { return m_sessionVars; }
|
||||||
|
// public void setSessionVars(SessionVars sessionVars) { m_sessionVars = sessionVars; }
|
||||||
|
//
|
||||||
|
// @XmlTransient
|
||||||
|
// private Rights m_rights;
|
||||||
|
// @XmlTransient
|
||||||
|
// public Rights getRights() { return m_rights; }
|
||||||
|
// public void setRights(Rights rights) { m_rights = rights; }
|
||||||
|
//
|
||||||
|
// //Merker Variable fuer das Menu
|
||||||
|
// @XmlTransient
|
||||||
|
// private String m_startPageBeanName;
|
||||||
|
// @XmlTransient
|
||||||
|
// public String getStartPageBeanName() {return m_startPageBeanName;}
|
||||||
|
// public void setStartPageBeanName(String startPageBeanName) {m_startPageBeanName = startPageBeanName;}
|
||||||
|
|
||||||
|
public WorkpageDefaultStarterInfo() {
|
||||||
|
super();
|
||||||
|
}
|
||||||
|
|
||||||
|
public WorkpageDefaultStarterInfo(WorkpageStartInfo wpsi) {
|
||||||
|
this.setCloseSupported(wpsi.getCloseSupported());
|
||||||
|
this.setComment(wpsi.getComment());
|
||||||
|
this.setDecorated(wpsi.isDecorated());
|
||||||
|
this.setExcludeFromSavePerspective(wpsi.getExcludeFromSavePerspective());
|
||||||
|
this.setFunctionClassName(wpsi.getFunctionClassName());
|
||||||
|
this.setId(wpsi.getId());
|
||||||
|
this.setImage(wpsi.getImage());
|
||||||
|
this.setJspPage(wpsi.getJspPage());
|
||||||
|
this.setOpenAsPopupByDefault(wpsi.getOpenAsPopupByDefault());
|
||||||
|
this.setOpenMultipleInstances(wpsi.getOpenMultipleInstances());
|
||||||
|
this.setPageBeanName(wpsi.getPageBeanName());
|
||||||
|
this.setPopupSupported(wpsi.getPopupSuppoted());
|
||||||
|
this.setSelectorTitle(wpsi.getSelectorTitle());
|
||||||
|
this.setStartSubWorkpageContainerId(wpsi.getStartSubWorkpageContainerId());
|
||||||
|
this.setText(wpsi.getText());
|
||||||
|
this.setWindowTitle(wpsi.getWindowTitle());
|
||||||
|
this.setParamMap(wpsi.getParamMap());
|
||||||
|
// this.m_rights = new GsonBuilder().create().fromJson(this.getParam("RIGHTS"), Rights.class);
|
||||||
|
// this.m_sessionVars = new GsonBuilder().create().fromJson(this.getParam("SESSIONVARS"), SessionVars.class);
|
||||||
|
//this.m_startPageBeanName = this.getParam("PAGEBEAN");
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@ -0,0 +1,168 @@
|
|||||||
|
package de.tvo.workplace;
|
||||||
|
|
||||||
|
import org.eclnt.workplace.WorkpageDefaultStarter;
|
||||||
|
|
||||||
|
public class WorkpageStarter extends WorkpageDefaultStarter {
|
||||||
|
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
private boolean m_test;
|
||||||
|
public boolean getTest() { return m_test; }
|
||||||
|
|
||||||
|
// @Override
|
||||||
|
// public IWorkpage startWorkpage(IWorkpageDispatcher workpageDispatcher, IWorkpageContainer workpageContainer, WorkpageStartInfo startInfo) {
|
||||||
|
// try {
|
||||||
|
// //System.out.println("startWorkpage Juhu: " + startInfo.getWindowTitle());
|
||||||
|
// if ((startInfo instanceof WorkpageDefaultStarterInfo)) {
|
||||||
|
// DefaultWorkplaceBean wui = DefaultWorkplaceBean.findWorkplaceUIOfSession();
|
||||||
|
// try {
|
||||||
|
// if (wui != null) {
|
||||||
|
// wui.hideNavigation();
|
||||||
|
// }
|
||||||
|
// } catch (Exception e) {
|
||||||
|
// e.printStackTrace();
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
// if (startInfo.getOpenMultipleInstances() == false) {
|
||||||
|
// IWorkpage wp = workpageContainer.getWorkpageForId(startInfo.getId());
|
||||||
|
// if (wp != null) {
|
||||||
|
// switchToAlreadyOpenedWorkpage(workpageDispatcher,workpageContainer,wp);
|
||||||
|
// return wp;
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
// if (!(startInfo instanceof WorkpageDefaultStarterInfo)) {
|
||||||
|
// startInfo = new WorkpageDefaultStarterInfo(startInfo);
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
//
|
||||||
|
// // Load Rechte
|
||||||
|
// WorkpageDefaultStarterInfo workpageGeisStarterInfo = (WorkpageDefaultStarterInfo)startInfo;
|
||||||
|
// SessionVars sessionVars = workpageGeisStarterInfo.getSessionVars();
|
||||||
|
// m_test = WorkplaceConfig.getWorkplaceEnvironment();
|
||||||
|
//
|
||||||
|
// String progNodeId = workpageGeisStarterInfo.getParam(StarterInfoParm.NODEKNID.name());
|
||||||
|
// if (progNodeId == null || progNodeId.equals("") || progNodeId.equals("null")) {
|
||||||
|
// Statusbar.outputError("progNodeId: \"" + progNodeId + "\"");
|
||||||
|
// //System.out.println("progNodeId: \"" + progNodeId + "\"");
|
||||||
|
// //progNodeId = "0";
|
||||||
|
// }
|
||||||
|
// String mandantID = workpageGeisStarterInfo.getParam(StarterInfoParm.MANDANTID.name());
|
||||||
|
// if (mandantID == null || mandantID.equals("") || mandantID.equals("null")) {
|
||||||
|
// Statusbar.outputError("mandantID prüfen: \"" + mandantID + "\"");
|
||||||
|
// //System.out.println("mandantID prüfen: \"" + mandantID + "\"");
|
||||||
|
// //mandantID = "0";
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
// //System.out.println("progNodeId: " + progNodeId);
|
||||||
|
// //System.out.println("mandantID: " + mandantID);
|
||||||
|
// Long usrid = sessionVars.getGpuser().getUsid();
|
||||||
|
// List<Long> groupIdList = RightsInfo.getUserIdGroupsIdMap().get(usrid);
|
||||||
|
//
|
||||||
|
// //#463804 Geisportal - Fehler beim Programmstart
|
||||||
|
// if (groupIdList == null) {
|
||||||
|
// Method staticMethod = RightsInfo.class.getDeclaredMethod("loadAllGroupsFromUser", Long.class);
|
||||||
|
// staticMethod.setAccessible(true);
|
||||||
|
// staticMethod.invoke(null, usrid);
|
||||||
|
//
|
||||||
|
//
|
||||||
|
// staticMethod = RightsInfo.class.getDeclaredMethod("loadAllMandantsFromUser", Long.class);
|
||||||
|
// staticMethod.setAccessible(true);
|
||||||
|
// staticMethod.invoke(null, usrid);
|
||||||
|
//
|
||||||
|
// groupIdList = RightsInfo.getUserIdGroupsIdMap().get(usrid);
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
// Rights rights = getRightsHandler().loadRights(usrid, groupIdList, Long.parseLong(progNodeId), Long.parseLong(mandantID));
|
||||||
|
//
|
||||||
|
// workpageGeisStarterInfo.setRights(rights);
|
||||||
|
// workpageGeisStarterInfo.setSessionVars(sessionVars);
|
||||||
|
//
|
||||||
|
// for (PropertyInfo propertyInfo : rights.getModulProperties()) {
|
||||||
|
// if(propertyInfo.getPropertyKey().trim().equals("SERVER_START") && propertyInfo.getPropertyStatus() == PropertyStatus.ACTIV) {
|
||||||
|
// System.out.println("RemoteStartBean: " + propertyInfo.getPropertyValue());
|
||||||
|
// startInfo.setPageBeanName("RemoteStartBean");
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
// //MK: Wir merken unds hier die Eigendlich Klasse die gestartet werden soll, dies weird dann vom Menu mitgeladen und wieder zurueckgesetzt
|
||||||
|
// workpageGeisStarterInfo.setStartPageBeanName(startInfo.getPageBeanName());
|
||||||
|
//
|
||||||
|
// if (!workpageGeisStarterInfo.getParamMap().containsKey("POPUP")) {
|
||||||
|
// //MK: Wir oeffnen das Menu das called dann das Eigendliche Programm.
|
||||||
|
// startInfo.setPageBeanName("PortalMenuBean");
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
// try {
|
||||||
|
// if (SessionUtil.getHttpSessionID().contains(".") && !workpageGeisStarterInfo.getStartPageBeanName().equals("FavoritsUI")) {
|
||||||
|
// Gpopenapps openedApp = new Gpopenapps();
|
||||||
|
// openedApp.setOaportal("Webportal");
|
||||||
|
// openedApp.setOaserver(SessionUtil.getServerHostname());
|
||||||
|
// openedApp.setOatomcat(SessionUtil.getHttpSessionID().split("\\.")[1]);
|
||||||
|
// openedApp.setOapversion(WorkplaceVersion.getPortalVersion());
|
||||||
|
// openedApp.setOatest(WorkplaceConfig.getWorkplaceEnvironment() ? 1 : 0);
|
||||||
|
//
|
||||||
|
// boolean collectUserInfo = PIC_AppHistoryBean.logUserData;;
|
||||||
|
// if (collectUserInfo) {
|
||||||
|
// UserLoginInfo userLoginInfo = SessionHandler.getSessionIDUserLoginInfoMap().get(sessionVars.getSessionID());
|
||||||
|
// openedApp.setOaclientip(userLoginInfo.getClientIP());
|
||||||
|
// openedApp.setOauser(userLoginInfo.getGpuser().getUsusern());
|
||||||
|
// openedApp.setOasession(userLoginInfo.getSessionTyp().name());
|
||||||
|
// openedApp.setOalogin(userLoginInfo.getLoginType().name());
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
// openedApp.setOabeanname(workpageGeisStarterInfo.getStartPageBeanName());
|
||||||
|
// openedApp.setOabeantitl(workpageGeisStarterInfo.getSelectorTitle());
|
||||||
|
//
|
||||||
|
// openedApp.setCrtime(new Date());
|
||||||
|
//
|
||||||
|
// new DBHandler(WorkplaceConfig.getWorkplaceEnvironment() ? SchemataENUM.GEISWPT : SchemataENUM.GEISWPE).insertObject(openedApp);
|
||||||
|
// }
|
||||||
|
// } catch (Throwable t) {
|
||||||
|
// t.printStackTrace();
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
// } catch (Exception e) {
|
||||||
|
// e.printStackTrace();
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
// return super.startWorkpage(workpageDispatcher, workpageContainer, startInfo);
|
||||||
|
// }
|
||||||
|
|
||||||
|
|
||||||
|
// RightsHandler m_rightsHandler;
|
||||||
|
// public RightsHandler getRightsHandler() {
|
||||||
|
// if (m_rightsHandler == null) {
|
||||||
|
// m_rightsHandler = new RightsHandler(getTest());
|
||||||
|
// }
|
||||||
|
// return m_rightsHandler;
|
||||||
|
// }
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Called if an error occurs when starting a page bean. The page bean may
|
||||||
|
* e.g. throw an Exception/Error within the constructor.
|
||||||
|
* <br><br>
|
||||||
|
* Default behavior, implemented in this class: the message of the error
|
||||||
|
* is output as OKPopup, so that the user gest notified. - You may override
|
||||||
|
* this method in order to output the error information in some different
|
||||||
|
* way.
|
||||||
|
*/
|
||||||
|
// @Override
|
||||||
|
// protected void reactOnProblemDuringWorkpageStart(Throwable t) {
|
||||||
|
// while (true) {
|
||||||
|
// if (t.getCause() == null) {
|
||||||
|
// break;
|
||||||
|
// } else {
|
||||||
|
// t = t.getCause();
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
// if (t instanceof NullPointerException && t.getMessage().equals("null")) {
|
||||||
|
// //Hier läuft das Portal rein, wenn eine Anwendung sich beim Programmstart automatisch schließt
|
||||||
|
// //z. B. bei Locks bei Semikron oder deaktivierten VDA-Lieferanten in der Erfassung
|
||||||
|
// } else {
|
||||||
|
// OKPopup.createInstance("", t.getMessage());
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
// }
|
||||||
|
}
|
||||||
@ -0,0 +1,9 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<t:layoutdefinition xmlns:t="http://www.CaptainCasa.com/controllibrary/t" >
|
||||||
|
|
||||||
|
<t:beanprocessing id="g_1" beanbinding="#{d.HomeBean}" />
|
||||||
|
<t:rowtitlebar id="g_2" text="Home" />
|
||||||
|
<t:rowheader id="g_3" />
|
||||||
|
<t:rowbodypane id="g_4" />
|
||||||
|
|
||||||
|
</t:layoutdefinition>
|
||||||
Loading…
Reference in new issue