Don't use the listener= parameter, use action="" . Listeners will always
strive to find the most "direct" path to invoking your method, which in the
case of forms means as soon as the template parser sees it in the component
tree.

Action listeners on the other hand will safely be invoked only after the
form values have been bound. I question the usefulness of having the
listener parameters on forms or submit buttons at all sometimes.

On 5/29/06, Matt Raible <[EMAIL PROTECTED]> wrote:

I'm trying to put duplicate "button bars" on a form.  The top of my form
has:

    <li class="buttonBar right">
        <input type="submit" class="button" jwcid="@Submit"
value="message:button.save" id="save" listener="ognl:listeners.save"/>
          <span jwcid="@If" condition="ognl:user.username != null">
            <input type="submit" class="button" jwcid="@Submit"
value="message:button.delete" id="delete" listener="ognl:listeners.delete"
                onclick="form.onsubmit = null; return
confirmDelete('User')"/>
          </span>
        <input type="submit" class="button" jwcid="@Submit"
value="message:button.cancel" id="cancel" listener="ognl:listeners.cancel"
            onclick="form.onsubmit = null"/>
    </li>

The bottom of my form has almost exactly the same thing:

    <li class="buttonBar bottom">
        <input type="submit" class="button" jwcid="@Submit"
value="message:button.save" id="save" listener="ognl:listeners.save"/>
        <span jwcid="@If" condition="ognl:user.username != null">
        <input type="submit" class="button" jwcid="@Submit"
value="message:button.delete" id="delete" listener="ognl:listeners.delete"
            onclick="form.onsubmit = null; return confirmDelete('User')"/>
        </span>
        <input type="submit" class="button" jwcid="@Submit"
value="message:button.cancel" id="cancel" listener="ognl:listeners.cancel"
            onclick="form.onsubmit = null"/>
    </li>

The strange thing is, if I click on any of the top buttons (which occur
before any form elements), no form fields are passed in.  However, if I
click on the bottom set of buttons, everything works.  Is there a
limitation in Tapestry where you can't have two sets of the same submit
buttons?  This works in all the other web frameworks I've used.

The raw source of my form can be found at:
http://rifers.org/paste/show/828
The rendered source of my form can be found at:
http://rifers.org/paste/show/827

I've validated the rendered source of my page with validator.w3.org and
it validates as XHTML transitional.

Thanks,

Matt


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




--
Jesse Kuhnert
Tacos/Tapestry, team member/developer

Open source based consulting work centered around
dojo/tapestry/tacos/hivemind.

Reply via email to