@ -0,0 +1,107 @@
|
|||||||
|
package de.geis.portal.workplace.layout;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
|
||||||
|
import org.eclnt.jsfserver.resources.ResourceManager;
|
||||||
|
|
||||||
|
public class DefaultLayout implements LayoutInterface, Serializable {
|
||||||
|
|
||||||
|
private static final long serialVersionUID = 2030247226246332983L;
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String getLogoPathTop() {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String getLogoPathLeft() {
|
||||||
|
return "/images/logos/geis.png";
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String getTitelText() {
|
||||||
|
return ResourceManager.getRuntimeInstance().readProperty("literalsWorkplace", "titeldefaultportal");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String getTitel2Text() {
|
||||||
|
return ResourceManager.getRuntimeInstance().readProperty("literalsWorkplace", "titeldefaultportal2");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String getTitelTopText() {
|
||||||
|
return "Webportal - Geis Gruppe";
|
||||||
|
}
|
||||||
|
|
||||||
|
// Update from MainBean showLogin()
|
||||||
|
private String m_impressumLink = null; //"https://geis-group.eu/impressum";
|
||||||
|
@Override
|
||||||
|
public String getImpressumLink() {
|
||||||
|
return m_impressumLink;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Update from MainBean showLogin()
|
||||||
|
private String m_kontaktLink = null; //"https://geis-group.eu/kontakt";
|
||||||
|
@Override
|
||||||
|
public String getKontaktLink() {
|
||||||
|
return m_kontaktLink;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
private String m_countryLanguage = "de_DE";
|
||||||
|
@Override
|
||||||
|
public String getCountryLanguage() {
|
||||||
|
return m_countryLanguage;
|
||||||
|
}
|
||||||
|
public void updateCountryLanguageAndLinks(String countryLanguage) {
|
||||||
|
this.m_countryLanguage = countryLanguage;
|
||||||
|
updateKontaktAndImpressumLink(countryLanguage);
|
||||||
|
}
|
||||||
|
|
||||||
|
private void updateKontaktAndImpressumLink(String countryLanguage) {
|
||||||
|
// System.out.println("updateKontaktAndImpressumLink: " + countryLanguage);
|
||||||
|
switch (countryLanguage) {
|
||||||
|
case "de_DE":
|
||||||
|
m_kontaktLink = "https://geis-group.eu/kontakt";
|
||||||
|
m_impressumLink = "https://geis-group.eu/impressum";
|
||||||
|
break;
|
||||||
|
|
||||||
|
case "en_US":
|
||||||
|
m_kontaktLink = "https://geis-group.eu/en/contact";
|
||||||
|
m_impressumLink = "https://geis-group.eu/en/imprint";
|
||||||
|
break;
|
||||||
|
|
||||||
|
case "cs_CZ":
|
||||||
|
m_kontaktLink = "https://geis-group.eu/en/contact";
|
||||||
|
m_impressumLink = "https://geis-group.eu/en/imprint";
|
||||||
|
break;
|
||||||
|
|
||||||
|
case "pl_PL":
|
||||||
|
m_kontaktLink = "https://geis-group.eu/en/contact";
|
||||||
|
m_impressumLink = "https://geis-group.eu/en/imprint";
|
||||||
|
break;
|
||||||
|
|
||||||
|
default:
|
||||||
|
m_kontaktLink = "https://geis-group.eu/kontakt";
|
||||||
|
m_impressumLink = "https://geis-group.eu/impressum";
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean getShowLogoRight() {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean getShowGTMS() {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean getShowLOG() {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@ -0,0 +1,17 @@
|
|||||||
|
package de.geis.portal.workplace.layout;
|
||||||
|
|
||||||
|
public interface LayoutInterface {
|
||||||
|
|
||||||
|
public String getLogoPathTop();
|
||||||
|
public String getLogoPathLeft();
|
||||||
|
public String getTitelTopText();
|
||||||
|
public String getTitelText();
|
||||||
|
public String getTitel2Text();
|
||||||
|
public String getImpressumLink();
|
||||||
|
public String getKontaktLink();
|
||||||
|
public String getCountryLanguage();
|
||||||
|
public boolean getShowLogoRight();
|
||||||
|
public boolean getShowGTMS();
|
||||||
|
public boolean getShowLOG();
|
||||||
|
|
||||||
|
}
|
||||||
@ -0,0 +1,35 @@
|
|||||||
|
package de.geis.portal.workplace.layout;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
|
||||||
|
import org.eclnt.jsfserver.util.HttpSessionAccess;
|
||||||
|
|
||||||
|
import jakarta.servlet.http.HttpServletRequest;
|
||||||
|
|
||||||
|
public class LayoutManager implements Serializable {
|
||||||
|
|
||||||
|
private static final long serialVersionUID = 1722243909044740449L;
|
||||||
|
|
||||||
|
public static final DefaultLayout getLayoutObject() {
|
||||||
|
|
||||||
|
HttpServletRequest request = HttpSessionAccess.getCurrentRequest();
|
||||||
|
String url = request.getHeader("eclnt-originalurl");
|
||||||
|
|
||||||
|
// System.out.println("eclnt-originalurl: " + url);
|
||||||
|
|
||||||
|
// if (url != null && url.contains("g-tms")) {
|
||||||
|
// return new GtmsLayout();
|
||||||
|
// } else if (url != null && (url.contains("ccp.") || url.contains("ccp-test."))) {
|
||||||
|
// return new GtmsLayout();
|
||||||
|
// } else if (url != null && url.contains("geis")) {
|
||||||
|
// //Geis must be last one
|
||||||
|
// return new GeisLayout();
|
||||||
|
// } else if (url != null && (url.contains("okay") || url.contains("husqvarna"))) {
|
||||||
|
// //Geis must be last one
|
||||||
|
// return new DefaultLayout();
|
||||||
|
// } else {
|
||||||
|
return new DefaultLayout();
|
||||||
|
// }
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@ -0,0 +1,134 @@
|
|||||||
|
package de.tvo.workplace;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
|
||||||
|
import org.eclnt.editor.annotations.CCGenClass;
|
||||||
|
import org.eclnt.jsfserver.elements.util.Trigger;
|
||||||
|
import org.eclnt.jsfserver.pagebean.IPageBean;
|
||||||
|
import org.eclnt.jsfserver.util.HttpSessionAccess;
|
||||||
|
import org.eclnt.workplace.IWorkpageDispatcher;
|
||||||
|
import org.eclnt.workplace.WorkpageDispatchedPageBean;
|
||||||
|
|
||||||
|
import de.geis.portal.workplace.layout.DefaultLayout;
|
||||||
|
import de.geis.portal.workplace.layout.LayoutManager;
|
||||||
|
import jakarta.servlet.http.HttpSession;
|
||||||
|
|
||||||
|
@CCGenClass (expressionBase="#{d.MainPage}")
|
||||||
|
|
||||||
|
public class MainPage extends WorkpageDispatchedPageBean implements Serializable {
|
||||||
|
|
||||||
|
private boolean DEBUG = false;
|
||||||
|
|
||||||
|
boolean m_mobileDevice = false;
|
||||||
|
|
||||||
|
public boolean getMobileDevice() { return m_mobileDevice; }
|
||||||
|
|
||||||
|
public void setMobileDevice(boolean value) { m_mobileDevice = value; }
|
||||||
|
|
||||||
|
Trigger m_scriptTrigger = new Trigger();
|
||||||
|
|
||||||
|
public Trigger getScriptTrigger() { return m_scriptTrigger; }
|
||||||
|
|
||||||
|
String m_scriptText;
|
||||||
|
|
||||||
|
public String getScriptText() { return m_scriptText; }
|
||||||
|
|
||||||
|
public void setScriptText(String value) { m_scriptText = value; }
|
||||||
|
|
||||||
|
String m_title;
|
||||||
|
|
||||||
|
public String getTitle() { return m_title; }
|
||||||
|
|
||||||
|
public void setTitle(String value) { m_title = value; }
|
||||||
|
|
||||||
|
boolean m_confirmExit = false;
|
||||||
|
|
||||||
|
public boolean getConfirmExit() { return m_confirmExit; }
|
||||||
|
|
||||||
|
public void setConfirmExit(boolean value) { m_confirmExit = value; }
|
||||||
|
|
||||||
|
private static final long serialVersionUID = 2944301072965627253L;
|
||||||
|
|
||||||
|
private IPageBean currentPage = null;
|
||||||
|
|
||||||
|
public IPageBean getCurrentPage() { return currentPage; }
|
||||||
|
|
||||||
|
public void setCurrentPage(IPageBean currentPage) { this.currentPage = currentPage; }
|
||||||
|
|
||||||
|
public DefaultLayout layout = LayoutManager.getLayoutObject();
|
||||||
|
|
||||||
|
public DefaultLayout getLayout() { return layout; }
|
||||||
|
|
||||||
|
|
||||||
|
// ------------------------------------------------------------------------
|
||||||
|
// inner classes
|
||||||
|
// ------------------------------------------------------------------------
|
||||||
|
|
||||||
|
/* Listener to the user of the page bean. */
|
||||||
|
public interface IListener extends Serializable {
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
// ------------------------------------------------------------------------
|
||||||
|
// members
|
||||||
|
// ------------------------------------------------------------------------
|
||||||
|
|
||||||
|
private IListener m_listener;
|
||||||
|
|
||||||
|
// ------------------------------------------------------------------------
|
||||||
|
// constructors & initialization
|
||||||
|
// ------------------------------------------------------------------------
|
||||||
|
|
||||||
|
public MainPage(IWorkpageDispatcher workpageDispatcher) {
|
||||||
|
super(workpageDispatcher);
|
||||||
|
showDefaultWorkplace();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@SuppressWarnings("unused")
|
||||||
|
private void showDefaultWorkplace() {
|
||||||
|
DefaultWorkplaceBean dwp = new DefaultWorkplaceBean(getOwningDispatcher(), layout); //, getSessionVars());
|
||||||
|
|
||||||
|
DefaultWorkplaceBean.IListener listener = new DefaultWorkplaceBean.IListener() {
|
||||||
|
|
||||||
|
private static final long serialVersionUID = -4934826046496488251L;
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void logout() {
|
||||||
|
HttpSession httpSession = HttpSessionAccess.getCurrentHttpSession();
|
||||||
|
String sessionID = httpSession.getId();
|
||||||
|
//SessionHandler.logoutSession(sessionID);
|
||||||
|
|
||||||
|
try {
|
||||||
|
//showLogin();
|
||||||
|
} catch (IllegalStateException ise) {
|
||||||
|
if (!ise.getMessage().equals("getAttribute: Session already invalidated") && !ise.getMessage().equals("getAttribute: Session already invalidated")) {
|
||||||
|
ise.printStackTrace();
|
||||||
|
}
|
||||||
|
} catch (Exception e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
dwp.prepare(listener);
|
||||||
|
currentPage = dwp;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getPageName() { return "/main.xml"; }
|
||||||
|
public String getRootExpressionUsedInPage() { return "#{d.MainPage}"; }
|
||||||
|
|
||||||
|
// ------------------------------------------------------------------------
|
||||||
|
// 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
|
||||||
|
// ------------------------------------------------------------------------
|
||||||
|
}
|
||||||
|
After Width: | Height: | Size: 10 KiB |
|
After Width: | Height: | Size: 181 KiB |
|
After Width: | Height: | Size: 176 KiB |
|
After Width: | Height: | Size: 21 KiB |
|
After Width: | Height: | Size: 121 KiB |
|
After Width: | Height: | Size: 106 KiB |
|
After Width: | Height: | Size: 32 KiB |
|
After Width: | Height: | Size: 132 KiB |
|
After Width: | Height: | Size: 61 KiB |
|
After Width: | Height: | Size: 337 KiB |
|
After Width: | Height: | Size: 24 KiB |
|
After Width: | Height: | Size: 50 KiB |
|
After Width: | Height: | Size: 101 KiB |
|
After Width: | Height: | Size: 462 B |
|
After Width: | Height: | Size: 9.2 KiB |
|
After Width: | Height: | Size: 6.7 KiB |
|
After Width: | Height: | Size: 339 B |
|
After Width: | Height: | Size: 330 B |
|
After Width: | Height: | Size: 610 B |
|
After Width: | Height: | Size: 599 B |
|
After Width: | Height: | Size: 346 B |
|
After Width: | Height: | Size: 342 B |
|
After Width: | Height: | Size: 589 B |
|
After Width: | Height: | Size: 577 B |
|
After Width: | Height: | Size: 296 B |
|
After Width: | Height: | Size: 282 B |
|
After Width: | Height: | Size: 417 B |
|
After Width: | Height: | Size: 405 B |
|
After Width: | Height: | Size: 309 B |
|
After Width: | Height: | Size: 300 B |
|
After Width: | Height: | Size: 567 B |
|
After Width: | Height: | Size: 551 B |
|
After Width: | Height: | Size: 204 B |
|
After Width: | Height: | Size: 198 B |
|
After Width: | Height: | Size: 243 B |
|
After Width: | Height: | Size: 242 B |
|
After Width: | Height: | Size: 232 B |
|
After Width: | Height: | Size: 226 B |
|
After Width: | Height: | Size: 290 B |
|
After Width: | Height: | Size: 285 B |
|
After Width: | Height: | Size: 407 B |
|
After Width: | Height: | Size: 386 B |
|
After Width: | Height: | Size: 789 B |
|
After Width: | Height: | Size: 760 B |
|
After Width: | Height: | Size: 316 B |
|
After Width: | Height: | Size: 305 B |
|
After Width: | Height: | Size: 494 B |
|
After Width: | Height: | Size: 474 B |
|
After Width: | Height: | Size: 272 B |
|
After Width: | Height: | Size: 263 B |
|
After Width: | Height: | Size: 348 B |
|
After Width: | Height: | Size: 342 B |
|
After Width: | Height: | Size: 1.2 KiB |
|
After Width: | Height: | Size: 1.1 KiB |
|
After Width: | Height: | Size: 1.2 KiB |
|
After Width: | Height: | Size: 1.2 KiB |
|
After Width: | Height: | Size: 1.3 KiB |
|
After Width: | Height: | Size: 1.3 KiB |
|
After Width: | Height: | Size: 1.3 KiB |
|
After Width: | Height: | Size: 1.4 KiB |
|
After Width: | Height: | Size: 293 B |
|
After Width: | Height: | Size: 285 B |
|
After Width: | Height: | Size: 493 B |
|
After Width: | Height: | Size: 476 B |
|
After Width: | Height: | Size: 332 B |
|
After Width: | Height: | Size: 325 B |
|
After Width: | Height: | Size: 562 B |
|
After Width: | Height: | Size: 555 B |
|
After Width: | Height: | Size: 1.4 KiB |
|
After Width: | Height: | Size: 1.4 KiB |
|
After Width: | Height: | Size: 154 B |
|
After Width: | Height: | Size: 144 B |
|
After Width: | Height: | Size: 144 B |
|
After Width: | Height: | Size: 146 B |
|
After Width: | Height: | Size: 182 B |
|
After Width: | Height: | Size: 179 B |
|
After Width: | Height: | Size: 241 B |
|
After Width: | Height: | Size: 235 B |
|
After Width: | Height: | Size: 407 B |
|
After Width: | Height: | Size: 400 B |
|
After Width: | Height: | Size: 266 B |
|
After Width: | Height: | Size: 257 B |
|
After Width: | Height: | Size: 399 B |
|
After Width: | Height: | Size: 395 B |
|
After Width: | Height: | Size: 293 B |
|
After Width: | Height: | Size: 290 B |
|
After Width: | Height: | Size: 497 B |
|
After Width: | Height: | Size: 494 B |
|
After Width: | Height: | Size: 189 B |
|
After Width: | Height: | Size: 193 B |
|
After Width: | Height: | Size: 217 B |
|
After Width: | Height: | Size: 220 B |
|
After Width: | Height: | Size: 337 B |