summaryrefslogtreecommitdiff
path: root/eaaf_core/src/main/java/at/gv/egiz/eaaf/core/impl/gui
diff options
context:
space:
mode:
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());