2008/4/23 Johan Compagner <[EMAIL PROTECTED]>:
> i see that you use a cell. so it is a table view
interesting. i have tried to solve same problem using DataGridView and
i have the same problem.
> very likely is it that the component (toggle) isnt there on the page anymore
> and when that happens we dont execute its eveent.
ok. the problem should be here. But this is my html (part of) rendered
by wicket, it is correct for me:
<table>
<tr wicket:id="rows">
<td wicket:id="cells">
<a class="imgadd" wicket:id="cell" onclick="var
wcall=wicketAjaxGet('?wicket:interface=:0:rows:1:cells:1:cell::IBehaviorListener:0:',null,null,
function() {return Wicket.$('cell7') != null;}.bind(this));return
!wcall;">
</a>
</td>
</tr>
and this is the code of toggle that i use to render cell..
class Toggle extends AjaxFallbackLink {
[cut]
@Override
public void onClick(AjaxRequestTarget target) {
if (!hasProperty) dao.add(property);
if (hasProperty) dao.remove(property);
}
@Override
protected void onComponentTag(ComponentTag tag) {
if (!hasProperty) tag.put("class", "imgageForAddProperty");
if (hasProperty) tag.put("class", "imageForRemoveProperty");
}
}
all suggestion is apreciated. thanks in advance for your interests :)
Luca
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]