Very good. For completeness for anyone else reading this, I did the
following:

Added to the java class

@Component
private BeanEditForm _form;

public BeanEditForm getForm()
{
    return _form;
}

and changed template to ( notice the <t:beaneditform to <:form )

<t:form id="form" object="bean" model="model"/> 

Thanks!


Filip S. Adamsen wrote:
> Hi Chris,
> 
> Simply inject the BeanEditForm into your page class and use that to
> record the errors. You'll need to give the BeanEditForm an id in your
> template and then use the @Component annotation to inject it.
> 
> Details are here:
> http://tapestry.apache.org/tapestry5/apidocs/org/apache/tapestry/annotations/Component.html
> 
> 
> -Filip
> 
> Chris Campbell skrev:
>> Simple question from a noob: Following form example, mostly works
>> well. Now I want to do some cross validation server side, and can do
>> that, however I cannot figure out how to set the error message on
>> the form.
>>
>> My class has:
>>
>> @Inject
>> private BeanModelSource _beanModelSource;
>>     
>> @Inject
>> private ComponentResources _resources;
>>
>> @Retain
>> private BeanModel _model;
>>
>> etc..
>>
>> but no form object.
>>
>> The template has
>>
>> <t:beaneditform object="bean" model="model">
>>
>> It seems to me that I need to get the form object and use
>> recordError(String err), is that right? How do I access the form if
>> it is not in my class?
>>
>> Thanks in advance, really impressed with T5 so far.
>>
>> Chris
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 

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

Reply via email to