cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Thomas Lutz <mat...@gmx.at>
Subject CForms: Using javascript action event handler while using java flow in sitemap
Date Tue, 19 Jul 2005 15:58:35 GMT
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


Mime
View raw message