dev@woodstock.java.net

Re: autoValidate problem.

From: Dan Labrecque <Dan.Labrecque_at_Sun.COM>
Date: Fri, 26 Oct 2007 13:04:21 -0400

AntonioV wrote:
> Hi Dmitry,
>
> Thanks for your reply.
>
> I've tried out with the topic name you've suggested without success.
>
> What I've done is to add an event handler in the "onBlur" attribute, and
> that seems to be working correctly.
>
> Thanks again,
> Antonio
>
> P.S.: The topic names in the TLD docs for build #14 are not updated to dojo
> 0.9, I think (shall I file an issue for that?)
>

FYI, I checked the textField TLD below (build #14) and the event topics
are correct.

    http://webdev2.sun.com/woodstock-tlddocs

Note that in order to subscribe to a topic, you must now use:

<webuijsf:head>
    <webuijsf:script>
        var processEvents = {
            update: function(props) {
                // Do something...
            }
        }
        function init() {
            // Subscribe to event.
            
dojo.subscribe(webui.suntheme.widget.textField.event.<eventname>.endTopic,
processEvents, "update");
        }
    </webuijsf:script>
</webuijsf:head>
<webuijsf:body onLoad="setTimeout('init();', 0)">
...
|
|Not only did Dojo's function signature change for Dojo .9, but you must
subscribe after the widget has been created. In the example above, I'm
using the window.onLoad event to subscribe. You may not need the
timeout, but it ensure all HTML elements, widgets, etc. have been created.

Dan

>
> Dmitry Kushner wrote:
>
>> Antonio
>>
>> Sorry - the event names have been changed with the migration to dojo 0.9.
>> The following, for example is set of events our ajax implementation
>> subscribed to ( you can find this in
>> javascript.../widget/jsfx/textField.js)
>> ( @THEME@ gets translated to theme, so it becomes
>> webui.suntheme.widget.textField.event.validation.beginTopic)
>>
>> dojo.subscribe(webui._at_THEME@.widget.textField.event.refresh.beginTopic,
>> webui._at_THEME@.widget.jsfx.common, "processRefreshEvent");
>> dojo.subscribe(webui._at_THEME@.widget.textField.event.state.beginTopic,
>> webui._at_THEME@.widget.jsfx.common, "processStateEvent");
>> dojo.subscribe(webui._at_THEME@.widget.textField.event.submit.beginTopic,
>> webui._at_THEME@.widget.jsfx.common, "processSubmitEvent");
>> dojo.subscribe(webui._at_THEME@.widget.textField.event.validation.beginTopic,
>> webui._at_THEME@.widget.jsfx.textField, "processValidationEvent");
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: dev-unsubscribe_at_woodstock.dev.java.net
>> For additional commands, e-mail: dev-help_at_woodstock.dev.java.net
>>
>>
>>
>>
>
>