[Seaside] logic + templates + ... resources
Kamil Kukura
kamk@volny.cz
Sat, 13 Apr 2002 17:25:19 +0200
Simply, have a template:
<p>Status: [statusText]</p>
and of course there's implicit or explicit binding of statusText to
something that results into say one of: 'Okay'. 'Pending'. 'Error'. The
beauty just works.
Now I feel that separation of logic and content is half-baked. I'm doing
something that should be multilingual and now I have in the code those
strings of possible status. I have helped myself by creating new special
element which has use like this:
<local sea:id="ok">Okay</local>
<local sea:id="pnd">Pending</local>
<local sea:id="err">Error</local>
These are at the end of template and it's sort of simple resource. In my
own IAComponent I have in the binding block also the part that loads
local texts to the class side of the component. And of course this
element is silent on its output.
So, is it good way to think that along with templates we need also
something for storing resources? So far I have in each template's end
the resource section but I feel the need for shared resources as well.
--
Kamil