You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@causeway.apache.org by ah...@apache.org on 2025/03/13 13:51:13 UTC

(causeway-app-referenceapp) branch v3 updated: ditch the redirect policy stuff

This is an automated email from the ASF dual-hosted git repository.

ahuber pushed a commit to branch v3
in repository https://gitbox.apache.org/repos/asf/causeway-app-referenceapp.git


The following commit(s) were added to refs/heads/v3 by this push:
     new 98bd394  ditch the redirect policy stuff
98bd394 is described below

commit 98bd394dbcd1068c1e9b0e0922871bae84d2b296
Author: Andi Huber <ah...@apache.org>
AuthorDate: Thu Mar 13 14:51:06 2025 +0100

    ditch the redirect policy stuff
---
 ...LayoutRedirectPolicyEntity_incrementRedirectEvenIfSame.java |  3 +--
 ...outRedirectPolicyEntity_incrementRedirectOnlyIfDiffers.java |  3 +--
 .../CollectionDomainEventPage_changeControlStrategy.java       |  5 ++---
 .../PropertyDomainEventPage_changeControlStrategy.java         |  5 ++---
 .../wicket/common/featured/customui/WhereInTheWorldPanel.java  | 10 +++++-----
 5 files changed, 11 insertions(+), 15 deletions(-)

diff --git a/domain/src/main/java/demoapp/dom/domain/actions/ActionLayout/redirectPolicy/ActionLayoutRedirectPolicyEntity_incrementRedirectEvenIfSame.java b/domain/src/main/java/demoapp/dom/domain/actions/ActionLayout/redirectPolicy/ActionLayoutRedirectPolicyEntity_incrementRedirectEvenIfSame.java
index e79d613..7c3cb58 100644
--- a/domain/src/main/java/demoapp/dom/domain/actions/ActionLayout/redirectPolicy/ActionLayoutRedirectPolicyEntity_incrementRedirectEvenIfSame.java
+++ b/domain/src/main/java/demoapp/dom/domain/actions/ActionLayout/redirectPolicy/ActionLayoutRedirectPolicyEntity_incrementRedirectEvenIfSame.java
@@ -21,7 +21,6 @@ package demoapp.dom.domain.actions.ActionLayout.redirectPolicy;
 import org.apache.causeway.applib.annotation.Action;
 import org.apache.causeway.applib.annotation.ActionLayout;
 import org.apache.causeway.applib.annotation.MemberSupport;
-import org.apache.causeway.applib.annotation.Redirect;
 import org.apache.causeway.applib.annotation.SemanticsOf;
 
 import lombok.RequiredArgsConstructor;
