You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@myfaces.apache.org by Mike Kienenberger <mk...@gmail.com> on 2005/07/01 02:51:31 UTC

Re: dinamic order of rendering of columns in data table

On 6/30/05, Mike Kienenberger <mk...@gmail.com> wrote:
> Actually, I'm having an even worse issue.   My n x m checkbox code
> broke when I upgraded to BEFORE_SVN_REORG a couple days ago.   My
> UIColumn is no longer rendered nor are its bindings executed.  My
> previous snv checkout was at the start of May, so I'm trying to track
> down exactly what revision broke my code.  (And yes, I noted the
> change from org.apache.myfaces.custom.crosstable.UIColumns to
> org.apache.myfaces.component.UIColumns, but I can't see why that'd be
> the problem since I updated my import statement.)
> 
> However, my code is pretty complex (it programmically creates the
> UIColumn and children for the DataTable), so maybe I've triggered a
> subtle bug.
> 
> Somewhere between revision 178781 (5/27) and 190000, so far.

Ok.  Between revision 178781 and 178786, the code for handling
UIColumns rendering was moved from
src/share:org.apache.myfaces.renderkit.html.HtmlTableRendererBase
to
src/component:org.apache.myfaces.renderkit.html.ext.HtmlTableRenderer.

However, my custom DataTable subclass keeps picking up the renderer in
src/myfaces:org.apache.myfaces.renderkit.html.HtmlTableRenderer, which
is a subclass of
HtmlTableRendererBase, but not of ext.HtmlTableRenderer.

So the rendering of my UIColumns used to work, but no longer works.

For the life of me, I can't figure out how to make my custom DataTable
class pick up the renderer in ext.HtmlTableRenderer rather than the
other one.

My DataTable subclass extends
org.apache.myfaces.component.html.ext.HtmlDataTable, but I guess
that's not sufficient.

Re: dinamic order of rendering of columns in data table

Posted by Mike Kienenberger <mk...@gmail.com>.
Hey Popcorn,

Have you first evaluated t:dataTable with t:columns and t:dataScroller
to see if it will meet your needs?  This already handles paging and
sorting.  Not sure what you mean by "editable tables".

If you're determined to build your own, you won't probably find a
better example than the source code for the above components -- they
already represents the best way we know how to do these tasks :-)



On 9/26/06, Popcorn <po...@gmail.com> wrote:
>
> Hi,
>
> I need to implement a custom data table. Can you provide some pointers on how to
> go about doing this? I am totally lost. I need to implement functionalities like
> sorting, pagination, editable tables etc.
>
> Please help.
>
> Thanks.
>
>
>
>
>

Re: dinamic order of rendering of columns in data table

Posted by Popcorn <po...@gmail.com>.
Hi,

I need to implement a custom data table. Can you provide some pointers on how to
go about doing this? I am totally lost. I need to implement functionalities like
sorting, pagination, editable tables etc.

Please help.

Thanks.





Re: dinamic order of rendering of columns in data table

Posted by Mike Kienenberger <mk...@gmail.com>.
On 7/1/05, Mike Kienenberger <mk...@gmail.com> wrote:
> > For the life of me, I can't figure out how to make my custom DataTable
> > class pick up the renderer in ext.HtmlTableRenderer rather than the
> > other one.

And now that I'm subclassing my custom DataTableTag class from
org.apache.myfaces.taglib.html.ext.HtmlDataTableTag rather than
implementing it from scratch as a UIComponentTag, everything is much
cleaner and it all works as expected.

I'll make it available as an example as soon as I figure out a place
to exhibit it.

Re: dinamic order of rendering of columns in data table

Posted by Mike Kienenberger <mk...@gmail.com>.
On 6/30/05, Mike Kienenberger <mk...@gmail.com> wrote:
> However, my custom DataTable subclass keeps picking up the renderer in
> src/myfaces:org.apache.myfaces.renderkit.html.HtmlTableRenderer, which
> is a subclass of
> HtmlTableRendererBase, but not of ext.HtmlTableRenderer.
> 
> So the rendering of my UIColumns used to work, but no longer works.
> 
> For the life of me, I can't figure out how to make my custom DataTable
> class pick up the renderer in ext.HtmlTableRenderer rather than the
> other one.
> 
> My DataTable subclass extends
> org.apache.myfaces.component.html.ext.HtmlDataTable, but I guess
> that's not sufficient.

Oops.   my DataTableTag subclass implemented

  public String getRendererType()
  {
      return "javax.faces.Table";
  }

instead of 

  public String getRendererType()
  {
      return "org.apache.myfaces.Table";
  }