Christoph
 
If you look back at this thread, the idea is to have this in the
form definition file i.e.
 
      <fd:on-value-changed>
     <fd:_javascript_>
       var thisWidget = event.source;
       if ( thisWidget.getValue() == "" ) {
         thisWidget.setState ( ACTIVE )
       }  else  {
        thisWidget.setState ( OUTPUT )
       }
      </fd:_javascript_>
      </fd:on-value-changed> 
 
I do not think the "form.lookupWidget" approach works here...
is there something else you can suggest?
 
When I try
 
thisWidget.setState ( Packages.org.apache.cocoon.forms.formmodel.WidgetState.ACTIVE )
 
Then I get an "unknown setState() function" error.
 
Derek

>>> [EMAIL PROTECTED] 2005/11/11 03:44 PM >>>
Derek Hohls schrieb:

Hello,

> I cannot the import class to work - I have added:
>
> importClass(Packages.org.apache.cocoon.forms.formmodel.WidgetState);

> at the start of the flowscript; and get the error:

> org.mozilla._javascript_.EvaluatorException: "file:/D:/tomcat/webapps/cocoon/projects/inddb/script/dbtest.js", line 14: Not a Java class: [JavaPackage org.apache.cocoon.forms.formmodel.WidgetState]
>
> Any ideas how to do th eimport correctly?

I just use it directly:
form.lookupWidget("mywidget").setState(Packages.org.apache.cocoon.forms.formmodel.WidgetState.DISABLED);

This works fine.

HTH
Christoph

---------------------------------------------------------------------
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


This message has been scanned for viruses and dangerous content by MailScanner,
and is believed to be clean. MailScanner thanks Transtec Computers for their support.