Package de.iritgo.aktera.ui.form

Examples of de.iritgo.aktera.ui.form.CommandInfo


  {
    this.listCommands = commands;

    for (Iterator i = commands.iterator(); i.hasNext();)
    {
      CommandInfo cmd = (CommandInfo) i.next();

      if (cmd.getBundle() == null)
      {
        cmd.setBundle(bundle);
      }
    }
  }
View Full Code Here


      return false;
    }

    for (Iterator i = getItemCommands().iterator(); i.hasNext();)
    {
      CommandInfo descriptor = (CommandInfo) i.next();

      if (CommandDescriptor.STYLE_NORMAL == descriptor.getStyle())
      {
        return true;
      }
    }
View Full Code Here

      return false;
    }

    for (Iterator i = getItemCommands().iterator(); i.hasNext();)
    {
      CommandInfo descriptor = (CommandInfo) i.next();

      if (CommandDescriptor.STYLE_TOOL == descriptor.getStyle())
      {
        return true;
      }
    }
View Full Code Here

    String bundle = config != null ? config.getAttribute("bundle", "Aktera") : "Aktera";
    String pos = config != null ? config.getAttribute("pos", defaultPos) : defaultPos;

    if (config != null)
    {
      CommandInfo cmd = new CommandInfo(model, name, label);

      if (config.getAttribute("bean", null) != null)
      {
        cmd.setBean(true);
      }

      cmd.setBundle(bundle);
      cmd.setPosition(pos);

      if (config != null)
      {
        Configuration[] params = config.getChildren("param");

        for (int i = 0; i < params.length; ++i)
        {
          cmd.addParameter(params[i].getAttribute("name"), params[i].getAttribute("value"));
        }
      }

      cmd.setIcon(config.getAttribute("icon", null));

      return cmd;
    }

    return null;
View Full Code Here

    }
    else
    {
      if (cmdEdit != null && cmdEdit.getModel() != null)
      {
        CommandInfo cmd = (CommandInfo) cmdEdit.clone();

        cmd.addParameter("id", id);
        commands.add(cmd);
      }
    }

    if (commandConfig.size() > 0)
    {
      for (Iterator i = commandConfig.iterator(); i.hasNext();)
      {
        Configuration aCommandConfig = (Configuration) i.next();

        CommandInfo cmdInfo = new CommandInfo(aCommandConfig.getAttribute("model"), aCommandConfig
                .getAttribute("id"), aCommandConfig.getAttribute("label"), aCommandConfig.getAttribute(
                "icon", null));

        cmdInfo.setBundle(aCommandConfig.getAttribute("bundle", "Aktera"));

        commands.add(cmdInfo);
      }
    }
View Full Code Here

    Configuration[] commandChildren = config.getChildren("command");

    for (Configuration commandConfig : commandChildren)
    {
      String model = commandConfig.getAttribute("model", commandConfig.getAttribute("bean", null));
      CommandInfo cmd = new CommandInfo(model, commandConfig.getAttribute("name"), commandConfig.getAttribute(
              "label", null));

      if (commandConfig.getAttribute("bean", null) != null)
      {
        cmd.setBean(true);
      }

      cmd.setIcon(commandConfig.getAttribute("icon", null));

      CommandDescriptor command = field.getCommands().add(cmd);

      command.setBundle(commandConfig.getAttribute("bundle", field.getBundle() != null ? field.getBundle()
              : formular.getBundle()));
View Full Code Here

    boolean visible = config != null ? NumberTools.toBool(config.getAttribute("visible", "true"), true) : true;

    if (config != null)
    {
      CommandInfo cmd = new CommandInfo(model, name, label);

      if (config.getAttribute("bean", null) != null)
      {
        cmd.setBean(true);
      }

      cmd.setBundle(bundle);
      cmd.setVisible(visible);
      cmd.setPermission(config != null ? config.getAttribute("ifPermission", null) : null);

      if (config != null)
      {
        for (Configuration param : config.getChildren("param"))
        {
          cmd.addParameter(param.getAttribute("name"), param.getAttribute("value"));
        }
      }

      return cmd;
    }
View Full Code Here

        if (role != null && ! UserTools.currentUserIsInGroup(request, role))
        {
          continue;
        }

        CommandInfo cmdInfo = new CommandInfo(aCommandConfig.getAttribute("model"), aCommandConfig
                .getAttribute("id"), aCommandConfig.getAttribute("label"), aCommandConfig.getAttribute(
                "icon", null));

        cmdInfo.setBundle(aCommandConfig.getAttribute("bundle", "Aktera"));

        Configuration[] params = aCommandConfig.getChildren("param");

        setParameters(cmdInfo, params);

        cmdDescriptor.add(cmdInfo);
      }

      listing.setListCommands(cmdDescriptor);
    }

    if (! overview && itemCommandConfig.size() > 0)
    {
      CommandDescriptor cmdDescriptor = new CommandDescriptor("selectedItems");

      for (Iterator i = itemCommandConfig.iterator(); i.hasNext();)
      {
        Configuration aItemCommandConfig = (Configuration) i.next();

        if (! NumberTools.toBool(aItemCommandConfig.getAttribute("visible", "true"), true))
        {
          continue;
        }

        if (cmdDescriptor.hasCommand(aItemCommandConfig.getAttribute("id")))
        {
          continue;
        }

        CommandInfo cmdInfo = new CommandInfo(aItemCommandConfig.getAttribute("model", aItemCommandConfig
                .getAttribute("bean", null)), aItemCommandConfig.getAttribute("id"), aItemCommandConfig
                .getAttribute("label"), aItemCommandConfig.getAttribute("icon", null));

        cmdInfo.setStyle(aItemCommandConfig.getAttribute("style", null));
        cmdInfo.setBundle(aItemCommandConfig.getAttribute("bundle", "Aktera"));

        if (aItemCommandConfig.getAttribute("bean", null) != null)
        {
          cmdInfo.setBean(true);
        }

        Configuration[] params = aItemCommandConfig.getChildren("param");

        setParameters(cmdInfo, params);
View Full Code Here

    String label = config != null ? config.getAttribute("label", defaultLabel) : defaultLabel;
    String bundle = config != null ? config.getAttribute("bundle", "Aktera") : "Aktera";

    if (config != null)
    {
      CommandInfo cmd = new CommandInfo(model, name, label);

      if (config.getAttribute("bean", null) != null)
      {
        cmd.setBean(true);
      }

      cmd.setBundle(bundle);

      if (config != null)
      {
        Configuration[] params = config.getChildren("parameter");

        for (int i = 0; i < params.length; ++i)
        {
          cmd.addParameter(params[i].getAttribute("name"), params[i].getAttribute("value"));
        }

        params = config.getChildren("param");

        for (int i = 0; i < params.length; ++i)
        {
          cmd.addParameter(params[i].getAttribute("name"), params[i].getAttribute("value"));
        }
      }

      cmd.setIcon(config.getAttribute("icon", null));

      return cmd;
    }

    return null;
View Full Code Here

        {
          outColumn.setAttribute("hide", "Y");
        }
      }

      CommandInfo viewCommand = listing.getCommand(ListingDescriptor.COMMAND_VIEW);

      if (viewCommand != null)
      {
        Command cmd = viewCommand.createCommand(request, response, context);

        cmd.setName("command");
        cmd.setParameter(listing.getKeyName(), id);
        cmd.setParameter("link", "Y");
        outItem.setAttribute("command", cmd);
View Full Code Here

TOP

Related Classes of de.iritgo.aktera.ui.form.CommandInfo

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.