Hi All:

I just subscribed seconds ago.  This is exciting.  I think that you people are doing great work, and I am so excited for you because you have been accepted by Apache.  Way to go.

First off, I am fairly new to JSF.  I am researching it for my company to see if it will fit our needs and is ready for us to start using.  As a proof of concept I converted one of the pages here to JSF.  It was my first page so it took me a little while but it all worked out fine.  So now I'm trying to do some custom components to render a table because the JSF DataTable doesn't have the capabilities that we need.

I sent this question to Matthias Wessendorf at the jsf-developers yahoo group and he recommended that I send my question on to you guys/gals.  Thanks for taking the time to read my email.

I have a set of 5 custom components that implement the HTML table, tr, th, td, etc tags.  I tried using the JSF dataTable but it doesn't support rowspan and colspan, and I don't think that it supports multi line column headers.  All of this is a requirement for the pages that we have at work.  So I had to come up with my own set of custom tags.  Well, here is my problem.
I need to be able to put a commandButton in a column header so that I can implement sorting.  My problem is that the command button works under 1 custom tag but not under the one that I need it to work under.  Here is what I mean.

This works when the command button is up here.

<cjsf:rptTable tableClass="tableClass" id="rptTableId">
 <h:commandButton action="" value="A"/>
 <cjsf:colHdr>
  <cjsf:row>
   <cjsf:col colClass="header">
    <h:outputText value="User Id"/>
   </cjsf:col>

This doesn't work.

<cjsf:rptTable tableClass="tableClass" id="rptTableId">
 <cjsf:colHdr>
  <cjsf:row>
   <cjsf:col colClass="header">
    <h:commandButton action="" value="A"/>
    <h:outputText value="User Id"/>
   </cjsf:col>

This is just a portion of my JSP but you can see what I mean.  When the commandButton is under the rptTable tag the method in the backing bean gets called.  When the commandButton is under the col tag it does not.  There are no message, all of the phases execute, no logging
message, it is as if the page works just fine, but the method doesn't get called.  So I'm thinking that either I have something messed up in one of my components or renderers, or JSF has a bug in the life cycle or something.  I posted this on the Sun forum under the subject "Problem with commandButton in a custom DataTable", but so far no one has responded. What do you think the problem might be, and do you think MyFaces would have the same problem?  I've been sticking with the generic JSF for now so that I could see what that does before I try to use a 3rd part implementation.  But if MyFaces doesn't have this problem then I'm ready and eager to try it.  I really respect the opinion of you guys/gals, so if you could shed any light on this I would appreciate it.  Basically this is holding up my work even considering using JSF
because we can't duplicate the reports that we currently do with JSTL, Struts, HTML, etc, without this.

Well, that's it in a nutshell.  If you would like for me to post code I will.  I just didn't know what to post and I didn't want to make this to long.

Also, do you think that I should send this to the developers list as well?

Thank you for your help.

Thanks,
Ray


Do you Yahoo!?
Send a seasonal email greeting and help others. Do good.

Reply via email to