コード例 #1
0
  @Override
  protected void onInitialize() {
    super.onInitialize();
    InjectorHolder.getInjector().inject(this);
    modelName.setObject(_user.getName());
    addFeedback(this, "feedback");

    Form<String> form =
        new Form<String>("form") {
          @Override
          protected void onSubmit() {
            onSubmitForm();
          }
        };

    Button cancel =
        new Button("cancel") {
          public void onSubmit() {
            setResponsePage(UserOverviewPage.class);
          }
        };
    cancel.setDefaultFormProcessing(false);
    form.add(cancel);

    addTextInputField(form, "username", modelName, true);
    form.add(new PasswordTextField("password1", modelPassword1));
    form.add(new PasswordTextField("password2", modelPassword2));

    form.add(new Button("submit"));

    List<UserRoles> current = new ArrayList<UserRoles>();
    current.add(UserRoles.NONE);
    modelRoles = new MyModel(current);

    List<? extends UserRoles> choices = UserRoles.asList();
    ListMultipleChoice<UserRoles> roleSelect =
        new ListMultipleChoice<UserRoles>("roleSelect", modelRoles, choices);
    form.add(roleSelect);

    List<String> providers = facade.availableProviders();
    selectedProvider = providers.get(0);
    ListChoice<String> providerSelect =
        new ListChoice<String>(
            "providerSelect", new PropertyModel<String>(this, "selectedProvider"), providers);
    form.add(providerSelect);
    add(form);
  }
コード例 #2
0
 public MonthlyOrderDataProvider() {
   InjectorHolder.getInjector().inject(this);
   setSort("yearMonth", false);
 }
コード例 #3
0
ファイル: UserSession.java プロジェクト: tanerdiler/BICKLOG
 private void injectDependencies() {
   InjectorHolder.getInjector().inject(this);
 }
コード例 #4
0
 public SectionIconFactory() {
   InjectorHolder.getInjector().inject(this);
 }
コード例 #5
0
 @Override
 protected Person load() {
   InjectorHolder.getInjector().inject(this);
   return profileLogic.getPerson(userUuid);
 }