org.openmrs.propertyeditor
Class ConceptAnswersEditor

java.lang.Object
  extended by java.beans.PropertyEditorSupport
      extended by org.openmrs.propertyeditor.ConceptAnswersEditor
All Implemented Interfaces:
java.beans.PropertyEditor

public class ConceptAnswersEditor
extends java.beans.PropertyEditorSupport

Handles lists of conceptids that correspond to answers.


Constructor Summary
ConceptAnswersEditor(java.util.Collection<ConceptAnswer> originalAnswers)
          Default constructor taking in the original answers.
 
Method Summary
 void setAsText(java.lang.String text)
          loops over the textbox assigned to this property.
 
Methods inherited from class java.beans.PropertyEditorSupport
addPropertyChangeListener, firePropertyChange, getAsText, getCustomEditor, getJavaInitializationString, getSource, getTags, getValue, isPaintable, paintValue, removePropertyChangeListener, setSource, setValue, supportsCustomEditor
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ConceptAnswersEditor

public ConceptAnswersEditor(java.util.Collection<ConceptAnswer> originalAnswers)
Default constructor taking in the original answers. This should be the actual list on the pojo object to prevent hibernate errors later on.

Parameters:
originalAnswers - the list on the pojo
Method Detail

setAsText

public void setAsText(java.lang.String text)
               throws java.lang.IllegalArgumentException
loops over the textbox assigned to this property. The textbox is assumed to be a string of conceptIds^drugIds separated by spaces.

Specified by:
setAsText in interface java.beans.PropertyEditor
Overrides:
setAsText in class java.beans.PropertyEditorSupport
Parameters:
text - list of conceptIds (not conceptAnswerIds)
Throws:
java.lang.IllegalArgumentException
Expected behavior:
set the sort weights with the least possible changes

OpenMRS-1.7.x

Generated Apr 27 2012 10:06 PM. NOTE - these libraries are in active development and subject to change