Scott Gray wrote:
Hi Bilgin,
Sounds interesting I'll be sure to take a look within the next few days.
As coincidences would have it I've also been working on a POC for ajax
autocompletion which takes a different approach. I'm not done yet but
should hopefully have something this weekend.
The form definition would look like this:
<field name="country>
<autocompleter result-field="countries" result-value-name="geoId"
result-description-name="geoName">
<field-event>
<set field="geoName" value="${parameters.country}%"/>
<entity-condition entity-name="Geo" list="countries">
<condition-list>
<condition-expr field-name="geoName" operator="like"
from-field="geoName" ignore-case="true"/>
<condition-expr field-name="geoTypeId" value="COUNTRY"/>
</condition-list>
<order-by field-name="geoName"/>
</entity-condition>
</field-event>
</autcompleter>
</field>
The field-event is then stored in the session and accessed via a
generic request which runs the actions and returns a json result. The
field-event tag allows the same elements as the actions and
row-actions element so you can call scripts or services or whatever so
long as at the end of it the field specified by result-field contains
a list of maps.
Regards
Scott
HotWax Media
http://www.hotwaxmedia.com
On 18/11/2009, at 3:17 AM, Bilgin Ibryam wrote:
Hi Scott,
I like very much your idea about storing part of the widget logic in
session and accessing through ajax. I can't wait to see some code.
I think your idea would open a new area to extend the widgets to. Making
the more widgets dynamic at run time, would be a great benefit for the
project.
BTW, the proposal I did, uses only exiting ajax capabilities of the
widgets and server side.
Regards,
Bilgin