Re: Form Listner Problem

"Richard Lewis-Shell" <[email protected]>
Newsgroups gmane.comp.java.tapestry.devel
Message-ID <004501c294d9$ca64c150$b701a8c0@rls2>
Your login method is in a subclass of the class you specified..  Try this in
your page spec:
<page-specification  class="_cwg$cwg.HomePage.SideBar" >

Richard

----- Original Message -----
From: "Craig Gregory" <[email protected]>
To: <[email protected]>
Sent: Tuesday, November 26, 2002 11:43 AM
Subject: [Tapestry-developer] Form Listner Problem


> I am having problems binding to a form listener method.  From the
> example in the "component reference" I have the following
> page-specification that has two components to be wraped in a Form
> component.  Also it might be important to know that this page is
> "wrapped" within multiple framesets.  Does anyone have an idea why the
> ONGL expressing "listeners.login" does not work ?
>
>
> <?xml  version="1.0"  encoding="UTF-8" ?>
> <!DOCTYPE  page-specification  PUBLIC  "-//Howard Lewis Ship//Tapestry
> Specification 1.3//EN"  "http://tapestry.sf.net/dtd/Tapestry_1_3.dtd" >
>
> <page-specification  class="_cwg$cwg.Woven.WovenFrame" >
>
>     <component  id="login"  type="Form" >
>         <binding  name="listener"  expression="listeners.login" />
>     </component>
>
>     <component  id="username"  type="TextField" >
>         <binding  name="value"  expression="visit.username" />
>     </component>
>
>     <component  id="password"  type="TextField" >
>         <binding  name="value"  expression="visit.password" />
>         <binding  name="hidden"  expression="true" />
>     </component>
>
> <!-- -->
>
>     <component  id="tShell"  type="Shell" >
>         <static-binding  name="title" >My Title from
> SideBar.page</static-binding>
>     </component>
>
>     <component  id="tBody"  type="Body" />
>
> </page-specification>
>
>
>
> Folowing is the Java program.  I hava sub-classed WovenFrame from
> BasePage.
>
>
> package _cwg$cwg.HomePage ;
>
> import _cwg$cwg.Woven.WovenFrame ;
>
> import net.sf.tapestry.IRequestCycle ;
>
> public class SideBar extends _cwg$cwg.Woven.WovenFrame {
>
>     public void login (IRequestCycle cycle) {
>         Visit visit = (Visit) getVisit () ;
>     }
> }
>
>
>
>
>
>
> An exception has occured.
> You may continue by restarting the session.
>
> net.sf.tapestry.RequestCycleException
> Unable to resolve expression 'listeners.login' for
> _cwg$cwg.Woven.WovenFrame@facf0b[SideBar].
> component: _cwg$cwg.Woven.WovenFrame@facf0b[SideBar]
>
> net.sf.tapestry.BindingException
> Unable to resolve expression 'listeners.login' for
> _cwg$cwg.Woven.WovenFrame@facf0b[SideBar].
> binding: ExpressionBinding[SideBar listeners.login cachedValue=null]
>
> ognl.NoSuchPropertyException
> login
> target: ListenerMap[_cwg$cwg.Woven.WovenFrame@facf0b[SideBar]]
> Stack Trace:
> ognl.ObjectPropertyAccessor.getProperty(ObjectPropertyAccessor.java)
>
net.sf.tapestry.listener.ListenerMapPropertyAccessor.getProperty(ListenerMap
PropertyAccessor.java:61)
> ognl.OgnlRuntime.getProperty(OgnlRuntime.java)
> ognl.ASTProperty.getValueBody(ASTProperty.java)
> ognl.SimpleNode.getValue(SimpleNode.java)
> ognl.ASTChain.getValueBody(ASTChain.java)
> ognl.SimpleNode.getValue(SimpleNode.java)
> ognl.Ognl.getValue(Ognl.java)
>
net.sf.tapestry.binding.ExpressionBinding.resolveProperty(ExpressionBinding.
java:206)
>
net.sf.tapestry.binding.ExpressionBinding.checkForInvariant(ExpressionBindin
g.java:451)
>
net.sf.tapestry.binding.ExpressionBinding.initialize(ExpressionBinding.java:
313)
>
net.sf.tapestry.binding.ExpressionBinding.isInvariant(ExpressionBinding.java
:241)
> net.sf.tapestry.param.ParameterManager.setup(ParameterManager.java:226)
>
net.sf.tapestry.param.ParameterManager.setParameters(ParameterManager.java:9
2)
>
net.sf.tapestry.AbstractComponent.prepareForRender(AbstractComponent.java:92
5)
> net.sf.tapestry.AbstractComponent.render(AbstractComponent.java:899)
> net.sf.tapestry.AbstractComponent.renderBody(AbstractComponent.java:675)
> net.sf.tapestry.html.Shell.renderComponent(Shell.java:130)
> net.sf.tapestry.AbstractComponent.render(AbstractComponent.java:901)
> net.sf.tapestry.BaseComponent.renderComponent(BaseComponent.java:460)
> net.sf.tapestry.AbstractComponent.render(AbstractComponent.java:901)
> net.sf.tapestry.AbstractPage.renderPage(AbstractPage.java:303)
> net.sf.tapestry.engine.RequestCycle.renderPage(RequestCycle.java:413)
>
net.sf.tapestry.engine.AbstractEngine.renderResponse(AbstractEngine.java:621
)
> net.sf.tapestry.engine.PageService.service(PageService.java:94)
> net.sf.tapestry.engine.AbstractEngine.service(AbstractEngine.java:746)
> net.sf.tapestry.ApplicationServlet.doService(ApplicationServlet.java:175)
> net.sf.tapestry.ApplicationServlet.doGet(ApplicationServlet.java:144)
> javax.servlet.http.HttpServlet.service(HttpServlet.java:195)
> javax.servlet.http.HttpServlet.service(HttpServlet.java:309)
> javax.servlet.http.HttpServlet.service(HttpServlet.java:336)
> com.evermind._bxb._crd(.:501)
> com.evermind._bxb._ukb(.:170)
> com.evermind._cn._uab(.:576)
> com.evermind._cn._fm(.:189)
> com.evermind._bs.run(.:62)
>
>
>
> SessionProperties
> Name Value
> id HFAMDKADDAEF
> creationTime Mon Nov 25 13:35:04 PST 2002
> lastAccessedTime Mon Nov 25 13:46:47 PST 2002
> maxInactiveInterval 1200
> new no
> Attributes
> Name Value
> net.sf.tapestry.engine.HomePage
> _cwg$ais.JWC.engine.JWCSimpleEngine@81ed9e[Collaborative Workgroup Home
> Page]
> RequestParameters
> Name Value(s)
> context SideBar
> service page
> Properties
> Name Value
> contentLength -1
> method GET
> protocol HTTP/1.1
> queryString service=page&context=SideBar
> remoteAddr 127.0.0.1
> remoteHost 127.0.0.1
> requestedSessionId HFAMDKADDAEF
> requestedSessionIdFromCookie yes
> requestedSessionIdFromURL no
> requestedSessionIdValid yes
> requestURI /College-Support/HomePage
> scheme http
> serverName localhost
> serverPort 80
> contextPath /College-Support
> servletPath /HomePage
> Headers
> Name Value
> ACCEPT */*
> ACCEPT-ENCODING gzip, deflate
> ACCEPT-LANGUAGE en-us
> CONNECTION Keep-Alive
> COOKIE JSESSIONID=HFAMDKADDAEF
> HOST localhost
> REFERER
> http://localhost/College-Support/HomePage?service=page&context=Context
> USER-AGENT Mozilla/4.0 (compatible; MSIE 5.01; Windows NT 5.0)
> Cookies
> Name Value
> JSESSIONID HFAMDKADDAEF
> ServletProperties
> Name Value
> servlet _cwg$cwg.HomePage.Application_servlet@af72d8
> Servlet ContextProperties
> Name Value
> majorVersion 2
> minorVersion 2
> serverInfo Orion/1.5.3
> Attributes
> Name Value
> net.sf.tapestry.AssetExternalizer.HomePage
> net.sf.tapestry.asset.AssetExternalizer@1946c2
> net.sf.tapestry.DataSqueezer
>
DataSqueezer[adaptors=<AdaptorRegistry[java.lang.Boolean=net.sf.tapestry.uti
l.io.BooleanAdaptor@1563ff
> java.lang.String=net.sf.tapestry.util.io.StringAdaptor@ffc686
> java.lang.Byte=net.sf.tapestry.util.io.ByteAdaptor@f297e7
>
net.sf.tapestry.ComponentAddress=net.sf.tapestry.util.io.ComponentAddressAda
ptor@113622
> java.lang.Long=net.sf.tapestry.util.io.LongAdaptor@8ee016
> java.lang.Character=net.sf.tapestry.util.io.CharacterAdaptor@29e357
> java.lang.Float=net.sf.tapestry.util.io.FloatAdaptor@75078b
> java.lang.Short=net.sf.tapestry.util.io.ShortAdaptor@210b5b
> java.lang.Double=net.sf.tapestry.util.io.DoubleAdaptor@aaf0b3
> java.lang.Integer=net.sf.tapestry.util.io.IntegerAdaptor@961dff
> java.io.Serializable=net.sf.tapestry.util.io.SerializableAdaptor@6f0be8]>]
>
> net.sf.tapestry.PageSource.HomePage PageSource
> pool = Pool[Generation = 0 Pooled = 5]
> MultiKey[Navagation, en_US] = 1
> MultiKey[Context, en_US] = 1
> MultiKey[Home, en_US] = 1
> MultiKey[Application, en_US] = 1
> MultiKey[View, en_US] = 1
> 2 cached field bindings
> net.sf.tapestry.IEngineService.RESTART_SERVICE
> Boolean.TRUE
> 25 cached static bindings
> tr
> li
> sideBar
> My Title from FrameWork.page
> javascript:ti_raiseInspector();
> Application
> 0
> auto
> context
> Exception
> Navagation
> yes
> vies
> My Title from View.page
> SideBar
> My Title from SideBar.page
> My Title from Navagation.page
> frameset
> navbar
> application
> Context
> My Title from Context.page
> My Title from Application.page
> View
> no
> 4 cached private assets
> /net/sf/tapestry/pages/Exception.css
> /net/sf/tapestry/inspector/inspector-rollover.gif
> /net/sf/tapestry/html/PracticalBrowserSniffer.js
> /net/sf/tapestry/inspector/tapestry-logo.gif
>
> net.sf.tapestry.ScriptSource.HomePage
> DefaultScriptSource@747fa2[[/net/sf/tapestry/html/Rollover.script,
> /net/sf/tapestry/inspector/InspectorButton.script], ]
> net.sf.tapestry.ServiceMap.HomePage
> {restart=net.sf.tapestry.engine.RestartService@6782a9,
> reset=net.sf.tapestry.engine.ResetService@b34126,
> page=net.sf.tapestry.engine.PageService@7a4989,
> home=net.sf.tapestry.engine.HomeService@7200b4,
> external=net.sf.tapestry.engine.ExternalService@8c3679,
> direct=net.sf.tapestry.engine.DirectService@4c47db,
> action=net.sf.tapestry.engine.ActionService@18c74,
> asset=net.sf.tapestry.asset.AssetService@ac3379}
> net.sf.tapestry.SpecificationSource.HomePage
> DefaultSpecificationSource[7 cached page specifications:
> /_cwg$cwg/HomePage/Navagation.page
> /_cwg$cwg/HomePage/SideBar.page
> /_cwg$cwg/HomePage/View.page
> /_cwg$cwg/Woven/FrameWork.page
> /net/sf/tapestry/pages/Exception.page
> /_cwg$cwg/HomePage/Context.page
> /_cwg$cwg/HomePage/Application.page
>
> 14 cached component specifications:
> /net/sf/tapestry/components/Conditional.jwc
> /net/sf/tapestry/inspector/InspectorButton.jwc
> /net/sf/tapestry/link/GenericLink.jwc
> /net/sf/tapestry/html/Shell.jwc
> /net/sf/tapestry/form/Form.jwc
> /net/sf/tapestry/components/Delegator.jwc
> /net/sf/tapestry/link/ServiceLink.jwc
> /net/sf/tapestry/html/Frame.jwc
> /net/sf/tapestry/html/ExceptionDisplay.jwc
> /net/sf/tapestry/form/TextField.jwc
> /net/sf/tapestry/html/Body.jwc
> /net/sf/tapestry/components/Foreach.jwc
> /net/sf/tapestry/html/Rollover.jwc
> /net/sf/tapestry/components/Insert.jwc
> ]
> net.sf.tapestry.StringsSource.HomePage
> net.sf.tapestry.engine.DefaultStringsSource@6779e6
> net.sf.tapestry.TemplateSource.HomePage DefaultTemplateSource[118 tokens
> MultiKey[/_cwg$cwg/HomePage/Navagation.page, en_US] (12 tokens)
> MultiKey[/net/sf/tapestry/inspector/InspectorButton.jwc, en_US] (6
> tokens)
> MultiKey[/_cwg$cwg/HomePage/Application.page, en_US] (11 tokens)
> MultiKey[/_cwg$cwg/HomePage/Context.page, en_US] (11 tokens)
> MultiKey[/net/sf/tapestry/pages/Exception.page, en_US] (15 tokens)
> MultiKey[/_cwg$cwg/HomePage/View.page, en_US] (5 tokens)
> MultiKey[/_cwg$cwg/Woven/FrameWork.page, en_US] (8 tokens)
> MultiKey[/net/sf/tapestry/html/ExceptionDisplay.jwc, en_US] (35 tokens)
> MultiKey[/_cwg$cwg/HomePage/SideBar.page, en_US] (15 tokens)
>
> ]
> JVM System PropertiesName Value
> awt.toolkit sun.awt.windows.WToolkit
> file.encoding Cp1252
> file.encoding.pkg sun.io
> file.separator \
> java.awt.graphicsenv sun.awt.Win32GraphicsEnvironment
> java.awt.printerjob sun.awt.windows.WPrinterJob
> java.class.path orion.jar
> C:\_cwg$ais\OrionServer\Orion_v1-5-3\ejb.jar
> C:\_cwg$ais\OrionServer\Orion_v1-5-3\activation.jar
> C:\_cwg$ais\OrionServer\Orion_v1-5-3\jdbc.jar
> C:\_cwg$ais\OrionServer\Orion_v1-5-3\jndi.jar
> C:\_cwg$ais\OrionServer\Orion_v1-5-3\jta.jar
> C:\_cwg$ais\OrionServer\Orion_v1-5-3\mail.jar
> C:\_cwg$ais\OrionServer\Orion_v1-5-3\xerces.jar
> C:\_cwg$ais\OrionServer\Orion_v1-5-3\lib
> C:\_cwg$ais\OrionServer\Orion_v1-5-3\lib\hsql.jar
> C:\_cwg$ais\OrionServer\Orion_v1-5-3\lib\jakarta-oro_v2-0-6.jar
> C:\_cwg$ais\OrionServer\Orion_v1-5-3\lib\log4j_v1-2-6.jar
> C:\_cwg$ais\OrionServer\Orion_v1-5-3\lib\net-sf-tapestry_v2-2-rc-1.jar
> C:\_cwg$ais\OrionServer\Orion_v1-5-3\lib\ognl_v2-1-4-opt.jar
> C:\_cwg$ais\_web\College-Support\web-app\WEB-INF\classes
>
> java.class.version 48.0
> java.endorsed.dirs C:\_cwg$ais\JavaSoft\JSDK_v1-4-0-01\jre\lib\endorsed
> java.ext.dirs C:\_cwg$ais\JavaSoft\JSDK_v1-4-0-01\jre\lib\ext
> java.home C:\_cwg$ais\JavaSoft\JSDK_v1-4-0-01\jre
> java.io.tmpdir C:\DOCUME~1\cgregory\LOCALS~1\Temp\
> java.library.path C:\_cwg$ais\JavaSoft\JSDK_v1-4-0-01\bin
> .
> C:\WINNT\System32
> C:\WINNT
> C:\WINNT\system32
> C:\WINNT
> C:\WINNT\System32\Wbem
> C:\_cwg$ais\_exe\_DOS
> C:\Program Files\vslick\win
> C:\_cwg$ais\JavaSoft\JSDK_v1-4-0-01\bin
> C:\_cwg$ais\Apache\Jakarta\Ant_v1-4-1\bin
>
> java.naming.factory.initial
> com.evermind.server.ApplicationInitialContextFactory
> java.protocol.handler.pkgs com.evermind.protocol
> java.runtime.name Java(TM) 2 Runtime Environment, Standard Edition
> java.runtime.version 1.4.0_01-b03
> java.specification.name Java Platform API Specification
> java.specification.vendor Sun Microsystems Inc.
> java.specification.version 1.4
> java.util.prefs.PreferencesFactory
> java.util.prefs.WindowsPreferencesFactory
> java.vendor Sun Microsystems Inc.
> java.vendor.url http://java.sun.com/
> java.vendor.url.bug http://java.sun.com/cgi-bin/bugreport.cgi
> java.version 1.4.0_01
> java.vm.info mixed mode
> java.vm.name Java HotSpot(TM) Client VM
> java.vm.specification.name Java Virtual Machine Specification
> java.vm.specification.vendor Sun Microsystems Inc.
> java.vm.specification.version 1.0
> java.vm.vendor Sun Microsystems Inc.
> java.vm.version 1.4.0_01-b03
> line.separator
> os.arch x86
> os.name Windows 2000
> os.version 5.0
> path.separator ;
> sun.arch.data.model 32
> sun.boot.class.path C:\_cwg$ais\JavaSoft\JSDK_v1-4-0-01\jre\lib\rt.jar
> C:\_cwg$ais\JavaSoft\JSDK_v1-4-0-01\jre\lib\i18n.jar
> C:\_cwg$ais\JavaSoft\JSDK_v1-4-0-01\jre\lib\sunrsasign.jar
> C:\_cwg$ais\JavaSoft\JSDK_v1-4-0-01\jre\lib\jsse.jar
> C:\_cwg$ais\JavaSoft\JSDK_v1-4-0-01\jre\lib\jce.jar
> C:\_cwg$ais\JavaSoft\JSDK_v1-4-0-01\jre\lib\charsets.jar
> C:\_cwg$ais\JavaSoft\JSDK_v1-4-0-01\jre\classes
>
> sun.boot.library.path C:\_cwg$ais\JavaSoft\JSDK_v1-4-0-01\jre\bin
> sun.cpu.endian little
> sun.cpu.isalist pentium i486 i386
> sun.io.unicode.encoding UnicodeLittle
> user.country US
> user.dir C:\_cwg$ais\OrionServer\Orion_v1-5-3
> user.home C:\Documents and Settings\cgregory
> user.language en
> user.name cgregory
> user.timezone America/Los_Angeles
>
>
>
>
>
> Craig J. Gregory
> Dir. of Information Services
> Blue Mountain Community College
> PO Box 100
> 2411 NW Carden Av.
> Pendleton, OR 97801
> (541) 278-5825
>




-------------------------------------------------------
This SF.net email is sponsored by: Get the new Palm Tungsten T 
handheld. Power & Color in a compact size! 
http://ads.sourceforge.net/cgi-bin/redirect.pl?palm0002en
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.