Chris, thank you very much for support.

Could you please explain, how to process JAVA-file in the sitemap?

And I can't find the samples on this subject with Java.

Are you using Java or JavaScript for the form processing? What's better? 

Thank you!!!


Christofer Dutz-3 wrote:
> 
> Hi,
> 
>  
> 
> you can set Attributes on CForms Widgets or maybe Fields, I know that I
> use
> these a lot to pass additional Information from JavaFlow to the Form.
> 
>  
> 
> <fd:field id="density" required="true">
> 
>                 <fd:label>Density</fd:label>
> 
>                 <fd:datatype base="decimal"/>
> 
>                 <fd:attributes>
> 
>                                <fd:attribute name=" composition_id "
> value=":"/>
> 
>                 </fd:attributes>
> 
>   </fd:field>
> 
>  
> 
> Or from code 
> 
>  
> 
> <fd:field id="density" required="true">
> 
>                 <fd:label>Density</fd:label>
> 
>                 <fd:datatype base="decimal"/>
> 
>                 <fd:on-value-changed>
> 
>                                <java src="MyValueChangedListener"/>
> 
>                 </fd:on-value-changed>
> 
>   </fd:field>
> 
>  
> 
> public class MyValueChangedListener implements ValueChangedListener,
> Serviceable {
> 
>       protected ServiceManager manager;
> 
>  
> 
>       public void service(ServiceManager manager) throws ServiceException
> {
> 
>             this.manager = manager;
> 
>       }
> 
>  
> 
>       public void valueChanged(ValueChangedEvent event) {
> 
>             Widget sourceWidget = event.getSourceWidget();
> 
>                   // Get your composite id somehow :
> 
>             String compositeId = "";
> 
>             sourceWidget.setAttribute("composite_id", compositeId);
> 
>       }
> 
> }
> 
>  
> 
> Hope this helps
> 
>  
> 
> Chris
> 
>  
> 
>  
> 
>  
> 
>  
> 
> Von: Мария Григорьева [mailto:[EMAIL PROTECTED] 
> Gesendet: Montag, 4. August 2008 19:39
> An: [email protected]
> Betreff: how to pass params from flowscript to the widget
> 
>  
> 
> Variable in the flowscript: 
> 
>  
> 
> var composition_id = experiment.get("id_compositions");
> 
>  
> 
> And the widget:
> 
>  
> 
> <fd:field id="density" required="true">
> 
>                 <fd:label>Density</fd:label>
> 
>                 <fd:datatype base="decimal"/>
> 
>                 <fd:on-value-changed>
> 
>                                <javascript>
> 
>                                                var value = this.value;
> 
>                                </javascript>
> 
>                 </fd:on-value-changed>
> 
>   </fd:field>
> 
>  
> 
> I need to pass "composition_id" to the widget's on-value-changed.
> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/how-to-pass-params-from-flowscript-to-the-widget-tp18816044p18829596.html
Sent from the Cocoon - Users mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to