Class UnitsVM
- java.lang.Object
-
- org.openforis.collect.designer.viewmodel.BaseVM
-
- org.openforis.collect.designer.viewmodel.SurveyBaseVM
-
- org.openforis.collect.designer.viewmodel.SurveyObjectBaseVM<Unit>
-
- org.openforis.collect.designer.viewmodel.UnitsVM
-
public class UnitsVM extends SurveyObjectBaseVM<Unit>
- Author:
- S. Ricci
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.openforis.collect.designer.viewmodel.SurveyBaseVM
SurveyBaseVM.CanLeaveFormCompleteConfirmHandler, SurveyBaseVM.CanLeaveFormConfirmHandler, SurveyBaseVM.SurveyType
-
-
Field Summary
-
Fields inherited from class org.openforis.collect.designer.viewmodel.SurveyObjectBaseVM
APPLY_CHANGES_COMMAND, changed, COMMIT_CHANGES_COMMAND, commitChangesOnApply, editedItem, formObject, newItem, selectedItem, VALIDATE_COMMAND
-
Fields inherited from class org.openforis.collect.designer.viewmodel.SurveyBaseVM
currentLanguageCode, DATE_FORMAT, fieldLabelKeyPrefixes, NODE_CONVERTED_GLOBAL_COMMAND, SCHEMA_CHANGED_GLOBAL_COMMAND, schemaUpdater, survey, SURVEY_CHANGED_GLOBAL_COMMAND, SURVEY_SAVED_GLOBAL_COMMAND, UNDO_LAST_CHANGES_GLOBAL_COMMAND, VALIDATE_ALL_GLOBAL_COMMAND, VERSIONS_UPDATED_GLOBAL_COMMAND
-
Fields inherited from class org.openforis.collect.designer.viewmodel.BaseVM
COLLECT_EARTH_PROJECT_FILE_CREATOR_LOADER, jobManager, userGroupManager, userManager
-
-
Constructor Summary
Constructors Constructor Description UnitsVM()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidaddNewItemToSurvey()voidapply(org.zkoss.bind.Binder binder)voidapplyChanges(org.zkoss.bind.Binder binder)protected voidcloseErrorsInNodesPopUp()protected SurveyObjectFormObject<Unit>createFormObject()protected UnitcreateItemInstance()protected voiddeleteItemFromSurvey(Unit item)voiddeleteUnit(Unit item)protected voiddispatchUnitsUpdatedCommand()voiddoAfterCompose(org.zkoss.zk.ui.Component view)List<String>getAvailableDimensions()static StringgetDimensionLabel(Unit.Dimension dimension)protected List<Unit>getItemsInternal()protected List<NodeDefinition>getReferences(Unit item)voidinit()protected voidmoveSelectedItemInSurvey(int indexTo)protected voidperformDeleteItem(Unit item)-
Methods inherited from class org.openforis.collect.designer.viewmodel.SurveyObjectBaseVM
commitChanges, currentLanguageChanged, deleteItem, dispatchApplyChangesCommand, dispatchValidateCommand, getConfirmDeleteMessageKey, getEditedItem, getFormObject, getItems, getNameTextbox, getSelectedItem, getSelectedItemIndex, isChanged, isCommitChangesOnApply, isEditingItem, isMoveSelectedItemDownDisabled, isMoveSelectedItemUpDisabled, isNewItem, moveSelectedItem, moveSelectedItem, moveSelectedItemDown, moveSelectedItemUp, newItem, performItemSelection, performNewItemCreation, resetEditedItem, selectionChanged, setCommitChangesOnApply, setEditedItem, setFocusOnNameTextbox, setSelectedItem, suggestInternalName, suggestLabel, undoLastChanges, validate, validateAll, validateForm
-
Methods inherited from class org.openforis.collect.designer.viewmodel.SurveyBaseVM
checkCanLeaveForm, checkCanLeaveForm, checkCanLeaveForm, codeListsUpdated, createBasicModuleParameters, currentFormValidated, dispatchCurrentFormValidatedCommand, dispatchCurrentFormValidatedCommand, dispatchCurrentFormValidatedCommand, dispatchCurrentFormValidatedCommand, dispatchNodeConvertedCommand, dispatchSchemaChangedCommand, dispatchSurveyChangedCommand, dispatchTaxonomiesUpdatedCommand, dispatchValidateAllCommand, getCodeLists, getCurrentLanguageCode, getDateFormat, getDefaultLanguageCode, getEditableRecordStepNames, getExpressionValidator, getFormVersionIdsWithEmptyOption, getFormVersions, getFormVersionsWithEmptyOption, getRootEntities, getRootVM, getSurvey, getSurveyId, getTaxonomyNames, getUnitLabel, getUnitLabel, getUnitLabelFromName, getUnitLabelFromPrecision, getUnitNames, getUnits, getVersionLabel, initSurvey, isCollectEarthSurvey, isCurrentEditedSurvey, isCurrentFormBlocking, isCurrentFormValid, isDefaultLanguage, isSingleRootEntityDefined, isSurveyChanged, isSurveyPublished, isSurveyRelatedToPublishedSurvey, isSurveyStored, sortByName, surveyChanged, surveySaved, tabSetsUpdated, taxonomiesUpdated, undoLastChanges, unitsUpdated, versionsUpdated
-
Methods inherited from class org.openforis.collect.designer.viewmodel.BaseVM
closePopUp, getComponentsPath, getDefaultPublicUserGroupItem, getFormFieldValue, getFormFieldValue, getInitParameter, getLoggedUser, getLoggedUsername, getSession, getSessionStatus, getUserGroupsModel, initUserGroupsModel, joinList, joinValues, notifyChange, openPopUp, openPopUp, prettyDateFormat, setFormFieldValue, setFormFieldValue
-
-
-
-
Method Detail
-
getDimensionLabel
public static String getDimensionLabel(Unit.Dimension dimension)
-
init
public void init()
- Overrides:
initin classSurveyBaseVM
-
doAfterCompose
public void doAfterCompose(org.zkoss.zk.ui.Component view)
- Overrides:
doAfterComposein classSurveyObjectBaseVM<Unit>
-
getItemsInternal
protected List<Unit> getItemsInternal()
- Specified by:
getItemsInternalin classSurveyObjectBaseVM<Unit>
-
createItemInstance
protected Unit createItemInstance()
- Specified by:
createItemInstancein classSurveyObjectBaseVM<Unit>
-
addNewItemToSurvey
protected void addNewItemToSurvey()
- Specified by:
addNewItemToSurveyin classSurveyObjectBaseVM<Unit>
-
deleteItemFromSurvey
protected void deleteItemFromSurvey(Unit item)
- Specified by:
deleteItemFromSurveyin classSurveyObjectBaseVM<Unit>
-
moveSelectedItemInSurvey
protected void moveSelectedItemInSurvey(int indexTo)
- Specified by:
moveSelectedItemInSurveyin classSurveyObjectBaseVM<Unit>
-
createFormObject
protected SurveyObjectFormObject<Unit> createFormObject()
- Specified by:
createFormObjectin classSurveyObjectBaseVM<Unit>
-
applyChanges
public void applyChanges(org.zkoss.bind.Binder binder)
- Overrides:
applyChangesin classSurveyObjectBaseVM<Unit>
-
dispatchUnitsUpdatedCommand
protected void dispatchUnitsUpdatedCommand()
-
deleteUnit
public void deleteUnit(Unit item)
-
performDeleteItem
protected void performDeleteItem(Unit item)
- Overrides:
performDeleteItemin classSurveyObjectBaseVM<Unit>
-
closeErrorsInNodesPopUp
protected void closeErrorsInNodesPopUp()
-
getReferences
protected List<NodeDefinition> getReferences(Unit item)
-
apply
public void apply(org.zkoss.bind.Binder binder)
-
-