@ Nonnull @ OverrideOnDemand protected TOOLBAR_TYPE createCreateToolbar ( @ Nonnull final WPECTYPE aWPEC , @ Nonnull final FORM_TYPE aForm , @ Nullable final DATATYPE aSelectedObject ) { final Locale aDisplayLocale = aWPEC . getDisplayLocale ( ) ; final TOOLBAR_TYPE aToolbar = createNewCreateToolbar ( aWPEC ) ; aToolbar . addHiddenField ( CPageParam . PARAM_ACTION , CPageParam . ACTION_CREATE ) ; if ( aSelectedObject != null ) aToolbar . addHiddenField ( CPageParam . PARAM_OBJECT , aSelectedObject . getID ( ) ) ; aToolbar . addHiddenField ( CPageParam . PARAM_SUBACTION , CPageParam . ACTION_SAVE ) ; // Save button aToolbar . addSubmitButton ( getCreateToolbarSubmitButtonText ( aDisplayLocale ) , getCreateToolbarSubmitButtonIcon ( ) ) ; // Cancel button aToolbar . addButtonCancel ( aDisplayLocale ) ; // Callback modifyCreateToolbar ( aWPEC , aToolbar ) ; return aToolbar ; }
Create toolbar for creating a new object