Package org.apache.wicket.model

Examples of org.apache.wicket.model.StringResourceModel


          questionLister.doQuery();
          setResponsePage(ISIApplication.get().getMyQuestionsPageClass());
        }
      };
      add(dialog);
      dialog.setObjectName((new StringResourceModel("MyQuestions.delete.objectName", this, null, "Question").getString()));
      add(new WebMarkupContainer("delete").add(dialog.getDialogBorder().getClickToOpenBehavior()));
    }
View Full Code Here


  public AuthoredPopup(PageParameters _param, String _xmlId, XmlSectionModel _mSection) {
    super(_param);
    this.xmlId = _xmlId;
    this.mSection = _mSection;
    this.param = _param;
    add(new Label("pageTitle", ISIApplication.get().getPageTitleBase() + " :: " + (new StringResourceModel("AuthoredPopup.pageTitle", this, null, "Shared Content").getString())));

    // get the content based on the id and the msection
    ISIXmlComponent xmlContent = new ISIXmlComponent("xmlContent", mSection, "student");
    String object = "//*[@id='" + xmlId + "']";
    xmlContent.setTransformParameter(FilterElements.XPATH, object);
View Full Code Here

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

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

    String pageTitleEnd = (new StringResourceModel("Password.pageTitle", this, null, "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)));

    // forgot password shows up when there is an error in the link - expired link
    BookmarkablePageLink<Void> resetLink = new BookmarkablePageLink<Void>("reset", ISIApplication.get().getForgotPasswordPageClass());
    add(resetLink);
    resetLink.setVisible(false);

    // User may come in with a secret key from the "Forgot Password" page.
    if (params.containsKey("username") && params.containsKey("key")) {
      User user = UserService.get().getByUsername(params.getString("username")).getObject();
      if (user != null && params.getString("key").equals(user.getSecurityToken())) {
        haveKey = true;
        add (new ChangePasswordForm ("form", user));
      } else {
        log.warn("Failed reset-password attempt: username={}, key={}", params.getString("username"), params.getString("key"));
        String failed = new StringResourceModel("Password.failed", this, null, "Incorrect URL").getString();
        error(failed);
        add (new ChangePasswordForm ("form", null));
        resetLink.setVisible(true);
      }
    } else {     
View Full Code Here

    if (mStudent == null && mStudent.getObject() == null)
      throw new IllegalStateException("Must specify a student.\n");

    // set the heading for this page - modify the properties file to change this
    String pageTitleEnd = (new StringResourceModel("TeacherNotes.pageTitle", this, null, "Teacher Notes").getString());
    setPageTitle(pageTitleEnd);
    add(new Label("pageTitle", new PropertyModel<String>(this, "pageTitle")));
    String heading = pageTitleEnd;
   
    if (ISISession.get().getUser().hasRole(Role.TEACHER))
View Full Code Here

  protected IISIResponseService responseService;
 
  public TeacherToc(PageParameters parameters) {
    super(parameters);

    pageTitle = (new StringResourceModel("TeacherTOC.pageTitle", this, null, "Home").getString());
    setPageTitle(pageTitle);

    loadStudentsWithNotes();
    loadStatusMap();
    loadFlagMap();
View Full Code Here

   */
  public Reading (PageParameters parameters, boolean showXmlContent) {
    super(parameters);
    this.showXmlContent = showXmlContent;
    showSectionToggleTextLink = featureService.isSectionToggleTextLinksOn();
    pageTitle = (new StringResourceModel("Reading.pageTitle", this, null, "Reading").getString());
    setPageTitle(pageTitle);

    mTargetUser = ISISession.get().getTargetUserModel();
    boolean teacher = ISISession.get().getUser().getRole().equals(Role.TEACHER);

View Full Code Here

  private static final ResponseViewerFactory factory = new ResponseViewerFactory();

  public PeriodResponsePage(final PageParameters parameters) {
    super(parameters);

    pageTitleEnd = (new StringResourceModel("Compare.pageTitle", this, null, "Compare").getString());
    setPageTitle(pageTitleEnd);
    add(new Label("pageTitle", new PropertyModel<String>(this, "pageTitle")));
    add(new Label("periodName", ISISession.get().getCurrentPeriodModel().getObject().getName()));

    add(ISIApplication.get().getToolbar("tht", this));
View Full Code Here

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

    setQuestionsMetadata(questionsMetadata);
    String pageTitleEnd = (new StringResourceModel("MyQuestions.pageTitle", this, null, "My Questions").getString());
    setPageTitle(pageTitleEnd);

    // set teacher flag and target user
    isTeacher = ISISession.get().getUser().getRole().subsumes(Role.TEACHER);
    if (isTeacher) {
View Full Code Here

    addCommonComponents();
    addButtons();
  }

  protected void addCommonComponents() {
    add(new Label("applicationTitle", new StringResourceModel("applicationTitle", this, null)));
    add(new Label("applicationSubTitle", new StringResourceModel("applicationSubTitle", this, null)));
   
    User user = (User) AuthDataSession.get().getUser();
    add(new Label("userName", (user == null ? new StringResourceModel("unknownUserName", this, null).getString() : user.getFullName())));     

    add(new ISIApplication.LogoutLink("logoutLink"));
  }
View Full Code Here

      mUser = new UserModel(ISISession.get().getStudent());
    } else {
      mUser = new UserModel(ISISession.get().getUser());     
    }

    pageTitleEnd = (new StringResourceModel("ResponseCollections.pageTitle", this, null, "Collections").getString());
    setPageTitle(pageTitleEnd);
   
    paramCollectionName = parameters.getString("name");
   
    if (!haveSelectedCollection()) {
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.