|
Thanks Sylvain; yes - I am very "thin in the brain"
when it comes to the class naming side of things...
both as to when its needed (not always!?) and how to
track down where its located in the fabulous hierarchy
that makes up Cocoon!
I will just have to learn by blundering on, I guess.
>>> [EMAIL PROTECTED] 2005/11/04 03:44 PM >>> Derek Hohls wrote:
> Ok; I now have: > > <fd:on-value-changed> > <fd:_javascript_> > var thisWidget = event.source; > if ( thisWidget.getValue() == "" ) { > thisWidget.setState ( WidgetState.ACTIVE) > } else { > thisWidget.setState ( WidgetState.OUTPUT) > } > </fd:_javascript_> > </fd:on-value-changed> > > But I get a "Reference error: WidgetState is not defined"; searching > the archives also revealed an unanswered problem: > http://marc.theaimsgroup.com/?l=xml-cocoon-users&m=112178872110129&w=2 > <http://marc.theaimsgroup.com/?l=xml-cocoon-users&m=112178872110129&w=2> > > Any light on this aspect? You have to learn how to reference a Java class from _javascript_ with its full class name :-) This is "setState(org.apache.cocoon.forms.formmodel.WidgetState.ACTIVE)" Alternately, you can also "importClass(org.apache.cocoon.forms.formmodel.WidgetState)" either in your event handler or in the flowscript that shows the form, if you're using flowscript. Sylvain -- Sylvain Wallez Anyware Technologies http://people.apache.org/~sylvain http://www.anyware-tech.com Apache Software Foundation Member Research & Technology Director --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- This message is subject to the CSIR's copyright, terms and conditions and e-mail legal notice. Views expressed herein do not necessarily represent the views of the CSIR. CSIR E-mail Legal Notice CSIR Copyright, Terms and Conditions For electronic copies of the CSIR Copyright, Terms and Conditions and the CSIR Legal Notice send a blank message with "REQUEST LEGAL" in the subject line to CSIR HelpDesk
|
- Re: CForms - different views of the same widget Derek Hohls
- Re: CForms - different views of the same widget Philipp Schmidt
- Passing variables between XSL and JavaScript Oleg Konovalov
- Re: Passing variables between XSL and JavaS... Mark Lundquist
- Simple DB report Oleg Konovalov
- Simple DB report Oleg Konovalov
- Re: CForms - different views of the same widget Derek Hohls
- Re: CForms - different views of the same widget Philipp Schmidt
- Re: CForms - different views of the same widget Derek Hohls
- Re: CForms - different views of the same widget Christoph Hermann
- Re: CForms - different views of the same widget Derek Hohls
