public WOComponent componentToEmail() { System.out.println("ReportListWrapper.componentToEmail()"); WOComponent comp = null; if (isList() == true) { comp = (WOComponent) pageWithName("ItemList"); comp.takeValueForKey(displayGroup, "itemDisplayGroup"); ((ItemList) comp) .displayAll(); // no batching in emails - how to return it to original setting? ((ItemList) comp) .setEmailFlag( true); // set a flag for emails to hide any content that does not display properly ((ItemList) comp).setCommentsFlag(commentsFlag); ((ItemList) comp).setReleaseFlag(releaseFlag); } else if (isReport() == true) { comp = (ReportGenerator) pageWithName("ReportGenerator"); // ((ReportGenerator)comp).setNeedUpdate(true); comp.takeValueForKey(aColumn, "selectedColumn"); comp.takeValueForKey(aRow, "selectedRow"); comp.takeValueForKey(displayGroup, "displayGroup"); ((ReportGenerator) comp).setHideReportSpecifier(true); ((ReportGenerator) comp).setHideGraphLink(true); } /* else if(isEstimate() == true) { comp = (WOComponent)pageWithName("EstimateActual"); comp.takeValueForKey(displayGroup, "displayGroup"); ((EstimateActual)comp).setIsSelected(false); ((EstimateActual)comp).setShowLinks(false); } */ return (WOComponent) comp; }
public WOComponent create() { // searchMessage = null; // canCreate = false; selection = null; setValueForBinding(selection, "selection"); PersonLink onEdit = Person.Utility.create(ec, entity(), searchString); WOComponent returnPage = context().page(); WOComponent popup = null; // try { // popup = pageWithName("PersonInspector"); // } catch (Exception e) { popup = pageWithName("SelectorPopup"); // } if (returnPage instanceof SelectorPopup) { SelectorPopup sp = (SelectorPopup) returnPage; popup.takeValueForKey(sp.returnPage, "returnPage"); popup.takeValueForKey(sp.resultPath, "resultPath"); popup.takeValueForKey(sp.resultGetter, "resultGetter"); popup.reset(); } else { popup.takeValueForKey(returnPage, "returnPage"); } if (popup instanceof SelectorPopup) { NSDictionary dict = (NSDictionary) session().valueForKeyPath("strings.RujelBase_Base.newPerson"); popup.takeValueForKey(onEdit.person(), "value"); popup.takeValueForKey(dict, "dict"); // } else { // popup.takeValueForKey(onEdit, "personLink"); } return popup; }
public WOComponent emailCurrentPage() { // System.out.println("ReportListWrapper.emailCurrentPage()"); WOComponent nextPage = (WOComponent) pageWithName("EmailPage"); nextPage.takeValueForKey(componentToEmail(), "componentToEmail"); nextPage.takeValueForKey(context().page(), "nextPage"); return nextPage; }