Why don't you use <input type="image" name="confirm" src="confirm.gif" />
and define an action with name? E.g.
    <action name="confirm.x" type="YourAction"/> - I think this will work.

A while ago I've suggested an enhancement for C2's actions-set to solve
multiple cases, but unfortunately hadn't time to implement it. The solution
was to add additional attributes to action-set tag, that would allow to
select the action depending on different things:
    - cocoon-action - as it is now
    - any desired param <action-set
action-param-name="my-action">...</action-set>
    - check the presence of any of the action names in request parameters
(e.g.: <button name="add" value="Add">, <button name="delete"
value="Delete"): <action-set action-param-present="add, delete"> (or simply
use declared actions' names)
    - use a sitemap param to select the action (e.g. an action URL: <form
action="questions/confirm" />):
        <match pattern="questions/*"
            <action-set action-value="{1}" />
            ...
        </match>

Regards,
    Konstantin Piroumian

> Hi all,
>
> We are trying to migrate to Cocoon 2, but we have the following problem.
>
> We use a lot forms which hold multiple actions, like update, save,
confirm.
>
> We 'must' define the buttons like this:
>
> <INPUT TYPE="image" NAME="confirm"
SRC="/static_language/ENG/confirm.gif"/>
>
> Because the form holds multiple actions, it is as far as I know not
possible
> to create more than one
> <INPUT TYPE="hidden" NAME="cocoon-action" VALUE=[desired action]>
>
> Our commissioner will not allow the use of javascript, so this is not an
> option for us.
>
> In other words: how can i define multiple image submit buttons, without
> using <INPUT TYPE="submit"/>
> elements in 1 HTML Form?
>
> Does anybody know a solution for this problem?
>
> Thanks in advance.
>
> Mark
>
>
>
> ---------------------------------------------------------------------
> Please check that your question has not already been answered in the
> FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>
>
> To unsubscribe, e-mail: <[EMAIL PROTECTED]>
> For additional commands, e-mail: <[EMAIL PROTECTED]>
>

---------------------------------------------------------------------
Please check that your question has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>

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

Reply via email to