You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Joose Vettenranta <jo...@iki.fi> on 2004/08/11 14:50:44 UTC
cforms + javascript validation + i18n
Hi,
I have like
<fd:form>
<fd:validation>
<fd:javascript>
if (email.value == null && 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
Re: cforms + javascript validation + i18n [solution]
Posted by Joose Vettenranta <jo...@iki.fi>.
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 && 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
Re: cforms + javascript validation + i18n
Posted by Joose Vettenranta <jo...@iki.fi>.
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 && 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