On Mon, Oct 5, 2020, 2:22 PM Thiago H. de Paula Figueiredo <
thiag...@gmail.com> wrote:

> On Sun, Oct 4, 2020 at 8:37 AM marwa hussein <marwa.huss...@gmail.com>
> wrote:
>
> > Hi Thiago,
> >
>
> Hello!
>
>
> > Thanks a lot for your reply it works fine but the problem is using this
> > line of code in beginRender() function shows the "div" when the page is
> > loaded. but What I want is to show the div after a button is pressed.
> >
>
> In this case, just write the same JavaScript you'd do as if you weren't
> using Tapestry.
>

 Do you mean to write a JS function and call it from the onSubmit()
function and not to use JavaScript support?.

>
>
> > When I used this line of code in the onSubmit() button function it gives
> > me  "No object of type
> > org.apache.tapestry5.services.javascript.JavaScriptSupport is available
> > from the Environment" exception!!
> >
>
> JavaScriptSupport is only available when the component is being rendered.
> Form submission is not done during rendering, so you get this exception.
>
> --
> Thiago
>

Reply via email to