I want to extend the hack.

I'd like to give it another go to explain the situation.

In taglib we obviously need some way to call extra functionality. On nodes
that can be done already if you use 'functions on fields' like this:

 <mm:field id="source" name="url(ram)"  write="false" />

This is quite ugly and rather inflexible because:
- string parsing needed
- no way to check the parameters in an early stage ('could 'ram' actually be
  a valid argumetn for the url function')
- no way to leave parameters unfilled, so if a function might need a lot of
  parameters/settings, things get quickly rather messy.
  (url(ram,,,,broadband)?). Practicly it is impossible to feed more than 3 or
  4 things into a function now. 
- no way to specify parameters of other type then String

So, the hack should perhaps be limited to:

'Do you agree that a function object (see code in speeltuin) would be a nice
way to solve this'.

If I can use this Function object (and related Parameters object) I have a
tool to solve all of the above problems (I actually have most tags ready
here).


Of course such a Function object would not need to be limited to 'node
functions' but can be applied more generaly. 

Daniel has a lot of code to work with 'sets of functions', which are
declared in an XML.  He also needs a way to use them using taglib. When
using such general 'Function' objects, for the 'function' tags it does not
matter much on what excactly they work. Only in an abtract 'StartTag' of
functions tags must be some code to call the right 'getFunction' (is the
function working on a node, or on something else, e.g. on such a 'set'). His
code, to produce Function objects in this way, does not necessarily be part
of 1.7, but at least he can offer it as a plugin to 1.7 relativily simply,
later on.


I'd be glad to leave the actual instantation and finding of Function objects
to a function project, but I'd hate to release another mmbase with the
problems mentioned above, which is not necessary if at least we can agree
upon the Function object itself now, and set up a, possibly temporary, way
to instantiate them. I don't mind to change some taglib or core
implementation for that later, but I do mind being limited in my jsp's in
this respect for all of 1.7, and even worse, having to convert them later,
when a decent way is available.

 Michiel



-- 
Michiel Meeuwissen 
Mediapark C101 Hilversum  
+31 (0)35 6772979
nl_NL eo_XX en_US
mihxil'
 [] ()

Reply via email to