Package org.dmrad.view.context

Examples of org.dmrad.view.context.ViewContext


          childInternalNeighborNames));

      ModelContext entityUpdateTableListModelContext = new ModelContext(
          modelContext);

      ViewContext entityUpdateTableListViewContext = new ViewContext(
          viewContext);
      entityUpdateTableListViewContext
          .setWicketId("entityUpdateTableListView");

      PageableListView entityUpdateTableListView = app.getViewMeta()
          .getPageableListView("EntityUpdateTableListView",
              entityUpdateTableListModelContext,
              entityUpdateTableListViewContext);
      add(entityUpdateTableListView);
      if (!app.isConceptDisplayAllowed(getAppSession(), conceptConfig)) {
        entityUpdateTableListView.setVisible(false);
      }

      add(new PropertyEmptyNameLabelListView(
          "propertyEmptyNameLabelListView", essentialPropertyNames));
      add(new PagingNavigator("blockNavigator", entityUpdateTableListView));
      add(new NeighborEmptyNameLabelListView(
          "neighborEmptyNameLabelListViewTail",
          childInternalNeighborNames));

      final Integer currentBlock = new Integer(entityUpdateTableListView
          .getCurrentPage());
      Link addLink = new Link("add") {
        static final long serialVersionUID = 200761L;

        public void onClick() {
          if (app.isConceptUpdateAllowed(getAppSession(),
              conceptConfig, null, "add")) {
            ModelContext entityAddFormPageModelContext = new ModelContext(
                modelContext);
            entityAddFormPageModelContext.setEntity(null);
            ViewContext entityAddPageContext = new ViewContext(
                viewContext);
            entityAddPageContext.setPageBlock(currentBlock);
            setResponsePage(app.getViewMeta().getPage(
                "EntityAddFormPage",
                entityAddFormPageModelContext,
                entityAddPageContext));
          } else {
            String error = getLocalizer().getString(
                "entities.config.add", this);
            error(error);
          }
        }
      };
      add(addLink);

      final IEntity clipboardEntity = getAppSession().getClipboard()
          .getEntity();
      Link pasteLink = new Link("paste") {
        static final long serialVersionUID = 200762L;

        public void onClick() {
          try {
            if (clipboardEntity != null) {
              if (app.isConceptUpdateAllowed(getAppSession(),
                  conceptConfig, clipboardEntity, "add")
                  && clipboardEntity.getConceptConfig() == entities
                      .getConceptConfig()) {
                if (entities.add(clipboardEntity)) {
                  ViewContext entityUpdateTablePageContext = new ViewContext(
                      viewContext);
                  entityUpdateTablePageContext
                      .setPageBlock(currentBlock);
                  setResponsePage(app.getViewMeta().getPage(
                      "EntityUpdateTablePage",
                      modelContext,
                      entityUpdateTablePageContext));
View Full Code Here


   */
  public DmLiteEntryPage(final ModelContext modelContext,
      final ViewContext viewContext) {
    ModelContext menuModelContext = new ModelContext(modelContext);

    ViewContext menuViewContext = new ViewContext(viewContext);
    menuViewContext.setContextPage(this);
    menuViewContext.setPage(this);
    menuViewContext.setWicketId("dmLiteEntryMenuPanel");

    add(new DmLiteEntryMenuPanel(menuModelContext, menuViewContext));

    add(new DmLiteEntryDescriptionPanel("dmLiteEntryDescriptionPanel"));
  }
View Full Code Here

      App app = viewContext.getApp();

      ModelContext entityModelContext = new ModelContext(modelContext);
      entityModelContext.setEntity(entity);

      ViewContext entityViewContext = new ViewContext(viewContext);
      entityViewContext.setWicketId("entityProperty");
      entityViewContext.getMoreArgs().add("shortText", Boolean.TRUE);

      PropertyConfig propertyConfig = entityModelContext
          .getPropertyConfig();
      Panel entityPropertyPanel;
View Full Code Here

        lookupLink = new Link("lookupLink") {
          static final long serialVersionUID = 200871L;
          public void onClick() {
            ModelContext lookupModelContext = new ModelContext(
                modelContext);
            ViewContext lookupViewContext = new ViewContext(
                viewContext);
            lookupViewContext.setUpdate(false);
            setResponsePage(app.getViewMeta().getPage(
                "EntityLookupTablePage",
                lookupModelContext, lookupViewContext));
          }
        };
View Full Code Here

TOP

Related Classes of org.dmrad.view.context.ViewContext

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.