List of usage examples for org.apache.wicket.injection Injector get
public static Injector get()
From source file:$.XaloonDemoApplication.java
License:Apache License
@Override protected void initComponentInjector() { getComponentInstantiationListeners().add(new JavaEEComponentInjector(this)); getComponentInstantiationListeners().add(new WeldComponentInjector(this)); Injector.get().inject(this); }/*w w w. j a v a2 s . c om*/
From source file:at.molindo.wicketutils.migration.InjectorHolder.java
License:Apache License
public static Injector getInjector() { return Injector.get(); }
From source file:biz.turnonline.ecosystem.origin.frontend.model.CountriesModel.java
License:Apache License
/** * Constructor. */ public CountriesModel() { Injector.get().inject(this); }
From source file:biz.turnonline.ecosystem.origin.frontend.model.LegalFormListModel.java
License:Apache License
public LegalFormListModel() { Injector.get().inject(this); }
From source file:by.parfen.disptaxi.webapp.etc.AutoComplitePage.java
License:Apache License
/** * Constructor./* ww w . j a v a 2 s. c om*/ */ public AutoComplitePage() { Injector.get().inject(this); sampleEvent = new SampleEvent(); // selectedCity = cityService.get(15L); sampleEvent.setCityById(60L); streetsList = sampleEvent.getStreets(); // pointsList = sampleEvent.getPointsList(); final FeedbackPanel feedback = new FeedbackPanel("feedback"); feedback.setOutputMarkupId(true); add(feedback); Form<Void> form = new Form<Void>("form"); add(form); final AutoCompleteTextField<String> field = new AutoCompleteTextField<String>("acStreet", new Model<String>("")) { @Override protected Iterator<String> getChoices(String input) { if (Strings.isEmpty(input)) { List<String> emptyList = Collections.emptyList(); return emptyList.iterator(); } List<String> choices = new ArrayList<String>(MAX_AUTO_COMPLETE_ELEMENTS); for (final Street streetItem : streetsList) { final String streetName = streetItem.getName(); if (streetName.toUpperCase().startsWith(input.toUpperCase())) { choices.add(streetName); if (choices.size() == MAX_AUTO_COMPLETE_ELEMENTS) { break; } } } return choices.iterator(); } }; final AutoCompleteTextField<String> fieldPoint = new AutoCompleteTextField<String>("acPoint", new Model<String>("")) { @Override protected Iterator<String> getChoices(String input) { if (Strings.isEmpty(input)) { List<String> emptyList = Collections.emptyList(); return emptyList.iterator(); } List<String> choices = new ArrayList<String>(MAX_AUTO_COMPLETE_ELEMENTS); for (final Point pointItem : sampleEvent.getPointsList()) { final String pointName = pointItem.getName(); if (pointName.toUpperCase().startsWith(input.toUpperCase())) { choices.add(pointName); if (choices.size() == MAX_AUTO_COMPLETE_ELEMENTS) { break; } } } return choices.iterator(); } }; final ItemPanel itemPanel = new ItemPanel("itemPanel"); add(itemPanel); add(new Link<Void>("linkItemInfo") { @Override public void onClick() { info("onSubmit"); info(itemPanel.getItemInfo()); } }); final Label label = new Label("label", form.getDefaultModel()) { @Override public void onEvent(IEvent<?> event) { Object payload = event.getPayload(); if (payload instanceof SampleEvent) { SampleEvent sampelEvent = (SampleEvent) payload; setDefaultModel(Model .of(sampelEvent.getSelectedStreetName() + ", " + sampelEvent.getSelectedPointName())); sampelEvent.getTarget().add(this); } } }; label.setOutputMarkupId(true); add(label); form.add(field); form.add(fieldPoint); field.add(new AjaxFormSubmitBehavior(form, "onchange") { @Override protected void onSubmit(AjaxRequestTarget target) { sampleEvent.setTarget(target); sampleEvent.setSelectedStreetName(field.getDefaultModelObjectAsString()); sampleEvent.setSelectedPointName(""); send(getPage(), Broadcast.BREADTH, sampleEvent); } @Override protected void onError(AjaxRequestTarget target) { } }); fieldPoint.add(new AjaxFormSubmitBehavior(form, "onchange") { @Override protected void onSubmit(AjaxRequestTarget target) { sampleEvent.setTarget(target); sampleEvent.setSelectedPointName(fieldPoint.getDefaultModelObjectAsString()); send(getPage(), Broadcast.BREADTH, sampleEvent); } @Override protected void onError(AjaxRequestTarget target) { } }); }
From source file:ca.travelagency.authentication.AuthenticatedSession.java
License:Apache License
public AuthenticatedSession(Request request) { super(request); Injector.get().inject(this); initFilters(); }
From source file:ca.travelagency.components.dataprovider.DataProvider.java
License:Apache License
public DataProvider(IModel<? extends Filter> model) { Validate.notNull(model); this.model = model; Injector.get().inject(this); }
From source file:ca.travelagency.components.formheader.DaoEntityModel.java
License:Apache License
private DaoEntityModel() { super(); Injector.get().inject(this); }
From source file:ca.travelagency.components.validators.DuplicateValidator.java
License:Apache License
public DuplicateValidator(Form<T> form) { super(); Injector.get().inject(this); this.form = form; }
From source file:ca.travelagency.customer.CustomerDuplicateValidator.java
License:Apache License
public CustomerDuplicateValidator(LastNameField lastNameField, FirstNameField firstNameField, TextField<String> primaryPhoneNumber, DateField dateOfBirth) { super();/*www . j av a2 s. c om*/ Injector.get().inject(this); Validate.notNull(lastNameField); Validate.notNull(firstNameField); Validate.notNull(primaryPhoneNumber); Validate.notNull(dateOfBirth); this.lastNameField = lastNameField; this.firstNameField = firstNameField; this.primaryPhoneNumber = primaryPhoneNumber; this.dateOfBirth = dateOfBirth; }