Package com.liferay.docs.guestbook.wrappers

Examples of com.liferay.docs.guestbook.wrappers.Entry


        else {
          List<com.liferay.docs.guestbook.model.Entry> list = EntryLocalServiceUtil.getEntries(scopeGroupId,
              selectedGuestbook.getGuestbookId());

          for (com.liferay.docs.guestbook.model.Entry entry : list) {
            entries.add(new Entry(entry));
          }
        }

      }
      catch (SystemException e) {
View Full Code Here


  public Entry getSelectedEntry() {
    return selectedEntry;
  }

  public void setSelectedEntry(Entry selectedEntry) {
    this.selectedEntry = new Entry(selectedEntry);
  }
View Full Code Here

  @ManagedProperty(name = "guestbookBacking", value = "#{guestbookBacking}")
  protected GuestbookBacking guestbookBacking;

  public void add() {
    Entry entry = new Entry(EntryUtil.create(0L));
    LiferayFacesContext liferayFacesContext = LiferayFacesContext.getInstance();
    entry.setGroupId(liferayFacesContext.getScopeGroupId());
    entry.setGuestbookId(guestbookBacking.getSelectedGuestbook().getGuestbookId());
    guestbookBacking.setSelectedEntry(entry);
    guestbookBacking.editEntry();
  }
View Full Code Here

    guestbookBacking.editEntry();
  }

  public void save() {

    Entry entry = guestbookBacking.getSelectedEntry();
    LiferayFacesContext liferayFacesContext = LiferayFacesContext.getInstance();
    entry.setCompanyId(liferayFacesContext.getCompanyId());
    entry.setUserId(liferayFacesContext.getUserId());

    try {

      if (entry.getEntryId() == 0) {
        EntryLocalServiceUtil.addEntry(entry, liferayFacesContext.getUserId());
      }
      else {
        EntryLocalServiceUtil.updateEntry(entry);
      }
View Full Code Here

TOP

Related Classes of com.liferay.docs.guestbook.wrappers.Entry

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.