dev@woodstock.java.net

Re: Strange problem while refreshing a tab

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

We don't want to replace the hyperlink each time -- that gets expensive.
My question is; when did this stop working? (I don't see this behavior
in the nightly build.) Perhaps you can back off some of your most recent
changes to expose the underlying problem?

FYI, the updateFragment function should check if there is an existing
widget before calling addFragment() and creating a new one. If the
widget exists, the setProps() function is called on the hyperlink.
Therefore, I would debug the hyperlink's _setProps() function to see why
the "contents" are not being updated properly.

Dan

Ratnadeep Bhattacharjee wrote:
> I have the following code in the accordionTab that sets the title -
> its invoked from _setProps().
>
>
> webui._at_THEME@.widget.accordionTab.prototype.setTitle = function (title) {
> if (title) {
> var titleHref =
> webui._at_THEME@.widget.common.getWidgetProps("hyperlink", {
> id: this.id + "_titleLink",
> title: title,
> onClick: "return false;",
> className: "",
> contents: [title]
>
> });
> this.widget.updateFragment(this.titleNode, titleHref);
> }
> return true;
> }
>
> This works fine when the accordion is loaded the first time. However,
> if an XHR call is made to refresh the accordion the tabs render
> without the title - hence, the tab header looks real ugly. This
> happens only on IE. I checked the DOM tree and in the case of refresh
> the anchor tag does not have the title text within it.
>
> If I replace the code above by the following code things work just
> fine in both the situations (fresh load, refresh) on IE.
>
> webui._at_THEME@.widget.accordionTab.prototype.setTitle = function (title) {
>
> if (title) {
> this.widget.addFragment(this.titleHref, title);
> }
> }
>
> Any idea why the first case fails to load the title on IE? Any timing
> issues?
>
> Thanks,
> -Deep.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe_at_woodstock.dev.java.net
> For additional commands, e-mail: dev-help_at_woodstock.dev.java.net
>