Package wicket.markup.html.basic

Examples of wicket.markup.html.basic.Label


   
    final DropDownChoice categorieChoice = new DropDownChoice("categorie", new PropertyModel(this.afterInfoSaison,"categorie"),this.categories.getList(), new CategoryChoiceRender());
    this.add(categorieChoice.setRequired(true));
    this.add(plaque);
    this.add(licence);
    this.add(new Label("nom", new PropertyModel(this.personne, "nom")));
    this.add(new Label("prenom", new PropertyModel(this.personne, "prenom")));
 
    //Lien Sélectioner
    final Map params = new HashMap();
    params.put(ListeMembres.TypeParameters.SAISON, this.saison);
   
View Full Code Here


  {
    final CartItem cartItem = (CartItem) item.getModelObject();
    Tarification tarification = catPartCtrl.getTarificationByOid(cartItem
        .getTarificationOid().getUniqueNumber());

    item.add(new Label("evenementNom", new PropertyModel(tarification
        .getCourse().getEvenement(), "nom")));
    item.add(new Label("discipline", new PropertyModel(tarification
        .getCourse(), "nom")));
    item.add(new Label("courseDate", new PropertyModel(tarification
        .getCourse(), "date")));
    item.add(new Label("prix", new PropertyModel(cartItem, "prix")));

    item.add(new RemoveCheckBox("selected", cartItem));

  }
View Full Code Here

   *            applicant
   */
  public ApplicantConfirmPanel(final String wicketId,
      final Applicant applicant) {
    super(wicketId);
    Label messageForApplicant = null;
    if (applicant != null) {
      try {
        Link loginLink = new PageLink("login", LoginPage.class);
        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);
        applicants.remove(applicant);
      } catch (DmException e) {
        log.error("New member problem in ApplicantConfirmPanel: "
            + applicant.getCode());
      }
    } else {
      String unconfirmMessage = getLocalizer().getString("message.unconfirm", this);
      messageForApplicant = new Label("messageForApplicant",
          unconfirmMessage);
    }
    add(messageForApplicant);
  }
View Full Code Here

  protected void populateItem(final ListItem item) {
    try {
      Project project = (Project) item.getModelObject();

      String projectName = project.getName();
      Label projectNameLabel = new Label("projectName", projectName);
      item.add(projectNameLabel);

      String projectObjective = project.getObjective();
      MultiLineLabel projectObjectiveLabel = new MultiLineLabel(
          "projectObjective", projectObjective);
View Full Code Here

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

      IEntity entity = modelContext.getEntity();

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

      ModelContext entityContext = new ModelContext(modelContext);

      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 parentPropertyConfigEntity : parentConceptPropertiesConfig) {
              PropertyConfig parentConceptPropertyConfig = (PropertyConfig) parentPropertyConfigEntity;
              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 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);
            propertyValuePanel.setVisible(false);
          }

          propertyNameLabelValuePanelPair
              .setPropertyValuePanel(propertyValuePanel);
View Full Code Here

          } else {
            propertyValueText = "????????";
          }
        }
      }
      label = new Label("propertyValue", propertyValueText);
      add(label);
    } catch (Exception e) {
      log.error("Error in LabelPanel: " + modelContext.getPropertyCode()
          + " - " + e.getMessage());
    }
View Full Code Here

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

   */
  protected void populateItem(ListItem item) {
    try {
      NeighborNameLabelLinkPair neighborNameLabelLinkPair = (NeighborNameLabelLinkPair) item
          .getModelObject();
      Label neighborNameLabel = neighborNameLabelLinkPair
          .getNeighborNameLabel();
      item.add(neighborNameLabel);
      Link neighborLink = neighborNameLabelLinkPair.getNeighborLink();
      item.add(neighborLink);
    } catch (Exception e) {
View Full Code Here

   *            list item
   */
  protected void populateItem(ListItem item) {
    try {
      String propertyName = (String) item.getModelObject();
      Label propertyNameLabel = new Label("propertyName", propertyName);
      item.add(propertyNameLabel);
    } catch (Exception e) {
      log.error("Error in PropertyNameLabelListView: " + e.getMessage());
    }
  }
View Full Code Here

TOP

Related Classes of wicket.markup.html.basic.Label

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.