/** * action methode to update the information text dependent on the given parameter * * @return null, to stay on the same page */ public Object updateInfoText() { FacesContext fc = FacesContext.getCurrentInstance(); Map<String, String> params = fc.getExternalContext().getRequestParameterMap(); if (params.containsKey("type")) { String type = params.get("type"); if (WPS_INFOKEY.equals(type) && wpsClient != null) { ServiceIdentification si = wpsClient.getMetadata().getServiceIdentification(); information = getAsLocaleString(si.getAbstracts()); } else if (PROCESS_INFOKEY.equals(type) && selectedProcess != null) { information = selectedProcess.getAbstract() != null ? selectedProcess.getAbstract().getString() : ""; } else if (IN_INFOKEY.equals(type) && params.containsKey("dataId") && selectedProcess != null) { try { String id = params.get("dataId"); InputType[] inputTypes = selectedProcess.getInputTypes(); for (int i = 0; i < inputTypes.length; i++) { if (equalsCodeType(inputTypes[i].getId(), id)) { information = inputTypes[i].getAbstract() != null ? inputTypes[i].getAbstract().getString() : ""; } } } catch (Exception e) { information = null; FacesMessage msg = getFacesMessage(FacesMessage.SEVERITY_INFO, "INFO.UPDATE_INFO_FAILED"); fc.addMessage("ClientBean.updateInfoText.FAILED", msg); } } else if (OUT_INFOKEY.equals(type) && params.containsKey("dataId") && selectedProcess != null) { try { String id = params.get("dataId"); OutputType[] outputTypes = selectedProcess.getOutputTypes(); for (int i = 0; i < outputTypes.length; i++) { if (equalsCodeType(outputTypes[i].getId(), id)) { information = outputTypes[i].getAbstract() != null ? outputTypes[i].getAbstract().getString() : ""; } } } catch (Exception e) { information = null; FacesMessage msg = getFacesMessage(FacesMessage.SEVERITY_INFO, "INFO.UPDATE_INFO_FAILED"); fc.addMessage("ClientBean.updateInfoText.FAILED", msg); } } } return null; }