Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
 // Copyright 2007, 2008 The Apache Software Foundation
 //
 // Licensed under the Apache License, Version 2.0 (the "License");
 // you may not use this file except in compliance with the License.
 // You may obtain a copy of the License at
 //
 //     http://www.apache.org/licenses/LICENSE-2.0
 //
 // Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
package org.apache.tapestry5;
Defines the possible options and option groups for a <select> [X]HTML element.

Primarily used by the org.apache.tapestry5.corelib.components.Select component, but potentially used by anything similar, that needs to present a list of options to the user. Generally paired with a ValueEncoder to create client-side representations of server-side values.

public interface SelectModel
{
    
The list of groups, each containing some number of individual options.

Returns:
the groups, or null
The list of ungrouped options, which appear after any grouped options. Generally, a model will either provide option groups or ungrouped options, but not both.

Returns:
the ungrouped options, or null
    List<OptionModelgetOptions();

    
Allows access to all the OptionGroupModels and OptionModels within the SelectModel.
    void visit(SelectModelVisitor visitor);
New to GrepCode? Check out our FAQ X