Hello I have a component called program that is called from my page template called purchaseRequest. Within program, I have a field called evaluators and within the component class I'm @InjectComponent evaluators. I'm trying to do some field validations on evaluators from within my page validation method. However I'm not sure how pass the fields around. I tried passing my form component into my program component and validating using void onValidateFromEvaluators() however the field value is null even though it's been populated within the template. Does anybody know how to do this.
Example Program.tml <t:TextField t:id="evaluators" value="pr.evaluators"> Program.class @Parameter @Property private PurchaseRequest pr; @InjectComponent @Property private Field evaluators; PurcahseRequest.tml <t:Form t:id="PR"> <t:Program pr="pr"/> </t:Form> PurcahseRequest.class @Component(id = "PR") @Property private Form form; Object onValidateFromPr() { for(PrEvaluator evaluator : this.pr.getPrEvaluators()) { if (evaluator.getEvaluator() != null) { if(evaluatorUsers.contains(evaluator.getEvaluator())) { //I can not set this.evaluators field because it's not contained within the page. this.form.recordError(this.evaluators, "Evaluator(s) must be unique."); } } } } -- View this message in context: http://tapestry.1045711.n5.nabble.com/Validate-form-field-in-component-class-from-page-class-tp5716469.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