Skip to Content

How to Implement One Validating Method for Different Views

Hi there,

imagine a component (wizard), where the first two steps (views) are static (view Step1 is followed by view Step2), but the third step is dynamic (dependant on input in view Step2, it will be view Step3a or view Step3b or ...).

The only common thing in all views Step3x are two input fields for dates (begin/end).

The question now is how to implement a validation method so that it works for all views Step3x, without copy/paste.

Within the component context, I have got a node "GenericStep3" with beginDate and endDate values. This is mapped to all view contexts of the views Step3x.

So my idea was to implement the validation methods within the main controller (component controller) and call these method(s) from the view controller. This works one time, then the application stops working.

Any pattern to be used for such thing? I think this is a very common task and there should be a general rule how to handle it?!

Thanks in advance


Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

1 Answer

  • Posted on Apr 21, 2004 at 11:50 AM

    Hi there again,

    strange enough, now it works (the validating process is implemented within three methods, I had started to move the first method and left the two others for testing purposes within the view controller).

    Nevertheless, I cannot realize why my first try did not success. And the question stays the same: Is the way I have chosen the intended way?!

    Thanks in advance


    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.