Skip to content

Commit c8cda27

Browse files
SubmitButton behavioral design won't change any time soon, FIXME removed
1 parent acebdf1 commit c8cda27

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

ng-appserver/src/main/java/ng/appserver/elements/NGSubmitButton.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,13 +53,14 @@ public void appendToResponse( NGResponse response, NGContext context ) {
5353

5454
@Override
5555
public NGActionResults invokeAction( NGRequest request, NGContext context ) {
56+
5657
// This would be our regular way of checking for a senderID:
5758
// if( context.currentElementIsSender() ) {...}
5859
// ....HOWEVER....
5960
// The pressed button is not actually the submitting element, the form that contains the button is.
6061
// The pressed submit button's name will be in the query parameter dictionary, so that's what we check for.
6162
// I have a feeling this is going to cause us grief with regard to state management, i.e. the same form/elementID can now result in different actions being invoked. Very exciting.
62-
// FIXME: This might actually be a perfect application for the formaction attributes (which would allow for a more traditional handling of the invoked button) // Hugi 2024-06-01
63+
// CHECKME: This might actually be a perfect application for the formaction attributes (which would allow for a more traditional handling of the invoked button) // Hugi 2024-06-01
6364
if( request.formValues().get( context.elementID().toString() ) != null ) {
6465
return (NGActionResults)_actionAssociation.valueInComponent( context.component() );
6566
}

0 commit comments

Comments
 (0)