You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by bojidar <dc...@gmail.com> on 2013/06/24 11:55:19 UTC

Model changes are not saved when component markup is externally removed from DOM

Hi Guys, 
I'm trying to make something like editable grid using Ajax components and 
Drill-down rows table <http://datatables.net/blog/Drill-down_rows>   from
JQuery Datatables plugin. The idea is user to be able to see all basic
properties of his entities in the table and if he decides to be able to edit
them, and if he want to see/edit the secondary properties he just expands
the row.

I really like the out of the box functionality provided by Datatables.  I
found an example in  another thread
<http://apache-wicket.1842946.n4.nabble.com/Adding-Components-to-fit-markup-td4654246.html>  
how to partially integrate such table with Wicket components. The idea is
that custom JS/JQuery deals with the table tags when "drill down" action is
executed, and then it notifies Wicket about the new markup, which wicket
binds with newly created components. So far so good, but when I use
AjaxEditableLabel everything looks ok, until I decide to close the details
panel - after that model changes are not saved. I think the problem is that
the custom JS/JQuery code deletes the table row, which was created for the
drill down (details) panel, but it doesn't notify Wicket for that.
How can be fixed ?
Do you know other resources , which I can use in order to easily integrate
with Datatables ? 

I'm attaching a quickstart project for you to see. 
Here is the test case , which I described above:
1) expand row (drill dow)  - panel with AjaxEditableLabel for "note"
property appears
2) click on the label to edit it and change its value
3) collapse the row 
4) expand the row again - model is not saved
 





--
View this message in context: http://apache-wicket.1842946.n4.nabble.com/Model-changes-are-not-saved-when-component-markup-is-externally-removed-from-DOM-tp4659725.html
Sent from the Users forum mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org