cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From fha...@s-und-n.de
Subject Ajax form reloading after Action Event
Date Wed, 28 Feb 2007 09:21:08 GMT
Hello, 

I have a little problem with cocoon and ajax in one of my forms.

The form I use has one tree widget included and this tree works fine with 
ajax.
When I select a treenode a java class produces some data on the server 
which present in the form this way:

<bu:replace id="elements">
<div id="elements">
<jx:forEach var="element" items="${data.getData()}">
   <tr>
     <td>${element.getInfo()}</td>
     <td>${element.getName()}</td>
     <td>${element.getTitle()}</td> 
   </tr> 
</jx:forEach>
</div>
</bu:replace>

This works fine so far! Everything is displayed after the selection via 
ajax.

Now I want to add an action widget, wich will sort the data 
alphabetically.
So I inserted the action widget which calls a java class and does some 
work to sort the data. OK.
But the whole page is completely reloaded.

Here is the action widget:
template:
<ft:widget id="sort">
        <fi:styling type="link"/>
</ft:widget>

model:
<fd:action id="sort" command="sortName" state="active">
        <fb:label>up</fb:label>
        <fd:on-action>
                <java class="de.sundn.SortAction"/>
        </fd:on-action>
</fd:action>

So my question is:
How to refresh the part above without a complete reload of the page. What 
settings have to be made that the action widget uses ajax as the tree 
does?

Hope you can help me?


Freundliche Grüße / With kind regards
Fabian Hagen

S&N AG
Klingenderstr. 5
D 33100 Paderborn

voice     +49 5251/1581- 0
fax       +49 5251/1581-71
eMail     fhagen@s-und-n.de
web       http://www.s-und-n.de

Vorstand
Klaus Beverungen
Josef Tillmann 

Vorsitzender des Aufsichtsrates
Heinz-Dieter Wendorff

Handelsregister
Amtsgericht Paderborn HRB 3270 
Mime
View raw message