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 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 parameter passed in the .page file. | | The first problem was that (as described in the howto) | | <binding name="translator" value="translator:gender,parameter"/> | | didn't work - I got an java.lang.reflect.InvocationTargetException. | And yes, I have a constructor which accepts a String as parameter ;) | | Using | | <binding name="translator" value="translator:gender,parameter=value"/> | | and providing a setter/getter in the translator works. | Is the first wrong? In this case I won't add my solution to | the wiki but replace the wrong one. | | The second and even bigger problem is that I have a problem with | the combination of the validator/translator. What I want is | that first the validator checks if the choice was submitted | correctly and afterwards this choice is translated in a | corresponding boolean value (to be inserted in the database). | | BUT: | As it seems the translator is called first, translates the | choice into a boolean and the validator fails afterwards :( | | How can I accomplish this? | | Thanks in advance! | Andreas --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
