01: // Copyright 2007 The Apache Software Foundation
02: //
03: // Licensed under the Apache License, Version 2.0 (the "License");
04: // you may not use this file except in compliance with the License.
05: // You may obtain a copy of the License at
06: //
07: // http://www.apache.org/licenses/LICENSE-2.0
08: //
09: // Unless required by applicable law or agreed to in writing, software
10: // distributed under the License is distributed on an "AS IS" BASIS,
11: // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12: // See the License for the specific language governing permissions and
13: // limitations under the License.
14:
15: package org.apache.tapestry;
16:
17: /**
18: * Callback interface that allows for visiting the option groups and option models of a select model
19: * in correct render order.
20: */
21: public interface SelectModelVisitor {
22: /**
23: * Invoked once for each {@link OptionGroupModel}, just before invoking
24: * {@link #option(OptionModel)} for each embedded option within the group.
25: */
26: void beginOptionGroup(OptionGroupModel groupModel);
27:
28: /**
29: * Invoked for each option within a group, and at the end, for each ungrouped option.
30: *
31: * @param optionModel
32: */
33: void option(OptionModel optionModel);
34:
35: /**
36: * Invoked after all options within the group have been visited.
37: */
38: void endOptionGroup(OptionGroupModel groupModel);
39: }
|