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 emailCurrentPage() { // System.out.println("ReportListWrapper.emailCurrentPage()"); WOComponent nextPage = (WOComponent) pageWithName("EmailPage"); nextPage.takeValueForKey(componentToEmail(), "componentToEmail"); nextPage.takeValueForKey(context().page(), "nextPage"); return nextPage; }
public WOComponent applyResult(String resultPath) { setValueForBinding(resultPath, "attributeToSet"); WOComponent result = (WOComponent) valueForBinding("saveAction"); if (result == null) { WOComponent temp = parent(); do { result = temp; temp = result.parent(); } while (temp != null); result.ensureAwakeInContext(context()); } return result; }
public void appendToResponse(WOResponse aResponse, WOContext aContext) { try { Number b = (Number) valueForBinding("firstNameDisplay"); if (b != null) firstNameDisplay = b.intValue(); else firstNameDisplay = 2; b = (Number) valueForBinding("secondNameDisplay"); if (b != null) secondNameDisplay = b.intValue(); else secondNameDisplay = 2; } catch (ClassCastException cex) { throw new IllegalArgumentException("NameDisplay bindings should be integer"); } String request = (String) valueForBinding("searchRequest"); if (request != null) { performSearchRequest(request); } else { selection = (PersonLink) EOUtilities.localInstanceOfObject( ec, (EOEnterpriseObject) valueForBinding("selection")); // syncSelection(); } if (selection == null && Various.boolForObject(valueForBinding("showPopup"))) { selection = defaultSelectionValue(); setValueForBinding(selection, "selection"); } super.appendToResponse(aResponse, aContext); found = null; // searchMessage = null; }
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 void takeValuesFromRequest(WORequest aRequest, WOContext aContext) { super.takeValuesFromRequest(aRequest, aContext); if (!Various.boolForObject(valueForBinding("showPopup"))) { selection = (PersonLink) EOUtilities.localInstanceOfObject( ec, (EOEnterpriseObject) valueForBinding("selection")); // syncSelection(); } }