Title: Re: Datatable Problem
Thanks alot Werner!  This looks very helpful.
 
Rian


From: Werner Punz [mailto:[EMAIL PROTECTED]
Sent: Thu 1/27/2005 10:29 AM
To: MyFaces Discussion
Subject: Re: Datatable Problem

Werner Punz wrote:

> Rian Houston wrote:
>
>> Hi Werner,
>> 
>> Sorry I can't help with your problem.  But I would be very interested
>> in hearing more about how you implemented your custom data model and
>> how you use it with the dataTable component.  I need to do a similar
>> thing and am struggling with it...
>> 
>
>
> Well what I intented to do, was to make a data model which feeds
> directly hibernate objects into the table, and having a query object
> passed down the data model which handles the query part.
>
> The model itself should have some kind of caching window to speedup
> traversal and to reduce open connections.
> The datasets should be displayed outside of the connection scope to
> avoid the problem the current JDBC data model has within the faces
> definition (not caring about the update problem yet...)
>
> What I basically did was to derive a class from the JSF  Data model
> class and add the needed functionality.
> Attached you can see my code, use it as you wish (I would be happy if
> it would be integrated in one way or the other in myfaces)
>

I forgot to mention, the main idea with the cache was good, but
the data table seems to ignore the parameter which should keep the
model in ram, so the whole caching idea was pointless (but I left it in
in case it might work one day)

But if you read the code I think you can get the clue on how to
implement the needed stuff, all you have to do is to override some of
the basic data model methods and add your needed functionality in there.

Reply via email to