Re: Custom Validator/Translator

2006-03-07 Thread Andreas Bulling
Hi, thanks a lot for your helpful answer! | You only need to implement one translator (which, if input is invalid can act | like a validator). That means that validators/translators are not designed to be used together or perhaps just in some (standard) cases? | The translator will have 2 prope

Re: Custom Validator/Translator

2006-03-06 Thread andyhot
You only need to implement one translator (which, if input is invalid can act like a validator). The translator will have 2 properties, yesString + noString you'll define it in you .page like this: and use it like this: For each language you want to support, you just supp

Re: Custom Validator/Translator

2006-03-06 Thread Andreas Bulling
| I'm sorry. My bad. I guess I didn't read your post too carefully. No problem ;) | AFAIK translator by design runs first so that your validator can check | on the intended value. Well, in this case in my opinion this is bad design, isn't it? For example if I just want two different characters t

Re: Custom Validator/Translator

2006-03-06 Thread Adam Zimowski
I'm sorry. My bad. I guess I didn't read your post too carefully. AFAIK translator by design runs first so that your validator can check on the intended value. For instance, if you're collecting a String which is a number translator will do its work and give you number so that you can further chec

Re: Custom Validator/Translator

2006-03-06 Thread Andreas Bulling
Hi Adam, thanks for your answer, but I don't understand how this is related to my problem?! I'm already using a custom ValidationDelegate and I've also set up both the translator and the validator in my hivemodule.xml file (I verified that they get called/used when submitting the form). My proble

Re: Custom Validator/Translator

2006-03-06 Thread Adam Zimowski
In your page class you can populate delegate object with your custom validations. For instance, if you add the following to you page class: @Bean public abstract ValidationDelegate getDelegate(); you then can add errors to this delegate in your listener (onSubmit or whatever). I s

Re: Custom Validator/Translator

2006-03-06 Thread Andreas Bulling
Is nobody out there who can help me with this problem? That would be very kind as I'm stuck completely with this issue... :( On 04. Mär 2006 - 12:09:01, Andreas Bulling wrote: | Hi everybody, | | I followed the howto on the wiki to create a custom validator and | translator: A choice validator wh

Re: Custom Validator/Translator

2006-03-04 Thread Massimo Lusetti
On 3/4/06, Andreas Bulling <[EMAIL PROTECTED]> wrote: > How can I accomplish this? I'm sorry but just want to add one more question to the list not an answer, how could i use Validator to validate field content in relation to the content of one another? Let me explain, i wish field B having cont

Custom Validator/Translator

2006-03-04 Thread Andreas Bulling
Hi everybody, I followed the howto on the wiki to create a custom validator and translator: A choice validator which only accepts two different string values (like y/n) and a boolean translator which translates this choice into corresponding boolean values. Both are configurable by use of a parame