I got the following from the log:
Sync service [marketingofficer/getAssociatedStateList] finished in [953]
milliseconds with response [{stateList={Johor: MY-JHR, Kedah: MY-KDH,
Kelantan: MY-KTN, Wilayah Persekutuan Kuala Lumpur: MY-KUL, Wilayah
Persekutuan Labuan: MY-LBN, Melaka: MY-MLK, Negeri Sembilan: MY-NSN,
Pahang: MY-PHG, Wilayah Persekutuan Putrajaya: MY-PJY, Perlis: MY-PLS,
Pulau Pinang: MY-PNG, Perak: MY-PRK, Sabah: MY-SBH, Selangor: MY-SGR,
Sarawak: MY-SWK, Terengganu: MY-TRG}, responseMessage=success}]
2011-12-20 14:30:32,843 (http-0.0.0.0-8443-1) [
ModelScreen.java:401:ERROR] Error rendering screen
[component://common/widget/CommonScreens.xml#GlobalDecorator]:
java.lang.ClassCastException: Not a map. Rolling back transaction.
>From there i can see that the service call was successful, however it
failed when rendering the screen.
I think it is because the service result is not a Map and it's a List
instead? if that's the case is there anyway i can encapsulate the result
into a Map in the xml and use it as i intended to to generate the option
list?
Thanx a lot
FooShyn
On Tue, Dec 20, 2011 at 7:05 AM, Jacques Le Roux <
[email protected]> wrote:
> What do you have in log? (just a relevant snippet)
>
> Jacques
>
> From: "Foo Shyn Chung" <[email protected]>
>
> Hi guys,
>>
>> Just to check, anyone has an idea on how to populate a dropdown list with
>> the result from getAssociatedStateList in the Form Widget xml?
>>
>> The scenario is that i just need the dropdown box to populate the states
>> of
>> a particular country, thus i do not need the full ajax implementation as
>> mentioned in the example form.
>>
>> Currently i have the Form in single mode and actions tag that calls the
>> service,
>>
>> <form name="MembersForm" target="addMember" type="single"
>> default-title-style="**tableheadtext" default-tooltip-style="**tabletext"
>> default-widget-style="**inputBox" >
>> <actions>
>> <service service-name="**getAssociatedStateList" result-map="result">
>> <field-map name="countryGeoId" value="MYS"/>
>> </service>
>> </actions>
>>
>> <field name="states">
>> <drop-down allow-empty="true">
>> <list-options key-name="countryGeoId" list-name="result.stateList"
>> description="${countryGeoId}" />
>> </drop-down>
>> </field>
>> ....
>> </form>
>>
>> I got an error that states "Not a map"
>>
>> Anyone has any clue?
>>
>> Thanx
>> FooShyn
>>
>>