cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Patrick Refondini <>
Subject Re: Calling a business service from a form
Date Sun, 12 Mar 2006 22:01:30 GMT
Hi Duncan,

If onChange can be used instead of onBlur in your senario you might be 
able to use something as follow in you CForm model (fd):

<fd:field id="name">
   <fd:datatype base="string"/>

I have used this with Cocoon 2.1.8 with AJAX block enabled, and of 
course AJAX enabled in the form template too:



Duncan McLean wrote:
> Hi
> We have a rather complicated scenario where we would like to effectively 
> call a business service which does some detailed calculations involving 
> a value from a text field on a form and then updating the same form with 
> the value.
> Effectively, the users would like the service calculation to trigger 
> after an onBlur event on the affected text field.
> We already call a business service in flow (using and XSP page which 
> composes the required SOAP request). We then call this pipeline within 
> flow which causes the business service to be called and we can then get 
> at the returned DOM to extract the values. This can be done up front in 
> flow which makes this scenario easy, but the onBlur scenario is proving 
> trickier.
> What would be nice would be to (in the fd:javascript block for the text 
> box) using a similar method to the above - call a pipeline that creates 
> another XSP page that will create the appropriate SOAP request and call 
> the business service, interrogate the results and incorporate the 
> results into the same form! Tricky?
> Sorry that this sounds a bit convoluted, but does anyone have a better 
> suggestion on how to achieve this?
> So, in summary - onBlur called against a text field, results in creation 
> of SOAP request to a business service which does some business logic 
> calcs, returns some XML which is interrogated for a value and area on 
> the same form re-populated with result of calculation.
> Phew
> Thanks in advance
> Duncan
> ---------------------------------------------------------------------
> To unsubscribe, e-mail:
> For additional commands, e-mail:

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message