You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@wicket.apache.org by GitBox <gi...@apache.org> on 2020/05/06 18:38:40 UTC

[GitHub] [wicket] papegaaij opened a new pull request #432: WICKET-6774: minor change to contract of Component.getBehaviorId

papegaaij opened a new pull request #432:
URL: https://github.com/apache/wicket/pull/432


   This PR suggest a minor change to the contract of IRequestComponent.getBehaviorId to prepare for a refactoring of the component internals.


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [wicket] bitstorm commented on a change in pull request #432: WICKET-6774: minor change to contract of Component.getBehaviorId

Posted by GitBox <gi...@apache.org>.
bitstorm commented on a change in pull request #432:
URL: https://github.com/apache/wicket/pull/432#discussion_r422006145



##########
File path: wicket-core/src/main/java/org/apache/wicket/ajax/AbstractDefaultAjaxBehavior.java
##########
@@ -83,12 +83,12 @@ protected void onBind()
 		final Component component = getComponent();
 		
 		component.setOutputMarkupId(true);
-		
-		if (getStatelessHint(component))
-		{
-			//generate behavior id
-			component.getBehaviorId(this);
-		}
+	}
+	
+	@Override

Review comment:
       ok. thanks for the explanation!




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [wicket] papegaaij commented on pull request #432: WICKET-6774: minor change to contract of Component.getBehaviorId

Posted by GitBox <gi...@apache.org>.
papegaaij commented on pull request #432:
URL: https://github.com/apache/wicket/pull/432#issuecomment-625122298


   > Please do not merge this PR until we are clear on the way this is supposed to work.
   > https://markmail.org/message/p4cnvfypzprrl2qt
   
   Agreed, that's why I created a PR for such a simple change. The change is simple, but the implications of doing it wrong are much greater. We need have a clear understanding of how we want these stable id's to work.


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [wicket] asfgit merged pull request #432: WICKET-6774: minor change to contract of Component.getBehaviorId

Posted by GitBox <gi...@apache.org>.
asfgit merged pull request #432:
URL: https://github.com/apache/wicket/pull/432


   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [wicket] papegaaij commented on a change in pull request #432: WICKET-6774: minor change to contract of Component.getBehaviorId

Posted by GitBox <gi...@apache.org>.
papegaaij commented on a change in pull request #432:
URL: https://github.com/apache/wicket/pull/432#discussion_r422000659



##########
File path: wicket-core/src/main/java/org/apache/wicket/ajax/AbstractDefaultAjaxBehavior.java
##########
@@ -83,12 +83,12 @@ protected void onBind()
 		final Component component = getComponent();
 		
 		component.setOutputMarkupId(true);
-		
-		if (getStatelessHint(component))
-		{
-			//generate behavior id
-			component.getBehaviorId(this);
-		}
+	}
+	
+	@Override

Review comment:
       `isStableIdRequired` does not make the behavior stateful, that's the purpose of this new method.




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [wicket] bitstorm commented on a change in pull request #432: WICKET-6774: minor change to contract of Component.getBehaviorId

Posted by GitBox <gi...@apache.org>.
bitstorm commented on a change in pull request #432:
URL: https://github.com/apache/wicket/pull/432#discussion_r421995149



##########
File path: wicket-core/src/main/java/org/apache/wicket/ajax/AbstractDefaultAjaxBehavior.java
##########
@@ -83,12 +83,12 @@ protected void onBind()
 		final Component component = getComponent();
 		
 		component.setOutputMarkupId(true);
-		
-		if (getStatelessHint(component))
-		{
-			//generate behavior id
-			component.getBehaviorId(this);
-		}
+	}
+	
+	@Override

Review comment:
       Hi,
   forcing Ajax behavior to be stateful by default will break the current logic for stateless Ajax component. See [user guide](https://ci.apache.org/projects/wicket/guide/8.x/single.html#_stateless_ajax_components_behaviors). 
   I would remove this isStableIdRequired override and just keep things as they are now, i.e. behaviors state (stateful/stateless) depends on container component.




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org