@Test public void testGetWidgetByFieldName() { DropdownWidget widget = new DropdownWidget(); context.registerWidget(widget); String fieldName = context.getFieldName(widget); Widget w = context.getWidgetByFieldName(fieldName); assertNotNull(w); }
public Widget getWidgetByFieldName(String fieldName) { for (Map.Entry<Widget, String> e : fieldNames.entrySet()) { if (e.getValue().equals(fieldName)) return e.getKey(); } return null; }
FormEntryContext { public Widget getWidgetByFieldName(String fieldName) { for (Map.Entry<Widget, String> e : fieldNames.entrySet()) { if (e.getValue().equals(fieldName)) return e.getKey(); } return null; } }
FormEntryContext { public Widget getWidgetByFieldName(String fieldName) { for (Map.Entry<Widget, String> e : fieldNames.entrySet()) { if (e.getValue().equals(fieldName)) return e.getKey(); } return null; } FormEntryContext(Mode mode); }
FormEntryContext { public Widget getWidgetByFieldName(String fieldName) { for (Map.Entry<Widget, String> e : fieldNames.entrySet()) { if (e.getValue().equals(fieldName)) return e.getKey(); } return null; } FormEntryContext(Mode mode); Mode getMode(); String registerWidget(Widget widget); String registerErrorWidget(Widget widget, ErrorWidget errorWidget); String getFieldName(Widget widget); String getFieldNameIfRegistered(Widget widget); Widget getWidgetByFieldName(String fieldName); String getErrorFieldId(Widget widget); Collection<String> getErrorDivIds(); void beginSection(HtmlFormSection section); void beginSection(); HtmlFormSection getActiveSection(); void addFieldToActiveSection(HtmlFormField field); void endSection(); void beginObsGroup(Concept conceptSet, Obs thisGroup, ObsGroup obsGroupSchemaObj); ObsGroup getActiveObsGroup(); void addFieldToActiveObsGroup(HtmlFormField field); void setObsGroup(Obs group); void endObsGroup(); List<Concept> getCurrentObsGroupConcepts(); Obs getObsFromCurrentGroup(Concept concept, Concept answerConcept); Obs getObsFromCurrentGroup(Concept concept, Drug answerDrug); void setupExistingData(Patient patient); void setupExistingData(Encounter encounter); void setupExistingObsInGroups(Set<Obs> oSet); Obs removeExistingObs(Concept question, Drug answer); Obs removeExistingObs(Concept question, Concept answer); Obs removeExistingObs(List<Concept> questions, Concept answer); Obs removeExistingObs(Concept question, String numericAns); List<Obs> removeExistingObs(Concept question); Order removeExistingOrder(Concept concept); List<Order> getRemainingExistingOrders(); DrugOrder removeExistingDrugOrder(Drug drug); Obs removeExistingObs(Concept question, Boolean answer); Obs getNextUnmatchedObsGroup(String path); int getExistingObsInGroupsCount(); Obs findBestMatchingObsGroup(List<ObsGroupComponent> questionsAndAnswers, String xmlObsGroupConcept,
	        String path); Patient getExistingPatient(); Encounter getExistingEncounter(); Translator getTranslator(); HtmlFormSchema getSchema(); void setHttpSession(HttpSession httpSession); HttpSession getHttpSession(); void pushToStack(Object object); Object popFromStack(); T getHighestOnStack(Class<T> clazz); Map<Widget, String> getFieldNames(); Map<Concept, List<Obs>> getExistingObs(); Map<Obs, Set<Obs>> getExistingObsInGroups(); Map<Concept, List<Order>> getExistingOrders(); void registerPropertyAccessorInfo(String property, String widgetId, String fieldFunctionName,
	        String getterFunctionName, String setterFunctionName); Map<String, String> getJavascriptFieldAccessorInfo(); Location getDefaultLocation(); void setDefaultLocation(Location defaultLocation); boolean isGuessingInd(); void setGuessingInd(boolean guessingInd); String getGuessingInd(); Date getPreviousEncounterDate(); void setPreviousEncounterDate(Date previousEncounterDate); boolean hasUnmatchedObsGroupEntities(); int addUnmatchedObsGroupEntities(ObsGroupEntity obsGroupEntity); List<ObsGroupEntity> getUnmatchedObsGroupEntities(); void setUnmatchedObsGroupEntities(List<ObsGroupEntity> unmatchedObsGroupEntities); boolean isUnmatchedMode(); void setUnmatchedMode(boolean unmatchedMode); boolean isAutomaticClientSideValidation(); void setAutomaticClientSideValidation(boolean automaticClientSideValidation); boolean isClientSideValidationHints(); void setClientSideValidationHints(boolean clientSideValidationHints); Object getVisit(); void setVisit(Object visit); Date getDefaultEncounterDate(); void setDefaultEncounterDate(Date defaultEncounterDate); }
