Package de.iritgo.aktario.framework.dataobject.gui

Examples of de.iritgo.aktario.framework.dataobject.gui.Controller


    CommandTools.performSimple(new ShowOtherFrame(null, "address.embeddedview", onScreenUniqueId, bounds));

    GUIManager guiManager = (GUIManager) Engine.instance().getManagerRegistry().getManager("GUIManager");

    Controller controller = guiManager.getController(controllerId);

    String editModel = controller.getCommandDescription("EditAkteraObjectCommand").getValue();

    CommandTools
            .performSimple(new ShowWindow("DataObjectGUIPane", onScreenUniqueId, onScreenUniqueId, null),
                    props);
View Full Code Here


        return;
      }

      ResponseElement resultList = result.get("list");

      Controller controller = createController(controllerTypeId);

      WidgetDescription wdGroup = createWidget(controller.getUniqueId(), controllerTypeId, "group", "group",
              false, true);

      controller.addWidgetDescription(wdGroup);

      for (Iterator i = ((ResponseElement) resultList.getAttribute("header")).getAll().iterator(); i.hasNext();)
      {
        ResponseElement field = (ResponseElement) i.next();
        String attributeName = (String) ((Output) field).getContent();
        String fieldLabel = (String) ((Output) field).getAttribute("label");
        boolean hide = ((Output) field).getAttribute("hide") != null ? true : false;

        wdGroup.addWidgetDescription(createWidget(controller.getUniqueId(), fieldLabel, attributeName,
                attributeName, false, hide));
      }

      Input attribute = (Input) result.get("listSearchCategory");

      if (attribute != null)
      {
        controller.addWidgetDescription(createWidget(controller.getUniqueId(), "listSearchCategory",
                "listSearchCategory", "listSearchCategory", false, false));
      }

      // Wird noch ben�tigt um zu �perpr�fen ob �berhaupt die Neuanlage
      // erlaubt ist.
      // Command cmdNew = (Command) resultList.getAttribute ("cmdNew");
      Command cmdEdit = (Command) resultList.getAttribute("cmdEdit");

      if (cmdEdit != null)
      {
        controller.addCommandDescription(createCommand(controller.getUniqueId(), "NewAkteraObjectCommand",
                cmdEdit.getModel(), "new", "new", "des", true, true));

        controller.addCommandDescription(createCommand(controller.getUniqueId(), "EditAkteraObjectCommand",
                cmdEdit.getModel(), "edit", "edit", "des", true, true));
      }

      ResponseElement itemCommands = (ResponseElement) resultList.getAttribute("itemCommands");

      if (itemCommands != null)
      {
        for (Iterator i = itemCommands.getAll().iterator(); i.hasNext();)
        {
          Command command = (Command) i.next();

          if (command.getName().equals("delete"))
          {
            controller.addCommandDescription(createCommand(controller.getUniqueId(),
                    "DeleteAkteraObjectCommand", command.getModel(), "delete", "delete", "des",
                    true, true));
          }
        }
      }

      controller.addCommandDescription(createCommand(controller.getUniqueId(), "CancelAkteraObjectCommand",
              "cancel", "cancel", "cancel", "des", true, true));

      guiManager.addController(controllerTypeId, controller);
    }

    if (displayType == GUIControllerRequest.DATAOBJECT)
    {
      KeelResponse keelForm = getKeelObject(controllerTypeId, "0", userUniqueId);

      Controller controller = createController(controllerTypeId);

      ResponseElement groups = keelForm.get("groups");

      for (Iterator i = groups.getAll().iterator(); i.hasNext();)
      {
        ResponseElement group = (ResponseElement) i.next();

        WidgetDescription wdGroup = createWidget(controller.getUniqueId(), (String) ((Output) group)
                .getContent(), "group", "group", false, true);

        controller.addWidgetDescription(wdGroup);

        for (Iterator j = group.getAll().iterator(); j.hasNext();)
        {
          Input field = (Input) j.next();
          String fieldName = field.getName();
          String fieldLabel = field.getLabel();
          boolean duty = field.getAttribute("duty") == null ? false : true;

          WidgetDescription fieldWidget = createWidget(controller.getUniqueId(), fieldLabel, fieldName,
                  (String) ((Input) field).getAttribute("editor"), duty, true);

          wdGroup.addWidgetDescription(fieldWidget);
        }
      }

      Command cmdSave = (Command) keelForm.get("save");

      if (cmdSave != null)
      {
        controller.addCommandDescription(createCommand(controller.getUniqueId(), "SaveAkteraObjectCommand",
                cmdSave.getModel(), "save", "save", "des", true, true));
      }

      controller.addCommandDescription(createCommand(controller.getUniqueId(), "CancelAkteraObjectCommand",
              "cancel", "cancel", "cancel", "des", true, true));

      guiManager.addController(controllerTypeId, controller);
    }
  }
View Full Code Here

   * @param String controllerTypeId
   * @return Controller
   */
  private Controller createController(String controllerTypeId)
  {
    Controller controller = new Controller();
    long controllerUniqueId = Engine.instance().getPersistentIDGenerator().createId();

    controller.setControllerTypeId(controllerTypeId);
    registerObject(controller);

    return controller;
  }
View Full Code Here

TOP

Related Classes of de.iritgo.aktario.framework.dataobject.gui.Controller

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.