示例#1
0
 /**
  * Handle the "Success" event from the CategorySelection form
  *
  * @return the current page (redraw self)
  */
 @OnEvent(value = EventConstants.SUCCESS, component = "categorySelection")
 Object redrawList() {
   entryList.setEntryType(selectedEntryType);
   entryList.setSourceTypes(selectedSourceTypes);
   if (request.isXHR()) // an AJAX request?
   {
     return entryList; // return the entryList component
   } else {
     return null; // redraw the whole current page
   }
 }
示例#2
0
 /**
  * As an event lister, respond to a selection from the "entryType" Select menu. Return the
  * "entryList" component (to be put into a zone). If the event is not part of an AJAX zone update
  * (i.e. the browser has JavaScript off) we return the whole page to be redrawn.
  *
  * @return
  */
 @OnEvent(value = EventConstants.VALUE_CHANGED, component = "entryType")
 Object changeEntryType(EntryType entryType) {
   if (request.isXHR()) // an AJAX request?
   {
     selectedEntryType = entryType;
     entryList.setEntryType(entryType);
     return entryList; // return the entryList component
   } else {
     return null; // redraw the whole current page
   }
 }
示例#3
0
 /**
  * As an event lister, respond to a selection from the "sourceType" Select menu. Return the
  * "entryList" component (to be put into a zone). If the event is not part of an AJAX zone update
  * (i.e. the browser has JavaScript off) we return the whole page to be redrawn.
  *
  * @return
  */
 @OnEvent(value = EventConstants.VALUE_CHANGED, component = "sourceTypes")
 Object changeSourceType(SourceType sourceType) {
   if (request.isXHR()) // an AJAX request?
   {
     // FIXME: we only handle a single SourceType but may have more
     ArrayList<SourceType> sources = new ArrayList<SourceType>();
     sources.add(sourceType);
     entryList.setSourceTypes(sources);
     return entryList; // return the entryList component
   } else {
     return null; // redraw the whole current page
   }
 }