diff --git a/src/main/webapp/css/main.css b/src/main/webapp/css/main.css index e69de29..fe1730d 100644 --- a/src/main/webapp/css/main.css +++ b/src/main/webapp/css/main.css @@ -0,0 +1,5 @@ +div.vre-app-integration-portlet > div.portlet-borderless-container { + background: transparent; + padding: 4px 10px 0; + border-radius: 5px; +} \ No newline at end of file diff --git a/src/main/webapp/html/vreappintegration/config.jsp b/src/main/webapp/html/vreappintegration/config.jsp index c54a9b0..4c4d1f4 100644 --- a/src/main/webapp/html/vreappintegration/config.jsp +++ b/src/main/webapp/html/vreappintegration/config.jsp @@ -1,64 +1,70 @@ -<%@include file="/html/init.jsp" %> +<%@include file="/html/init.jsp"%> - - -<% -String appURL_cfg = GetterUtil.getString(portletPreferences.getValue("appURL", StringPool.BLANK)); -String appURLTokenParam_cfg = GetterUtil.getString(portletPreferences.getValue("appURLTokenParam", StringPool.BLANK)); -Integer iFrameHeightParam_cfg = GetterUtil.getInteger(portletPreferences.getValue("iFrameHeightParam", "1000")); + +<% + String appURL_cfg = GetterUtil.getString(portletPreferences.getValue("appURL", StringPool.BLANK)); + String appURLTokenParam_cfg = GetterUtil + .getString(portletPreferences.getValue("appURLTokenParam", StringPool.BLANK)); + Integer iFrameHeightParam_cfg = GetterUtil + .getInteger(portletPreferences.getValue("iFrameHeightParam", "1000")); + boolean newWindowPreference_cfg = GetterUtil + .getBoolean(portletPreferences.getValue("newWindowPreference", StringPool.FALSE)); + String applicationNameParam_cfg = GetterUtil + .getString(portletPreferences.getValue("applicationNameParam", "the Application")); + if (applicationNameParam_cfg.equals("")) + applicationNameParam_cfg = "the Application"; %> - - + + - + value="<%=appURL_cfg%>" required="true" /> - - - - - - - - - - - + + + + + + +

Display options (default iFrame):

+ + +
+ + + + + - - + +
\ No newline at end of file diff --git a/src/main/webapp/html/vreappintegration/view.jsp b/src/main/webapp/html/vreappintegration/view.jsp index dbc9477..26898fa 100644 --- a/src/main/webapp/html/vreappintegration/view.jsp +++ b/src/main/webapp/html/vreappintegration/view.jsp @@ -1,54 +1,68 @@ -<%@include file="/html/init.jsp" %> - +<%@include file="/html/init.jsp"%> <% -String appURL_view = GetterUtil.getString(portletPreferences.getValue("appURL", StringPool.BLANK)); -String appURLTokenParam_view = GetterUtil.getString(portletPreferences.getValue("appURLTokenParam", StringPool.BLANK)); -Integer iFrameHeight = GetterUtil.getInteger(portletPreferences.getValue("iFrameHeightParam", "1000")); -pageContext.setAttribute("iFrameHeight", iFrameHeight); + String appURL_view = GetterUtil.getString(portletPreferences.getValue("appURL", StringPool.BLANK)); + String appURLTokenParam_view = GetterUtil + .getString(portletPreferences.getValue("appURLTokenParam", StringPool.BLANK)); + Integer iFrameHeight = GetterUtil.getInteger(portletPreferences.getValue("iFrameHeightParam", "1000")); + pageContext.setAttribute("iFrameHeight", iFrameHeight); + + boolean newWindowPreference = GetterUtil.getBoolean(portletPreferences.getValue("newWindowPreference", StringPool.FALSE)); + pageContext.setAttribute("newWindowPreference", newWindowPreference); + + String applicationNameParam_view = GetterUtil.getString(portletPreferences.getValue("applicationNameParam", "the Application")); + pageContext.setAttribute("applicationNameParam_view", applicationNameParam_view); -Object securityTokenObj = request.getAttribute("securityToken"); -String securityToken = ""; -if(securityToken != null){ - securityToken = securityTokenObj.toString(); -} + Object securityTokenObj = request.getAttribute("securityToken"); + String securityToken = ""; + if (securityToken != null) { + securityToken = securityTokenObj.toString(); + } -/* handle the case where the page is called with GET parameters needing to be forwarded*/ -String completeURL = PortalUtil.getCurrentCompleteURL(request); -String queryString = ""; -if (completeURL.indexOf("?") > 0) { - queryString = completeURL.substring(completeURL.indexOf("?")+1); - queryString = queryString.trim(); -} + /* handle the case where the page is called with GET parameters needing to be forwarded*/ + String completeURL = PortalUtil.getCurrentCompleteURL(request); + String queryString = ""; + if (completeURL.indexOf("?") > 0) { + queryString = completeURL.substring(completeURL.indexOf("?") + 1); + queryString = queryString.trim(); + } -/* handle the case where the appURL provided has GET parameters needing to be forwarded*/ -if (appURL_view.indexOf("?") > 0) { - if (queryString != null && !queryString.equals("")) { //not empty - queryString += "&" + appURL_view.substring(appURL_view.indexOf("?")+1); + /* handle the case where the appURL provided has GET parameters needing to be forwarded*/ + if (appURL_view.indexOf("?") > 0) { + if (queryString != null && !queryString.equals("")) { //not empty + queryString += "&" + appURL_view.substring(appURL_view.indexOf("?") + 1); + } else { + queryString = appURL_view.substring(appURL_view.indexOf("?") + 1); + } + appURL_view = appURL_view.substring(0, appURL_view.indexOf("?")); + queryString = queryString.trim(); + } + + String applicationURL = appURL_view; + if (!appURLTokenParam_view.equals("")) { + applicationURL += "?" + appURLTokenParam_view + "=" + securityToken; + if (queryString != null && !queryString.equals("")) { + applicationURL += "&" + queryString; + } } else { - queryString = appURL_view.substring(appURL_view.indexOf("?")+1); + if (queryString != null && !queryString.equals("")) { + applicationURL += "?" + queryString; + } } - appURL_view = appURL_view.substring(0, appURL_view.indexOf("?")); - queryString = queryString.trim(); -} - - -String applicationURL = appURL_view; -if (! appURLTokenParam_view.equals("")) { - applicationURL += "?" + appURLTokenParam_view + "=" + securityToken; - if (queryString != null && !queryString.equals("")) { - applicationURL += "&" + queryString; - } -} else { - if (queryString != null && !queryString.equals("")) { - applicationURL += "?" + queryString; - } -} -pageContext.setAttribute("applicationURL", applicationURL); + pageContext.setAttribute("applicationURL", applicationURL); + pageContext.setAttribute("newWindow", true); %> - - - - + + + + + +

If no new window appears, please click here to open ${applicationNameParam_view}

+ +
+