Here's that link ...

http://cwiki.apache.org/confluence/display/WICKET/Request+Focus+on+a+Spe
cific+Form+Component

Note that the technique outlined does set the focus correctly, but after
I use the autocomplete box it throws a runtime exception : 

Root cause:
java.lang.IllegalStateException: No behavior listener found with
behaviorId 4; Component: [MarkupContainer [Component id = ac, page =
au.com.macquarie.hr.edms.web.ed.EDMainPage, path =
6:edSelectionPanel:form:ac.EDSelectionPanel$EdSelectionForm$1, isVisible
= true, isVersioned = false]]     
at
org.apache.wicket.request.target.component.listener.BehaviorRequestTarge
t.processEvents(BehaviorRequestTarget.java:95)     
at
org.apache.wicket.request.AbstractRequestCycleProcessor.processEvents(Ab
stractRequestCycleProcessor.java:91)     
at
org.apache.wicket.RequestCycle.processEventsAndRespond(RequestCycle.java
:1171)     
at org.apache.wicket.RequestCycle.step(RequestCycle.java:1248)     
at org.apache.wicket.RequestCycle.steps(RequestCycle.java:1349)     
at org.apache.wicket.RequestCycle.request(RequestCycle.java:493)     
at
org.apache.wicket.protocol.http.WicketFilter.doGet(WicketFilter.java:387
)     
at
org.apache.wicket.protocol.http.WicketServlet.doPost(WicketServlet.java:
145)     
at javax.servlet.http.HttpServlet.service(HttpServlet.java:709)     
at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)     
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Applica
tionFilterChain.java:252)     
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilt
erChain.java:173)     
at
org.springframework.orm.hibernate3.support.OpenSessionInViewFilter.doFil
terInternal(OpenSessionInViewFilter.java:198)     
at
org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequ
estFilter.java:75)     
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Applica
tionFilterChain.java:202)     
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilt
erChain.java:173)     
at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValv
e.java:213)     
at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValv
e.java:178)     
at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java
:126)     
at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java
:105)     
at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.
java:107)     
at
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:1
48)     
at
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:86
9)     
at
org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.proc
essConnection(Http11BaseProtocol.java:667)     
at
org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint
.java:527)     
at
org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollow
erWorkerThread.java:80)     
at
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool
.java:684)     
at java.lang.Thread.run(Thread.java:619)
 

-----Original Message-----
From: Rod Good 
Sent: Friday, 13 June 2008 1:06 PM
To: users@wicket.apache.org
Subject: Re: Default Focus Behavior?

Hi,
 
I'm trying to set the 'focus on load' to an AutoCompleteTextField within
a form.
 
I tried extending the technique outlined by James Carman (see link) to
extend AbstractDefaultAjaxBehavior, without success.
 
Any thoughts on how to do this ?
 
Thanks,
Rod.
 
http://cwiki.apache.org/confluence/display/WICKET/Request+Focus+on+a+Spe
cific+Form+Component

NOTICE
This e-mail and any attachments are confidential and may contain
copyright material of Macquarie Group Limited or third parties. If you
are not the intended recipient of this email you should not read, print,
re-transmit, store or act in reliance on this e-mail or any attachments,
and should destroy all copies of them. Macquarie Group Limited does not
guarantee the integrity of any emails or any attached files. The views
or opinions expressed are the author's own and may not reflect the views
or opinions of Macquarie Group Limited.


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to