public void postConstruct() {
createMainGuestbook();
}
public void save() {
Guestbook guestbook = getSelectedGuestbook();
LiferayFacesContext liferayFacesContext = LiferayFacesContext.getInstance();
guestbook.setCompanyId(liferayFacesContext.getCompanyId());
guestbook.setUserId(liferayFacesContext.getUserId());
try {
if (guestbook.getGuestbookId() == 0) {
guestbook = new Guestbook(GuestbookLocalServiceUtil.addGuestbook(guestbook,
liferayFacesContext.getUserId()));
}
else {
guestbook = new Guestbook(GuestbookLocalServiceUtil.updateGuestbook(guestbook));
}
addGlobalSuccessInfoMessage();
}
catch (Exception e) {