users@woodstock.java.net

Re: Asynchroneous Refresh: different behavior between build 14 and build 15

From: Rasha <rasha.abdallah_at_murex.com>
Date: Tue, 11 Dec 2007 03:43:40 -0800 (PST)

Hello Dan,
Clarification on why I am using fireAjaxTransaction and not refresh feature.

In a typical case where I want to submit one component and refresh multiple
one.
If I register to a webui.suntheme.widget.textField.event.submit.endTopic and
make all components that need to get refreshed call the refresh function, I
will be generating x + 1 number of requests to the server, where x is the
number of components to refresh.
This is obvisouly an overhead, especially when the fireAjaxTransaction
allows me to do the refresh in a single request to the server.
Moreover: the table component does not expose the refresh API, so I cannot
asynchronsouly update it. Which I was able to do with fireAjaxTransation.


Am I missing something? is there a way I can use on ajax call to update all
the components I want in a single request?

PS: this is a code snippet (i took your woodstock example of validation and
modified it a bit for demonstration purpose):
        <webuijsf:script type="text/javascript">
                 function TextfieldListener(srcID) {
                this.srcID = srcID;
                    }
                
        function TextfieldNotify(props) {
        // Ensure we have the correct event.

        (props.id != this.srcID) { return; }
                        
            //this is egenrating 3 different requests
        document.getElementById('txtName').refresh();
        document.getElementById('txtToken').refresh();
        document.getElementById('txtSchool').refresh();
                 }
TextfieldListener.prototype.notify = TextfieldNotify;

 function init() {
// Subscribe to validation event for credit card number.
var listener = new
TextfieldListener("sessionForm:content:sheet:general:generalInfo:txtID");
dojo.event.topic.subscribe(
                    webui.suntheme.widget.textField.event.submit.endTopic,
                        listener, listener.notify);

}
</webuijsf:script>







Dan Labrecque wrote:
>
> I'm not sure how you're using the fireAjaxTransaction function of JSF
> Extensions. However, this is typically used to render a component
> server-side and completely replace previously existing HTML elements.
> The Woodstock refresh feature also uses fireAjaxTransaction, but only to
> obtain new widget properties. The component is not rendered again, but
> selectively updated client-side. If you're not using the Woodstock
> refresh feature, I'm not certain we can help you. However, perhaps you
> can explain how you're updating widgets via fireAjaxTransaction? You
> might also try your question on users_at_jsf-extensions.dev.java.net.
>
> Dan
>
> Rasha wrote:
>> Hello,
>> I just upgraded to build 15, and I noticed a difference in the behavior
>> of
>> components when refreshing asynchroneously the components.
>> In build 15, the components being refreshed disappear for few seconds
>> from
>> the page and then are redrawn, which is noticeable by the user, and we do
>> not want this behavior.
>> In build 14, the components being refreshed do not disappear, and for the
>> end user it seems that only the text values have changed. Which is the
>> correct behavior.
>>
>> Note that I am using fireAjaxTransaction method to aynchroneously submit
>> and
>> refresh my components. And not refresh() and submit() functions.
>>
>> Is there any particular reason for this difference in the behavior, and
>> if
>> so, is there a way we can make components behave as in build 14?
>>
>> Thanks
>> Rasha
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe_at_woodstock.dev.java.net
> For additional commands, e-mail: users-help_at_woodstock.dev.java.net
>
>
>

-- 
View this message in context: http://www.nabble.com/Asynchroneous-Refresh%3A-different-behavior-between-build-14-and-build-15-tp14212797p14272383.html
Sent from the Project Woodstock - Users mailing list archive at Nabble.com.