summaryrefslogtreecommitdiff
path: root/eaaf_core/src/main/java/at/gv/egiz/eaaf/core/impl/gui
diff options
context:
space:
mode:
authorChristof Rabensteiner <christof.rabensteiner@iaik.tugraz.at>2019-06-19 08:55:49 +0200
committerChristof Rabensteiner <christof.rabensteiner@iaik.tugraz.at>2019-06-19 08:55:49 +0200
commit1bad320e50f66e44fcb23f0c8d242809f8077520 (patch)
tree2c65c6f9ca55c95c2327bdd39474cfab35f73d46 /eaaf_core/src/main/java/at/gv/egiz/eaaf/core/impl/gui
parent5d306c41c0033f330413cf2b18db9f1137d51980 (diff)
parent470ac2c6234a0bac1e973fd3c1f49e1d9da41be4 (diff)
downloadEAAF-Components-1bad320e50f66e44fcb23f0c8d242809f8077520.tar.gz
EAAF-Components-1bad320e50f66e44fcb23f0c8d242809f8077520.tar.bz2
EAAF-Components-1bad320e50f66e44fcb23f0c8d242809f8077520.zip
Merge branch 'master' into moa-sig-dependency-fixup
Diffstat (limited to 'eaaf_core/src/main/java/at/gv/egiz/eaaf/core/impl/gui')
-rw-r--r--eaaf_core/src/main/java/at/gv/egiz/eaaf/core/impl/gui/AbstractGUIFormBuilderConfiguration.java13
-rw-r--r--eaaf_core/src/main/java/at/gv/egiz/eaaf/core/impl/gui/AbstractVelocityGUIFormBuilderImpl.java4
2 files changed, 12 insertions, 5 deletions
diff --git a/eaaf_core/src/main/java/at/gv/egiz/eaaf/core/impl/gui/AbstractGUIFormBuilderConfiguration.java b/eaaf_core/src/main/java/at/gv/egiz/eaaf/core/impl/gui/AbstractGUIFormBuilderConfiguration.java
index 51b4e0b4..c9c2ec0b 100644
--- a/eaaf_core/src/main/java/at/gv/egiz/eaaf/core/impl/gui/AbstractGUIFormBuilderConfiguration.java
+++ b/eaaf_core/src/main/java/at/gv/egiz/eaaf/core/impl/gui/AbstractGUIFormBuilderConfiguration.java
@@ -103,9 +103,9 @@ public abstract class AbstractGUIFormBuilderConfiguration implements IGUIBuilder
@Override
public final Map<String, Object> getViewParameters() {
//set generic parameters
- setViewParameter(PARAM_GROUP_FORM, PARAM_AUTHCONTEXT, this.authURL);
- setViewParameter(PARAM_GROUP_FORM, PARAM_FORMSUBMITENDPOINT, this.formSubmitEndpoint);
- setViewParameter(PARAM_GROUP_FORM, PARAM_VIEWNAME, this.viewName);
+ setViewParameter(getFromGroup(), PARAM_AUTHCONTEXT, this.authURL);
+ setViewParameter(getFromGroup(), PARAM_FORMSUBMITENDPOINT, this.formSubmitEndpoint);
+ setViewParameter(getFromGroup(), PARAM_VIEWNAME, this.viewName);
//get parameters from detail implementation
putSpecificViewParameters();
@@ -126,6 +126,13 @@ public abstract class AbstractGUIFormBuilderConfiguration implements IGUIBuilder
*
*/
abstract protected void putSpecificViewParameters();
+
+ /**
+ * Get the Group for generic form elements
+ *
+ * @return groupName or <code>null</code> if no groups are used
+ */
+ abstract protected String getFromGroup();
@SuppressWarnings("unchecked")
protected void setViewParameter(String group, String key, Object value) {
diff --git a/eaaf_core/src/main/java/at/gv/egiz/eaaf/core/impl/gui/AbstractVelocityGUIFormBuilderImpl.java b/eaaf_core/src/main/java/at/gv/egiz/eaaf/core/impl/gui/AbstractVelocityGUIFormBuilderImpl.java
index 65e13b5a..b9c16538 100644
--- a/eaaf_core/src/main/java/at/gv/egiz/eaaf/core/impl/gui/AbstractVelocityGUIFormBuilderImpl.java
+++ b/eaaf_core/src/main/java/at/gv/egiz/eaaf/core/impl/gui/AbstractVelocityGUIFormBuilderImpl.java
@@ -77,7 +77,7 @@ public abstract class AbstractVelocityGUIFormBuilderImpl implements IVelocityGui
public final void build(HttpServletRequest httpReq, HttpServletResponse httpResp, IGUIBuilderConfiguration config,
String loggerName) throws GUIBuildException {
if (config instanceof IVelocityGUIBuilderConfiguration)
- build(httpReq, httpResp, config, loggerName);
+ build(httpReq, httpResp, (IVelocityGUIBuilderConfiguration)config, loggerName);
else
throw new IllegalStateException(this.getClass().getName() + " needs a " + IVelocityGUIBuilderConfiguration.class.getName());
@@ -88,7 +88,7 @@ public abstract class AbstractVelocityGUIFormBuilderImpl implements IVelocityGui
public final void build(HttpServletRequest httpReq, HttpServletResponse httpResp, IGUIBuilderConfiguration config,
String contentType, String loggerName) throws GUIBuildException {
if (config instanceof IVelocityGUIBuilderConfiguration)
- build(httpReq, httpResp, config, loggerName);
+ build(httpReq, httpResp, (IVelocityGUIBuilderConfiguration)config, contentType, loggerName);
else
throw new IllegalStateException(this.getClass().getName() + " needs a " + IVelocityGUIBuilderConfiguration.class.getName());