Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
AW: AW: [riena-dev] Comments regarding Validation

Hi Christian,

 

you were right; I've fixed this:

 

- TextRidget validation will block *only* when the status code is ERROR_BLOCK_WITH_FLASH.

- ValidEmail and ValidExpression changed to be non-blocking. This fixed some issues with the example.

- There are still some problems with the date validation rule. Opened a bug so we can keep track of it.

 

Note that the point discussing some limitations of the current validation APIs still apply. In particular we should think about:

 

- if validation time is decided by the rule implementer or the rule user

- if validation response (block, dialog, message, xyz) is decided by the rule implementer or the rule user

- how to react when invalid values are introduced programmatically via ridget.setText() / ridget.updateFromModel()

- if we want to update validation status when rules are added removed

 

Kind regards,

Elias.

 

 

PS: As an aid with understanding the code here is a  summary of the places where validation happens when the user types a key / control.setText(…). For ridget.setText() / ridget.updateFromModel() may or may not look different.

 

User types a key:

                ModifyListener validates ON_EDIT rules

                                - update validation markers

                                - if validation failed with ERROR_BLOCK_WITH_FLASH - block input - end

                                - update text in control

 

Update was requested (i.e. direct writing / cr pressed / focus lost)

                                - validate edit rules - end if edit rules fail

                                - edit rules ok ? update text in ridget                     

                                - validate on_edit and on_update rules - end if update rules fail

                                - update model

 

Note that by design ERROR_BLOCK_WITH_FLASH and validation time ON_UPDATE, will not block the key press; however it will prevent updating the model.

 

 

Von: riena-dev-bounces@xxxxxxxxxxx [mailto:riena-dev-bounces@xxxxxxxxxxx] Im Auftrag von Christian Campo
Gesendet: Tuesday, July 08, 2008 07:38
An: Riena Developers list
Betreff: Re: AW: [riena-dev] Comments regarding Validation

 

[…]

 

Ultimatly I believe the innerclass ValidationListener in the TextRidgets sets the e.doit flag to false if any rule fails. So the ValidExpression defines itsself as ON_UI_CONTROL_EDIT, so its checked with every edit. That seems to always end up with a block if the rule fails no matter what parameter you specify in the ValidRuleStatus ?

 

 


Back to the top