Hi all,

In a .ftl form I build a list of projects available. The list contains per
row a selection box to generate a query-string.

I then pass the request (with the query-string) to following javascript
function:

function getAssociatedTaskList(request) {;
    new Ajax.Request( request, {
        onSuccess: function(transport) {
            var data = transport.responseText.evalJSON(true);
            var serverError = getServerError(data);
            if (serverError != "") {
                alert("het gaat fout");
                Effect.Appear('createListError',{duration:0.0});
                $('createListError').update(serverError);
            } else {
                Effect.Fade('createListError', {duration: 0.0});
                new Ajax.Updater($('TaskOverview'), 'ListTasks' ,
{evalScripts: true});
            }
        },
        asynchronous: true,
        requestHeaders: {Accept: 'application/json'}
    });
}

the request is like:
/application/control/getAssociatedTaskList?projectsSelected=10050

The request-map in controller.xml is:
<request-map uri="getAssociatedTaskList">
        <security https="true" auth="true"/>
        <response name="success" type="view" value="getAssociatedTaskList"/>
    </request-map>

With the corresponding view-map:
<view-map name="getAssociatedTaskList" type="screen"
page="component://application/widget/applicationScreens.xml#ListTasks"/>

ListTasks in applicationScreens.xml contains:
<screen name="ListTasks">
        <section>
            <actions>
                <property-map resource="casUiLabels" map-name="uiLabelMap"
global="true"/>
                <set field="parameters.partyId"
from-field="parameters.userLogin.partyId"/>
                <script
location="component://application/webapp/application/WEB-INF/actions/projects/ListTasks.groovy"/>
            </actions>
            <widgets>
                <platform-specific>
                    <html><html-template
location="component://cas/webapp/cas/cas/listTasks.ftl"/></html>
                </platform-specific>
            </widgets>
        </section>
    </screen>

When the js function is executed I see that the groovy file gets the correct
parameters (from the query string passed).

But I don't see the ajax result appearing in the div (div="TaskOverview").

Can you help with some pointers?

Regards,

Pierre

Reply via email to