Skip to content

Commit 583bc06

Browse files
Support NGRepetition's [count] binding in takeValues.../invokeAction
1 parent 0dc8721 commit 583bc06

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

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

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,15 @@ private void afterAll( final NGContext context ) {
9494
public void takeValuesFromRequest( NGRequest request, NGContext context ) {
9595
beforeAll( context );
9696

97+
if( _countAssociation != null ) {
98+
final int count = count( context );
99+
100+
for( int i = 0; i < count; ++i ) {
101+
beforeEach( context, i );
102+
takeValuesFromRequest( request, context );
103+
}
104+
}
105+
97106
if( _listAssociation != null ) {
98107
final List<?> list = list( context );
99108

@@ -116,6 +125,15 @@ public NGActionResults invokeAction( NGRequest request, NGContext context ) {
116125

117126
NGActionResults actionResults = null;
118127

128+
if( _countAssociation != null ) {
129+
final int count = count( context );
130+
131+
for( int i = 0; i < count; ++i ) {
132+
beforeEach( context, i );
133+
invokeChildrenAction( request, context );
134+
}
135+
}
136+
119137
if( _listAssociation != null ) {
120138
final List<?> list = list( context );
121139

0 commit comments

Comments
 (0)