aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Lenz <tlenz@iaik.tugraz.at>2016-04-08 09:54:25 +0200
committerThomas Lenz <tlenz@iaik.tugraz.at>2016-04-08 09:54:25 +0200
commit9231c84c9a509ba75b3e92a286941cc0792982f6 (patch)
treee098752556d0a2e143a5be7747ae651494c25d8a
parent19cbabff11dd919e40eaef5e8eb50d4e35c7421f (diff)
downloadmoa-id-spss-9231c84c9a509ba75b3e92a286941cc0792982f6.tar.gz
moa-id-spss-9231c84c9a509ba75b3e92a286941cc0792982f6.tar.bz2
moa-id-spss-9231c84c9a509ba75b3e92a286941cc0792982f6.zip
fix configurationTool BKU-selection preview problem
-rw-r--r--id/ConfigWebTool/src/main/java/at/gv/egovernment/moa/id/configuration/struts/action/BasicOAAction.java34
-rw-r--r--id/server/data/deploy/conf/moa-id-configuration/htmlTemplates/loginFormFull.html4
2 files changed, 25 insertions, 13 deletions
diff --git a/id/ConfigWebTool/src/main/java/at/gv/egovernment/moa/id/configuration/struts/action/BasicOAAction.java b/id/ConfigWebTool/src/main/java/at/gv/egovernment/moa/id/configuration/struts/action/BasicOAAction.java
index c80bc1925..5bc17f1ee 100644
--- a/id/ConfigWebTool/src/main/java/at/gv/egovernment/moa/id/configuration/struts/action/BasicOAAction.java
+++ b/id/ConfigWebTool/src/main/java/at/gv/egovernment/moa/id/configuration/struts/action/BasicOAAction.java
@@ -29,6 +29,8 @@ import java.io.FileInputStream;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.StringWriter;
+import java.io.UnsupportedEncodingException;
+import java.net.URI;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Iterator;
@@ -84,7 +86,7 @@ public class BasicOAAction extends BasicAction {
private boolean newOA;
private boolean isMetaDataRefreshRequired = false;
- private InputStream stream;
+ private InputStream stream = null;
/**
*
@@ -587,8 +589,8 @@ public class BasicOAAction extends BasicAction {
ConfigurationProvider config = ConfigurationProvider.getInstance();
String templateURL = config.getConfigRootDir() + ConfigurationProvider.HTMLTEMPLATE_DIR
+ ConfigurationProvider.HTMLTEMPLATE_FILE;
-
- File file = new File(templateURL);
+
+ File file = new File(new URI(templateURL));
input = new FileInputStream(file);
String contextpath = config.getMOAIDInstanceURL();
@@ -656,6 +658,15 @@ public class BasicOAAction extends BasicAction {
}
+ if (stream == null && MiscUtil.isNotEmpty(preview)) {
+ try {
+ stream = new ByteArrayInputStream(preview.getBytes("UTF-8"));
+
+ } catch (UnsupportedEncodingException e) {
+ e.printStackTrace();
+
+ }
+ }
return Constants.STRUTS_SUCCESS;
@@ -699,12 +710,13 @@ public class BasicOAAction extends BasicAction {
public void setPvp2OA(OAPVP2Config pvp2oa) {
formList.put(pvp2oa.getName(), pvp2oa);
}
-
- /**
- * @return the stream
- */
- public InputStream getStream() {
- return stream;
- }
-
+
+ /**
+ * @return the stream
+ */
+ public InputStream getStream() {
+ return stream;
+ }
+
+
}
diff --git a/id/server/data/deploy/conf/moa-id-configuration/htmlTemplates/loginFormFull.html b/id/server/data/deploy/conf/moa-id-configuration/htmlTemplates/loginFormFull.html
index 02b86472b..6c70b57b3 100644
--- a/id/server/data/deploy/conf/moa-id-configuration/htmlTemplates/loginFormFull.html
+++ b/id/server/data/deploy/conf/moa-id-configuration/htmlTemplates/loginFormFull.html
@@ -37,13 +37,13 @@
</div>
<div id="bkuselectionarea">
<div id="bkukarte">
- <img id="bkuimage" class="bkuimage" src="$contextPath/img/online-bku.png"
+ <img id="bkuimage" class="bkuimage" src="$contextPath/img/karte.png"
alt="OnlineBKU" /> <input name="bkuButtonOnline" type="button"
onClick="bkuOnlineClicked();" tabindex="2" role="button"
value="Karte" />
</div>
<div id="bkuhandy">
- <img class="bkuimage" src="$contextPath/img/mobile-bku.png"
+ <img class="bkuimage" src="$contextPath/img/handysign.png"
alt="HandyBKU" /> <input name="bkuButtonHandy" type="button"
onClick="bkuHandyClicked();" tabindex="3" role="button"
value="HANDY" />