Package wicket.markup.html.panel

Examples of wicket.markup.html.panel.Panel


      IEntity firstEntity = null;
      if (entity == null) {
        firstEntity = (IEntity) modelContext.getOrderedEntities()
            .first();
        if (firstEntity == null) {
          Panel panel = new Panel("entityDisplaySlidePanel");
          panel.setVisible(false);
          add(panel);
        } else {
          ModelContext entityDisplaySlidePanelModelContext = new ModelContext(
              modelContext);
          entityDisplaySlidePanelModelContext.setEntity(firstEntity);
View Full Code Here


      ModelContext slideNavigateModelContext = new ModelContext(
          modelContext);

      ViewContext slideNavigateViewContext = new ViewContext(viewContext);
      slideNavigateViewContext.setWicketId("slideNavigatePanel");
      Panel entitySlideNavigatePanel = new EntitySlideNavigatePanel(
          slideNavigateModelContext, slideNavigateViewContext);
      add(entitySlideNavigatePanel);
      if (!app.isConceptDisplayAllowed(getAppSession(), conceptConfig)) {
        entitySlideNavigatePanel.setVisible(false);
      }

      List<Panel> neighborList = new ArrayList<Panel>();
      NeighborsConfig neighborsConfig = conceptConfig
          .getNeighborsConfig();
      for (IEntity neighborConfigEntity : neighborsConfig) {
        NeighborConfig neighborConfig = (NeighborConfig) neighborConfigEntity;
        if (neighborConfig.getType().equals("child")) {
          String neighborCode = neighborConfig.getCode();
          IDomainModel domainModel = app.getDomainModel();
          IOrderedEntities childEntities = (IOrderedEntities) domainModel
              .getModelMeta().getNeighborEntities(entity,
                  neighborCode);

          ModelContext neighborModelContext = new ModelContext(
              modelContext);
          neighborModelContext.setContextEntities(entities);
          neighborModelContext.setContextEntity(entity);
          neighborModelContext.setEntities(childEntities);

          ViewContext neighborViewContext = new ViewContext(
              viewContext);
          neighborViewContext.setWicketId("entityDisplayListPanel");

          Panel entityDisplayListPanel = app.getViewMeta().getPanel(
              "EntityDisplayListPanel", neighborModelContext,
              neighborViewContext);
          neighborList.add(entityDisplayListPanel);
          if (!app.isNeighborDisplayAllowed(getAppSession(),
              neighborConfig)) {
            entityDisplayListPanel.setVisible(false);
          }
        } // if (neighborConfig.getType().equals("child")) {
      } // for

      add(new PanelListView("neighborEntityListPanelListView",
View Full Code Here

      String childProperty = (String) modelContext.getMoreArgs().get(
          "childProperty");
      PropertyConfig childPropertyConfig = childEntity.getConceptConfig()
          .getPropertyConfig(childProperty);
      Panel childPropertyPanel;
      String propertyType = childPropertyConfig.getPropertyClass();
      if (propertyType.equals("java.net.URL")
          || propertyType.equals("org.dmlite.type.email.Email")) {
        childPropertyPanel = new ExternalLinkPanel(childModelContext,
            childViewContext);
        item.add(childPropertyPanel);
      } else if (childPropertyConfig.getPropertyClass().equals(
          "java.lang.String")
          && childPropertyConfig.isValidateType()
          && (childPropertyConfig.getValidationType().equals(
              "java.net.URL") || childPropertyConfig
              .getValidationType().equals(
                  "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)) {
        childPropertyPanel.setVisible(false);
      }
    } catch (Exception e) {
      log.error("Error in ChildPropertyDisplayListListView: "
          + e.getMessage());
    }
View Full Code Here

   *            view context
   * @return panel
   */
  public Panel getPanel(final String classSimpleName,
      final ModelContext modelContext, final ViewContext viewContext) {
    Panel result = null;
    try {
      String actionType;
      if (viewContext.isUpdate()) {
        actionType = "update";
      } else {
View Full Code Here

   *            Wicket id
   * @return menu panel
   */
  public Panel getMenuPanel(final String classSimpleName,
      final String wicketId) {
    Panel result = null;
    try {
      String className = App.PACKAGE_VIEW_HOME_PREFIX + "."
          + classSimpleName;
      Class claz = getClass(className);
      Constructor constructor = getConstructor(claz, String.class);
View Full Code Here

   *            view context
   * @return menu panel
   */
  public Panel getMenuPanel(final String classSimpleName,
      final ModelContext modelContext, final ViewContext viewContext) {
    Panel result = null;
    try {
      String className = App.PACKAGE_VIEW_MENU_PREFIX + "."
          + classSimpleName;
      Class claz = getClass(className);
      Constructor constructor = getConstructor(claz, ModelContext.class,
View Full Code Here

      ViewContext parentViewContext = new ViewContext(viewContext, true);
      parentViewContext.setWicketId("parentProperty");

      PropertyConfig parentPropertyConfig = parentModelContext
          .getPropertyConfig();
      Panel parentPropertyPanel;
      String propertyType = parentPropertyConfig.getPropertyClass();
      if (propertyType.equals("java.net.URL")
          || propertyType.equals("org.dmlite.type.email.Email")) {
        parentPropertyPanel = new ExternalLinkPanel(parentModelContext,
            parentViewContext);
        item.add(parentPropertyPanel);
      } else if (parentPropertyConfig.getPropertyClass().equals(
          "java.lang.String")
          && parentPropertyConfig.isValidateType()) {
        if (parentPropertyConfig.getValidationType().equals(
            "java.net.URL")
            || parentPropertyConfig.getValidationType().equals(
                "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)) {
        parentPropertyPanel.setVisible(false);
      }

      ModelContext childModelContext = new ModelContext(modelContext,
          true);
      childModelContext.setEntity(parentEntity);
View Full Code Here

            .setWicketId("countryLanguageChoicePanel");
        CountryLanguageChoicePanel countryLanguageChoicePanel = new CountryLanguageChoicePanel(
            countryLanguageModelContext, countryLanguageViewContext);
        add(countryLanguageChoicePanel);
      } else {
        Panel panel = new Panel("countryLanguageChoicePanel");
        add(panel);
        panel.setVisible(false);
      }

      ModelContext dmLiteEntryPageModelContext = new ModelContext();
      dmLiteEntryPageModelContext.setDomainModel(app.getDomainModel());
View Full Code Here

      entityViewContext.setWicketId("entityProperty");
      entityViewContext.getMoreArgs().add("shortText", Boolean.TRUE);

      PropertyConfig propertyConfig = entityModelContext
          .getPropertyConfig();
      Panel entityPropertyPanel;

      String propertyType = propertyConfig.getPropertyClass();
      if (propertyType.equals("java.net.URL")
          || propertyType.equals("org.dmlite.type.email.Email")) {
        entityPropertyPanel = new ExternalLinkPanel(entityModelContext,
            entityViewContext);
        item.add(entityPropertyPanel);
      } else if (propertyConfig.getPropertyClass().equals(
          "java.lang.String")
          && propertyConfig.isValidateType()) {
        if (propertyConfig.getValidationType().equals("java.net.URL")
            || propertyConfig.getValidationType().equals(
                "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);
      }
    } catch (Exception e) {
      log.error("Error in EntityPropertyDisplayListListView: "
          + e.getMessage());
    }
View Full Code Here

TOP

Related Classes of wicket.markup.html.panel.Panel

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.