Hello! Ben already provided some great options, as usual. :) I'll add another: what about using links with the EventLink component, all of them using the same event name but with different contexts, all of them styled as buttons? Does it really need to be an <input>? Something like this (not tested):
<t:loop source="buttons" value="paneButton"> <t:eventLink t:event="buttonClicked" t:context="paneButton" class="btn ${buttonStyling}">${buttonLabel}</eventLink> </t:loop> Object onButtonClicked(String paneButton) { ... } Tapestry's Submit component really wasn't meant to be used inside a loop while having a context and being able to get it (context) on the corresponding component/page/mixin/page class. And I'm not sure it could be changed to have passing its context work without JavaScript. In your original code above, have you tried adding the name attribute to your <input>s, all them with the same value, and then getting the value from Request.getParameter() or @RequestParameter? On Thu, Jul 3, 2025 at 2:57 AM Christopher Dodunski (Tapestry) < chrisfromtapes...@christopher.net.nz> wrote: > Hi all, > > I have a simple but unusual use case for a Tapestry form, whereby its > output will be one of 27 options: A to Z plus an asterisk (for all). > > Obviously I could take the conventional approach of using 27 radio > buttons along with a submit button. This would require two clicks from > the user. I figured, however, why not simply have 27 submit buttons so > a selection can be made from a single click. This would require, > however, each of the buttons having 'context' so I can know which button > was clicked. > > Would Tapestry support a fieldless form such as this? As I've > encountered some difficulty extracting the below context field from > inside the code. > > A snippet from the TML: > > <t:loop source="buttons" value="paneButton"> > <input t:type="submit" t:id="tap" t:context="paneButton" > t:defer="false" class="btn ${buttonStyling}" value="${buttonLabel}" /> > </t:loop> > > Kind regards, > > Chris. > > --------------------------------------------------------------------- > To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org > For additional commands, e-mail: users-h...@tapestry.apache.org > > -- Thiago H. de Paula Figueiredo Software developer/engineer Apache Tapestry consultant, committer and project management committee member You can sponsor my work on Tapestry at https://github.com/sponsors/machina-br