use of com.helger.photon.bootstrap4.form.BootstrapViewForm in project peppol-practical by phax.
the class PagePublicToolsTestEndpoints method showSelectedObject.
@Override
protected void showSelectedObject(@Nonnull final WebPageExecutionContext aWPEC, @Nonnull final TestEndpoint aSelectedObject) {
final HCNodeList aNodeList = aWPEC.getNodeList();
final BootstrapViewForm aForm = aNodeList.addAndReturnChild(new BootstrapViewForm());
aForm.addFormGroup(new BootstrapFormGroup().setLabel("Creation").setCtrl(AppCommonUI.getDTAndUser(aWPEC, aSelectedObject.getCreationDateTime(), aSelectedObject.getCreationUserID())));
if (aSelectedObject.getLastModificationDateTime() != null) {
aForm.addFormGroup(new BootstrapFormGroup().setLabel("Last modification").setCtrl(AppCommonUI.getDTAndUser(aWPEC, aSelectedObject.getLastModificationDateTime(), aSelectedObject.getLastModificationUserID())));
}
if (aSelectedObject.getDeletionDateTime() != null) {
aForm.addFormGroup(new BootstrapFormGroup().setLabel("Deletion").setCtrl(AppCommonUI.getDTAndUser(aWPEC, aSelectedObject.getDeletionDateTime(), aSelectedObject.getDeletionUserID())));
}
aForm.addFormGroup(new BootstrapFormGroup().setLabel("Company name").setCtrl(aSelectedObject.getCompanyName()));
if (StringHelper.hasText(aSelectedObject.getContactPerson())) {
aForm.addFormGroup(new BootstrapFormGroup().setLabel("Contact person").setCtrl(aSelectedObject.getContactPerson()));
}
aForm.addFormGroup(new BootstrapFormGroup().setLabel("Participant information").setCtrl(aSelectedObject.getParticipantIDIssuer() + ":" + aSelectedObject.getParticipantIDValue()));
aForm.addFormGroup(new BootstrapFormGroup().setLabel("Transport profile").setCtrl(AppHelper.getSMPTransportProfileShortName(aSelectedObject.getTransportProfile()) + " (" + aSelectedObject.getTransportProfile().getID() + ")"));
aForm.addFormGroup(new BootstrapFormGroup().setLabel("SML").setCtrl(aSelectedObject.getSML().getDisplayName()));
}
Aggregations