the latest dicussion revealed a i18n problem with the cocoon-action.
Let's say we have a simple action-set

  <action-set>
    <action type="..." action="Add"/>
    <action type="..." action="Delete"/>
  </action-set>

This action-set can be used in HTML as follows

  <input type="submit" name="cocoon-action" value="Add">
  <input type="submit" name="cocoon-action" value="Delete">

Now here is the problem: the value attribute is the key for the action set
as well as the caption of the input button. Now think of a i18n site. The
HTML should look like for locale "de":

  <input type="submit" name="cocoon-action" value="Hinzufuegen">
  <input type="submit" name="cocoon-action" value="Loeschen">

But the action-set has still english keys. So you would need an action-set
per lanuage. This is IMHO really *BAD*!!!!!!!

So I propose to change this as follows:

  locale en:
  <input type="submit" name="cocoon-action-Add" value="Add">

  locale de:
  <input type="submit" name="cocoon-action-Add" value="Hinzufuegen">

...so there is no i18n dependency. AAAND while changing this I'd also like
to add a way to pass another parameter to the action:

  <input type="submit" name="cocoon-action-Add/parametervalue" value="Add">

This would make an MultiAction very easy to implement! :) But I'm sure
there are other use-cases as well...

So I'd like to deprecate the old "cocoon-action" syntax (but still support
it) and like to introduce the new syntax.

 [prefix][delimitter][actionkey]{[delimitter][paramtervalue]}
    |         |           |           |             |
    |         |           |           |             +-optional:
    |         |           |           |               will be passed as action
    |         |           |           |               parameter named (e.g.
    |         |           |           |               [prefix]-paramter)
    |         |           |           |
    |         |           |           +------- introduce the parametervalue
    |         |           |                    (e.g. '/')
    |         |           |
    |         |           +------------------- the key of action (the value
    |         |                                attribute of the current impl)
    |         |
    |         +------------------------------- (e.g. '-' or ':')
    |
    +----------------------------------------- prefix (e.g. again 'cocoon-action')

What do guys think?
--
Torsten


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]

Reply via email to