Package org.dmrad.view

Examples of org.dmrad.view.App


   */
  protected void populateItem(ListItem item) {
    IOrderedEntities entry = (IOrderedEntities) item.getModelObject();
    ConceptConfig entryConceptConfig = entry.getConceptConfig();
    try {
      App app = viewContext.getApp();

      String conceptKey = entryConceptConfig.getCode();
      String conceptName = getLocalizer().getString(conceptKey, this);
      Label entryConceptName = new Label("entryName", conceptName);
      item.add(entryConceptName);

      ModelContext entryModelContext = new ModelContext(modelContext);
      entryModelContext.setEntities(entry);

      ViewContext entryViewContext = new ViewContext(viewContext);
      WebPage entryConceptPage = null;
      String displayType = entry.getConceptConfig().getDisplayType();
      if (displayType == null) {
        displayType = "table";
      }
      if (displayType.equals("table")) {
        entryConceptPage = app.getViewMeta().getPage(
            "EntityDisplayTablePage", entryModelContext,
            entryViewContext);
      } else if (displayType.equals("list")) {
        entryConceptPage = app.getViewMeta().getPage(
            "EntityDisplayListPage", entryModelContext,
            entryViewContext);
      } else if (displayType.equals("slide")) {
        entryConceptPage = app.getViewMeta().getPage(
            "EntityDisplaySlidePage", entryModelContext,
            entryViewContext);
      }
      Link entryConceptLink = new PageLink("entry", entryConceptPage);
      item.add(entryConceptLink);

      ModelContext keywordSelectionModelContext = new ModelContext(
          modelContext);
      keywordSelectionModelContext.setEntities(entry);
      PropertyConfig propertyConfig = entryConceptConfig
          .getPropertiesConfig().getFirstMaxTextSizePropertyConfig();
      keywordSelectionModelContext.setPropertyConfig(propertyConfig);

      ViewContext keywordSelectionViewContext = new ViewContext(
          viewContext);
      keywordSelectionViewContext.getMoreArgs().add("keywords", "");
      keywordSelectionViewContext.getMoreArgs().add("andKeywords",
          Boolean.TRUE);

      WebPage keywordSelectionPage = app.getViewMeta().getPage(
          "EntityPropertyKeywordSelectPage",
          keywordSelectionModelContext, keywordSelectionViewContext);
      Link keywordSelectionLink = new PageLink("entryKeywordSelection",
          keywordSelectionPage);
      item.add(keywordSelectionLink);
      if (!app.isConceptDisplayAllowed(getAppSession(),
          entryConceptConfig)) {
        entryConceptLink.setVisible(false);
        keywordSelectionLink.setVisible(false);
      } else if (propertyConfig == null) {
        keywordSelectionLink.setVisible(false);
View Full Code Here


  public ParentChildPropertyDisplayListPanel(final ModelContext modelContext,
      final ViewContext viewContext) {
    super(modelContext, viewContext);
    try {
      App app = viewContext.getApp();
     
      ConceptConfig parentConceptConfig = modelContext.getEntities()
          .getConceptConfig();

      ModelContext parentChildModelContext = new ModelContext(
          modelContext, true);
      String sectionTitle = (String) parentChildModelContext
          .getMoreArgs().get("sectionTitle");
      add(new Label("sectionTitle", sectionTitle));

      ViewContext parentChildViewContext = new ViewContext(viewContext,
          true);
      parentChildViewContext.setWicketId("parentChildPropertyList");
      parentChildViewContext.getMoreArgs().add("shortText", Boolean.TRUE);

      ListView parentChildPropertyDisplayListListView = app.getViewMeta()
          .getListView("ParentChildPropertyDisplayListListView",
              parentChildModelContext, parentChildViewContext);
      add(parentChildPropertyDisplayListListView);
      if (!app.isConceptDisplayAllowed(getAppSession(),
          parentConceptConfig)) {
        parentChildPropertyDisplayListListView.setVisible(false);
      }
    } catch (Exception e) {
      log.error("Error in ParentChildPropertyDisplayListPanel: "
View Full Code Here

   */
  public EntityLookupTablePage(final ModelContext modelContext,
      final ViewContext viewContext) {
    super(modelContext, viewContext);
    try {
      App app = viewContext.getApp();

      ModelContext lookupModelContext = new ModelContext(modelContext);

      ViewContext lookupViewContext = new ViewContext(viewContext);
      lookupViewContext.setPage(this);
      lookupViewContext.setWicketId("entityLookupTablePanel");

      add(app.getViewMeta().getPanel("EntityLookupTablePanel",
          lookupModelContext, lookupViewContext));
    } catch (Exception e) {
      log.error("Error in EntityLookupTablePage: "
          + modelContext.getEntitiesCode() + " - " + e.getMessage());
    }
View Full Code Here

        add(loginLink);

        String confirmMessage = getLocalizer().getString("message.confirm", this);
        messageForApplicant = new Label("messageForApplicant",
            confirmMessage);
        App app = (App) getApplication();
        String loginConcept = app.getModelConfig().getLoginConcept();
        Members members = (Members) app.getDbContext()
            .getPersistentModel().getPersistentEntry(loginConcept)
            .getEntities();
        IDomainModel domainModel = app.getDomainModel();
        Member newMember = (Member) domainModel.getModelMeta()
            .createEntity(members);
        Applicants applicants = (Applicants) app.getDbContext()
            .getPersistentModel().getPersistentEntry("Applicants")
            .getEntities();
        newMember.copyFromApplicant(applicant);

        members.add(newMember);
View Full Code Here

   */
  protected void populateItem(ListItem item) {
    try {
      IEntity entity = (IEntity) item.getModelObject();

      final App app = viewContext.getApp();

      ConceptConfig conceptConfig = entity.getConceptConfig();

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

      ModelContext parentModelContext = new ModelContext(modelContext);
      ViewContext parentViewContext = new ViewContext(viewContext);

      List<Panel> propertyValuePanels = new ArrayList<Panel>();

      // Properties absorbed from parents.
      NeighborsConfig neighborsConfig = conceptConfig
          .getNeighborsConfig();
      for (IEntity neighborConfigEntity : neighborsConfig) {
        NeighborConfig neighborConfig = (NeighborConfig) neighborConfigEntity;
        if (neighborConfig.getType().equals("parent")
            && neighborConfig.getMax().equals("1")
            && neighborConfig.isAbsorb()) {
          ConceptConfig parentConceptConfig = neighborConfig
              .getNeighborDestinationConceptConfig();
          if (parentConceptConfig != null) {
            PropertiesConfig parentConceptPropertiesConfig = parentConceptConfig
                .getPropertiesConfig();
            for (IEntity parentPropertyConfigEntity : parentConceptPropertiesConfig) {
              PropertyConfig parentConceptPropertyConfig = (PropertyConfig) parentPropertyConfigEntity;
              if (parentConceptPropertyConfig.isEssential()) {
                IEntity parentEntity = entity
                    .getNeighborEntity(neighborConfig
                        .getCode());
                Panel parentPropertyPanel;
                if (parentEntity != null) {
                  parentModelContext.setEntity(parentEntity);
                  parentModelContext
                      .setPropertyConfig(parentConceptPropertyConfig);
                  parentViewContext.setWicketId("valuePanel");
                  parentViewContext.getMoreArgs().add(
                      "shortText", Boolean.TRUE);
                  if (parentConceptPropertyConfig
                      .getPropertyClass().equals(
                          "java.net.URL")
                      || parentConceptPropertyConfig
                          .getPropertyClass()
                          .equals(
                              "org.dmlite.type.email.Email")) {
                    parentPropertyPanel = new ExternalLinkPanel(
                        parentModelContext,
                        parentViewContext);
                  } else if (parentConceptPropertyConfig
                      .getPropertyClass().equals(
                          "java.lang.String")
                      && parentConceptPropertyConfig
                          .isValidateType()
                      && (parentConceptPropertyConfig
                          .getValidationType()
                          .equals("java.net.URL") || parentConceptPropertyConfig
                          .getValidationType()
                          .equals(
                              "org.dmlite.type.email.Email"))) {
                    parentPropertyPanel = new ExternalLinkPanel(
                        parentModelContext,
                        parentViewContext);
                  } else {
                    parentPropertyPanel = new LabelPanel(
                        parentModelContext,
                        parentViewContext);
                  } // if
                  if (!app.isNeighborDisplayAllowed(
                      getAppSession(), neighborConfig)) {
                    parentPropertyPanel.setVisible(false);
                  } else if (!app.isPropertyDisplayAllowed(
                      getAppSession(),
                      parentConceptPropertyConfig)) {
                    parentPropertyPanel.setVisible(false);
                  }
                } else {
                  parentPropertyPanel = new Panel(
                      "valuePanel");
                  parentPropertyPanel.setVisible(false);
                }
                propertyValuePanels.add(parentPropertyPanel);
              } // if
            } // for
          } // if
        } // if
      } // for

      PropertiesConfig propertiesConfig = conceptConfig
          .getPropertiesConfig();
      for (IEntity propertyConfigEntity : propertiesConfig) {
        PropertyConfig propertyConfig = (PropertyConfig) propertyConfigEntity;
        if (propertyConfig.isEssential()) {
          entityModelContext.setPropertyConfig(propertyConfig);
          ViewContext propertiesViewContext = new ViewContext(
              viewContext);
          propertiesViewContext.setWicketId("valuePanel");
          propertiesViewContext.getMoreArgs().add("shortText",
              Boolean.TRUE);
          Panel essentialPropertyPanel;
          if (propertyConfig.getPropertyClass()
              .equals("java.net.URL")
              || propertyConfig.getPropertyClass().equals(
                  "org.dmlite.type.email.Email")) {
            essentialPropertyPanel = new ExternalLinkPanel(
                entityModelContext, propertiesViewContext);
          } else if (propertyConfig.getPropertyClass().equals(
              "java.lang.String")
              && propertyConfig.isValidateType()
              && (propertyConfig.getValidationType().equals(
                  "java.net.URL") || propertyConfig
                  .getValidationType().equals(
                      "org.dmlite.type.email.Email"))) {
            essentialPropertyPanel = new ExternalLinkPanel(
                entityModelContext, propertiesViewContext);
          } else {
            essentialPropertyPanel = new LabelPanel(
                entityModelContext, propertiesViewContext);
          } // end if
          if (!app.isPropertyDisplayAllowed(getAppSession(),
              propertyConfig)) {
            essentialPropertyPanel.setVisible(false);
          }

          propertyValuePanels.add(essentialPropertyPanel);
        } // end if (propertyConfig.isEssential()) {
      } // for

      ListView propertyValuePanelListView = new PropertyValuePanelListView(
          "propertyValuePanelListView", propertyValuePanels);
      item.add(propertyValuePanelListView);
      if (!app.isConceptDisplayAllowed(getAppSession(), conceptConfig)) {
        propertyValuePanelListView.setVisible(false);
      }

      final ViewContext entityDisplayPageViewContext = new ViewContext(
          viewContext);
      entityDisplayPageViewContext.setUpdate(false);
      Link displayLink = new PageLink("display", new IPageLink() {
        static final long serialVersionUID = 200531L;

        public Page getPage() {
          return app.getViewMeta().getPage("EntityDisplayPage",
              entityModelContext, entityDisplayPageViewContext);
        }

        public Class getPageIdentity() {
          return app.getViewMeta().getPageClass("EntityDisplayPage",
              entityModelContext, entityDisplayPageViewContext);
        }
      });
      item.add(displayLink);
    } catch (Exception e) {
View Full Code Here

      String projectDescription = project.getDescription();
      MultiLineLabel projectDescriptionLabel = new MultiLineLabel(
          "projectDescription", projectDescription);
      item.add(projectDescriptionLabel);

      App app = (App) getApplication();
      Topics topics = (Topics) app.getEntry("Topics");
      Topic projectTopic = (Topic) topics.getTopic(project.getName());
      Links projectTopicLinks;
      if (projectTopic == null) {
        projectTopicLinks = new Links(project.getDomainModel());
      } else {
View Full Code Here

   */
  public EntityDisplayMinPanel(final ModelContext modelContext,
      final ViewContext viewContext) {
    super(viewContext.getWicketId());
    try {
      App app = viewContext.getApp();
     
      IEntity entity = modelContext.getEntity();

      ConceptConfig conceptConfig = entity.getConceptConfig();

      List<PropertyNameLabelValuePanelPair> propertyNameLabelValuePanelPairs = new ArrayList<PropertyNameLabelValuePanelPair>();

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

      PropertiesConfig propertiesConfig = conceptConfig
          .getPropertiesConfig();
      for (IEntity propertyConfigEntity : propertiesConfig) {
        PropertyConfig propertyConfig = (PropertyConfig) propertyConfigEntity;
        if (propertyConfig.isEssential()) {
          String propertyKey = conceptConfig.getCode() + "."
              + propertyConfig.getCode();
          String propertyName = getLocalizer().getString(propertyKey,
              this);
          PropertyNameLabelValuePanelPair propertyNameLabelValuePanelPair = new PropertyNameLabelValuePanelPair();
          Label propertyNameLabel = new Label("propertyName",
              propertyName);
          propertyNameLabelValuePanelPair
              .setPropertyNameLabel(propertyNameLabel);

          entityContext.setPropertyConfig(propertyConfig);
          ViewContext propertiesViewContext = new ViewContext(
              viewContext);
          propertiesViewContext.setWicketId("valuePanel");
          Panel essentialPropertyPanel;
          if (propertyConfig.getPropertyClass()
              .equals("java.net.URL")
              || propertyConfig.getPropertyClass().equals(
                  "org.dmlite.type.email.Email")) {
            essentialPropertyPanel = new ExternalLinkPanel(
                entityContext, propertiesViewContext);
          } else if (propertyConfig.getPropertyClass().equals(
              "java.lang.String")
              && propertyConfig.isValidateType()
              && (propertyConfig.getValidationType().equals(
                  "java.net.URL") || propertyConfig
                  .getValidationType().equals(
                      "org.dmlite.type.email.Email"))) {
            essentialPropertyPanel = new ExternalLinkPanel(
                entityContext, propertiesViewContext);
          } else if (propertyConfig.getPropertyClass().equals(
              "java.lang.Boolean")) {
            essentialPropertyPanel = new CheckBoxPanel(
                entityContext, propertiesViewContext);
          } else if (propertyConfig.getPropertyClass().equals(
              "java.lang.String")
              && propertyConfig.getDisplayLengthInt() > App.MIN_LONG_TEXT_LENGTH) {
            essentialPropertyPanel = new MultiLineLabelPanel(
                entityContext, propertiesViewContext);
          } else {
            essentialPropertyPanel = new LabelPanel(entityContext,
                propertiesViewContext);
          }
          if (!app.isPropertyDisplayAllowed(getAppSession(),
              propertyConfig)) {
            essentialPropertyPanel.setVisible(false);
          }

          propertyNameLabelValuePanelPair
              .setPropertyValuePanel(essentialPropertyPanel);
          propertyNameLabelValuePanelPairs
              .add(propertyNameLabelValuePanelPair);
        } // if (propertyConfig.isEssential()) {
      } // end for

      ListView propertyNameLabelValuePanelListView = new PropertyNameLabelValuePanelListView(
          "propertyNameLabelValuePanelListView",
          propertyNameLabelValuePanelPairs);
      add(propertyNameLabelValuePanelListView);
      if (!app.isConceptDisplayAllowed(getAppSession(), conceptConfig)) {
        propertyNameLabelValuePanelListView.setVisible(false);
      }
    } catch (Exception e) {
      log.error("Error in EntityDisplayMinPanel: "
          + modelContext.getEntityCode() + " - " + e.getMessage());
View Full Code Here

      final ViewContext viewContext) {
    super(viewContext.getWicketId());
    this.modelContext = modelContext;
    this.viewContext = viewContext;
    try {
      App app = viewContext.getApp();
     
      CountryLanguage countryLanguage = (CountryLanguage) modelContext
          .getEntity();
      CountryLanguages countryLanguages = (CountryLanguages) modelContext
          .getEntities();
      ConceptConfig countryLanguageConceptConfig = countryLanguages
          .getConceptConfig();
      String currentLanguage = countryLanguage.getLanguage();
      List languageList = countryLanguages.getLanguageList();

      IModel choiceModel = new Model(currentLanguage);
      DropDownChoice countryLanguageChoice = new CountryLanguageChoice(
          "countryLanguageChoice", choiceModel, languageList);
      add(countryLanguageChoice);
      if (!app.isConceptDisplayAllowed(getAppSession(),
          countryLanguageConceptConfig)) {
        countryLanguageChoice.setVisible(false);
      }
    } catch (Exception e) {
      log.error("Error in CountryLanguageChoicePanel: " + e.getMessage());
View Full Code Here

   */
  public EntityUpdateForm(final ModelContext modelContext,
      final ViewContext viewContext) {
    super(modelContext, viewContext);
    try {
      final App app = viewContext.getApp();
     
      final IEntity entity = modelContext.getEntity();
      final IDomainModel domainModel = modelContext.getDomainModel();

      ConceptConfig conceptConfig = entity.getConceptConfig();
      String conceptKey = conceptConfig.getCode();
      String conceptName = getLocalizer().getString(conceptKey, this);
      add(new Label("conceptName", conceptName));

      List<PropertyNameLabelValuePanelPair> propertyNameLabelValuePanelPairs = new ArrayList<PropertyNameLabelValuePanelPair>();

      // Properties absorbed from parents.
      NeighborsConfig neighborsConfig = conceptConfig
          .getNeighborsConfig();
      for (IEntity neighborConfigEntity : neighborsConfig) {
        NeighborConfig neighborConfig = (NeighborConfig) neighborConfigEntity;
        if (neighborConfig.getType().equals("parent")
            && neighborConfig.getMax().equals("1")
            && neighborConfig.isAbsorb()) {
          ConceptConfig parentConceptConfig = neighborConfig
              .getNeighborDestinationConceptConfig();
          if (parentConceptConfig != null) {
            PropertiesConfig parentConceptPropertiesConfig = parentConceptConfig
                .getPropertiesConfig();
            for (IEntity propertyConfigEntity : parentConceptPropertiesConfig) {
              PropertyConfig parentConceptPropertyConfig = (PropertyConfig) propertyConfigEntity;
              if (parentConceptPropertyConfig.isEssential()) {
                IEntity parentEntity = entity
                    .getNeighborEntity(neighborConfig
                        .getCode());
                if (parentEntity != null) {
                  String parentCode = parentEntity
                      .getConceptConfig().getCode();
                  String parentPropertyKey = parentCode
                      + "."
                      + parentConceptPropertyConfig
                          .getCode();
                  String parentPropertyName = getLocalizer()
                      .getString(parentPropertyKey, this);
                  Label parentPropertyNameLabel = new Label(
                      "propertyName", parentPropertyName);
                  PropertyNameLabelValuePanelPair propertyNameLabelValuePanelPair = new PropertyNameLabelValuePanelPair();
                  propertyNameLabelValuePanelPair
                      .setPropertyNameLabel(parentPropertyNameLabel);

                  ModelContext parentModelContext = new ModelContext(
                      modelContext);
                  parentModelContext.setEntity(parentEntity);
                  parentModelContext
                      .setPropertyConfig(parentConceptPropertyConfig);

                  ViewContext parentViewContext = new ViewContext(
                      viewContext);
                  parentViewContext.setWicketId("valuePanel");

                  Panel parentPropertyValuePanel;
                  if (parentConceptPropertyConfig
                      .getPropertyClass().equals(
                          "java.net.URL")
                      || parentConceptPropertyConfig
                          .getPropertyClass()
                          .equals(
                              "org.dmlite.type.email.Email")) {
                    parentPropertyValuePanel = new ExternalLinkPanel(
                        parentModelContext,
                        parentViewContext);
                  } else {
                    parentPropertyValuePanel = new LabelPanel(
                        parentModelContext,
                        parentViewContext);
                  }
                  if (!app.isNeighborDisplayAllowed(
                      getAppSession(), neighborConfig)) {
                    parentPropertyNameLabel.setVisible(false);
                    parentPropertyValuePanel.setVisible(false);
                  } else if (!app.isPropertyDisplayAllowed(
                      getAppSession(),
                      parentConceptPropertyConfig)) {
                    parentPropertyNameLabel.setVisible(false);
                    parentPropertyValuePanel.setVisible(false);
                  }

                  propertyNameLabelValuePanelPair
                      .setPropertyValuePanel(parentPropertyValuePanel);
                  propertyNameLabelValuePanelPairs
                      .add(propertyNameLabelValuePanelPair);
                } // if
              } // if
            } // for
          } // if
        } // if
      } // for

      PropertiesConfig propertiesConfig = conceptConfig
          .getPropertiesConfig();
      for (IEntity config : propertiesConfig) {
        PropertyConfig propertyConfig = (PropertyConfig) config;
        String propertyCode = propertyConfig.getCode();
        String propertyKey = conceptConfig.getCode() + "."
            + propertyCode;
        String propertyName = getLocalizer().getString(propertyKey,
            this);
        PropertyNameLabelValuePanelPair propertyNameLabelValuePanelPair = new PropertyNameLabelValuePanelPair();
        Label propertyNameLabel = new Label("propertyName",
            propertyName);
        propertyNameLabelValuePanelPair
            .setPropertyNameLabel(propertyNameLabel);
        ModelContext entityModelContext = new ModelContext(modelContext);
        entityModelContext.setPropertyConfig(propertyConfig);
        Panel propertyValuePanel;
        if (propertyConfig.getPropertyClass().equals(
            "java.lang.Boolean")) {
          ViewContext checkBoxPanelContext = new ViewContext(
              viewContext);
          checkBoxPanelContext.setWicketId("valuePanel");
          propertyValuePanel = new CheckBoxPanel(entityModelContext,
              checkBoxPanelContext);
        } else if (propertyConfig.getPropertyClass().equals(
            "java.lang.String")
            && propertyConfig.getDisplayLengthInt() > App.MIN_LONG_TEXT_LENGTH) {
          ViewContext textAreaPanelContext = new ViewContext(
              viewContext);
          textAreaPanelContext.setWicketId("valuePanel");
          propertyValuePanel = new TextAreaPanel(entityModelContext,
              textAreaPanelContext);
        } else if (propertyConfig.isReference()) {
          String neighborCode = propertyConfig.getReferenceNeighbor();
          NeighborConfig neighborConfig = conceptConfig
              .getNeighborsConfig().getNeighborConfig(
                  neighborCode);
          String neighborConceptCode = neighborConfig
              .getDestination();
          IPersistentEntities persistentEntities = app.getDbContext()
              .getPersistentModel().getPersistentEntry(
                  neighborConceptCode);
          IOrderedEntities lookupEntities = null;
          if (persistentEntities != null) {
            lookupEntities = (IOrderedEntities) persistentEntities
                .getEntities();
          }
          if (lookupEntities != null) {
            ModelContext neighborModelContext = new ModelContext(
                modelContext);
            neighborModelContext.setPropertyConfig(propertyConfig);
            neighborModelContext.setLookupEntities(lookupEntities);
            ViewContext lookupViewContext = new ViewContext(
                viewContext);
            lookupViewContext.setWicketId("valuePanel");
            if (neighborConfig.getMinInt() == 0) {
              propertyValuePanel = new LookupEmptyPanel(
                  neighborModelContext, lookupViewContext);

            } else {
              propertyValuePanel = new LookupPanel(
                  neighborModelContext, lookupViewContext);
            }
          } else {
            ViewContext textFieldPanelContext = new ViewContext(
                viewContext);
            textFieldPanelContext.setWicketId("valuePanel");
            propertyValuePanel = new TextFieldPanel(entityModelContext,
                textFieldPanelContext);
          }
        } else if (propertyConfig.isValidateType()
            && propertyConfig
                .isValidatationTypeEntities(domainModel)) {
          ViewContext dropDownChoicePanelContext = new ViewContext(
              viewContext);
          dropDownChoicePanelContext.setWicketId("valuePanel");
          propertyValuePanel = new TypeValueDropDownChoicePanel(
              entityModelContext, dropDownChoicePanelContext);
        } else {
          ViewContext textFieldPanelContext = new ViewContext(
              viewContext);
          textFieldPanelContext.setWicketId("valuePanel");
          propertyValuePanel = new TextFieldPanel(entityModelContext,
              textFieldPanelContext);
        } // end if
        if (!app.isPropertyDisplayAllowed(getAppSession(),
            propertyConfig)) {
          propertyNameLabel.setVisible(false);
          propertyValuePanel.setVisible(false);
        } else if (!app.isPropertyUpdateAllowed(getAppSession(),
            propertyConfig)) {
          ViewContext labelPanelContext = new ViewContext(viewContext);
          labelPanelContext.setWicketId("valuePanel");
          propertyValuePanel = new LabelPanel(entityModelContext,
              labelPanelContext);
        }

        propertyNameLabelValuePanelPair
            .setPropertyValuePanel(propertyValuePanel);
        propertyNameLabelValuePanelPairs
            .add(propertyNameLabelValuePanelPair);
      } // end for

      ListView propertyNameLabelValuePanelListView = new PropertyNameLabelValuePanelListView(
          "propertyNameLabelValuePanelListView",
          propertyNameLabelValuePanelPairs);
      add(propertyNameLabelValuePanelListView);
      if (!app.isConceptDisplayAllowed(getAppSession(), conceptConfig)) {
        propertyNameLabelValuePanelListView.setVisible(false);
      }

      add(new Button("cancel") {
        static final long serialVersionUID = 200721L;

        protected void onSubmit() {
          App app = viewContext.getApp();
          ModelContext entityUpdateTablePageModelContext = new ModelContext(
              modelContext);
          entityUpdateTablePageModelContext.setUpdateEntity(null);
          ViewContext entityUpdateTablePageViewContext = new ViewContext(
              viewContext);
          setResponsePage(app.getViewMeta().getPage(
              "EntityUpdateTablePage",
              entityUpdateTablePageModelContext,
              entityUpdateTablePageViewContext));
        }
      }.setDefaultFormProcessing(false));
View Full Code Here

          NeighborConfig neighborConfig = entity.getConceptConfig()
              .getNeighborsConfig().getNeighborConfig(
                  neighborCode);
          String neighborConceptCode = neighborConfig
              .getDestination();
          App app = (App) getApplication();
          IPersistentEntities persistentEntities = app.getDbContext()
              .getPersistentModel().getPersistentEntry(
                  neighborConceptCode);
          IOrderedEntities neighborEntities = null;
          if (persistentEntities != null) {
            neighborEntities = (IOrderedEntities) persistentEntities
View Full Code Here

TOP

Related Classes of org.dmrad.view.App

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.