Calling function and passing parameter

Hi

I have a function, that take input parameter. Then assign this value to a variable in the page. But some reason it's not working. say function is not defined. Here is the code.
Please could some one advice me.

<form   xmlns="http://www.w3.org/1999/xhtml"
                xmlns:b="http://www.backbase.com/2006/btl"
                xmlns:e="http://www.backbase.com/2006/xel"
                xmlns:c="http://www.backbase.com/2006/command"
                xmlns:f="http://www.backbase.com/2008/formValidation"
                xmlns:xs="http://www.w3.org/2001/XMLSchema"
                xmlns:bf="http://www.backbase.com/2007/forms"
                bf:destination="id('blankDiv')"
                mode="replaceChildren"
                action="${url}"
                method="GET"
                id="addProductForm">


        <e:function name="setHasFormValueChange">
                <e:argument name="valueChange" required="true" />
                <e:body type="application/xml">
                        <e:set variable="hasFormValueChange" select="'Yes'" />
                </e:body>
        </e:function>
       
        <div id="productFormButtons" class="buttonController">
        <div>  
                <b:button validationTarget="true" disabled="true">
                Add
                        <e:handler event="click" type="application/xml">
                                <e:call method="submit" with="../../../../form"/>
                        </e:handler>
                </b:button>
                       
                       
        <e:variable name="hasFormValueChange" select="'false'" scope="global"/>
                       
                <b:button>
                NextTest
                        <e:handler event="click" type="application/xml">
                                <c:alert select="$hasFormValueChange" />
                        </e:handler>
                </b:button>
                       
                       
                <b:button>
                Assign Value
                        <e:handler event="click" type="application/xml">
                                <e:call  function="setHasFormValueChange('Yes')" />
                        </e:handler>
                </b:button>
               
                </div>
        </div>
       
</form>

Calling function and passing parameter

Hi Ishfady,

The way you assigned parameter in XEL is not correct. If you want to assign a parameter then you should use e:with-argument to assign a parameter.

<e:handler event="click">
<e:call function="setHasFormValueChange">
<e:with-argument name="valueChange" select="'Yes'" />
</e:call>
</e:handler>

Cheers,

Yudi