@@ -29,7 +28,7 @@ import lombok.RequiredArgsConstructor;
 //tag::class[]
 @Action(semantics = SemanticsOf.IDEMPOTENT)
 @ActionLayout(
-    redirectPolicy = Redirect.EVEN_IF_SAME                  // <.>
+    /*redirectPolicy = Redirect.EVEN_IF_SAME*/                  // <.>
 )
 @RequiredArgsConstructor
 public class ActionLayoutRedirectPolicyEntity_incrementRedirectEvenIfSame {
diff --git a/domain/src/main/java/demoapp/dom/domain/actions/ActionLayout/redirectPolicy/ActionLayoutRedirectPolicyEntity_incrementRedirectOnlyIfDiffers.java b/domain/src/main/java/demoapp/dom/domain/actions/ActionLayout/redirectPolicy/ActionLayoutRedirectPolicyEntity_incrementRedirectOnlyIfDiffers.java
index b34f1e0..c347a96 100644
--- a/domain/src/main/java/demoapp/dom/domain/actions/ActionLayout/redirectPolicy/ActionLayoutRedirectPolicyEntity_incrementRedirectOnlyIfDiffers.java
+++ b/domain/src/main/java/demoapp/dom/domain/actions/ActionLayout/redirectPolicy/ActionLayoutRedirectPolicyEntity_incrementRedirectOnlyIfDiffers.java
@@ -21,7 +21,6 @@ package demoapp.dom.domain.actions.ActionLayout.redirectPolicy;
 import org.apache.causeway.applib.annotation.Action;
 import org.apache.causeway.applib.annotation.ActionLayout;
 import org.apache.causeway.applib.annotation.MemberSupport;
-import org.apache.causeway.applib.annotation.Redirect;
 import org.apache.causeway.applib.annotation.SemanticsOf;
 
 import lombok.RequiredArgsConstructor;
@@ -29,7 +28,7 @@ import lombok.RequiredArgsConstructor;
 //tag::class[]
 @Action(semantics = SemanticsOf.IDEMPOTENT)
 @ActionLayout(
-    redirectPolicy = Redirect.ONLY_IF_DIFFERS               // <.>
+    /*redirectPolicy = Redirect.ONLY_IF_DIFFERS*/               // <.>
 )
 @RequiredArgsConstructor
 public class ActionLayoutRedirectPolicyEntity_incrementRedirectOnlyIfDiffers {
diff --git a/domain/src/main/java/demoapp/dom/domain/collections/Collection/domainEvent/CollectionDomainEventPage_changeControlStrategy.java b/domain/src/main/java/demoapp/dom/domain/collections/Collection/domainEvent/CollectionDomainEventPage_changeControlStrategy.java
index ab4ab96..e5fc2b4 100644
--- a/domain/src/main/java/demoapp/dom/domain/collections/Collection/domainEvent/CollectionDomainEventPage_changeControlStrategy.java
+++ b/domain/src/main/java/demoapp/dom/domain/collections/Collection/domainEvent/CollectionDomainEventPage_changeControlStrategy.java
@@ -23,20 +23,19 @@ import jakarta.inject.Inject;
 import org.apache.causeway.applib.annotation.Action;
 import org.apache.causeway.applib.annotation.ActionLayout;
 import org.apache.causeway.applib.annotation.MemberSupport;
-import org.apache.causeway.applib.annotation.Redirect;
 import org.apache.causeway.applib.annotation.SemanticsOf;
 
 import lombok.RequiredArgsConstructor;
 
 //tag::class[]
 @Action(semantics = SemanticsOf.IDEMPOTENT)
-@ActionLayout(redirectPolicy = Redirect.EVEN_IF_SAME)       // <.>
+@ActionLayout(/*redirectPolicy = Redirect.EVEN_IF_SAME*/)       // <.>
 @RequiredArgsConstructor
 public class CollectionDomainEventPage_changeControlStrategy {
 
     private final CollectionDomainEventPage page;
 
-    @MemberSupport public CollectionDomainEventPage act(CollectionDomainEventControlStrategy controlStrategy) {
+    @MemberSupport public CollectionDomainEventPage act(final CollectionDomainEventControlStrategy controlStrategy) {
         subscriber.controlStrategy = controlStrategy;
         return page;
     }
diff --git a/domain/src/main/java/demoapp/dom/domain/properties/Property/domainEvent/PropertyDomainEventPage_changeControlStrategy.java b/domain/src/main/java/demoapp/dom/domain/properties/Property/domainEvent/PropertyDomainEventPage_changeControlStrategy.java
index e3ee4af..a892928 100644
--- a/domain/src/main/java/demoapp/dom/domain/properties/Property/domainEvent/PropertyDomainEventPage_changeControlStrategy.java
+++ b/domain/src/main/java/demoapp/dom/domain/properties/Property/domainEvent/PropertyDomainEventPage_changeControlStrategy.java
@@ -23,20 +23,19 @@ import jakarta.inject.Inject;
 import org.apache.causeway.applib.annotation.Action;
 import org.apache.causeway.applib.annotation.ActionLayout;
 import org.apache.causeway.applib.annotation.MemberSupport;
-import org.apache.causeway.applib.annotation.Redirect;
 import org.apache.causeway.applib.annotation.SemanticsOf;
 
 import lombok.RequiredArgsConstructor;
 
 //tag::class[]
 @Action(semantics = SemanticsOf.IDEMPOTENT)
-@ActionLayout(redirectPolicy = Redirect.EVEN_IF_SAME)       // <.>
+@ActionLayout(/*redirectPolicy = Redirect.EVEN_IF_SAME*/)       // <.>
 @RequiredArgsConstructor
 public class PropertyDomainEventPage_changeControlStrategy {
 
     private final PropertyDomainEventPage page;
 
-    @MemberSupport public PropertyDomainEventPage act(PropertyDomainEventControlStrategy controlStrategy) {
+    @MemberSupport public PropertyDomainEventPage act(final PropertyDomainEventControlStrategy controlStrategy) {
         subscriber.controlStrategy = controlStrategy;
         return page;
     }
diff --git a/wicket/common/src/main/java/demoapp/webapp/wicket/common/featured/customui/WhereInTheWorldPanel.java b/wicket/common/src/main/java/demoapp/webapp/wicket/common/featured/customui/WhereInTheWorldPanel.java
index 8805443..fb17e55 100644
--- a/wicket/common/src/main/java/demoapp/webapp/wicket/common/featured/customui/WhereInTheWorldPanel.java
+++ b/wicket/common/src/main/java/demoapp/webapp/wicket/common/featured/customui/WhereInTheWorldPanel.java
@@ -89,21 +89,21 @@ extends PanelAbstract<ManagedObject, UiObjectWkt>  {
     private Image createMapComponent(final String id, final WhereInTheWorldPage vm)  {
         val bytes = geoapifyClient.toJpeg(
                         vm.getLatitude(), vm.getLongitude(), vm.getZoom());  // <.>
-        return new Image(id, new ByteArrayResource("image/jpeg", bytes));    // <.>
+        return new Image(id, new ByteArrayResource("image/jpeg", bytes));   // <.>
     }
 //end::createMapComponent[]
 
 //tag::createPropertyComponent[]
     private Component createPropertyComponent(final String propertyId) {
         val managedObject = getModel().getManagedObject();
-        val spec = managedObject.getSpecification();                               // <.>
-        val property = spec.getPropertyElseFail(propertyId);                      // <.>
+        val spec = managedObject.objSpec();                                   // <.>
+        val property = spec.getPropertyElseFail(propertyId);                 // <.>
 
         val scalarModel =
-                getModel().getPropertyModel(                                       // <.>
+                getModel().getPropertyModel(                                   // <.>
                     property, ViewOrEditMode.VIEWING,
                     RenderingHint.REGULAR);
-        return getComponentFactoryRegistry().createComponent(                      // <.>
+        return getComponentFactoryRegistry().createComponent(                 // <.>
                 propertyId, UiComponentType.ATTRIBUTE_NAME_AND_VALUE, scalarModel);
     }
 //end::createPropertyComponent[]