web.sequences.ns_editor-ajaxprocessor.jsp Maven / Gradle / Ivy
The newest version!
<%@ page language="java" contentType="text/html; charset=ISO-8859-1" pageEncoding="ISO-8859-1" %>
<%@ page import="org.wso2.carbon.sequences.ui.util.ns.NameSpacesInformationRepository" %>
<%@ page import="org.wso2.carbon.sequences.ui.util.ns.NameSpacesInformation" %>
<%@ page import="java.util.Iterator" %>
<%@ page import="org.wso2.carbon.sequences.ui.util.SequenceEditorHelper" %>
<%@ page import="org.owasp.encoder.Encode" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<%@ taglib uri="http://wso2.org/projects/carbon/taglibs/carbontags.jar" prefix="carbon" %>
<%
String currentID = request.getParameter("currentID");
if (currentID == null || "".equals(currentID)) {
//TODO
throw new RuntimeException("'currentID' parameter cannot be found");
}
String divID = request.getParameter("divID");
if (divID == null || "".equals(divID)) {
//TODO
throw new RuntimeException("'divID' parameter cannot be found");
}
String linkID = request.getParameter("linkID");
if (linkID == null || "".equals(linkID)) {
linkID = "null";
}
String editorMode = request.getParameter("editorMode");
boolean isSingle = "single".equals(editorMode);
String displayStyle = isSingle ? "display:none;" : "";
NameSpacesInformationRepository repository = (NameSpacesInformationRepository) session.getAttribute(
NameSpacesInformationRepository.NAMESPACES_INFORMATION_REPOSITORY);
NameSpacesInformation information = null;
if (repository == null) {
repository = new NameSpacesInformationRepository();
session.setAttribute(NameSpacesInformationRepository.NAMESPACES_INFORMATION_REPOSITORY, repository);
} else {
information = repository.getNameSpacesInformation(SequenceEditorHelper.getEditingMediatorPosition(session), currentID);
}
if (information == null) {
information = new NameSpacesInformation();
repository.addNameSpacesInformation(SequenceEditorHelper.getEditingMediatorPosition(session), currentID, information);
}
// Set standard HTTP/1.1 no-cache headers.
response.setHeader("Cache-Control", "no-store, max-age=0, no-cache, must-revalidate");
// Set IE extended HTTP/1.1 no-cache headers.
response.addHeader("Cache-Control", "post-check=0, pre-check=0");
// Set standard HTTP/1.0 no-cache header.
response.setHeader("Pragma", "no-cache");
%>
© 2015 - 2025 Weber Informatics LLC | Privacy Policy