Tan, Pow Hwee wrote:
Hi,
I am intersted to use the recalculate / calculate feature in XForms in
Chiba. Is there a way to call external user defined (Java) function
within the XPath expression in Chiba?
Regards,
ph tan
yes, there is a way. chiba provides two connectors for that purpose:
org.chiba.xml.xforms.connector.ModelItemCalculator and
org.chiba.xml.xforms.connector.ModelItemValidator. they are triggered
via an URI, like the other connectors. to make use of them in a xpath
expression, write "chiba:calculate('<uri>')" or
"chiba:validate('<uri>')" respectively. the calculator is designed to
return a string value as the calculation result, while the validator has
to return a boolean value.
regards, uli.
--
Ulrich Nicolas Lissé
-------------------------------------------------------
This SF.net email is sponsored by: IBM Linux Tutorials.
Become an expert in LINUX or just sharpen your skills. Sign up for IBM's
Free Linux Tutorials. Learn everything from the bash shell to sys admin.
Click now! http://ads.osdn.com/?ad_id78&alloc_id371&op=click
|