cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Grzegorz Kossakowski <g...@tuffmail.com>
Subject Re: CForm Get all Widgets
Date Fri, 21 Nov 2008 00:38:02 GMT
Gary Larsen pisze:
> Hi Gurus,
> 
>  
> 
> I’m creating a form definition dynamically and have set up a Java
> ValueChangedListener on all the Widgets.
> 
>  
> 
> My problem if that I need to iterate though all the widgets on the form
> in the listener.  Since the form is dynamic I do not know the widget
> names.  I could not find any method to get a list of all the widgets.
> 
>  
> 
> Is this possible?  I’m running 2.1.9.  ‘
> 
>  
> 
> Thanks for any advice!


Hi Gary,

Take a look at WidgetEvent[1], from there you can obtain original widget. Once you have a
widget,
you can obtain a Form using getForm() and from there you call getChildren().

HTH.


[1] http://cocoon.apache.org/2.1/apidocs/org/apache/cocoon/forms/event/WidgetEvent.html
[2] http://cocoon.apache.org/2.1/apidocs/org/apache/cocoon/forms/formmodel/Widget.html

-- 
Grzegorz Kossakowski

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


Mime
View raw message