RE: addEventlistener question
"David R Robison" <[email protected]>
| Newsgroups | gmane.comp.java.enhydra.barracuda.general |
|---|---|
| Message-ID | <000001c2e266$f7550140$0864a8c0@D901K911> |
I'm still getting the same response. In my "screen" class, I identify
the events of interest as:
public HistoricalVosDataScreen() {
specifyLocalEventInterests(getHistoricalVosDataFactory,
GetHistoricalVosData.class);
specifyLocalEventInterests(renderHistoricalVosDataFactory,
RenderHistoricalVosData.class);
specifyLocalEventInterests(selectByRoadwayFactory);
specifyLocalEventInterests(selectByStationFactory);
}
Is this correct?
David R Robison
Open Roads Consulting, Inc.
http://www.openroadsconsulting.com
-----Original Message-----
From: [email protected]
[mailto:[email protected]] On Behalf Of Christian Cryder
Sent: Tuesday, March 04, 2003 10:24 AM
To: [email protected]
Subject: RE: [Barracuda] addEventlistener question
> Since the Event Listeners are not associated with a specific
> application event (from events.xml) do I need to somehow register
> them with the ApplicationGateway?
Yes! The problem you are having is that ApplicationGateway doesn't know
where to deliver the event. The easiest way to do this is via an
event-gateways.xml file, like this:
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<assemble>
<event-gateway
class="org.enhydra.barracuda.core.event.DefaultEventGateway">
<event-gateway class="com.atmr.atmreports.screens.Login"/>
<event-gateway class="com.atmr.atmreports.screens.Home"/>
<event-gateway class="com.atmr.atmreports.screens.Businesses"/>
</event-gateway>
</assemble>
Now, the way this get's invoked is from within web.xml...where the
ApplicationGateway is declared, you provide a reference to your
event-gateways.xml like this:
<init-param>
<param-name>AssemblyDescriptor</param-name>
<param-value>/WEB-INF/event-gateways.xml</param-value>
</init-param>
If you look in the Barracuda web.xml, you should see an example of this.
Fix that, and you should be in business!
Christian
----------------------------------------------
Christian Cryder [[email protected]]
Internet Architect, ATMReports.com
Barracuda - http://barracudamvc.org
----------------------------------------------
"Coffee? I could quit anytime, just not today"
> -----Original Message-----
> From: [email protected]
> [mailto:[email protected]]On Behalf Of David R Robison
> Sent: Tuesday, March 04, 2003 10:11 AM
> To: [email protected]
> Subject: RE: [Barracuda] addEventlistener question
>
>
> Thanks for your quick response...
>
> 1) The code is rendered as:
>
> <input checked="checked" id="ByRoadway" name="ByRoadway"
> onclick="this.disabled=true;
> document.EditForm.action='ActionEvent.event?$eid=HistoricalVosData
> Screen$SelectByRoadwayHandler';document.EditForm.submit();
> return false;" type="checkbox" value="true">
>
> 2) I'm using Netscape 7.02
>
> 3) The error I get is:
>
> Error: EventException
>
> There was an unexpected error while servicing this
> request...please contact your
> application administrator and notify them of the problem.
>
> Error dispatching request: Unhandled Event - a reponse was required
but no
> response event was handled!
>
> Exception:
> org.enhydra.barracuda.core.event.UnhandledEventException:
> Unhandled Event - a
> reponse was required but no response event was handled! at
> org.enhydra.barracuda.core.event.DefaultEventDispatcher.dispatchEv
> ent(DefaultEventDispatcher.java:132)
> at
> org.enhydra.barracuda.core.event.DefaultEventBroker.dispatchEvent(
DefaultEventBroker.java:494)
> at
> org.enhydra.barracuda.core.event.ApplicationGateway.handleDefaultE
> xt(ApplicationGateway.java:415)
> at
> org.enhydra.barracuda.core.event.ApplicationGateway.handleDefault(
ApplicationGateway.java:240)
> at
> com.orci.ADMSVirginia.MainGateway.handleDefault(MainGateway.java:149)
at
> org.enhydra.barracuda.core.event.ApplicationGateway.doGet(Applicat
> ionGateway.java:643)
> at javax.servlet.http.HttpServlet.service(HttpServlet.java:740) at
> javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at
> org.apache.tomcat.core.ServiceInvocationHandler.method(Unknown Source)
at
> org.apache.tomcat.core.ServletWrapper.handleInvocation(Unknown Source)
at
> org.apache.tomcat.core.ServletWrapper.handleRequest(Unknown Source) at
> org.apache.tomcat.core.Context.handleRequest(Unknown Source) at
> org.enhydra.servlet.servletManager.ServletManager.service(Unknown
> Source) at
>
org.enhydra.servlet.connectionMethods.http.HttpHandler.doARequest(Unknow
n
> Source) at
> org.enhydra.servlet.connectionMethods.http.HttpHandler.processRequ
> ests(Unknown
> Source) at
> org.enhydra.servlet.connectionMethods.http.HttpHandler.run(Unknown
> Source) at java.lang.Thread.run(Thread.java:536)
>
> Parameters:
> key:SpatialSelectionPredefinedSelect value:- Predefined
> Roadway Selections -
> key:TemporalSelectionPredefinedSelect value:- Predefined
> Aggregations -
> key:DateFilterFrom value:
> key:TimeFilterPredefinedSelect value:- Predefined Time Range -
> key:DateFilterPredefinedSelect value:- Predefined Date Range -
> key:Date2FilterTo value:
> key:DateFilterCustom value:
> key:ByRoadway value:true
> key:DateFilterTo value:
> key:Date2FilterFrom value:
> RequestURI:/ADMSVirginia/ActionEvent.event
> ServletPath:/ActionEvent.event
> PathInfo:null
> PathTranslated:null
>
> 4) I'm having trouble getting log4j to find any appenders. I used
> the web.xml
> and log4j.xml from the latest BarracudaDiscRack as an example. I tried
to
> sepecify logging of debug message, but I got nothing conclusive.
>
> Here are a few questions?
>
> Since the Event Listeners are not associated with a specific
> application event
> (from events.xml) do I need to somehow register them with the
> ApplicationGateway?
>
> Do the event listener classes need to be declared as public classes?
>
> David Robison
>
> Quoting Christian Cryder <[email protected]>:
>
> > Hi David,
> >
> > Can you gove us a little more information:
> >
> > a) what's the actual rendered markup look like?
> > b) what browser are you trying this in?
> > c) when you click it, is it initiating a request to the server? (ie.
do
> > you
> > see the "loading" icon start churning in the browser?)
> > d) if c = yes, have you tried turning on debugging in
ApplicationGateway
> > to
> > see where the incoming event is getting routed?
> >
> > Answers to these qeustions should give us enough info to solve the
> > problem.
> >
> > Christian
> > ----------------------------------------------
> > Christian Cryder [[email protected]]
> > Internet Architect, ATMReports.com
> > Barracuda - http://barracudamvc.org
> > ----------------------------------------------
> > "Coffee? I could quit anytime, just not today"
> >
> > > -----Original Message-----
> > > From: [email protected]
> > > [mailto:[email protected]]On Behalf Of David R
> > Robison
> > > Sent: Tuesday, March 04, 2003 9:25 AM
> > > To: [email protected]
> > > Subject: [Barracuda] addEventlistener question
> > >
> > >
> > > I'm having trouble using addEventlistener on a checkbox. I define
> > > the listener as:
> > >
> > > private ListenerFactory selectByRoadwayFactory = new
> > > DefaultListenerFactory() {
> > > public BaseEventListener getInstance() { return new
> > > SelectByRoadwayHandler(); }
> > > public String getListenerID() { return
> > > getID(SelectByRoadwayHandler.class); }};
> > >
> > > I attach the listener as:
> > >
> > > Boolean selected = (fm!=null ?
fm.getBooleanVal(EditForm.BYROADWAY,
> > new
> > > Boolean(false)) : new Boolean(false));
> > > BToggleButton b = new BToggleButton("CHECKBOX",
> > > EditForm.BYROADWAY, "true",
> > > selected.booleanValue());
> > > b.addEventListener(selectByRoadwayFactory);
> > >
> > > Yet, when I click on the checkbox, the class
> > > SelectByRoadwayBandler does not get
> > > called. I'm sure its something simple... Any ideas?
> > >
> > > David Robison
> > >
> > >
> > > _______________________________________________
> > > Barracuda mailing list
> > > [email protected]
> > > http://barracudamvc.org/lists/listinfo/barracuda
> >
> > _______________________________________________
> > Barracuda mailing list
> > [email protected]
> > http://barracudamvc.org/lists/listinfo/barracuda
> >
> _______________________________________________
> Barracuda mailing list
> [email protected]
> http://barracudamvc.org/lists/listinfo/barracuda
_______________________________________________
Barracuda mailing list
[email protected]
http://barracudamvc.org/lists/listinfo/barracuda