diff --git a/modules/cui-jsf-api/src/main/java/de/cuioss/jsf/api/application/message/MessageProducer.java b/modules/cui-jsf-api/src/main/java/de/cuioss/jsf/api/application/message/MessageProducer.java index 6f3e35ed..4d14ff83 100644 --- a/modules/cui-jsf-api/src/main/java/de/cuioss/jsf/api/application/message/MessageProducer.java +++ b/modules/cui-jsf-api/src/main/java/de/cuioss/jsf/api/application/message/MessageProducer.java @@ -51,9 +51,9 @@ public interface MessageProducer extends Serializable { * {@link #getMessageFor(String, jakarta.faces.application.FacesMessage.Severity, Object...)} * that sets in addition the Messages into the {@link FacesContext} * - * @param messagekey must no be null FacesMessage.Severity severity + * @param messagekey must not be null FacesMessage.Severity severity * @param severity The Severity level of the Message, must not be null. - * @param componentId identifying the component, may be null. + * @param componentId identifying the component may be null. * @param parameter Ellipses of Object Parameter for MessageFormat */ void setFacesMessage(String messagekey, FacesMessage.Severity severity, String componentId, Object... parameter); diff --git a/modules/cui-jsf-api/src/main/java/de/cuioss/jsf/api/components/base/BaseCuiHtmlSelectBooleanCheckboxComponent.java b/modules/cui-jsf-api/src/main/java/de/cuioss/jsf/api/components/base/BaseCuiHtmlSelectBooleanCheckboxComponent.java index eeba967e..196d15f8 100644 --- a/modules/cui-jsf-api/src/main/java/de/cuioss/jsf/api/components/base/BaseCuiHtmlSelectBooleanCheckboxComponent.java +++ b/modules/cui-jsf-api/src/main/java/de/cuioss/jsf/api/components/base/BaseCuiHtmlSelectBooleanCheckboxComponent.java @@ -37,10 +37,10 @@ public class BaseCuiHtmlSelectBooleanCheckboxComponent extends HtmlSelectBoolean implements ComponentBridge, ComponentStyleClassProvider, StyleAttributeProvider { @Delegate - private final ComponentStyleClassProvider styleClassProvider; + protected final ComponentStyleClassProvider styleClassProvider; @Delegate - private final StyleAttributeProvider styleAttributeProvider; + protected final StyleAttributeProvider styleAttributeProvider; /***/ public BaseCuiHtmlSelectBooleanCheckboxComponent() { diff --git a/modules/cui-jsf-api/src/main/java/de/cuioss/jsf/api/components/base/BaseCuiInputComponent.java b/modules/cui-jsf-api/src/main/java/de/cuioss/jsf/api/components/base/BaseCuiInputComponent.java index 34de78ae..19fb1a8e 100644 --- a/modules/cui-jsf-api/src/main/java/de/cuioss/jsf/api/components/base/BaseCuiInputComponent.java +++ b/modules/cui-jsf-api/src/main/java/de/cuioss/jsf/api/components/base/BaseCuiInputComponent.java @@ -24,7 +24,7 @@ import jakarta.faces.context.FacesContext; /** - * Minimal super-set for cui-based components that are at least {@link UIInput}. + * Minimal superset for cui-based components that are at least {@link UIInput}. * Therefore, it provides the handling of the styleClass and style attribute and * the implicit attributes provided by {@link UIInput}. * In addition, it acts as a {@link ComponentBridge} diff --git a/modules/cui-jsf-api/src/main/java/de/cuioss/jsf/api/components/base/BaseCuiNamingContainer.java b/modules/cui-jsf-api/src/main/java/de/cuioss/jsf/api/components/base/BaseCuiNamingContainer.java index 5a558ca8..eb82f97e 100644 --- a/modules/cui-jsf-api/src/main/java/de/cuioss/jsf/api/components/base/BaseCuiNamingContainer.java +++ b/modules/cui-jsf-api/src/main/java/de/cuioss/jsf/api/components/base/BaseCuiNamingContainer.java @@ -24,7 +24,7 @@ import jakarta.faces.context.FacesContext; /** - * Minimal super-set for cui-based components that are at least + * Minimal superset for cui-based components that are at least * {@link UINamingContainer}. * Therefore, it provides the handling of the * styleClass and style attribute and the implicit attributes provided by diff --git a/modules/cui-jsf-api/src/main/java/de/cuioss/jsf/api/components/decorator/AbstractParentDecorator.java b/modules/cui-jsf-api/src/main/java/de/cuioss/jsf/api/components/decorator/AbstractParentDecorator.java index f0d1c302..addc4a30 100644 --- a/modules/cui-jsf-api/src/main/java/de/cuioss/jsf/api/components/decorator/AbstractParentDecorator.java +++ b/modules/cui-jsf-api/src/main/java/de/cuioss/jsf/api/components/decorator/AbstractParentDecorator.java @@ -56,7 +56,7 @@ public void processEvent(final ComponentSystemEvent event) { * will be called at {@link PostAddToViewEvent} and only if the component is * set to {@code rendered=true} * - * @param parent to be decorated, wrapped into an corresponding + * @param parent to be decorated, wrapped into a corresponding * {@link ComponentModifier}, is never null */ public abstract void decorate(final ComponentModifier parent); diff --git a/modules/cui-jsf-api/src/main/java/de/cuioss/jsf/api/components/html/HtmlTreeBuilder.java b/modules/cui-jsf-api/src/main/java/de/cuioss/jsf/api/components/html/HtmlTreeBuilder.java index a9790123..ee9031e6 100644 --- a/modules/cui-jsf-api/src/main/java/de/cuioss/jsf/api/components/html/HtmlTreeBuilder.java +++ b/modules/cui-jsf-api/src/main/java/de/cuioss/jsf/api/components/html/HtmlTreeBuilder.java @@ -35,8 +35,9 @@ import lombok.Getter; /** - * Represents a partial html tree. It provides a number of fluent builder in - * order to simplify the creation. methods in order to interact with + * Represents a partial html tree. + * It provides a number of fluent builders to simplify the creation. + * In addition, it provides methods to interact with * * @author Oliver Wolff */ @@ -200,7 +201,7 @@ public HtmlTreeBuilder withAttribute(final AttributeName attributeName, final St } /** - * Adds the 'name' and 'id' attributes attribute to the current dom-element. + * Adds the 'name' and 'id' attributes to the current dom-element. * * @param attributeValue to be set as 'name' and 'id' * @return the {@link HtmlTreeBuilder} diff --git a/modules/cui-jsf-api/src/main/java/de/cuioss/jsf/api/components/javascript/ComponentWrapperJQuerySelector.java b/modules/cui-jsf-api/src/main/java/de/cuioss/jsf/api/components/javascript/ComponentWrapperJQuerySelector.java index 2546a419..b5c31439 100644 --- a/modules/cui-jsf-api/src/main/java/de/cuioss/jsf/api/components/javascript/ComponentWrapperJQuerySelector.java +++ b/modules/cui-jsf-api/src/main/java/de/cuioss/jsf/api/components/javascript/ComponentWrapperJQuerySelector.java @@ -15,16 +15,15 @@ */ package de.cuioss.jsf.api.components.javascript; -import jakarta.faces.component.UIComponent; - import de.cuioss.jsf.api.components.util.ComponentWrapper; +import jakarta.faces.component.UIComponent; import lombok.AccessLevel; import lombok.NonNull; import lombok.RequiredArgsConstructor; import lombok.ToString; /** - * Simple base class for creating JQuery-specific selectors: e.g for a given + * Simple base class for creating JQuery-specific selectors: e.g., for a given * component providing the id "a:b" it returns "jQuery('#a\\\\:b')" saying it * takes care on the proper masking of the clientIds. * @@ -34,7 +33,9 @@ @ToString public class ComponentWrapperJQuerySelector extends JQuerySelector { - /** Runtime access on component specific attributes. */ + /** + * Runtime access on component specific attributes. + */ @NonNull private final ComponentWrapper componentWrapper; @@ -65,14 +66,14 @@ public static class ComponentWrapperJQuerySelectorBuilder { * @return an instance of {@link ComponentWrapperJQuerySelectorBuilder} */ public ComponentWrapperJQuerySelectorBuilder withComponentWrapper( - final ComponentWrapper componentWrapper) { + final ComponentWrapper componentWrapper) { this.componentWrapper = componentWrapper; return this; } /** - * @param idExtension if not null it will be appended to the derived ClientId. - * In addition there will be an underscore appended: The + * @param idExtension if not null, it will be appended to the derived ClientId. + * In addition, there will be an underscore appended: The * result will be component.getClientId() + "_" + idExtension * @return an instance of {@link ComponentWrapperJQuerySelectorBuilder} */ diff --git a/modules/cui-jsf-api/src/main/java/de/cuioss/jsf/api/components/javascript/JQuerySelector.java b/modules/cui-jsf-api/src/main/java/de/cuioss/jsf/api/components/javascript/JQuerySelector.java index 28561c10..eb3460ff 100644 --- a/modules/cui-jsf-api/src/main/java/de/cuioss/jsf/api/components/javascript/JQuerySelector.java +++ b/modules/cui-jsf-api/src/main/java/de/cuioss/jsf/api/components/javascript/JQuerySelector.java @@ -15,11 +15,11 @@ */ package de.cuioss.jsf.api.components.javascript; -import static de.cuioss.tools.string.MoreStrings.nullToEmpty; - import de.cuioss.tools.string.Joiner; import de.cuioss.tools.string.Splitter; +import static de.cuioss.tools.string.MoreStrings.nullToEmpty; + /** * Provides a simple way to create a correctly escaped JQuery-selector * @@ -33,9 +33,9 @@ public abstract class JQuerySelector implements ScriptProvider { public static final String SELECTOR_TEMPLATE = "jQuery('#%s')"; /** - * @return the corresponding jQuerySelectorString, e.g for a given component - * providing the id "a:b" it returns "jQuery('#a\\\\:b')" saying it - * takes care on the proper masking of the clientIds. + * @return the corresponding jQuerySelectorString, e.g., for a given component + * providing the id "a:b" it returns "jQuery('#a\\\\:b')" saying it + * takes care on the proper masking of the clientIds. */ @Override public String script() { @@ -45,7 +45,7 @@ public String script() { protected abstract String getIdString(); /** - * Escapes a given id String in order to be used within javascript, e.g for a + * Escapes a given id String to be used within javascript, e.g., for a * given component providing the id "a:b" it returns "'a\\\\:b'" saying it takes * care on the proper masking of the clientIds. * diff --git a/modules/cui-jsf-api/src/main/java/de/cuioss/jsf/api/components/javascript/NotQuotableWrapper.java b/modules/cui-jsf-api/src/main/java/de/cuioss/jsf/api/components/javascript/NotQuotableWrapper.java index 86a0b650..3c7f72ce 100644 --- a/modules/cui-jsf-api/src/main/java/de/cuioss/jsf/api/components/javascript/NotQuotableWrapper.java +++ b/modules/cui-jsf-api/src/main/java/de/cuioss/jsf/api/components/javascript/NotQuotableWrapper.java @@ -15,21 +15,20 @@ */ package de.cuioss.jsf.api.components.javascript; -import java.io.Serial; -import java.io.Serializable; - import lombok.Getter; import lombok.RequiredArgsConstructor; import lombok.ToString; +import java.io.Serial; +import java.io.Serializable; + /** * Helper class to be used in conjunction with {@link JavaScriptOptions}. The * problem: Each value will automatically put into double quotes. If you wrap - * the corresponding element in an instance of this type it will be taken + * the corresponding element in an instance of this type, it will be taken * directly and not quoted. * * @author Oliver Wolff - * */ @RequiredArgsConstructor @ToString diff --git a/modules/cui-jsf-api/src/main/java/de/cuioss/jsf/api/components/model/datalist/impl/AbstractEditableDataListModel.java b/modules/cui-jsf-api/src/main/java/de/cuioss/jsf/api/components/model/datalist/impl/AbstractEditableDataListModel.java index f9e1d5bb..625ae83a 100644 --- a/modules/cui-jsf-api/src/main/java/de/cuioss/jsf/api/components/model/datalist/impl/AbstractEditableDataListModel.java +++ b/modules/cui-jsf-api/src/main/java/de/cuioss/jsf/api/components/model/datalist/impl/AbstractEditableDataListModel.java @@ -135,7 +135,7 @@ protected void cancelAllEditItems() { } /** - * This removes new items that were in edit mode and have been canceled. + * This removes new items in edit mode and have been canceled. */ private void removeNullItems() { getDisplayItems().removeIf(item -> !PERSISTED.equals(item.getAddStatus()) && null == item.getWrapped()); diff --git a/modules/cui-jsf-api/src/main/java/de/cuioss/jsf/api/components/model/datalist/impl/ItemWrapperImpl.java b/modules/cui-jsf-api/src/main/java/de/cuioss/jsf/api/components/model/datalist/impl/ItemWrapperImpl.java index 919149a9..8b9042f1 100644 --- a/modules/cui-jsf-api/src/main/java/de/cuioss/jsf/api/components/model/datalist/impl/ItemWrapperImpl.java +++ b/modules/cui-jsf-api/src/main/java/de/cuioss/jsf/api/components/model/datalist/impl/ItemWrapperImpl.java @@ -15,12 +15,6 @@ */ package de.cuioss.jsf.api.components.model.datalist.impl; -import static de.cuioss.tools.base.Preconditions.checkState; -import static java.util.Objects.requireNonNull; - -import java.io.Serial; -import java.io.Serializable; - import de.cuioss.jsf.api.components.model.datalist.AddStatus; import de.cuioss.jsf.api.components.model.datalist.EditStatus; import de.cuioss.jsf.api.components.model.datalist.ItemWrapper; @@ -29,15 +23,20 @@ import lombok.Setter; import lombok.ToString; +import java.io.Serial; +import java.io.Serializable; + +import static de.cuioss.tools.base.Preconditions.checkState; +import static java.util.Objects.requireNonNull; + /** * @param identifying the type of items to be created. Must be at least * {@link Serializable} and implement {@link Object#hashCode()} and * {@link Object#equals(Object)} correctly. - * * @author Oliver Wolff */ -@EqualsAndHashCode(of = { "wrapped", "editStatus" }) -@ToString(of = { "wrapped", "editStatus" }) +@EqualsAndHashCode(of = {"wrapped", "editStatus"}) +@ToString(of = {"wrapped", "editStatus"}) public class ItemWrapperImpl implements ItemWrapper { @Serial @@ -66,7 +65,7 @@ public class ItemWrapperImpl implements ItemWrapper { private int listIndex; /** - * @param wrapped may be null + * @param wrapped maybe null * @param editStatus must not be null. */ public ItemWrapperImpl(final T wrapped, final EditStatus editStatus) { @@ -98,15 +97,15 @@ public ItemWrapperImpl() { public void doSave() { requireNonNull(wrapped, "Invalid usage: wrapped should not be null"); switch (initalEditStatus) { - case ADDED: - editStatus = EditStatus.ADDED; - addStatus = AddStatus.ADDED; - break; - case EDIT: - throw new IllegalStateException("Invalid usage: You must not doCancel or doSave prior to doEdit"); - default: - editStatus = wrapped.equals(initialWrapped) ? EditStatus.INITIAL : EditStatus.MODIFIED; - break; + case ADDED: + editStatus = EditStatus.ADDED; + addStatus = AddStatus.ADDED; + break; + case EDIT: + throw new IllegalStateException("Invalid usage: You must not doCancel or doSave prior to doEdit"); + default: + editStatus = wrapped.equals(initialWrapped) ? EditStatus.INITIAL : EditStatus.MODIFIED; + break; } initialWrapped = null; } diff --git a/modules/cui-jsf-api/src/main/java/de/cuioss/jsf/api/components/model/menu/NavigationMenuItemImpl.java b/modules/cui-jsf-api/src/main/java/de/cuioss/jsf/api/components/model/menu/NavigationMenuItemImpl.java index 8968a5c3..92a56cdf 100644 --- a/modules/cui-jsf-api/src/main/java/de/cuioss/jsf/api/components/model/menu/NavigationMenuItemImpl.java +++ b/modules/cui-jsf-api/src/main/java/de/cuioss/jsf/api/components/model/menu/NavigationMenuItemImpl.java @@ -15,20 +15,15 @@ */ package de.cuioss.jsf.api.components.model.menu; +import de.cuioss.jsf.api.application.navigation.NavigationUtils; +import de.cuioss.jsf.api.components.support.LabelResolver; +import jakarta.faces.context.FacesContext; +import lombok.*; + import java.io.Serial; import java.util.ArrayList; import java.util.List; -import jakarta.faces.context.FacesContext; - -import de.cuioss.jsf.api.application.navigation.NavigationUtils; -import de.cuioss.jsf.api.components.support.LabelResolver; -import lombok.EqualsAndHashCode; -import lombok.Getter; -import lombok.RequiredArgsConstructor; -import lombok.Setter; -import lombok.ToString; - /** * Basic Implementation of a {@link NavigationMenuItem} * @@ -74,7 +69,7 @@ public abstract class NavigationMenuItemImpl implements NavigationMenuItem { private String parentId; /** - * Allows to configure a list of view ids that should trigger displaying the + * Allows configuring a list of view ids that should trigger displaying the * menu item in "active" mode. */ @Getter @@ -89,7 +84,7 @@ public int compareTo(final NavigationMenuItem other) { @Override public String getResolvedTitle() { return LabelResolver.builder().withLabelKey(titleKey).withLabelValue(titleValue).build() - .resolve(FacesContext.getCurrentInstance()); + .resolve(FacesContext.getCurrentInstance()); } @Override @@ -100,7 +95,7 @@ public boolean isTitleAvailable() { @Override public boolean isActive() { return !getActiveForAdditionalViewId().isEmpty() && getActiveForAdditionalViewId() - .contains(NavigationUtils.getCurrentView(FacesContext.getCurrentInstance()).getViewId()); + .contains(NavigationUtils.getCurrentView(FacesContext.getCurrentInstance()).getViewId()); } } diff --git a/web-modules/cui-javascript/src/main/resources/META-INF/resources/de.cuioss.javascript/cui.ts b/web-modules/cui-javascript/src/main/resources/META-INF/resources/de.cuioss.javascript/cui.ts index 5906d702..72e604d0 100644 --- a/web-modules/cui-javascript/src/main/resources/META-INF/resources/de.cuioss.javascript/cui.ts +++ b/web-modules/cui-javascript/src/main/resources/META-INF/resources/de.cuioss.javascript/cui.ts @@ -118,13 +118,11 @@ namespace Cui.Core { jQuery('.modal').modal('hide'); jQuery('[data-modal-dialog-id=confirmDialogTimeout]').modal('show'); jQuery(document.body).addClass('modal-timeout'); - onIdle.forEach((callback: () => void) => { - callback(); - }); + onIdle.forEach((callback:() => void) => { callback(); }); } /** - * Execute open external application in new window (or tab depend on browser and settings) and set focus on this + * Execute open external application in a new window (or tab depend on browser and settings) and set focus on this * @param applicationUrl */ export function openExternalApplicationInNewWindow(applicationUrl: string): void {