/*	public IPage cancelPage(IRequestCycle cycle) {
 	getShowEbookPage().setResourceType(ResourceType.TYPE_NEWSPAPERS);
 	return getShowEbookPage();
 }*/
 public void cancelPage(IRequestCycle cycle) {
   try {
     ICallback callback = (ICallback) getCallbackStack().popPreviousCallback();
     callback.performCallback(cycle);
   } catch (Exception e) {
     cycle.activate("resource/ShowEbookPage");
   }
 }
 /*	public IPage savePage(IRequestCycle cycle){
 	if(save()){
 		getShowEbookPage().setResourceType(ResourceType.TYPE_NEWSPAPERS);
 		return getShowEbookPage();
 	}else
 		return this;
 }*/
 public void savePage(IRequestCycle cycle) {
   if (save()) {
     /*getShowEbookPage().setResourceType(ResourceType.TYPE_MAGAZINE);
     return getShowEbookPage();*/
     try {
       ICallback callback = (ICallback) getCallbackStack().popPreviousCallback();
       callback.performCallback(cycle);
     } catch (Exception e) {
       cycle.activate("resource/ShowEbookPage");
     }
   }
 }
Beispiel #3
0
 public void performCallback(IRequestCycle cycle) {
   if (isStay() && FormActions.OK.equals(getButtonPressed())) {
     // Explicitly null out information that should not be used for multiple users,
     // otherwise keep form values as is theory that creating users in bulk will want
     // all the same settings by default
     setUser(null);
     cycle.activate(PAGE);
   } else if (m_delegate != null) {
     m_delegate.performCallback(cycle);
   }
 }