public void vc5() { final NumericProperty<Integer> MY_PROPERTY = NumericProperty.integerType("my_property"); // tag::vc5a[] PropertyValuePresenterRegistry.getDefault() // <1> .forProperty(MY_PROPERTY, (property, value) -> "#" + value); // <2> // end::vc5a[] // tag::vc5b[] ViewComponent<Integer> viewComponent = ViewComponent.create(MY_PROPERTY); // <1> String value = MY_PROPERTY.present(1); // <2> // end::vc5b[] }
public void listing17() { // tag::listing17a[] PropertyValuePresenterRegistry.getDefault() // <1> .forProperty(ID, (property, value) -> "#" + value); // <2> // end::listing17a[] // tag::listing17b[] PropertyListing listing = PropertyListing.builder(SUBJECT).build(); // <1> String value = ID.present(1L); // <2> // end::listing17b[] }