2
Copyright (C) 2000-2005 SKYRIX Software AG
4
This file is part of SOPE.
6
SOPE is free software; you can redistribute it and/or modify it under
7
the terms of the GNU Lesser General Public License as published by the
8
Free Software Foundation; either version 2, or (at your option) any
11
SOPE is distributed in the hope that it will be useful, but WITHOUT ANY
12
WARRANTY; without even the implied warranty of MERCHANTABILITY or
13
FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
14
License for more details.
16
You should have received a copy of the GNU Lesser General Public
17
License along with SOPE; see the file COPYING. If not, write to the
18
Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA
22
#ifndef __NGObjWeb_WOLabelAssociation_H__
23
#define __NGObjWeb_WOLabelAssociation_H__
25
#include <NGObjWeb/WOAssociation.h>
31
"next" - lookup key 'next' in table 'nil' with default 'next'
32
"table/next" - lookup key 'next' in table 'table' with default 'next'
34
This association performs a string lookup in the components
35
WOResourceManager (or the app's manager if the component has none). It uses
36
the session and browser languages for the key lookup.
38
Note that this also supports keypathes by prefixing the values with an
39
"$", eg: "$currentDay" will first evaluate "currentDay" in the component
40
and then pipe the result through the label processor.
41
We consider that a bit hackish, but given that it is often required in
42
practice, a pragmatic implementation.
45
@interface WOLabelAssociation : WOAssociation < NSCopying >
49
NSString *defaultValue;
58
- (id)initWithKey:(NSString *)_key inTable:(NSString *)_table
59
withDefaultValue:(NSString *)_default;
61
- (id)initWithString:(NSString *)_str;
65
- (BOOL)isValueConstant; // returns NO
66
- (BOOL)isValueSettable; // returns NO
70
#endif /* __NGObjWeb_WOLabelAssociation_H__ */