Package muntjac :: Package ui :: Module table_field_factory
[hide private]
[frames] | no frames]

Source Code for Module muntjac.ui.table_field_factory

 1  # Copyright (C) 2012 Vaadin Ltd.  
 2  # Copyright (C) 2012 Richard Lincoln 
 3  #  
 4  # Licensed under the Apache License, Version 2.0 (the "License");  
 5  # you may not use this file except in compliance with the License.  
 6  # You may obtain a copy of the License at  
 7  #  
 8  #     http://www.apache.org/licenses/LICENSE-2.0  
 9  #  
10  # Unless required by applicable law or agreed to in writing, software  
11  # distributed under the License is distributed on an "AS IS" BASIS,  
12  # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.  
13  # See the License for the specific language governing permissions and  
14  # limitations under the License. 
15   
16   
17 -class ITableFieldFactory(object):
18 """Factory interface for creating new Field-instances based on Container 19 (datasource), item id, property id and uiContext (the component responsible 20 for displaying fields). Currently this interface is used by L{Table}, 21 but might later be used by some other components for L{Field} 22 generation. 23 24 @author: Vaadin Ltd. 25 @author: Richard Lincoln 26 @version: 1.1.2 27 @see: FormFieldFactory 28 """ 29
30 - def createField(self, container, itemId, propertyId, uiContext):
31 """Creates a field based on the Container, item id, property id and 32 the component responsible for displaying the field (most commonly 33 L{Table}). 34 35 @param container: 36 the Container where the property belongs to. 37 @param itemId: 38 the item Id. 39 @param propertyId: 40 the Id of the property. 41 @param uiContext: 42 the component where the field is presented. 43 @return: A field suitable for editing the specified data or null if the 44 property should not be editable. 45 """ 46 raise NotImplementedError
47