WebWidget

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

WebWidget

Dirk Verleysen-3
I have a WebWidget with some entry fields and 2 action buttons. On will
simply close the widget with onSubmitClose but the other action button
should first do an evaluation of the entry fields and if these are valid
it should close the widget. If the evaluation fails the widget should
stay open and display the error message.

Any idea on how to do this ?
_______________________________________________
Aida mailing list
[hidden email]
http://lists.aidaweb.si/mailman/listinfo/aida
Reply | Threaded
Open this post in threaded view
|

Re: WebWidget

Janko Mivšek
Hi Dirk,

Dne 05. 11. 2013 20:20, piše Dirk Verleysen:
> I have a WebWidget with some entry fields and 2 action buttons. On will
> simply close the widget with onSubmitClose but the other action button
> should first do an evaluation of the entry fields and if these are valid
> it should close the widget. If the evaluation fails the widget should
> stay open and display the error message.

You can use onClick on button instead, something like:

        aButton
          onClickDo:
                []
          onClickClose

Also look at the ToDo example, login widget, there such a popup with
validation and error reporting is implemented and Save button is simply
grayed out until a whole form is valid.

Best regards
Janko


--
Janko Mivšek
Aida/Web
Smalltalk Web Application Server
http://www.aidaweb.si
_______________________________________________
Aida mailing list
[hidden email]
http://lists.aidaweb.si/mailman/listinfo/aida
Reply | Threaded
Open this post in threaded view
|

Re: WebWidget

Dirk Verleysen-3
Thanks Janko,

I'll try that. i thought that the close would be performed no matter  the result of the onCloseDo:

Dirk

dinsdag 5 november 2013 21:40
Hi Dirk,

You can use onClick on button instead, something like:

aButton
onClickDo:
[]
onClickClose

Also look at the ToDo example, login widget, there such a popup with
validation and error reporting is implemented and Save button is simply
grayed out until a whole form is valid.

Best regards
Janko


dinsdag 5 november 2013 20:20
I have a WebWidget with some entry fields and 2 action buttons. On will simply close the widget with onSubmitClose but the other action button should first do an evaluation of the entry fields and if these are valid it should close the widget. If the evaluation fails the widget should stay open and display the error message.

Any idea on how to do this ?

_______________________________________________
Aida mailing list
[hidden email]
http://lists.aidaweb.si/mailman/listinfo/aida
Reply | Threaded
Open this post in threaded view
|

Re: WebWidget

Janko Mivšek
Dne 05. 11. 2013 21:46, piše Dirk Verleysen:
> Thanks Janko,
>
> I'll try that. i thought that the close would be performed no matter
> the result of the onCloseDo:

Hmm, something like 'e close' is needed, as we have 'e update', which
can be called elsewhere and whenever needed for element e to update.

In cas of 'e close' a window of element e (usually popup) would be
closed. Let me have that in mind to find a good idea how to implement it.

Best regards
Janko

>
> Dirk
>
>> Janko Mivšek <mailto:[hidden email]>
>> dinsdag 5 november 2013 21:40
>> Hi Dirk,
>>
>> You can use onClick on button instead, something like:
>>
>> aButton
>> onClickDo:
>> []
>> onClickClose
>>
>> Also look at the ToDo example, login widget, there such a popup with
>> validation and error reporting is implemented and Save button is simply
>> grayed out until a whole form is valid.
>>
>> Best regards
>> Janko
>>
>>
>> Dirk Verleysen <mailto:[hidden email]>
>> dinsdag 5 november 2013 20:20
>> I have a WebWidget with some entry fields and 2 action buttons. On
>> will simply close the widget with onSubmitClose but the other action
>> button should first do an evaluation of the entry fields and if these
>> are valid it should close the widget. If the evaluation fails the
>> widget should stay open and display the error message.
>>
>> Any idea on how to do this ?

--
Janko Mivšek
Svetovalec za informatiko
Eranova d.o.o.
Ljubljana, Slovenija
www.eranova.si
tel:  01 514 22 55
faks: 01 514 22 56
gsm: 031 674 565
_______________________________________________
Aida mailing list
[hidden email]
http://lists.aidaweb.si/mailman/listinfo/aida