Examples of AbstractContainer


Examples of lupos.gui.operatorgraph.visualeditor.visualrif.operators.AbstractContainer

      final UnitermOperator fo = (UnitermOperator) newOp;
      this.createNewUniterm(fo);
    }

    if ( newOp instanceof AbstractContainer ){
      final AbstractContainer oc = (AbstractContainer) newOp;
      this.createNewOperatorContainer(oc);
    }

    if ( newOp instanceof ListOperator ){
      final ListOperator lo = (ListOperator) newOp;
View Full Code Here

Examples of lupos.gui.operatorgraph.visualeditor.visualrif.operators.AbstractContainer

        }
      }

      // OperatorContainer
      if (op instanceof AbstractContainer) {
        final AbstractContainer ac = (AbstractContainer) op;

        try {
          saveObject.put(this.checkName("AbstractContainer",
              "AbstractContainer", 0), ac.toJSON());
        } catch (final JSONException e) {
          e.printStackTrace();
        }

      }
View Full Code Here

Examples of org.brixcms.plugin.site.page.AbstractContainer

                    CreatePageOrTemplatePanel.this));
            error(error);
        } else {
            JcrNode page = parent.addNode(name, "nt:file");

            AbstractContainer node;

            node = initializePage(type, page);

            node.setTitle(name);

            node.setData("");
            name = null;

            parent.save();

            SitePlugin.get().selectNode(this, node, true);
View Full Code Here

Examples of org.brixcms.plugin.site.page.AbstractContainer

            SitePlugin.get().selectNode(this, node, true);
        }
    }

    protected AbstractContainer initializePage(String type, JcrNode page) {
        AbstractContainer node;
        if (type.equals(PageSiteNodePlugin.TYPE)) {
            node = PageNode.initialize(page);
        } else {
            node = TemplateNode.initialize(page);
        }
View Full Code Here

Examples of org.brixcms.plugin.site.page.AbstractContainer

        grid.setContentHeight(17, SizeUnit.EM);

        add(delete = new AjaxLink<Void>("deleteSelected") {
            @Override
            public void onClick(AjaxRequestTarget target) {
                AbstractContainer node = (AbstractContainer) VariablesPanel.this.getModelObject();
                for (IModel<?> m : grid.getSelectedItems()) {
                    Entry e = (Entry) m.getObject();
                    node.setVariableValue(e.getKey(), null);
                }
                node.save();
                grid.markAllItemsDirty();
                grid.update();
                grid.resetSelectedItems();
                target.addComponent(this);
            }
View Full Code Here

Examples of org.brixcms.plugin.site.page.AbstractContainer

        public IModel<Entry> model(Entry object) {
            return new Model<Entry>(object);
        }

        public void query(IQuery query, IQueryResult<Entry> result) {
            AbstractContainer node = (AbstractContainer) VariablesPanel.this.getModelObject();
            List<Entry> res = new ArrayList<Entry>();
            for (String s : node.getSavedVariableKeys()) {
                res.add(new Entry(s));
            }
            Collections.sort(res, new Comparator<Entry>() {
                public int compare(Entry o1, Entry o2) {
                    return o1.getKey().compareTo(o2.getKey());
View Full Code Here

Examples of org.brixcms.plugin.site.page.AbstractContainer

        public String getKey() {
            return key;
        }

        public String getValue() {
            AbstractContainer node = (AbstractContainer) VariablesPanel.this.getModelObject();
            return node.getVariableValue(key, false);
        }
View Full Code Here

Examples of org.brixcms.plugin.site.page.AbstractContainer

            AbstractContainer node = (AbstractContainer) VariablesPanel.this.getModelObject();
            return node.getVariableValue(key, false);
        }

        public void setValue(String value) {
            AbstractContainer node = (AbstractContainer) VariablesPanel.this.getModelObject();
            node.setVariableValue(key, value);
            node.save();
        }
View Full Code Here

Examples of org.brixcms.plugin.site.page.AbstractContainer

            IModel<List<? extends String>> choicesModel = new LoadableDetachableModel<List<? extends String>>() {
                @Override
                protected List<? extends String> load() {
                    List<String> result = new ArrayList<String>();
                    AbstractContainer node = (AbstractContainer) VariablesPanel.this.getModelObject();
                    result.addAll(node.getVariableKeys());
                    return result;
                }
            };

            final TextField<String> tf;
            add(tf = new TextField<String>("key", new PropertyModel<String>(this, "key")));
            tf.setRequired(true);
            tf.setOutputMarkupId(true);

            final DropDownChoice<String> keySuggestions;
            add(keySuggestions = new DropDownChoice<String>("keySuggestions", new Model<String>(), choicesModel) {
                @Override
                public boolean isVisible() {
                    return VariablesPanel.this.getModelObject() instanceof GlobalContainerNode == false;
                }
            });
            keySuggestions.setNullValid(true);

            keySuggestions.add(new AjaxFormComponentUpdatingBehavior("onchange") {
                @Override
                protected void onUpdate(AjaxRequestTarget target) {
                    tf.setModelObject(keySuggestions.getModelObject());
                    keySuggestions.setModelObject(null);
                    target.addComponent(tf);
                    target.addComponent(keySuggestions);
                    target.focusComponent(tf);
                }
            });

            add(new TextField<String>("value", new PropertyModel<String>(this, "value")).setRequired(true));

            add(new AjaxButton("submit") {
                @Override
                protected void onSubmit(AjaxRequestTarget target, Form<?> form) {
                    AbstractContainer node = (AbstractContainer) VariablesPanel.this.getModelObject();
                    node.setVariableValue(key, value);
                    node.save();
                    onItemAdded();
                    key = null;
                    value = null;
                    target.addComponent(form);
                    target.addChildren(findParent(VariablesPanel.class), FeedbackPanel.class);
                }

                @Override
                protected void onError(AjaxRequestTarget target, Form<?> form) {
                    target.addChildren(findParent(VariablesPanel.class), FeedbackPanel.class);
                }
            });

            tf.add(new IValidator<String>() {
                public void validate(IValidatable validatable) {
                    String key = (String) validatable.getValue();

                    AbstractContainer node = (AbstractContainer) VariablesPanel.this.getModelObject();

                    if (key.contains("/") || key.contains(":")) {
                        report(validatable, "keyValidator.invalidKey", key);
                    } else if (node.getVariableValue(key, false) != null) {
                        report(validatable, "keyValidator.duplicateKey", key);
                    }
                }

                private void report(IValidatable validatable, String messageKey, String key) {
View Full Code Here

Examples of org.brixcms.plugin.site.page.AbstractContainer

    /**
     * {@inheritDoc}
     */
    public Component getComponent(String id, IModel<BrixNode> pageNodeModel) {
        AbstractContainer container = getTileContainer();
        BrixNode tileNode = container.getTileNode(tileName);

        if (tileNode != null) {
            Tile tile = Tile.Helper.getTileOfType(TileContainerFacet.getTileClassName(tileNode),
                    tileNode.getBrix());
            return tile.newViewer(id, new BrixNodeModel(tileNode));
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.