Lance, it looks as if your approach works perfectly. The only other hurdle left to deal with is the fact the loop exist within a component and the onValidate method exist within the page ;)
The page can't see public void onValidateFromActivityCode(String value) but the component can. So the question is, how do I pass this data back to the page. component class HourField //Loop of activityCode fields @InjectComponent private Field activityCode; public void onValidateFromActivityCode(String value) { //logic } Page class TimeSheet @Component(id="form") private From form; @InjectComponent private HourField hourField; public void onValidateFromForm() { } On Fri, Jun 6, 2014 at 1:18 PM, Dmitry Gusev <dmitry.gu...@gmail.com> wrote: > You can use SubmitNotifier + onAfterSubmit: > > > https://mail-archives.apache.org/mod_mbox/tapestry-users/201405.mbox/%3cca+v6ct9vsg+dk+jwq58cpv6b32dazmootraddk2aijp7z5d...@mail.gmail.com%3E > > > > > On Fri, Jun 6, 2014 at 5:20 PM, George Christman <gchrist...@cardaddy.com> > wrote: > > > Hi guys, I'm wondering if there is a way to record an error to a specific > > field within a loop and provide css markup to that field. I know this is > > really simple to do with a non looping field, just not sure if it's > > possible within a loop. Validate="" is not going to be an option in this > > case for me do to backend business logic being needed. > > > > Example, A loop of 14 activityCode fields and field 3, 5, 8 have errors. > Is > > there a way to provide markup to those specific fields? If I do > > recordError(activityCode, "my error"); It seems to mark up the last field > > in the array. > > > > Any thoughts? > > > > -- > > George Christman > > www.CarDaddy.com > > P.O. Box 735 > > Johnstown, New York > > > > > > -- > Dmitry Gusev > > AnjLab Team > http://anjlab.com > -- George Christman www.CarDaddy.com P.O. Box 735 Johnstown, New York