@Override protected void showSelectedObject (@Nonnull final WebPageExecutionContext aWPEC, @Nonnull final ISMPUserEditable aSelectedObject) { final HCNodeList aNodeList = aWPEC.getNodeList (); final BootstrapViewForm aTable = aNodeList.addAndReturnChild (new BootstrapViewForm ()); aTable.addFormGroup (new BootstrapFormGroup ().setLabel ("User name").setCtrl (aSelectedObject.getUserName ())); aTable.addFormGroup (new BootstrapFormGroup ().setLabel ("Password").setCtrl (aSelectedObject.getPassword ())); }
@Override protected void showSelectedObject (@Nonnull final WebPageExecutionContext aWPEC, @Nonnull final ISMPUserEditable aSelectedObject) { final HCNodeList aNodeList = aWPEC.getNodeList (); final BootstrapViewForm aTable = aNodeList.addAndReturnChild (new BootstrapViewForm ()); aTable.addFormGroup (new BootstrapFormGroup ().setLabel ("User name").setCtrl (aSelectedObject.getUserName ())); aTable.addFormGroup (new BootstrapFormGroup ().setLabel ("Password").setCtrl (aSelectedObject.getPassword ())); }
@Override protected void showListOfExistingObjects (@Nonnull final WPECTYPE aWPEC) { final Locale aDisplayLocale = aWPEC.getDisplayLocale (); final HCNodeList aNodeList = aWPEC.getNodeList (); // Toolbar on top final IButtonToolbar <?> aToolbar = aNodeList.addAndReturnChild (getStyler ().createToolbar (aWPEC)); aToolbar.addButtonNew (EText.BUTTON_CREATE_NEW_USER.getDisplayText (aDisplayLocale), createCreateURL (aWPEC)); final ITabBox <?> aTabBox = getStyler ().createTabBox (aWPEC); final AccessManager aMgr = AccessManager.getInstance (); final Collection <? extends IUser> aActiveUsers = aMgr.getAllActiveUsers (); aTabBox.addTab (EText.TAB_ACTIVE.getDisplayTextWithArgs (aDisplayLocale, Integer.toString (aActiveUsers.size ())), getTabWithUsers (aWPEC, aActiveUsers, getID () + "1")); final Collection <? extends IUser> aDisabledUsers = aMgr.getAllDisabledUsers (); aTabBox.addTab (EText.TAB_DISABLED.getDisplayTextWithArgs (aDisplayLocale, Integer.toString (aDisabledUsers.size ())), getTabWithUsers (aWPEC, aDisabledUsers, getID () + "2")); final Collection <? extends IUser> aDeletedUsers = aMgr.getAllDeletedUsers (); aTabBox.addTab (EText.TAB_DELETED.getDisplayTextWithArgs (aDisplayLocale, Integer.toString (aDeletedUsers.size ())), getTabWithUsers (aWPEC, aDeletedUsers, getID () + "3")); aNodeList.addChild (aTabBox); } }
@Override protected void fillContent (@Nonnull final WPECTYPE aWPEC) { final HCNodeList aNodeList = aWPEC.getNodeList (); final Locale aDisplayLocale = aWPEC.getDisplayLocale (); aNodeList.addChild (HCH4.create (EText.MSG_TPM_HEADER.getDisplayText (aDisplayLocale))); // Third party modules final Set <IThirdPartyModule> aModules = ThirdPartyModuleRegistry.getInstance () .getAllRegisteredThirdPartyModules (); final HCUL aUL = aNodeList.addAndReturnChild (new HCUL ()); // Show all required modules, sorted by name for (final IThirdPartyModule aModule : CollectionHelper.getSorted (aModules, new ComparatorHasDisplayName <IHasDisplayName> (aDisplayLocale))) if (!aModule.isOptional ()) aUL.addItem (_getModuleHCNode (aModule, aDisplayLocale)); } }
@Override protected void fillContent (@Nonnull final WPECTYPE aWPEC) { final HCNodeList aNodeList = aWPEC.getNodeList (); final Locale aDisplayLocale = aWPEC.getDisplayLocale (); aNodeList.addChild (new HCH4 ().addChild (EText.MSG_TPM_HEADER.getDisplayText (aDisplayLocale))); // Third party modules final Set <IThirdPartyModule> aModules = ThirdPartyModuleRegistry.getInstance () .getAllRegisteredThirdPartyModules (); final HCUL aUL = aNodeList.addAndReturnChild (new HCUL ()); // Show all required modules, sorted by name for (final IThirdPartyModule aModule : CollectionHelper.getSorted (aModules, IHasDisplayName.getComparatorCollating (aDisplayLocale))) if (!aModule.isOptional ()) aUL.addItem (_getModuleHCNode (aModule, aDisplayLocale)); } }
@Override protected void showListOfExistingObjects (@Nonnull final WPECTYPE aWPEC) { final Locale aDisplayLocale = aWPEC.getDisplayLocale (); final HCNodeList aNodeList = aWPEC.getNodeList (); final UserGroupManager aUserGroupMgr = PhotonSecurityManager.getUserGroupMgr (); // Toolbar on top final BootstrapButtonToolbar aToolbar = aNodeList.addAndReturnChild (new BootstrapButtonToolbar (aWPEC)); aToolbar.addButtonNew (EText.BUTTON_CREATE_NEW_USERGROUP.getDisplayText (aDisplayLocale), createCreateURL (aWPEC)); final BootstrapTabBox aTabBox = new BootstrapTabBox (); final ICommonsList <IUserGroup> aActiveUserGroups = aUserGroupMgr.getAllActiveUserGroups (); aTabBox.addTab ("active", EText.TAB_ACTIVE.getDisplayTextWithArgs (aDisplayLocale, Integer.toString (aActiveUserGroups.size ())), getTabWithUserGroups (aWPEC, aActiveUserGroups, getID () + "1")); final ICommonsList <IUserGroup> aDeletedUserGroups = aUserGroupMgr.getAllDeletedUserGroups (); aTabBox.addTab ("deleted", EText.TAB_DELETED.getDisplayTextWithArgs (aDisplayLocale, Integer.toString (aDeletedUserGroups.size ())), getTabWithUserGroups (aWPEC, aDeletedUserGroups, getID () + "2")); aNodeList.addChild (aTabBox); } }
@Override protected void fillContent (@Nonnull final WPECTYPE aWPEC) { final HCNodeList aNodeList = aWPEC.getNodeList (); final Locale aDisplayLocale = aWPEC.getDisplayLocale (); aNodeList.addChild (new HCH4 ().addChild (EText.MSG_TPM_HEADER.getDisplayText (aDisplayLocale))); // Third party modules final Set <IThirdPartyModule> aModules = ThirdPartyModuleRegistry.getInstance () .getAllRegisteredThirdPartyModules (); final HCUL aUL = aNodeList.addAndReturnChild (new HCUL ()); // Show all required modules, sorted by name for (final IThirdPartyModule aModule : CollectionHelper.getSorted (aModules, IHasDisplayName.getComparatorCollating (aDisplayLocale))) if (!aModule.isOptional ()) aUL.addItem (_getModuleHCNode (aModule, aDisplayLocale)); } }
@Override protected void showListOfExistingObjects (@Nonnull final WPECTYPE aWPEC) { final Locale aDisplayLocale = aWPEC.getDisplayLocale (); final HCNodeList aNodeList = aWPEC.getNodeList (); final UserGroupManager aUserGroupMgr = PhotonSecurityManager.getUserGroupMgr (); // Toolbar on top final BootstrapButtonToolbar aToolbar = aNodeList.addAndReturnChild (new BootstrapButtonToolbar (aWPEC)); aToolbar.addButtonNew (EText.BUTTON_CREATE_NEW_USERGROUP.getDisplayText (aDisplayLocale), createCreateURL (aWPEC)); final BootstrapTabBox aTabBox = new BootstrapTabBox (); final ICommonsList <IUserGroup> aActiveUserGroups = aUserGroupMgr.getAllActiveUserGroups (); aTabBox.addTab ("active", EText.TAB_ACTIVE.getDisplayTextWithArgs (aDisplayLocale, Integer.toString (aActiveUserGroups.size ())), getTabWithUserGroups (aWPEC, aActiveUserGroups, getID () + "1")); final ICommonsList <IUserGroup> aDeletedUserGroups = aUserGroupMgr.getAllDeletedUserGroups (); aTabBox.addTab ("deleted", EText.TAB_DELETED.getDisplayTextWithArgs (aDisplayLocale, Integer.toString (aDeletedUserGroups.size ())), getTabWithUserGroups (aWPEC, aDeletedUserGroups, getID () + "2")); aNodeList.addChild (aTabBox); } }
@Override protected void showListOfExistingObjects (@Nonnull final WPECTYPE aWPEC) { final Locale aDisplayLocale = aWPEC.getDisplayLocale (); final HCNodeList aNodeList = aWPEC.getNodeList (); // Toolbar on top final BootstrapButtonToolbar aToolbar = aNodeList.addAndReturnChild (new BootstrapButtonToolbar (aWPEC)); aToolbar.addButtonNew (EText.BUTTON_CREATE_NEW.getDisplayText (aDisplayLocale), createCreateURL (aWPEC)); final BootstrapTabBox aTabBox = new BootstrapTabBox (); aTabBox.addTab ("active", EText.TAB_LABEL_ACTIVE.getDisplayText (aDisplayLocale), _createList (aWPEC, "active", aValue -> !aValue.isDeleted ())); aTabBox.addTab ("deleted", EText.TAB_LABEL_DELETED.getDisplayText (aDisplayLocale), _createList (aWPEC, "deleted", aValue -> aValue.isDeleted ())); aNodeList.addChild (aTabBox); } }
final BootstrapButtonToolbar aToolbar = aNodeList.addAndReturnChild (new BootstrapButtonToolbar (aWPEC)); aToolbar.addButtonNew (EText.BUTTON_CREATE_NEW_USER.getDisplayText (aDisplayLocale), createCreateURL (aWPEC));
@Override protected void showListOfExistingObjects (@Nonnull final WPECTYPE aWPEC) { final Locale aDisplayLocale = aWPEC.getDisplayLocale (); final HCNodeList aNodeList = aWPEC.getNodeList (); // Toolbar on top final BootstrapButtonToolbar aToolbar = aNodeList.addAndReturnChild (new BootstrapButtonToolbar (aWPEC)); aToolbar.addButtonNew (EText.BUTTON_CREATE_NEW.getDisplayText (aDisplayLocale), createCreateURL (aWPEC)); final BootstrapTabBox aTabBox = new BootstrapTabBox (); aTabBox.addTab ("active", EText.TAB_LABEL_ACTIVE.getDisplayText (aDisplayLocale), _createList (aWPEC, "active", aValue -> !aValue.isDeleted ())); aTabBox.addTab ("deleted", EText.TAB_LABEL_DELETED.getDisplayText (aDisplayLocale), _createList (aWPEC, "deleted", aValue -> aValue.isDeleted ())); aNodeList.addChild (aTabBox); } }
final BootstrapButtonToolbar aToolbar = aNodeList.addAndReturnChild (new BootstrapButtonToolbar (aWPEC)); aToolbar.addButtonNew (EText.BUTTON_CREATE_NEW_USER.getDisplayText (aDisplayLocale), createCreateURL (aWPEC));
final BootstrapForm aForm = aNodeList.addAndReturnChild (getUIHandler ().createFormSelf (aWPEC)); aForm.addChild (new BootstrapQuestionBox ().addChild (EText.LOGOUT_QUESTION.getDisplayTextWithArgs (aDisplayLocale, sUserName)));
final BootstrapContainer aOuterContainer = ret.addAndReturnChild (new BootstrapContainer ().setFluid (true));
@Override protected boolean handleCustomActions (@Nonnull final WPECTYPE aWPEC, @Nullable final FormState aSelectedObject) { if (aWPEC.hasAction (ACTION_DELETE_ALL)) { final HCNodeList aNodeList = aWPEC.getNodeList (); final Locale aDisplayLocale = aWPEC.getDisplayLocale (); if (aWPEC.hasSubAction (CHCParam.ACTION_SAVE)) { if (FormStateManager.getInstance ().deleteAllFormStates ().isChanged ()) aNodeList.addChild (getStyler ().createSuccessBox (aWPEC, EText.DELETE_ALL_SUCCESS.getDisplayText (aDisplayLocale))); else aNodeList.addChild (getStyler ().createErrorBox (aWPEC, EText.DELETE_ALL_ERROR.getDisplayText (aDisplayLocale))); return true; } final AbstractHCForm <?> aForm = aNodeList.addAndReturnChild (createFormSelf (aWPEC)); aForm.addChild (getStyler ().createQuestionBox (aWPEC, EText.DELETE_ALL_QUERY.getDisplayText (aDisplayLocale))); final IButtonToolbar <?> aToolbar = aForm.addAndReturnChild (getStyler ().createToolbar (aWPEC)); aToolbar.addHiddenField (CHCParam.PARAM_ACTION, ACTION_DELETE_ALL); aToolbar.addHiddenField (CHCParam.PARAM_SUBACTION, ACTION_SAVE); aToolbar.addSubmitButtonYes (aDisplayLocale); aToolbar.addButtonNo (aDisplayLocale); return false; } return true; }
aSelectedObject.getName ()))); final BootstrapViewForm aForm = aNodeList.addAndReturnChild (new BootstrapViewForm ()); aForm.addFormGroup (new BootstrapFormGroup ().setLabel (EText.LABEL_NAME.getDisplayText (aDisplayLocale)) .setCtrl (aSelectedObject.getName ()));
aSelectedObject.getName ()))); final BootstrapViewForm aForm = aNodeList.addAndReturnChild (new BootstrapViewForm ()); aForm.addFormGroup (new BootstrapFormGroup ().setLabel (EText.LABEL_NAME.getDisplayText (aDisplayLocale)) .setCtrl (aSelectedObject.getName ()));
final BootstrapButtonToolbar aToolbar = aNodeList.addAndReturnChild (new BootstrapButtonToolbar (aWPEC)); aToolbar.addButtonNew ("Create new user", createCreateURL (aWPEC));
final BootstrapButtonToolbar aToolbar = aNodeList.addAndReturnChild (new BootstrapButtonToolbar (aWPEC)); aToolbar.addButtonNew ("Create new user", createCreateURL (aWPEC));
final String sDirectoryName = SMPWebAppConfiguration.getDirectoryName (); final BootstrapViewForm aTable = aNodeList.addAndReturnChild (new BootstrapViewForm ()); aTable.addFormGroup (new BootstrapFormGroup ().setLabel ("REST writable API disabled?") .setCtrl (EPhotonCoreText.getYesOrNo (aObject.isRESTWritableAPIDisabled (),