Package org.cxbox.core.dto.rowmeta
Class PostAction
java.lang.Object
org.cxbox.core.dto.rowmeta.PostAction
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classstatic classstatic classPostAction.WaitUntilBuilder<T extends org.cxbox.api.data.dto.DataResponseDTO,V> Creates a post-action that waits until a specified condition is met. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic PostActiondelayedRefreshBC(org.cxbox.api.data.BcIdentifier bcIdentifier, Number seconds) static PostActiondownloadFile(String fileId) static PostActiondownloadFileByUrl(String url) static PostActiondrillDown(DrillDownTypeSpecifier drillDownType, String url) static PostActiondrillDown(DrillDownTypeSpecifier drillDownType, String url, String urlName) static <T extends org.cxbox.api.data.dto.DataResponseDTO,V>
PostAction.WaitUntilBuilder<T,V> drillDownAndWaitUntil(@NonNull String url, @NonNull org.cxbox.api.data.BcIdentifier successConditionBc, @NonNull DtoField<? super T, V> successConditionField, V successConditionValue) Creates a post-action that performs a INNER drill-down and then waits until a specified condition is met.static PostActiondrillDownWithFilter(DrillDownTypeSpecifier drillDownType, String url, Consumer<FC> fc) Sets drill-down functionality with filter capabilities for a specific field.getAttribute(String key) getType()getURL()static PostActionopenPickList(String pickList) static PostActionstatic PostActionrefreshBc(org.cxbox.api.data.BcIdentifier bcIdentifier) static PostActionrefreshParentBc(org.cxbox.api.data.BcIdentifier bcIdentifier) static PostActionshowMessage(MessageType messageType, String messageText) static <T extends org.cxbox.api.data.dto.DataResponseDTO,V>
PostAction.WaitUntilBuilder<T,V> Creates a post-action that waits until a specified condition is met.
-
Constructor Details
-
PostAction
public PostAction()
-
-
Method Details
-
refreshBc
-
refreshParentBc
-
downloadFile
-
downloadFileByUrl
-
openPickList
-
drillDown
-
drillDown
public static PostAction drillDown(DrillDownTypeSpecifier drillDownType, String url, String urlName) -
drillDownWithFilter
public static PostAction drillDownWithFilter(DrillDownTypeSpecifier drillDownType, String url, Consumer<FC> fc) Sets drill-down functionality with filter capabilities for a specific field.This method configures a drill-down URL with optional filtering parameters for a DTO field. It retrieves the
PlatformDrilldownServiceto generate URL filter parameters and applies them to the field's drill-down configuration.Example: // add with default builder PostAction.drillDownWithFilterDrillDownType.INNER, "screen/myscreen/view/myview", fc -> fc .add(RestController.myBc, MyDefaultDTO.class, fb -> fb .dictionaryEnum(MyDefaultDTO_.status, getStatusFilterValues(id)) .multiValue(MyDefaultDTO_.multivalueField, myMultivalueField)) // add with custom filter builders .add(RestController.myBc, MyDefaultDTO.class, new TypeToken<MyCustomFilterBuilder<MyCustomDTO>>() { }, fb -> fb .dictionaryEnum(MyDTO_.status, getStatusFilterValues(id)) .multiValue(MyDTO_.multivalueField, myMultivalueFilterField) .myCustomFields(MyDTO_.customField, myCustomFieldFilterValue );- Parameters:
drillDownType- the type specifier that defines the drill-down behaviorurl- the base drill-down URL stringfc- a consumer that accepts and configures the filter configuration object. This allows customization of filtering parameters that will be appended to the drill-down URL
-
delayedRefreshBC
public static PostAction delayedRefreshBC(org.cxbox.api.data.BcIdentifier bcIdentifier, Number seconds) -
showMessage
-
postDelete
-
waitUntil
public static <T extends org.cxbox.api.data.dto.DataResponseDTO,V> PostAction.WaitUntilBuilder<T,V> waitUntil(@NonNull @NonNull DtoField<? super T, V> successConditionField, @NonNull V successConditionValue) Creates a post-action that waits until a specified condition is met.- Parameters:
successConditionField- The field whose value will be monitored.successConditionValue- The value that indicates successful completion. Only String and Boolean types are supported now- Returns:
- A builder for constructing a `waitUntil` post-action.
Example usage:
PostAction.waitUntil(CxboxRestController.clientEdit, ClientDTO_.statusField, true) .inProgressMessage("Fetching data...") .successMessage("Data received. Click OK to proceed.") .timeoutMessage("Timeout reached. Close the window and refresh.") .build();
-
drillDownAndWaitUntil
public static <T extends org.cxbox.api.data.dto.DataResponseDTO,V> PostAction.WaitUntilBuilder<T,V> drillDownAndWaitUntil(@NonNull @NonNull String url, @NonNull @NonNull org.cxbox.api.data.BcIdentifier successConditionBc, @NonNull @NonNull DtoField<? super T, V> successConditionField, @NonNull V successConditionValue) Creates a post-action that performs a INNER drill-down and then waits until a specified condition is met.- Parameters:
url- The INNER drill-down URL to navigate to.successConditionBc- The business component on which the condition will be monitored after drill-down.successConditionField- The field whose value will be monitored.successConditionValue- The value that indicates successful completion. Only String and Boolean types are supported now- Returns:
- A builder for constructing a `drillDownAndWaitUntil` post-action.
Example usage:
PostAction.drillDownAndWaitUntil("/screen/client/view/clientView/" + CxboxRestController.clientEdit + "/" + clientId, CxboxRestController.clientEdit, ClientDTO_.statusField, true) .inProgressMessage("Navigating and fetching data...") .successMessage("Data loaded successfully.") .timeoutMessage("Failed to retrieve data in time.") .build();
-
getAttributes
-
getAttribute
-
getURL
-
getType
-
getDrillDownType
-
add
-