[Webtest] Help with richfaces 3.3.3

Brad Douglas Brad Douglas" <bdouglas@synyati.com.au
Mon, 12 Sep 2011 14:21:22 +1000


This is a multipart message in MIME format.

------=_NextPart_000_1CF0_01CC7157.405A87B0
Content-Type: text/plain;
	charset="us-ascii"
Content-Transfer-Encoding: 7bit

Hi all,

 

I'm hitting problems that seem pretty fatal trying to get canoo running
against our app that uses richfaces 3.3.3

 

I'm getting an error: TypeError: Cannot set property "isLeftClick" of
undefined to "function ()  {...

 

The javascript in questions is
http://localhost:8080/a4j/g/3_3_3.Finalorg.ajax4jsf.javascript.PrototypeScri
pt#12 and the code there is as follows:

 

return {

            isLeftClick : function(event) {

                  return isButton(event, 0)

            },

            isMiddleClick : function(event) {

                  return isButton(event, 1)

            },

            ..

 

It looks like it's choking because ajax4jsf's  javascript library is trying
to set the isLeftClick property on the anonymous result to a function.

 

Is there a way to get webtest working with ajax4jf?

 

Thanks,

Brad


------=_NextPart_000_1CF0_01CC7157.405A87B0
Content-Type: text/html;
	charset="us-ascii"
Content-Transfer-Encoding: quoted-printable

<html xmlns:v=3D"urn:schemas-microsoft-com:vml" =
xmlns:o=3D"urn:schemas-microsoft-com:office:office" =
xmlns:w=3D"urn:schemas-microsoft-com:office:word" =
xmlns:m=3D"http://schemas.microsoft.com/office/2004/12/omml" =
xmlns=3D"http://www.w3.org/TR/REC-html40"><head><meta =
http-equiv=3DContent-Type content=3D"text/html; =
charset=3Dus-ascii"><meta name=3DGenerator content=3D"Microsoft Word 14 =
(filtered medium)"><style><!--
/* Font Definitions */
@font-face
	{font-family:Calibri;
	panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
	{font-family:Tahoma;
	panose-1:2 11 6 4 3 5 4 4 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
	{margin:0cm;
	margin-bottom:.0001pt;
	font-size:11.0pt;
	font-family:"Calibri","sans-serif";
	mso-fareast-language:EN-US;}
a:link, span.MsoHyperlink
	{mso-style-priority:99;
	color:blue;
	text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
	{mso-style-priority:99;
	color:purple;
	text-decoration:underline;}
p.MsoAcetate, li.MsoAcetate, div.MsoAcetate
	{mso-style-priority:99;
	mso-style-link:"Balloon Text Char";
	margin:0cm;
	margin-bottom:.0001pt;
	font-size:8.0pt;
	font-family:"Tahoma","sans-serif";
	mso-fareast-language:EN-US;}
span.EmailStyle17
	{mso-style-type:personal-compose;
	font-family:"Calibri","sans-serif";
	color:windowtext;}
span.BalloonTextChar
	{mso-style-name:"Balloon Text Char";
	mso-style-priority:99;
	mso-style-link:"Balloon Text";
	font-family:"Tahoma","sans-serif";}
.MsoChpDefault
	{mso-style-type:export-only;
	font-family:"Calibri","sans-serif";
	mso-fareast-language:EN-US;}
@page WordSection1
	{size:612.0pt 792.0pt;
	margin:72.0pt 72.0pt 72.0pt 72.0pt;}
div.WordSection1
	{page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext=3D"edit" spidmax=3D"1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext=3D"edit">
<o:idmap v:ext=3D"edit" data=3D"1" />
</o:shapelayout></xml><![endif]--></head><body lang=3DEN-AU link=3Dblue =
vlink=3Dpurple><div class=3DWordSection1><p class=3DMsoNormal>Hi =
all,<o:p></o:p></p><p class=3DMsoNormal><o:p>&nbsp;</o:p></p><p =
class=3DMsoNormal>I&#8217;m hitting problems that seem pretty fatal =
trying to get canoo running against our app that uses richfaces =
3.3.3<o:p></o:p></p><p class=3DMsoNormal><o:p>&nbsp;</o:p></p><p =
class=3DMsoNormal>I&#8217;m getting an error: TypeError: Cannot set =
property &quot;isLeftClick&quot; of undefined to &quot;function () =
&nbsp;{&#8230;&#8230;.<o:p></o:p></p><p =
class=3DMsoNormal><o:p>&nbsp;</o:p></p><p class=3DMsoNormal>The =
javascript in questions is <a =
href=3D"http://localhost:8080/a4j/g/3_3_3.Finalorg.ajax4jsf.javascript.Pr=
ototypeScript#12">http://localhost:8080/a4j/g/3_3_3.Finalorg.ajax4jsf.jav=
ascript.PrototypeScript#12</a> and the code there is as =
follows:<o:p></o:p></p><p class=3DMsoNormal><o:p>&nbsp;</o:p></p><p =
class=3DMsoNormal =
style=3D'text-indent:36.0pt;text-autospace:none'><b><span =
style=3D'font-size:10.0pt;font-family:"Courier =
New";color:#7F0055;background:silver;mso-highlight:silver'>return</span><=
/b><span style=3D'font-size:10.0pt;font-family:"Courier =
New";color:black;background:silver;mso-highlight:silver'> {</span><span =
style=3D'font-size:10.0pt;font-family:"Courier =
New"'><o:p></o:p></span></p><p class=3DMsoNormal =
style=3D'text-autospace:none'><span =
style=3D'font-size:10.0pt;font-family:"Courier =
New";color:black;background:silver;mso-highlight:silver'>&nbsp;&nbsp;&nbs=
p;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; isLeftClick : =
</span><b><span style=3D'font-size:10.0pt;font-family:"Courier =
New";color:#7F0055;background:silver;mso-highlight:silver'>function</span=
></b><span style=3D'font-size:10.0pt;font-family:"Courier =
New";color:black;background:silver;mso-highlight:silver'>(event) =
{</span><span style=3D'font-size:10.0pt;font-family:"Courier =
New"'><o:p></o:p></span></p><p class=3DMsoNormal =
style=3D'text-autospace:none'><span =
style=3D'font-size:10.0pt;font-family:"Courier =
New";color:black;background:silver;mso-highlight:silver'>&nbsp;&nbsp;&nbs=
p;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp=
;&nbsp;&nbsp; </span><b><span =
style=3D'font-size:10.0pt;font-family:"Courier =
New";color:#7F0055;background:silver;mso-highlight:silver'>return</span><=
/b><span style=3D'font-size:10.0pt;font-family:"Courier =
New";color:black;background:silver;mso-highlight:silver'> =
isButton(event, 0)</span><span =
style=3D'font-size:10.0pt;font-family:"Courier =
New"'><o:p></o:p></span></p><p class=3DMsoNormal =
style=3D'text-autospace:none'><span =
style=3D'font-size:10.0pt;font-family:"Courier =
New";color:black;background:silver;mso-highlight:silver'>&nbsp;&nbsp;&nbs=
p;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; },</span><span =
style=3D'font-size:10.0pt;font-family:"Courier =
New"'><o:p></o:p></span></p><p class=3DMsoNormal =
style=3D'text-autospace:none'><span =
style=3D'font-size:10.0pt;font-family:"Courier =
New";color:black;background:silver;mso-highlight:silver'>&nbsp;&nbsp;&nbs=
p;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; isMiddleClick : =
</span><b><span style=3D'font-size:10.0pt;font-family:"Courier =
New";color:#7F0055;background:silver;mso-highlight:silver'>function</span=
></b><span style=3D'font-size:10.0pt;font-family:"Courier =
New";color:black;background:silver;mso-highlight:silver'>(event) =
{</span><span style=3D'font-size:10.0pt;font-family:"Courier =
New"'><o:p></o:p></span></p><p class=3DMsoNormal =
style=3D'text-autospace:none'><span =
style=3D'font-size:10.0pt;font-family:"Courier =
New";color:black;background:silver;mso-highlight:silver'>&nbsp;&nbsp;&nbs=
p;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp=
;&nbsp;&nbsp; </span><b><span =
style=3D'font-size:10.0pt;font-family:"Courier =
New";color:#7F0055;background:silver;mso-highlight:silver'>return</span><=
/b><span style=3D'font-size:10.0pt;font-family:"Courier =
New";color:black;background:silver;mso-highlight:silver'> =
isButton(event, 1)</span><span =
style=3D'font-size:10.0pt;font-family:"Courier =
New"'><o:p></o:p></span></p><p class=3DMsoNormal><span =
style=3D'font-size:10.0pt;font-family:"Courier =
New";color:black;background:silver;mso-highlight:silver'>&nbsp;&nbsp;&nbs=
p;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; },</span><span =
style=3D'font-size:10.0pt;font-family:"Courier =
New";color:black'><o:p></o:p></span></p><p class=3DMsoNormal><span =
style=3D'font-size:10.0pt;font-family:"Courier =
New";color:black'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&=
nbsp;&nbsp; &#8230;&#8230;<o:p></o:p></span></p><p =
class=3DMsoNormal><o:p>&nbsp;</o:p></p><p class=3DMsoNormal>It looks =
like it&#8217;s choking because ajax4jsf&#8217;s&nbsp; javascript =
library is trying to set the isLeftClick property on the anonymous =
result to a function.<o:p></o:p></p><p =
class=3DMsoNormal><o:p>&nbsp;</o:p></p><p class=3DMsoNormal>Is there a =
way to get webtest working with ajax4jf?<o:p></o:p></p><p =
class=3DMsoNormal><o:p>&nbsp;</o:p></p><p =
class=3DMsoNormal>Thanks,<o:p></o:p></p><p =
class=3DMsoNormal>Brad<o:p></o:p></p></div></body></html>
------=_NextPart_000_1CF0_01CC7157.405A87B0--