You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Myriam Delperier <my...@ajlsm.com> on 2006/01/09 08:56:06 UTC

error : setState is not a function

Hi,
i've got a problem in my bindinf file.
I need to change the state of my widget like this :
<fb:javascript id="code" path="@id">
  <fb:load-form>
   var v= jxpathPointer.getValue();
   widget.setValue(v);
   if (v!=""){
    widget.setState(Packages.org.apache.cocoon.forms.formmodel.WidgetState.OUTPUT);
   }
  </fb:load-form>
  <fb:save-form>
   jxpathPointer.setValue(widget.getValue());
  </fb:save-form>
 </fb:javascript>

but I receive an error :
at (resource://org/apache/cocoon/forms/flow/javascript/Form.js, Line 
165):

TypeError: setState is not a function

does somebody know where my problem is?


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


Re: error : setState is not a function

Posted by Sylvain Wallez <sy...@apache.org>.
Myriam Delperier wrote:
> | | but I receive an error :
> | | at (resource://org/apache/cocoon/forms/flow/javascript/Form.js, Line
> | | 165):
> | |
> | | TypeError: setState is not a function
> | |
> | | does somebody know where my problem is?
>
> ok my pb was that i'm working with cocoon 2.1.5.
> Is there a way to make a widget become "ouput", once a value has 
> already been given, with cocoon 2.1.5 ?

IIRC, the widget state feature was added in Cocoon 2.1.6. So the only 
option is to upgrade your Cocoon...

Sylvain

-- 
Sylvain Wallez                        Anyware Technologies
http://bluxte.net                     http://www.anyware-tech.com
Apache Software Foundation Member     Research & Technology Director


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


Re: error : setState is not a function

Posted by Myriam Delperier <my...@ajlsm.com>.
| | but I receive an error :
| | at (resource://org/apache/cocoon/forms/flow/javascript/Form.js, Line
| | 165):
| |
| | TypeError: setState is not a function
| |
| | does somebody know where my problem is?

ok my pb was that i'm working with cocoon 2.1.5.
Is there a way to make a widget become "ouput", once a value has already 
been given, with cocoon 2.1.5 ?


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org