Package org.projectforge.web.wicket.components

Examples of org.projectforge.web.wicket.components.RequiredMaxLengthTextField


  {
    super.init();
    {
      // Subject
      final FieldsetPanel fs = gridBuilder.newFieldset(MemoDO.class, "subject");
      final RequiredMaxLengthTextField subject = new RequiredMaxLengthTextField(fs.getTextFieldId(), new PropertyModel<String>(data, "subject"));
      subject.add(WicketUtils.setFocus());
      fs.add(subject);
    }
    {
      // Text description
      final FieldsetPanel fs = gridBuilder.newFieldset(MemoDO.class, "memo");
View Full Code Here


    /* GRID 50% - BLOCK */
    gridBuilder.newSplitPanel(GridSize.COL50);
    {
      // Name
      final FieldsetPanel fs = gridBuilder.newFieldset(getString("userPref.name"));
      final RequiredMaxLengthTextField name = new RequiredMaxLengthTextField(InputPanel.WICKET_ID, new PropertyModel<String>(data, "name"));
      name.add(new IValidator<String>() {
        @Override
        public void validate(final IValidatable<String> validatable)
        {
          if (data.getArea() == null) {
            return;
          }
          final String value = validatable.getValue();
          if (parentPage.userPrefDao.doesParameterNameAlreadyExist(data.getId(), data.getUser(), data.getArea(), value)) {
            name.error(getString("userPref.error.nameDoesAlreadyExist"));
          }
        }
      });
      name.add(WicketUtils.setFocus());
      fs.add(new InputPanel(fs.newChildId(), name));
    }
    gridBuilder.newSplitPanel(GridSize.COL50);
    {
      // User
View Full Code Here

      parentTaskSelectPanel.setRequired(true);
    }
    {
      // Title
      final FieldsetPanel fs = gridBuilder.newFieldset(getString("task.title"));
      final MaxLengthTextField title = new RequiredMaxLengthTextField(InputPanel.WICKET_ID, new PropertyModel<String>(data, "title"));
      WicketUtils.setStrong(title);
      fs.add(title);
      if (isNew() == true) {
        WicketUtils.setFocus(title);
      }
View Full Code Here

          null);
    }
    {
      // Name
      final FieldsetPanel fs = gridBuilder.newFieldset(getString("fibu.kost2art.name"));
      fs.add(new RequiredMaxLengthTextField(InputPanel.WICKET_ID, new PropertyModel<String>(data, "name")));
    }
    {
      // Work frqction
      final FieldsetPanel fs = gridBuilder.newFieldset(getString("fibu.kost2art.workFraction"));
      fs.add(new MinMaxNumberField<BigDecimal>(InputPanel.WICKET_ID, new PropertyModel<BigDecimal>(data, "workFraction"), BigDecimal.ZERO,
View Full Code Here

    super.init();
    gridBuilder.newSplitPanel(GridSize.COL50);
    {
      // Name
      final FieldsetPanel fs = gridBuilder.newFieldset(getString("name"));
      final RequiredMaxLengthTextField name = new RequiredMaxLengthTextField(InputPanel.WICKET_ID, new PropertyModel<String>(getData(),
          "name"));
      name.add(new AbstractValidator<String>() {
        @Override
        protected void onValidate(final IValidatable<String> validatable)
        {
          final String groupname = validatable.getValue();
          if (groupname == null) {
View Full Code Here

    }

    // set title
    {
      final FieldsetPanel fs = gridBuilder.newFieldset(getString("plugins.teamcal.title"));
      final RequiredMaxLengthTextField title = new RequiredMaxLengthTextField(fs.getTextFieldId(), new PropertyModel<String>(data, "title"));
      if (isNew() == true) {
        title.add(WicketUtils.setFocus());
      }
      WicketUtils.setStrong(title);
      fs.add(title);
      if (access == false) {
        title.setEnabled(false);
      }
    }

    // set description
    {
View Full Code Here

      taskSelectPanel.setRequired(true);
    }
    gridBuilder.newSplitPanel(GridSize.COL50);
    {
      final FieldsetPanel fs = gridBuilder.newFieldset(getString("gantt.name"));
      final RequiredMaxLengthTextField name = new RequiredMaxLengthTextField(fs.getTextFieldId(), new PropertyModel<String>(data, "name"));
      WicketUtils.setStrong(name);
      fs.add(name);
    }
    gridBuilder.newSplitPanel(GridSize.COL50);
    {
      final FieldsetPanel fs = gridBuilder.newFieldset(getString("gantt.owner"));
      final UserSelectPanel userSelectPanel = new UserSelectPanel(fs.newChildId(), new PropertyModel<PFUserDO>(data, "owner"), parentPage,
          "ownerId");
      fs.add(userSelectPanel);
      userSelectPanel.init();
    }
    gridBuilder.newSplitPanel(GridSize.COL50);
    {
      final FieldsetPanel fs = gridBuilder.newFieldset(getString("title"));
      final RequiredMaxLengthTextField title = new RequiredMaxLengthTextField(fs.getTextFieldId(), new PropertyModel<String>(getSettings(),
          "title"), 100);
      WicketUtils.setStrong(title);
      fs.add(title);
    }
    gridBuilder.newSplitPanel(GridSize.COL50);
View Full Code Here

    gridBuilder.newGridPanel();
    {
      // Title
      final FieldsetPanel fs = gridBuilder.newFieldset(getString("book.title"));
      final RequiredMaxLengthTextField title = new RequiredMaxLengthTextField(InputPanel.WICKET_ID,
          new PropertyModel<String>(data, "title"));
      title.add(WicketUtils.setFocus());
      fs.add(title);
    }
    {
      // Authors
      final FieldsetPanel fs = gridBuilder.newFieldset(getString("book.authors"));
View Full Code Here

  public static void createFirstName(final GridBuilder gridBuilder, final PFUserDO user)
  {
    // First name
    final FieldsetPanel fs = gridBuilder.newFieldset(gridBuilder.getString("firstName"));
    final RequiredMaxLengthTextField firstName = new RequiredMaxLengthTextField(fs.getTextFieldId(), new PropertyModel<String>(user,
        "firstname"));
    WicketUtils.setStrong(firstName);
    fs.add(firstName);
  }
View Full Code Here

  public static void createLastName(final GridBuilder gridBuilder, final PFUserDO user)
  {
    // Last name
    final FieldsetPanel fs = gridBuilder.newFieldset(gridBuilder.getString("name"));
    final RequiredMaxLengthTextField name = new RequiredMaxLengthTextField(fs.getTextFieldId(), new PropertyModel<String>(user, "lastname"));
    WicketUtils.setStrong(name);
    fs.add(name);
  }
View Full Code Here

TOP

Related Classes of org.projectforge.web.wicket.components.RequiredMaxLengthTextField

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.