cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Phil Snowdon" <Phil.Snow...@ird.govt.nz>
Subject Re: cforms + javascript validation + i18n [solution]
Date Wed, 11 Aug 2004 21:14:38 GMT
Don't need any modification to source. You can use:

ValidationError err = new ValidationError(new
I18nMessage("msg.key", "catalogue"));

this uses the ValidationError(XMLizable) constructor in the
class you mention.



>>> joose@iki.fi 12/08/2004 1:47:06 a.m. >>>
Seems like  
src\blocks\forms\java\org\apache\cocoon\forms\validation\ValidationError

.java

has to be changed to accept catalogue with it, so it can work.

     public ValidationError(String errorMessageKey, String
catalogue) {
         this.saxFragment = new I18nMessage(errorMessageKey,
catalogue);
     }


perhaps should work.

- Joose

11.8.2004 kello 16:10, Joose Vettenranta kirjoitti:

  Additional information:
>
> if false -> true, it does i18n -message..
>
> but how do I define catalogue which it uses? I would like to
leave  
> default forms message in one place and custom stuff in
another..
>
> - Joose
>
> 11.8.2004 kello 15:50, Joose Vettenranta kirjoitti:
>
>  Hi,
>>
>> I have like
>>
>> <fd:form>
>>  <fd:validation>
>>   <fd:javascript>
>>          if (email.value == null &amp;&amp; phone.value ==
null) {
>>                  email.setValidationError(new  
>>
Packages.org.apache.cocoon.forms.validation.ValidationError("Atleast
 
>> another one", false));
>>
>> and it works..
>>
>> But how can I make that i18n-capable? so it will be
translated  
>> according to i18n transformer...
>>
>> - Joose
>>
>> --
>> "Always remember that you are unique, just like everyone
else!"
>> * http://iki.fi/joose/ * joose@iki.fi * +358 44 561 0270 *
>>
>>
>>
---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org 
>> For additional commands, e-mail: users-help@cocoon.apache.org

>>
>>
> --
> "Always remember that you are unique, just like everyone
else!"
> * http://iki.fi/joose/ * joose@iki.fi * +358 44 561 0270 *
>
>
>
---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org 
> For additional commands, e-mail: users-help@cocoon.apache.org

>
>
--
"Always remember that you are unique, just like everyone else!"
* http://iki.fi/joose/ * joose@iki.fi * +358 44 561 0270 *


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org 
For additional commands, e-mail: users-help@cocoon.apache.org 


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


Mime
View raw message