You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ofbiz.apache.org by 叶双明 <ye...@gmail.com> on 2012/02/23 13:16:20 UTC

problem for on-event-update-area ‘s parameter of form

Hi all,

I want to implement ajax search by form widget, use on-event-update-area

form definition:

<form name="FindExamplesAjax" type="single"
target="FindExamplesByAjax" default-entity-name="Example">
        <field name="noConditionFind"><hidden value="Y"/><!-- if this
isn't there then with all fields empty no query will be done
--></field>
        <field name="exampleId"
title="${uiLabelMap.ExampleExampleId}"><text-find/></field>
        <field name="exampleName"
title="${uiLabelMap.CommonName}"><text-find/></field>

        <field name="searchButton" title="${uiLabelMap.CommonFind}"
widget-style="smallSubmit"><submit button-type="button"/></field>

        <on-event-update-area area-target="ListExampleFormOnly"
event-type="submit" area-id="FindExampleAjax">
        	<parameter param-name="exampleName" value="exampleValue"/>
        </on-event-update-area>
    </form>

and the result html for button is:
<input type="button"
onclick="ajaxSubmitFormUpdateAreas('FindExamplesAjax',
'FindExampleAjax,/practice/control/ListExampleFormOnly,')" value="查找"
name="searchButton" class="smallSubmit">

'FindExampleAjax,/practice/control/ListExampleFormOnly,' is second
parameter for ajaxSubmitFormUpdateAreas function,
FindExampleAjax is areaId,
/practice/control/ListExampleFormOnly is target
and I find it loss the target parameters,

how can i pass the search option to the target?

Thanks.
-- 
叶双明