I have a form:

    <component id="addBillableItemEventForm" type="Form">
        <binding name="delegate" value="bean:delegate"/>
        <binding name="clientValidationEnabled" value="true"/>
        <binding name="success" value="listener:addBillableItemEvent"/>
        <binding name="async" value="ognl:true"/>
<binding name="updateComponents" value="{'weekScheduler_billable_row'}"/>
    </component>

    <component id="billableItem" type="PropertySelection">
        <binding name="displayName" value="literal:Billable Item"/>
        <binding name="model" value="ognl:billableItemSelectionModel"/>
        <binding name="value" value="ognl:billableItem"/>
        <binding name="validators" value="validators:required"/>
    </component>

And I have an eventlistener on billableItem:

@EventListener(elements = "billableItem", events = "onchange", submitForm="addBillableItemEventForm", async=true, validateForm = false)

But when you change your billableItem selection, the form still validates (server side though). It also updates weekScheduler_billable_row, which I would prefer it not do, since the only reason I'm submitting this form is to get the selection value of billableItem. So it seems like the validation may be a bug, and the updateComponents should be overrideable somehow.

My workaround is to make another form which is populated with the value from billableItem when it changes, and to submit that using the event listener.

Thanks,

J

4.1.2-snap from today

--
Julian Wood <[EMAIL PROTECTED]>

Software Engineer
Teaching & Learning Centre
University of Calgary

http://tlc.ucalgary.ca


Reply via email to