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(); } }