Hi, The error message says that something.getName() is trying to get evaluated but something is null
Finding where exactly the error is thrown will show you which object is null... On Wed, Dec 30, 2009 at 20:51, Ivano Luberti <lube...@archicoop.it> wrote: > Hello, I'm trying to include some simple javascript in a component in my > T4 application. > I want my only textfield to get focus when is displayed. > I'm following the instructions provided at: > > http://tapestry.apache.org/tapestry4.1/components/general/script.html > > The template of the page including the component has @Shell and @Body > specified. > My component looks like this: > > <html> > <head> > <title>MET Online</title> > <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"> > <link href="css/stile_palmare.css" rel="stylesheet" type="text/css"> > </head> > <body> > <span jwcid="@Script" > script="/it/archimede/met/metgestioneingressi/tapestry/scripts/FormFocus.script" > component="ognl:components.barCode"/> > > <div id="box_operazione"> > <h1>Lettura BarCode</h1> > <br /> > <h2>passare il barcode sotto il lettore ottico</h2> > <form method="post" action="" jwcid="barCodeForm"> > <input type="text" jwcid="barCode" class="text_box" value="" /> > <br /><br /> > <input type="submit" name="Submit" value="Submit" class="bottone"> > </form> > </div> > > </body> > </html> > > The Script template file is the last one provides at: > > http://tapestry.apache.org/tapestry4.1/components/general/script.html > > the one without CDATA > > When I try to display the page I get: > > [ +/- ] Exception: Unable to read OGNL expression '<parsed OGNL > expression>' of > {component=$textfield_...@81eb97c1[homeloggeduser/barCodeForm.barCode]}: > source is null for getProperty(null, "name") > > I have already tried putting a bad component name in the @Script span > and the error changes, so it seem the name is right. I have put a bad > path to the script file and the error changes , then the path is correct. > > Can someone point me in the right direction? > > > > -- > ================================================== > dott. Ivano Mario Luberti > Archimede Informatica societa' cooperativa a r. l. > Sede Operativa > Via Gereschi 36 - 56126- Pisa > tel.: +39-050- 580959 > tel/fax: +39-050-9711344 > web: www.archicoop.it > ================================================== > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org > For additional commands, e-mail: users-h...@tapestry.apache.org > > -- Andreas Andreou - andy...@apache.org - http://blog.andyhot.gr Tapestry / Tacos developer Open Source / JEE Consulting --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org