Shank Kolin Shank Kolin - 1 year ago 91
Ajax Question

Stripes and Jquery and Ajax for dynamic dropdowns

I am using Stripes for the web tier. I want to include two dropdowns where the list of items in the second dropdown is dependent on the value chosen in the first.

Pretty straightforward Ajax you say. I can't find a single example of doing this. The examples on Stripes site are all trivial, like updating a label. I read, that the JSON returned by Stripes is funky & not straightforward for jQuery to handle. How can I do that? An example would be appreciated!

Answer Source

You could use Google Gson ( For example:


public Resolution autocomplete() {

    List<String> opts = new ArrayList<String>();


    String json = new Gson().toJson(opts);
    return new StreamingResolution("application/json",json);
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download