How to do a multifield validiation in Riena [message #722244] |
Mon, 05 September 2011 02:54  |
Eclipse User |
|
|
|
I would like to use Riena ridgets in an existing RCP application and I wonder how to best do a client validation that involves several fields. For example suppose there are two date fields and it should be asserted that the second date is after the first.
Best regards,
Peter
|
|
|
|
|
|
|
Re: How to do a multifield validiation in Riena [message #724851 is a reply to message #724428] |
Tue, 13 September 2011 06:50  |
Eclipse User |
|
|
|
Christian Campo wrote on Mon, 12 September 2011 06:42...
Am 09.09.11 16:44, schrieb Peter Kullmann:
> Hi Christian,
>
> Thanks for the suggestion. I suppose it would work like that but was not yet able to do it. I have currently two
> problems with this:
> 1. If I edit for example the second date, how can I trigger a revalidation of the first? Calling ridget.revalidate()
> would do the trick but would also lead to a recursion if called on the wrong ridget. Or should I add markers to the
> widgets myself? In this case I probably should always return ok.
Yes you would do a textRidget.setErrorMarker(true); (or false depending on what has happened) (or setErrorMarker(true,
"something is wrong here"); )
...
Thanks, that helped. It works well now.
Regards,
Peter
|
|
|
Powered by
FUDForum. Page generated in 0.04556 seconds