Hi all,
I have been interested in Ajax.InPlaceCollectionEditor provided by
scriptaculous and have been trying to implement an ajax based dropdown other
then the default implementation where we hardcode the values like 
"collection: ["one","two","three","four","five"]" (provide a hardcode string
array).

For this I have implemented a manager (UserManager) and properly injected it
to dwr. It has a method called getCounties() which returns a string array.I
have tried to make a string using the string array and assign it to the
desired place. (collection: longstr;) in Ajax.InPlaceCollectionEditor.

rightnow I am getting an empty dropdown in the Ajax.InPlaceCollectionEditor
but when I check in dwr
(in dwr/test/UserManager) I am getting the desired output for it.I have
checked inside my callbackfunc and found that data is available through
ajax.

I have added the code here. Any help or tip is highly appreciated.

thnx
Sanath
<code>
var longstr = "";
                UserManager.getCounties(callbackfunc);
                function callbackfunc(data){
                        longstr = "['"+data[3]+"','"+data[4]+"']"
                        alert("in the function "+longstr);
                        return longstr ;
                }

new Ajax.InPlaceCollectionEditor(editable1[j].id,'users.html?id=' + userId,
                        {
                                
                                        //collection: 
["one","two","three","four","five"]
                                        collection: longstr;
                        }
                        );
</code>
-- 
View this message in context: 
http://www.nabble.com/DWR-scriptaculous-ajax.InPlaceCollectionEditor-problem-tp15735979s2369p15735979.html
Sent from the AppFuse - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to