FormEntryContext { public Widget getWidgetByFieldName(String fieldName) { for (Map.Entry<Widget, String> e : fieldNames.entrySet()) { if (e.getValue().equals(fieldName)) return e.getKey(); } return null; } FormEntryContext(Mode mode); Mode getMode(); String registerWidget(Widget widget); String registerErrorWidget(Widget widget, ErrorWidget errorWidget); String getFieldName(Widget widget); String getFieldNameIfRegistered(Widget widget); Widget getWidgetByFieldName(String fieldName); String getErrorFieldId(Widget widget); Collection<String> getErrorDivIds(); void beginSection(HtmlFormSection section); void beginSection(); HtmlFormSection getActiveSection(); void addFieldToActiveSection(HtmlFormField field); void endSection(); void beginObsGroup(Concept conceptSet, Obs thisGroup, ObsGroup obsGroupSchemaObj); ObsGroup getActiveObsGroup(); void addFieldToActiveObsGroup(HtmlFormField field); void setObsGroup(Obs group); void endObsGroup(); List<Concept> getCurrentObsGroupConcepts(); Obs getObsFromCurrentGroup(Concept concept, Concept answerConcept); Obs getObsFromCurrentGroup(Concept concept, Drug answerDrug); void setupExistingData(Patient patient); void setupExistingData(Encounter encounter); void setupExistingObsInGroups(Set<Obs> oSet); Obs removeExistingObs(Concept question, Drug answer); Obs removeExistingObs(Concept question, Concept answer); Obs removeExistingObs(List<Concept> questions, Concept answer); Obs removeExistingObs(Concept question, String numericAns); List<Obs> removeExistingObs(Concept question); Order removeExistingOrder(Concept concept); List<Order> getRemainingExistingOrders(); DrugOrder removeExistingDrugOrder(Drug drug); Obs removeExistingObs(Concept question, Boolean answer); Obs getNextUnmatchedObsGroup(String path); int getExistingObsInGroupsCount(); Obs findBestMatchingObsGroup(List<ObsGroupComponent> questionsAndAnswers, String xmlObsGroupConcept,
	        String path); Patient getExistingPatient(); Encounter getExistingEncounter(); Translator getTranslator(); HtmlFormSchema getSchema(); void setHttpSession(HttpSession httpSession); HttpSession getHttpSession(); void pushToStack(Object object); Object popFromStack(); T getHighestOnStack(Class<T> clazz); Map<Widget, String> getFieldNames(); Map<Concept, List<Obs>> getExistingObs(); Map<Obs, Set<Obs>> getExistingObsInGroups(); Map<Concept, List<Order>> getExistingOrders(); void registerPropertyAccessorInfo(String property, String widgetId, String fieldFunctionName,
	        String getterFunctionName, String setterFunctionName); Map<String, String> getJavascriptFieldAccessorInfo(); Location getDefaultLocation(); void setDefaultLocation(Location defaultLocation); boolean isGuessingInd(); void setGuessingInd(boolean guessingInd); String getGuessingInd(); Date getPreviousEncounterDate(); void setPreviousEncounterDate(Date previousEncounterDate); boolean hasUnmatchedObsGroupEntities(); int addUnmatchedObsGroupEntities(ObsGroupEntity obsGroupEntity); List<ObsGroupEntity> getUnmatchedObsGroupEntities(); void setUnmatchedObsGroupEntities(List<ObsGroupEntity> unmatchedObsGroupEntities); boolean isUnmatchedMode(); void setUnmatchedMode(boolean unmatchedMode); boolean isAutomaticClientSideValidation(); void setAutomaticClientSideValidation(boolean automaticClientSideValidation); boolean isClientSideValidationHints(); void setClientSideValidationHints(boolean clientSideValidationHints); Object getVisit(); void setVisit(Object visit); Date getDefaultEncounterDate(); void setDefaultEncounterDate(Date defaultEncounterDate);  }