On Mar 25, 2008, at 14:15 , Dario Trussardi wrote:
Hi, Lukas
>> In WAComponent subclass i have the method:
>>
>> renderAddOn: html
>> html form:[
>> html textInput callback:[ :value| self add: value].
>> html submitButtton text:'add'].
>>
>> Now i can render the textInput based on specific descriptionKey ?
>
> I don't quite understand what you intend to do with the textInput
field.
In other words:
renderAddOn: html
html form:[
anMAReferenceModel
descriptionKey ....................as ???? changeAccesor ???
html submitButtton text:'add'].
where anMAReferenceModel is one specific classModel for example:
MANazionalityModel with specific descriptionKey ->
MAStringDescription new ........ label: 'Nazionaliry name'; ..........
or MAPhoneModel with specific descriptionKey -> MANumberDescription
new ............label: 'Phone number'; ..... beInteger............
or MA ..... Model with specific descriptionKey -> ........
With this reference i think to have the input set to relative
descriptionKey.
I'm clear ?
No, I don't understand.
I can only guess:
html textInput
value: (aDescription toString: (object readUsing: aDescription));
callback: [ :value | object write: (aDescription fromString:
value) using: aDescription ].
Cheers,
Lukas
--
Lukas Renggli
http://www.lukas-renggli.ch