master
VogelT 1 year ago
parent 0728b70466
commit 155e3a3b54

@ -27,7 +27,7 @@
<properties>
<!-- This is the CaptainCasa version to be used. -->
<cc.version>20240820_2</cc.version>
<cc.version>20240910</cc.version>
</properties>
<dependencies>

@ -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();
// }
}
}

@ -5,6 +5,8 @@ import org.eclnt.editor.annotations.CCGenClass;
import org.eclnt.workplace.IWorkpageDispatcher;
import org.eclnt.workplace.WorkpageDispatchedPageBean;
import de.geis.portal.workplace.layout.DefaultLayout;
import org.eclnt.jsfserver.base.faces.event.ActionEvent;
@CCGenClass (expressionBase="#{d.DefaultWorkplaceBean}")
@ -13,13 +15,30 @@ public class DefaultWorkplaceBean
extends WorkpageDispatchedPageBean
implements Serializable
{
public void onMenuToggleAction(org.eclnt.jsfserver.base.faces.event.ActionEvent event) {
if (getMenuToggle()) {
m_menuPageBean = new MenuPageBean();
} else {
m_menuPageBean = null;
}
}
boolean m_menuToggle = false;
public boolean getMenuToggle() { return m_menuToggle; }
public void setMenuToggle(boolean value) { this.m_menuToggle = value; }
MenuPageBean m_menuPageBean = null;
public MenuPageBean getMenuPageBean() { return m_menuPageBean; }
// ------------------------------------------------------------------------
// inner classes
// ------------------------------------------------------------------------
private DefaultLayout m_layout;
public DefaultLayout getLayout() { return m_layout; }
/* Listener to the user of the page bean. */
public interface IListener extends Serializable
{
public interface IListener extends Serializable {
public void logout();
}
// ------------------------------------------------------------------------
@ -32,9 +51,11 @@ public class DefaultWorkplaceBean
// constructors & initialization
// ------------------------------------------------------------------------
public DefaultWorkplaceBean(IWorkpageDispatcher workpageDispatcher)
public DefaultWorkplaceBean(IWorkpageDispatcher workpageDispatcher, DefaultLayout defaultLayout)
{
super(workpageDispatcher);
m_layout = defaultLayout;
}
public String getPageName() { return "/workplace/defaultWorkplace.xml"; }

@ -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
// ------------------------------------------------------------------------
}

@ -1,21 +1,22 @@
package managedbeans;
package de.tvo.workplace;
import java.io.Serializable;
import org.eclnt.editor.annotations.CCGenClass;
import org.eclnt.jsfserver.pagebean.IPageBean;
import org.eclnt.jsfserver.pagebean.PageBean;
import de.tvo.workplace.TestPageBean;
import org.eclnt.jsfserver.base.faces.event.ActionEvent;
@CCGenClass (expressionBase="#{d.MainPage}")
@CCGenClass (expressionBase="#{d.MenuPageBean}")
public class MainPage
public class MenuPageBean
extends PageBean
implements Serializable
{
IPageBean m_mainPage;
public IPageBean getMainPage() { return m_mainPage; }
public void onFixierenToggleAction(org.eclnt.jsfserver.base.faces.event.ActionEvent event) {}
boolean m_fixierenToggle = false;
public boolean getFixierenToggle() { return m_fixierenToggle; }
public void setFixierenToggle(boolean value) { this.m_fixierenToggle = value; }
// ------------------------------------------------------------------------
// inner classes
@ -36,12 +37,12 @@ public class MainPage
// constructors & initialization
// ------------------------------------------------------------------------
public MainPage() {
m_mainPage = new TestPageBean();
public MenuPageBean()
{
}
public String getPageName() { return "/main.xml"; }
public String getRootExpressionUsedInPage() { return "#{d.MainPage}"; }
public String getPageName() { return "/workplace/menuPage.xml"; }
public String getRootExpressionUsedInPage() { return "#{d.MenuPageBean}"; }
// ------------------------------------------------------------------------
// public usage

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 181 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 176 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 21 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 121 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 106 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 32 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 132 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 61 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 337 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 24 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 50 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 101 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 462 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 339 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 330 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 610 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 599 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 346 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 342 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 589 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 577 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 296 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 282 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 417 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 405 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 309 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 300 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 567 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 551 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 204 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 198 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 243 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 242 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 232 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 226 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 290 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 285 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 407 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 386 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 789 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 760 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 316 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 305 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 494 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 474 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 272 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 263 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 348 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 342 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 293 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 285 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 493 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 476 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 332 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 325 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 562 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 555 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 154 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 144 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 144 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 146 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 182 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 179 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 241 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 235 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 407 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 400 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 266 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 257 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 399 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 395 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 293 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 290 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 497 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 494 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 189 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 193 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 217 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 220 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 337 B

Some files were not shown because too many files have changed in this diff Show More

Loading…
Cancel
Save