@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;
  }
@ 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 ) ; aToolbar . addSubmitButton ( getCreateToolbarSubmitButtonText ( aDisplayLocale ) , getCreateToolbarSubmitButtonIcon ( ) ) ; aToolbar . addButtonCancel ( aDisplayLocale ) ; modifyCreateToolbar ( aWPEC , aToolbar ) ; return aToolbar ; }
Create toolbar for creating a new object

@param aWPEC
The web page execution context
@param aForm
The handled form. Never <code>null</code>.
@param aSelectedObject
Optional selected object. May be <code>null</code>.
@return Never <code>null</code>.