Search in sources :

Example 1 with ProfileImagePanel

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();
}
Also used : User(org.apache.openmeetings.db.entity.user.User) TextArea(org.apache.wicket.markup.html.form.TextArea) Label(org.apache.wicket.markup.html.basic.Label) ProfileImagePanel(org.apache.openmeetings.web.common.ProfileImagePanel)

Aggregations

User (org.apache.openmeetings.db.entity.user.User)1 ProfileImagePanel (org.apache.openmeetings.web.common.ProfileImagePanel)1 Label (org.apache.wicket.markup.html.basic.Label)1 TextArea (org.apache.wicket.markup.html.form.TextArea)1