public boolean windowClosing() {
   Request theRequest = FrontControllerFactory.createRequest();
   FrontController fc = FrontControllerFactory.getFrontController();
   Action theAction = fc.getAction("GetBack");
   ActionForward theActionForward = theAction.doExecute(theRequest);
   _container.forward(theActionForward, theRequest);
   return false;
 }
 private void cancelBtnActionPerformed(
     java.awt.event.ActionEvent evt) { // GEN-FIRST:event_cancelBtnActionPerformed
   Request theRequest = FrontControllerFactory.createRequest();
   FrontController fc = FrontControllerFactory.getFrontController();
   Action theAction = fc.getAction("GetBack");
   ActionForward theActionForward = theAction.doExecute(theRequest);
   _container.forward(theActionForward, theRequest);
 } // GEN-LAST:event_cancelBtnActionPerformed
 private void okBtnActionPerformed(
     java.awt.event.ActionEvent evt) { // GEN-FIRST:event_okBtnActionPerformed
   if (importar.equals("true") && !new File(fileTxt.getText()).exists())
     JOptionPane.showMessageDialog(null, aplicacion.getI18nString("SLDStyle.FicheroNoExiste"));
   else {
     Request theRequest = FrontControllerFactory.createRequest();
     theRequest.setAttribute("FileExport", fileTxt.getText());
     theRequest.setAttribute("selectedStyles", selectedStyles);
     theRequest.setAttribute("SLDStyle", sldStyle);
     theRequest.setAttribute("Layer", layer);
     theRequest.setAttribute("LayerName", layerName);
     FrontController fc = FrontControllerFactory.getFrontController();
     Action theAction;
     if (importar.equals("true")) theAction = fc.getAction("ImportCustomUserStyle");
     else theAction = fc.getAction("ExportCustomUserStyle");
     ActionForward theActionForward = theAction.doExecute(theRequest);
     _container.forward(theActionForward, theRequest);
   }
 } // GEN-LAST:event_okBtnActionPerformed
  /* (non-Javadoc)
   * @see com.geopista.style.sld.controller.Action#doExecute(com.geopista.style.sld.controller.Request)
   */
  public ActionForward doExecute(Request request) {

    /*Recuperamos las instancias del FrontController y de la Session*/
    FrontController frontController = FrontControllerImpl.getInstance();
    Session session = SessionImpl.getInstance();
    String styleName = (String) request.getAttribute("StyleName");
    session.setAttribute("StyleName", styleName);
    String symbolizerType = (String) request.getAttribute("SymbolizerType");
    List inserts = (List) session.getAttribute("Insert");
    inserts.add(2, new Integer(1));
    session.setAttribute("Insert", inserts);
    session.setAttribute("SymbolizerType", symbolizerType);
    /*Actualizamos el parámetro PagesVisited en la Session*/
    List pagesVisited = (List) session.getAttribute("PagesVisited");
    pagesVisited.add("InsertUpdateCustomStyle");
    session.setAttribute("PagesVisited", pagesVisited);
    /*Redirigimos a otra acción del controlador*/
    Action action = frontController.getAction("GetFeatureAttributes");
    Request newRequest = FrontControllerFactory.createRequest();
    String layerName = (String) session.getAttribute("LayerName");
    newRequest.setAttribute("LayerName", layerName);
    action.doExecute(newRequest);
    ActionForward forward = null;
    if ((symbolizerType.toLowerCase()).equals("point")) {
      forward = frontController.getForward("InsertUpdateThematicPointRule");
    } else if ((symbolizerType.toLowerCase()).equals("line")) {
      forward = frontController.getForward("InsertUpdateThematicLineRule");
    } else if ((symbolizerType.toLowerCase()).equals("polygon")) {
      forward = frontController.getForward("InsertUpdateThematicPolygonRule");
    } else if ((symbolizerType.toLowerCase()).equals("text")) {
      forward = frontController.getForward("InsertUpdateThematicTextRule");
    }
    return forward;
  }
  /* (non-Javadoc)
   * @see es.enxenio.util.controller.Action#doExecute(es.enxenio.util.controller.Request)
   */
  public ActionForward doExecute(Request request) {

    /*Recuperamos las instancias del FrontController y de la Session*/
    FrontController frontController = FrontControllerImpl.getInstance();
    Session session = SessionImpl.getInstance();
    MutableTreeNode oldNode = (MutableTreeNode) request.getAttribute("OldNode");
    session.setAttribute("OldNode", oldNode);
    MutableTreeNode parentNode = (MutableTreeNode) oldNode.getParent();
    session.setAttribute("ParentNode", parentNode);
    if (parentNode != null) {
      int index = parentNode.getIndex(oldNode);
      session.setAttribute("Index", new Integer(index));
    }
    int operatorID = ((Integer) request.getAttribute("OperatorID")).intValue();
    FilterFacade filterFacade = null;
    session.removeAttribute("GMLBox");
    BBOXOp bboxOp = null;
    try {
      filterFacade = FilterFacadeFactory.getDelegate();
      bboxOp = filterFacade.addBBOXOp(operatorID);
    } catch (InternalErrorException e) {
      System.err.println(e);
    } catch (IncorrectIdentifierException e) {
      System.err.println(e);
    }
    /*Añadimos el operador creado en la Session*/
    session.setAttribute("BBOXOperator", bboxOp);
    session.setAttribute("InsertOperator", new Integer(1));
    /*Redirigimos a otro panel*/
    String pagesVisitedName = (String) session.getAttribute("PagesVisitedListName");
    List pagesVisited = (List) session.getAttribute(pagesVisitedName);
    pagesVisited.add("InsertUpdateFilter");
    session.setAttribute(pagesVisitedName, pagesVisited);
    /*Redirección a una nueva interfaz*/
    ActionForward forward = frontController.getForward("InsertUpdateBBOXOp");
    return forward;
  }