Package org.dmrad.view.form

Examples of org.dmrad.view.form.LabelPanel


                              "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);
View Full Code Here


              "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);
View Full Code Here

                              "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 propertyConfigEntity : propertiesConfig) {
        PropertyConfig propertyConfig = (PropertyConfig) propertyConfigEntity;
        if (!propertyConfig.isReference()) {
          String propertyKey = conceptConfig.getCode() + "."
              + propertyConfig.getCode();
          String propertyName = getLocalizer().getString(propertyKey,
              this);
          Label propertyNameLabel = new Label("propertyName",
              propertyName);
          PropertyNameLabelValuePanelPair propertyNameLabelValuePanelPair = new PropertyNameLabelValuePanelPair();
          propertyNameLabelValuePanelPair
              .setPropertyNameLabel(propertyNameLabel);
          entityContext.setPropertyConfig(propertyConfig);
          ViewContext propertiesViewContext = new ViewContext(
              viewContext);
          propertiesViewContext.setWicketId("valuePanel");
          Panel propertyValuePanel;
          if (propertyConfig.getPropertyClass()
              .equals("java.net.URL")
              || propertyConfig.getPropertyClass().equals(
                  "org.dmlite.type.email.Email")) {
            propertyValuePanel = 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"))) {

            propertyValuePanel = new ExternalLinkPanel(entityContext,
                propertiesViewContext);

          } else if (propertyConfig.getPropertyClass().equals(
              "java.lang.Boolean")) {
            propertyValuePanel = new CheckBoxPanel(entityContext,
                propertiesViewContext);

          } else if (propertyConfig.getPropertyClass().equals(
              "java.lang.String")
              && propertyConfig.getDisplayLengthInt() > App.MIN_LONG_TEXT_LENGTH) {
            propertyValuePanel = new MultiLineLabelPanel(entityContext,
                propertiesViewContext);

          } else {
            propertyValuePanel = new LabelPanel(entityContext,
                propertiesViewContext);
          } // end if
          if (!app.isPropertyDisplayAllowed(getAppSession(),
              propertyConfig)) {
            propertyNameLabel.setVisible(false);
View Full Code Here

                              "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);
View Full Code Here

                              "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);
                  }

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

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

          entityModelContext.setPropertyConfig(propertyConfig);
          ViewContext propertiesViewContext = new ViewContext(
              viewContext);
          propertiesViewContext.setWicketId("valuePanel");
          Panel propertyValuePanel;
          if (propertyConfig.getPropertyClass()
              .equals("java.net.URL")
              || propertyConfig.getPropertyClass().equals(
                  "org.dmlite.type.email.Email")) {
            propertyValuePanel = 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"))) {
            propertyValuePanel = new ExternalLinkPanel(
                entityModelContext, propertiesViewContext);
          } else {
            propertyValuePanel = new LabelPanel(entityModelContext,
                propertiesViewContext);
          }
          if (!app.isPropertyDisplayAllowed(getAppSession(),
              propertyConfig)) {
            propertyNameLabel.setVisible(false);
View Full Code Here

                  "org.dmlite.type.email.Email"))) {
        childPropertyPanel = new ExternalLinkPanel(childModelContext,
            childViewContext);
        item.add(childPropertyPanel);
      } else {
        childPropertyPanel = new LabelPanel(childModelContext,
            childViewContext);
        item.add(childPropertyPanel);
      }
      if (!app.isPropertyDisplayAllowed(getAppSession(),
          childPropertyConfig)) {
View Full Code Here

                "org.dmlite.type.email.Email")) {
          parentPropertyPanel = new ExternalLinkPanel(
              parentModelContext, parentViewContext);
          item.add(parentPropertyPanel);
        } else {
          parentPropertyPanel = new LabelPanel(parentModelContext,
              parentViewContext);
          item.add(parentPropertyPanel);
        }
      } else {
        parentPropertyPanel = new LabelPanel(parentModelContext,
            parentViewContext);
        item.add(parentPropertyPanel);
      }
      if (!app.isPropertyDisplayAllowed(getAppSession(),
          parentPropertyConfig)) {
View Full Code Here

                "org.dmlite.type.email.Email")) {
          entityPropertyPanel = new ExternalLinkPanel(
              entityModelContext, entityViewContext);
          item.add(entityPropertyPanel);
        } else {
          entityPropertyPanel = new LabelPanel(entityModelContext,
              entityViewContext);
          item.add(entityPropertyPanel);
        }
      } else {
        entityPropertyPanel = new LabelPanel(entityModelContext,
            entityViewContext);
        item.add(entityPropertyPanel);
      }
      if (!app.isPropertyDisplayAllowed(getAppSession(), propertyConfig)) {
        entityPropertyPanel.setVisible(false);
View Full Code Here

TOP

Related Classes of org.dmrad.view.form.LabelPanel

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.