> Unless you know of a way to use context without defer, I could always use
> css positioning to handle this.

Use defer=false so that you can capture the context, then use the same
strategy that the submit component does and defer your processing code
until after the rest of the form has been processed.
Something like this never-compiled thus untested code:

@Inject
private FormSupport formSupport;

private Integer action;

// assuming <t:submit t:id="actionButton"/>
void onSelectedFromActionButton(Integer action) {
  this.action = action;

  formSupport.defer(new Runnable() {
            public void run(){ /* do stuff with form fields */}
      }
  );
}

Josh


On Mon, Oct 31, 2011 at 8:43 AM, George Christman
<gchrist...@cardaddy.com> wrote:
> Josh, thanks for taking the time to explain how the submit component works,
> makes a lot of sense now. I'm under the assumption when ever you use the
> submit component in a loop with context you'll need to use defer false. The
> loop will then need to be written at the end of the forum. Without using
> defer false, all submit buttons will get the last context id of the loop.
> This sound about right?
>
> The current form layout is as followed.
>
> <form>
>   <loop id="actionBtns">
>      <submit value="save"  context="id" defer="false"/>
>      <submit value="submit"  context="id" defer="false"/>
>   </loop>
>
>   form data goes here
>
>   <loop2 id="actionBtnsCopy">
>      <submit value="save"  context="id" defer="false"/>
>      <submit value="submit"  context="id" defer="false"/>
>   </loop2>
> </form>
>
> Unless you know of a way to use context without defer, I could always use
> css positioning to handle this.
>
> --
> View this message in context: 
> http://tapestry.1045711.n5.nabble.com/Submit-inside-loop-tp4946513p4952731.html
> Sent from the Tapestry - User mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
> For additional commands, e-mail: users-h...@tapestry.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org

Reply via email to