You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Thomas Lutz <ma...@gmx.at> on 2005/07/19 17:58:35 UTC

CForms: Using javascript action event handler while using java flow in sitemap

Hi list !

All my "sitemap flowscript" is written in javaflow. Now I am trying to 
copy-paste some action event handler from the multi-page example, and do 
not have access to the classes used..

The action event definition follows below, what I get is that 
WidgetState is unknown. In the exmaple this class is imported via 
importClass(org.apache.cocoon.forms.formmodel.WidgetState). As I have 
javaflow, I tried to import the class in my javaflow class, but all I 
get is "ReferenceError: "WidgetState" is not defined.".

So, is there a way to mix Javaflow for sitemap and Javascript for form 
action events ?

thanks,
tom

<fd:action id="next">
            <fd:label>Next</fd:label>
            <fd:on-action>
                <fd:javascript>
                  var parent = event.source.parent;
                if (parent.validate()) {
                    parent.setState(WidgetState.INVISIBLE);
                    
parent.lookupWidget("../page2").setState(WidgetState.ACTIVE);
                }
                </fd:javascript>
            </fd:on-action>
          </fd:action>



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