You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Christian Dutaret <cd...@gmail.com> on 2007/05/29 20:21:07 UTC

T4.1.x: @Dialog component triggers a lot a javascript errors on scroll after open/close

Hi all,

I've been playing with the @Dialog component and EventListener annotations,
and I am facing a problem with the dojo js:

- the @Dialog component is initialized as hidden
- A user clicks on a link, which triggers an EventListener, which updates a
component that wraps the @Dialog and makes it visible
- within the Dialog, a "Close" button is displayed. When the user clicks on
it, it triggers the EventListener again, the wrapper component is updated
and the Dialog is set back to hidden.

Everything works as expected, but once the Dialog has been opened then
closed once, every scroll event on the page triggers js errors.
on FF2.0 : "node has no properties" on line 96 in dojo.js
on IE7 : "offsetWidth is null or is not an object" (freely translated from
french)

Tried it on 4.1.1 and latest 4.1.2 snapshot : exact same behavior.

my HTML template:

<span jwcid="dialwrapper@Any">
    <div jwcid="dial@Dialog" hidden="ognl:hidden" backgroundColor="blue">
        <div style="background-color: white; border-width: 1px; width:
600px; height: 400px;">DIV content<br />
            <form><input type="button"
onclick="someJsThatEventuallyTriggersTheEventListener();" value="Close"
/></form>
        </div>
    </div>
</span>


my page class:

    @InitialValue("true")
    public abstract void setHidden(boolean value);

    @EventListener(elements = "dialwrapper", events = "someCustomJsEvent",
submitForm = "hiddenFormWhichUpdatesSelectedAnnounceId")
    public void selectAnnounce(IRequestCycle cycle, BrowserEvent event) {
        setHidden(getSelectedAnnounceId() == null);
        cycle.getResponseBuilder().updateComponent("dialwrapper");
    }

Thx
Ch.

Re: T4.1.x: @Dialog component triggers a lot a javascript errors on scroll after open/close

Posted by Christian Dutaret <cd...@gmail.com>.
https://issues.apache.org/jira/browse/TAPESTRY-1527

2007/5/29, Jesse Kuhnert <jk...@gmail.com>:
>
> Can you file a bug for this ?
>
> On 5/29/07, Christian Dutaret <cd...@gmail.com> wrote:
> >
> > Hi all,
> >
> > I've been playing with the @Dialog component and EventListener
> > annotations,
> > and I am facing a problem with the dojo js:
> >
> > - the @Dialog component is initialized as hidden
> > - A user clicks on a link, which triggers an EventListener, which
> updates
> > a
> > component that wraps the @Dialog and makes it visible
> > - within the Dialog, a "Close" button is displayed. When the user clicks
> > on
> > it, it triggers the EventListener again, the wrapper component is
> updated
> > and the Dialog is set back to hidden.
> >
> > Everything works as expected, but once the Dialog has been opened then
> > closed once, every scroll event on the page triggers js errors.
> > on FF2.0 : "node has no properties" on line 96 in dojo.js
> > on IE7 : "offsetWidth is null or is not an object" (freely translated
> from
> > french)
> >
> > Tried it on 4.1.1 and latest 4.1.2 snapshot : exact same behavior.
> >
> > my HTML template:
> >
> > <span jwcid="dialwrapper@Any">
> >     <div jwcid="dial@Dialog" hidden="ognl:hidden"
> backgroundColor="blue">
> >         <div style="background-color: white; border-width: 1px; width:
> > 600px; height: 400px;">DIV content<br />
> >             <form><input type="button"
> > onclick="someJsThatEventuallyTriggersTheEventListener();" value="Close"
> > /></form>
> >         </div>
> >     </div>
> > </span>
> >
> >
> > my page class:
> >
> >     @InitialValue("true")
> >     public abstract void setHidden(boolean value);
> >
> >     @EventListener(elements = "dialwrapper", events =
> "someCustomJsEvent",
> > submitForm = "hiddenFormWhichUpdatesSelectedAnnounceId")
> >     public void selectAnnounce(IRequestCycle cycle, BrowserEvent event)
> {
> >         setHidden(getSelectedAnnounceId() == null);
> >         cycle.getResponseBuilder().updateComponent("dialwrapper");
> >     }
> >
> > Thx
> > Ch.
> >
>
>
>
> --
> Jesse Kuhnert
> Tapestry/Dojo team member/developer
>
> Open source based consulting work centered around
> dojo/tapestry/tacos/hivemind. http://blog.opencomponentry.com
>

Re: T4.1.x: @Dialog component triggers a lot a javascript errors on scroll after open/close

Posted by Jesse Kuhnert <jk...@gmail.com>.
Can you file a bug for this ?

On 5/29/07, Christian Dutaret <cd...@gmail.com> wrote:
>
> Hi all,
>
> I've been playing with the @Dialog component and EventListener
> annotations,
> and I am facing a problem with the dojo js:
>
> - the @Dialog component is initialized as hidden
> - A user clicks on a link, which triggers an EventListener, which updates
> a
> component that wraps the @Dialog and makes it visible
> - within the Dialog, a "Close" button is displayed. When the user clicks
> on
> it, it triggers the EventListener again, the wrapper component is updated
> and the Dialog is set back to hidden.
>
> Everything works as expected, but once the Dialog has been opened then
> closed once, every scroll event on the page triggers js errors.
> on FF2.0 : "node has no properties" on line 96 in dojo.js
> on IE7 : "offsetWidth is null or is not an object" (freely translated from
> french)
>
> Tried it on 4.1.1 and latest 4.1.2 snapshot : exact same behavior.
>
> my HTML template:
>
> <span jwcid="dialwrapper@Any">
>     <div jwcid="dial@Dialog" hidden="ognl:hidden" backgroundColor="blue">
>         <div style="background-color: white; border-width: 1px; width:
> 600px; height: 400px;">DIV content<br />
>             <form><input type="button"
> onclick="someJsThatEventuallyTriggersTheEventListener();" value="Close"
> /></form>
>         </div>
>     </div>
> </span>
>
>
> my page class:
>
>     @InitialValue("true")
>     public abstract void setHidden(boolean value);
>
>     @EventListener(elements = "dialwrapper", events = "someCustomJsEvent",
> submitForm = "hiddenFormWhichUpdatesSelectedAnnounceId")
>     public void selectAnnounce(IRequestCycle cycle, BrowserEvent event) {
>         setHidden(getSelectedAnnounceId() == null);
>         cycle.getResponseBuilder().updateComponent("dialwrapper");
>     }
>
> Thx
> Ch.
>



-- 
Jesse Kuhnert
Tapestry/Dojo team member/developer

Open source based consulting work centered around
dojo/tapestry/tacos/hivemind. http://blog.opencomponentry.com