On Tue, 10 Feb 2004 02:53:07 +0100
Joerg Heinicke <[EMAIL PROTECTED]> wrote:

> On 09.02.2004 12:17, Joern Wallstabe wrote:
> 
> > Hi everyone,
> > 
> > I'm using woody and  I have to use flow validation functions for form validation.
> 
> In which way do you use them?
> 
> > How can I get a localized (!!)  message from these function back in my form if 
> > validation fails ?
> 
> I ask, because if you do it like in the updated sample [1] via 
> ValidationError object, the first parameter is either already localized 
> text or an i18n key. It depends on the second parameter set to true or 
> false. For details have a look into the ValidationError class [2].
> 
> > Can I achive this by using i18n transformer functionality ?
> 
> This one is for transforming the i18n elements into localized messages. 
> The problem seems to be more to get the i18n elements into your XML 
> structure.
> 
> Joerg
> 
> [1] 
> http://cvs.apache.org/viewcvs.cgi/cocoon-2.1/src/blocks/woody/samples/forms/form1.xml?annotate=1.20#235
> [2] 
> http://cvs.apache.org/viewcvs.cgi/cocoon-2.1/src/blocks/woody/java/org/apache/cocoon/woody/validation/ValidationError.java?annotate=1.1#50
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 

Thanks for the reply,

I tried different approaches, but it's not working (cocoon snapshot 2.1.4 - 24.11.03)
I'm always getting the key String an not the catalogue value.

(1)
var validationError = new 
Packages.org.apache.cocoon.woody.datatype.ValidationError("xxx");
form.getWidget("my_widget").setValidationError(validationError,true);

(2)
var message= new Packages.org.apache.cocoon.woody.util.I18nMessage("key", 
"my_catalogue")
form.getWidget("my_widget").setValidationError(message);

(3)
var message= new Packages.org.apache.cocoon.woody.util.I18nMessage("key")
form.getWidget("my_messages_widget").addMessage(message);

am I missing something ?

Regards J�rn 

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

Reply via email to