You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@myfaces.apache.org by al...@qualcomm.com on 2008/08/14 23:48:49 UTC
Using to call an Applet method........
I'm using the <trh:script> tag to call an applet method and it
creates this error. (document.applets[0].rebuildChartUsingCurrentData
is not a function ).
This is how I'm using it:
<trh:script text="function updateApplet()
{document.applets[0].rebuildChartUsingCurrentData();}" />
The document.applets[0].rebuildChartUsingCurrentData(); works when
not in a Trinidad/JSF page. The updateApplet() is called on an onClick event
<tr:commandButton text="Test Button"
id="mybutton"
partialSubmit="true"
actionListener="#{lotBean.doSomething}"
partialTriggers="mybutton"
onclick="updateApplet()"/>
I've tried it without success using just a script tag as well. Is
there some limitation that prevents the <trh> tag from accessing
applets? Is there some other way of doing this inside a jsf page?
Thanks
Al
Re: Using to call an Applet method........
Posted by al...@qualcomm.com.
Yes, it has. The test button would only be clicked after the applet
has completed its init. Is there a reason the <trh:script> won't call
an applet method? I've even tried giving the applet tag a name and id.
Any other tags to use or other ways of making this work?
Thanks
At 10:49 PM 8/14/2008, Andrew Robinson wrote:
>Has the applet had a chance to initialize when the script is run?
>
>On Thu, Aug 14, 2008 at 3:48 PM, <al...@qualcomm.com> wrote:
> > I'm using the <trh:script> tag to call an applet method and it creates this
> > error. (document.applets[0].rebuildChartUsingCurrentData is not a function
> > ).
> >
> > This is how I'm using it:
> > <trh:script text="function updateApplet()
> > {document.applets[0].rebuildChartUsingCurrentData();}" />
> >
> > The document.applets[0].rebuildChartUsingCurrentData(); works when not in a
> > Trinidad/JSF page. The updateApplet() is called on an onClick event
> >
> > <tr:commandButton text="Test Button"
> > id="mybutton"
> > partialSubmit="true"
> > actionListener="#{lotBean.doSomething}"
> > partialTriggers="mybutton"
> > onclick="updateApplet()"/>
> >
> > I've tried it without success using just a script tag as well. Is
> there some
> > limitation that prevents the <trh> tag from accessing applets? Is
> there some
> > other way of doing this inside a jsf page?
> >
> > Thanks
> > Al
> >
> >
Re: Using to call an Applet method........
Posted by Andrew Robinson <an...@gmail.com>.
Has the applet had a chance to initialize when the script is run?
On Thu, Aug 14, 2008 at 3:48 PM, <al...@qualcomm.com> wrote:
> I'm using the <trh:script> tag to call an applet method and it creates this
> error. (document.applets[0].rebuildChartUsingCurrentData is not a function
> ).
>
> This is how I'm using it:
> <trh:script text="function updateApplet()
> {document.applets[0].rebuildChartUsingCurrentData();}" />
>
> The document.applets[0].rebuildChartUsingCurrentData(); works when not in a
> Trinidad/JSF page. The updateApplet() is called on an onClick event
>
> <tr:commandButton text="Test Button"
> id="mybutton"
> partialSubmit="true"
> actionListener="#{lotBean.doSomething}"
> partialTriggers="mybutton"
> onclick="updateApplet()"/>
>
> I've tried it without success using just a script tag as well. Is there some
> limitation that prevents the <trh> tag from accessing applets? Is there some
> other way of doing this inside a jsf page?
>
> Thanks
> Al
>
>