Hi,
 
I'm dealing with the following situation: A directory structure containing a lot of files with the same structure is handled by the same woody definition, binding and template by simply changing the datafile. This file contains an attribute which indicates that it is an original one or a new one created by the user. If it is an original one, only some inputs may happen, but when the user created the file, all may be changed:
 
<DataFile original="true">
    <Name>Josh</Name>
    <Cookies>3</Cookies>
</DataFile>
-> show only input field for Cookies
 
<DataFile original="false">
    <Name>Kate</Name>
    <Cookies>5</Cookies>
</DataFile>
->this file was created by user, show input field for Cookies AND Name
 
I'm dynamically generating the filelist and only when reading the file, I know if it's an original one.
I'm thinking about having the woodystylesheet choose the correct form element by testing the attribute 'original=true' (saving that attribute as hidden widget or something alike and then using it in the woodystylesheet).
 
Are there other/better ways to do this? (e.g. choosing the correct widget by evaluating an attribute/element in datafile instead of changing it by the stylesheet?)
Anyone having the same situation?
 
Greetz,
 
Jan

Reply via email to