Hi marino,
You should consider using an IDataProvider implementation to handle the
data transfer between your external process and wicket.
The wicket page will update using the ajax timer and add the datatable
to the ajax request target to be rerendered (This looks to me what you
are currently doing).
The data will be provided by your IDataProvider implementation which can
handle the synchronization issues and cleanly separate the rendering
logic from how the data is generated.
For more information on how to do things in wicket look at the wiki here
: http://cwiki.apache.org/WICKET
The 'Reference Library' and 'New User Guide' pages are good starting points.
Regards,
Mike
Here is how I solved the problem.
I extended AjaxSelfUpdatingTimerBehavior and overrid onPostProcessTarget().
inside method I replace the table wicket ( because the DefaultDataTable
does not seem able to dynamically add column);
I created a borderwicket containing the table, added the timer
to it and, by miracle, it Works!!! :jumping:
Up to now the wicket library seems to me very good, but it's very hard
for a beginner to figure out what the methods do.
Marino
marino wrote:
Hello,
I have a simple wicket application built around the DefaulDataTable
example.
In the same program I have an Event Listener class which is called
outside
the wicket application context. This class produces data that I would like
to show
in the current wicket page, but when I call any operation like add(),
replaceWith() ..
I always receive the message:
WicketRuntimeException: There is no application attached to current thread
...
........
What can I do?
Thanks,
Marino