RE: addEventListener to radio button

"David R Robison" <[email protected]>
Newsgroups gmane.comp.java.enhydra.barracuda.general
Message-ID <002a01c2f7bf$687c0e50$0864a8c0@D901K911>
I was trying to "tweak" the onclick script as follows:
 
diff -r1.33 HTMLActionRenderer.java
296a297,299
>                 if (bel.getType().equals("radio")) {
>
sb.append("document."+NamingHelper.getName(fel)+"."+bel.getName()+"='"+b
el.getValue()+"';");
>                 }
 
This should force the value to be set prior to submitting the form.
However, I am having trouble using the latest version of Barracuda from
CVS. When I try to run it I get the error:
 
 
java.lang.NoClassDefFoundError:
org/enhydra/xml/xmlc/reloading/RecompilationHandler
        at
com.orci.ADMSVirginia.MainGateway.setUpEnhydraApplication(MainGateway.ja
va:106)
        at
com.orci.ADMSVirginia.MainGateway.initializeLocal(MainGateway.java:75)
        at
org.enhydra.barracuda.core.event.ApplicationGateway.init(ApplicationGate
way.java:844)
        at javax.servlet.GenericServlet.init(GenericServlet.java:256)
        at
org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.jav
a:934)
        at
org.apache.catalina.core.StandardWrapper.allocate(StandardWrapper.java:6
66)
        at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValv
e.java:214)
 
 
.
 
It seems to be trying to access a class that was in xmlc-2.1 but not in
xmlc-2.2.
 
I'm running Netscape 7.02.
 
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: Monday, March 31, 2003 2:04 PM
To: [email protected]
Subject: RE: [Barracuda] addEventListener to radio button
 
Hi David,
 
What browser are you using? One of the things you can try here is
manually tweaking the markup to figure out what it _should_ be doing in
your browser. What you are showing below looks basically correct to
me...but maybe I am missing something obvious.
 
Christian
 
----------------------------------------------
Christian Cryder [[email protected]]
Internet Architect, ATMReports.com
Barracuda - http://barracudamvc.org <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: Monday, March 31, 2003 10:22 AM
To: [email protected]
Subject: RE: [Barracuda] addEventListener to radio button
Here is the generated code for the radio button input:
 
<input checked="checked" id="SpaceByRoadway" name="SpaceBy"
onclick="this.disabled=true;
document.EditForm.action='ActionEvent.event?$eid=TSSDownloadScreen$GetTS
SDownloadHandler';document.EditForm.submit(); return false;"
type="radio" value="roadway">Roadway &nbsp;<input id="SpaceByCorridor"
name="SpaceBy" onclick="this.disabled=true;
document.EditForm.action='ActionEvent.event?$eid=TSSDownloadScreen$GetTS
SDownloadHandler';document.EditForm.submit(); return false;"
type="radio" value="corridor">Corridor &nbsp;<input id="SpaceByStation"
name="SpaceBy" onclick="this.disabled=true;
document.EditForm.action='ActionEvent.event?$eid=TSSDownloadScreen$GetTS
SDownloadHandler';document.EditForm.submit(); return false;"
type="radio" value="station">Station
 
I'm not sure exactly which version of barracuda I'm using, but the
timestamp on the class files in the JAR is 2/21/2003.
 
David R Robison
Open Roads Consulting, Inc.
http://www.openroadsconsulting.com
 
-----Original Message-----
From: [email protected]
[mailto:[email protected]] On Behalf Of Jacob Kjome
Sent: Friday, March 28, 2003 4:24 PM
To: [email protected]
Subject: Re: [Barracuda] addEventListener to radio button
 

Hi David,

I think this is a problem with the way Barracuda currently does form
submittal via javascript.  Just like you said, the form gets submitted
before the value is changed.  Normally you wouldn't run into this
because you'd set you form components to their appropriate values and
then click a "submit" button which would have the listener attached to
it.  Hmm....  

Can you send a snippet of the generated html for this page just for
reference?  Then we can think about what might be done to solve this
issue.

Oh, and what version of Barracuda are you using?  A release or the
latest CVS?

Jake

At 03:54 PM 3/28/2003 -0500, you wrote:


I have 3 <INPUT> elements all of type "radio" and with the same "name".
I want
to catch an event whenever a new selection is made. The values of the
input
fields are "one", "two", "three". I start with the <INPUT> "one"
selected. When
I click on "two" or "three" the event gets directed to my event listener
but the
value of the "radio" is still "one". No matter what I click, the value
is always
returned as "one". It seems that the event is firing when a radio button
is
clicked but before the selected value has been changed. Any ideas on
what may be
happening or how to work around it?

Thanks,
David Robison
_______________________________________________
Barracuda mailing list
[email protected]
http://barracudamvc.org/lists/listinfo/barracuda
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.