use of org.apache.openmeetings.web.common.ProfileImagePanel in project openmeetings by apache.
the class UserProfilePanel method onInitialize.
@Override
protected void onInitialize() {
User u = (User) getDefaultModelObject();
add(new ProfileImagePanel("img", u.getId()));
add(new Label("firstname"));
add(new Label("lastname"));
add(new Label("timeZoneId"));
add(new Label("regdate"));
add(new TextArea<String>("userOffers").setEnabled(false));
add(new TextArea<String>("userSearchs").setEnabled(false));
if (getUserId().equals(u.getId()) || u.isShowContactData() || (u.isShowContactDataToContacts() && contactDao.isContact(u.getId(), getUserId()))) {
addressDenied.setVisible(false);
address.add(new Label("address.phone"));
address.add(new Label("address.street"));
address.add(new Label("address.additionalname"));
address.add(new Label("address.zip"));
address.add(new Label("address.town"));
address.add(new Label("country", getCountryName(u.getAddress().getCountry(), getLocale())));
address.add(new Label("address.comment"));
} else {
address.setVisible(false);
addressDenied.setDefaultModelObject(getString(u.isShowContactDataToContacts() ? "1269" : "1268"));
}
add(address.setDefaultModel(getDefaultModel()));
add(addressDenied);
super.onInitialize();
}
Aggregations