I'd need to look at Tailer to see how it operates. But here is how I'd try
it (it is quick and I don't like the markup, but we'll optimize it later:

Create a panel that looks like so (we'll call it LoggingPanel):

<wicket:panel>
<div wicket:id="logData">log contents</div>
<div wicket:id="nextLog">next log call</div>
</wicket:panel>

Add a self updating timer behavior so the panel check the Tailer for
output, if there is data, then update the logData label with it, make the
nextLog component be another LoggingPanel with a SelfUpdatingTImerBehavior,
and stop the timerbehavior on the current panel.

Drawbacks are: the divs keep getting nested, so the markup isn't the most
beautiful, so setRenderBodyOnly(true) might make it nicer.

-Clint

On Sun, Nov 20, 2011 at 9:27 PM, James <james.eliye...@gmail.com> wrote:

> Thanks Steve. I'll look into the commons-io "Tailer".
> But any idea on how to use this with wicket?
>
> On Mon, Nov 21, 2011 at 11:10 AM, Steve Swinsburg <
> steve.swinsb...@gmail.com
> > wrote:
>
> > I've done something similar to this using the Tailer class from
> commons-io.
> >
> > cheers,
> > Steve
> >
> >
> > On 21/11/2011, at 12:59 PM, James wrote:
> >
> > > Dear wicket community,
> > >
> > > In a project that I'm working on, I need to build a "live log viewer"
> or
> > > "dynamic log viewer" or "refreshable log viewer".
> > > Much like how hudson/jenkins displays the console output.
> > >
> > > The idea is to dynamically display the new data added to a log file
> along
> > > with the existing content.
> > >
> > > How to go about doing this? Please throw some light on this.
> > >
> > > I searched about this in the web, mailing lists but couldn't find what
> I
> > > was looking for, so I'm posting it here.
> > > If this is asked elsewhere, kindly re-direct me to the respective
> > resource.
> > >
> > > --
> > > Thanks & Regards,
> > > James
> > > A happy Wicket user
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> > For additional commands, e-mail: users-h...@wicket.apache.org
> >
> >
>
>
> --
> Thanks & Regards,
> James
>

Reply via email to