Package org.apache.wicket.model

Examples of org.apache.wicket.model.StringResourceModel


    }
    return new Icon("icon", "img/icons/" + imageName + ".png", mAlt, mAlt);
  }
 
  private IModel<String> formatAltString(String propertyKey, String defaultFormat, IModel<ISIXmlSection> sectionModel) {
    return new StringResourceModel(
        propertyKey,
        sectionModel,
        String.format(
            defaultFormat,
            sectionModel.getObject().getTitle())
View Full Code Here


    IModel<String> labelModel;
    if (type.isEditable()) {
      labelModel = new PropertyModel<String>(this, "editedName");
    } else {
      // The e.g. yellow highlighter name in the properties file is highlightsPanel.yHighlighterName
      labelModel = new StringResourceModel(String.format("highlightsPanel.%sHighlighterName", color),
        this, null, "Highlighter");
    }
    link.add(new Label("name", labelModel) {
      private static final long serialVersionUID = 1L;
      public boolean isVisible() {
View Full Code Here

   
    // if the author added highlights then allow the hint box to appear
    WebMarkupContainer hintCompareBox = new WebMarkupContainer("hintCompareBox");
    hintContainer.add(hintCompareBox);
    hintCompareBox.setVisible(hasKeySpans);
    hintCompareBox.add(new Label("hintText", new StringResourceModel("highlightsPanel.hintText", null)));
    hintCompareBox.add(new Label("compareText", new StringResourceModel("highlightsPanel.compareText", null)));

    // if there aren't any hints then hide the hintcontainer
    hintContainer.setVisible(hasHint);
  }
View Full Code Here

  public Notebook(PageParameters parameters) {
    super(parameters);

    // set the heading for this page - modify the properties file to change this
    String pageTitleEnd = (new StringResourceModel("Notebook.pageTitle", this, null, "Notebook").getString());
    setPageTitle(pageTitleEnd);
    add(new Label("pageTitle", new PropertyModel<String>(this, "pageTitle")));

    isTeacher = ISISession.get().getUser().getRole().subsumes(Role.TEACHER);
    add(new Label("heading", isTeacher ?  (pageTitleEnd + " - " + ISISession.get().getCurrentPeriodModel().getObject().getName() + " > "
View Full Code Here

      setResponsePage(ISIApplication.get().getNotebookPageClass(), getPageParameters());
    }

    @Override
    protected String getDialogTitle() {
      return new StringResourceModel("Notebook.removeDialogTitle", this, null, "Remove from Notebook?").getString();
    }
View Full Code Here

    }));
    button.setOutputMarkupPlaceholderTag(true);
    link.add(button);

    // add the correct text for the button
    link.add(new Label("buttonText", new StringResourceModel("feedback.buttonText.${userRole}.${state}", this, Model.of(this), "default")));
    add(link);
    if (messageList.isEmpty() && role != Role.TEACHER)
      link.setVisible(false);
  }
View Full Code Here

      return new StringResourceModel("Notebook.removeDialogTitle", this, null, "Remove from Notebook?").getString();
    }

    @Override
    protected String getDialogText() {
      return new StringResourceModel("Notebook.removeDialogText", this, null, "Are you sure you want to remove this response from the Notebook?").getString();
    }
View Full Code Here

        mEntry = WordService.get().getWordCard(id);
      }
    }
   
    // add page title
    String pageTitleEnd = (new StringResourceModel("Glossary.pageTitle", this, null, "Glossary").getString());
    setPageTitle(pageTitleEnd);
    boolean isTeacher = ISISession.get().getUser().getRole().subsumes(Role.TEACHER);
    add(new Label("heading", isTeacher ?  (pageTitleEnd + " - " + ISISession.get().getCurrentPeriodModel().getObject().getName() + " > "
        + ISISession.get().getTargetUserModel().getObject().getFullName()) : pageTitleEnd));
    add(new Label("pageTitle", new PropertyModel<String>(this, "pageTitle")));
View Full Code Here

  private static final Logger log = LoggerFactory.getLogger(ForgotPassword.class);

  public ForgotPassword(PageParameters params) {
    super(params);

    String pageTitleEnd = (new StringResourceModel("ForgotPassword.pageTitle", this, null, "Forgot Password").getString());
    setPageTitle(pageTitleEnd);
    add(new Label("pageTitle", new PropertyModel<String>(this, "pageTitle")));
    add(new Label("applicationTitle", new StringResourceModel("applicationTitle", this, null)));
    add(new Label("applicationSubTitle", new StringResourceModel("applicationSubTitle", this, null)));
    add(new WebMarkupContainer("preSubmitMessage") {
      private static final long serialVersionUID = 1L;

      @Override
      public boolean isVisible() {
View Full Code Here

        Databinder.getHibernateSession().beginTransaction();
        user.generateSecurityToken();
        Databinder.getHibernateSession().getTransaction().commit();
        String url = "/password?username=" + user.getUsername() + "&key=" + user.getSecurityToken();
        ((ISIEmailService) EmailService.get()).sendXmlEmail(userModel, ISIEmailService.EMAIL_FORGOT, url);
        String passwordSent = new StringResourceModel("ForgotPassword.passwordSent", this, null,
            "Thank you! In a few minutes you should get an email.  You will need to click on the link in that email to reset your password.").getString();
        info(passwordSent);
        success = true;
      } else {
        String passwordNotFound = new StringResourceModel("ForgotPassword.passwordNotFound", this, null,
            "Sorry, there is no account with that email address.").getString();
        info(passwordNotFound);
      }
    }
View Full Code Here

TOP

Related Classes of org.apache.wicket.model.StringResourceModel

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.