You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@myfaces.apache.org by Ray Clark <rc...@yahoo.com> on 2004/12/30 14:51:20 UTC

custom dataTable and commandButton

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="#{allAuthUser.sortAppIdAscButton}" 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="#{allAuthUser.sortAppIdAscButton}" 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.

German Umlaut Problem

Posted by Werner Punz <we...@gmx.at>.
I have a problem with special chars,
I have a page with a simple form, and an entry
field and whenever I put in special chars which are out of the ascii
scope I get garbage back (the data bean is filled with garbage)

The form basically looks like this:

   
        <h:form id="testin g" >
            <h:inputText id="inputText" size="20" 
value="#{testingbean.entry}"  />
           
            <h:commandLink id="link" action="submit">
                  <h:outputText value="Submit"/>
            </h:commandLink>           
        </h:form>

And the resulting html is generated with charset iso-8859-1 and
an xform-urlencoded tag
but due to some strange kind of reason the passing of characters
does not work properly and the backend data bean gets not url encoded
chars in whatever format.

Does anybody know where the problem is?



Re: Datascroller question again

Posted by cheeser <my...@cheeseronline.org>.
I'm using appfuse with jsf+hibernate+spring  http://appfuse.dev.java.net

Werner Punz wrote:
> Thank you, I will look into this, that might be the best option.
> Btw. does anybody know if there already is a project
> which tries to marry JSF and Hibernate sort of?
> 
> This combination looks to me like a really good one, with
> Hibernate objects being the data beans, a small framework doing the 
> access control on top of hibernate as a backing bean
> and JSF controls, directly bound to the hibernate object as the frontend.
> 
> (I am halfway there for an intranet project I am currently doing for my 
> current employer)
> 
> 
> In combination with Spring this might be the best you can get currently.
> 
> I don't like the plain JDBC route like Sun suggests particularily,
> especially due to the fact that they keep the connection open in their 
> standard implementation, which is impossible on anything else than a 
> site with a few users.
> 
> 
> Werner
> 
> 
> Travis Reeder wrote:
> 
>> DataTable also can take a javax.faces.model.DataModel, so if you 
>> create a DataModel, then you can control when and what to load on an 
>> as needed basis.
>>
>> Travis
> 
> 
> 

-- 
cheeser		You can find my blog at http://cheeser.blog-city.com

Re: Datascroller question again

Posted by Werner Punz <we...@gmx.at>.
Thank you, I will look into this, that might be the best option.
Btw. does anybody know if there already is a project
which tries to marry JSF and Hibernate sort of?

This combination looks to me like a really good one, with
Hibernate objects being the data beans, a small framework doing the 
access control on top of hibernate as a backing bean
and JSF controls, directly bound to the hibernate object as the frontend.

(I am halfway there for an intranet project I am currently doing for my 
current employer)


In combination with Spring this might be the best you can get currently.

I don't like the plain JDBC route like Sun suggests particularily,
especially due to the fact that they keep the connection open in their 
standard implementation, which is impossible on anything else than a 
site with a few users.


Werner


Travis Reeder wrote:

> DataTable also can take a javax.faces.model.DataModel, so if you 
> create a DataModel, then you can control when and what to load on an 
> as needed basis.
>
> Travis



Re: Datascroller question again

Posted by Travis Reeder <tr...@ecommstats.com>.
DataTable also can take a javax.faces.model.DataModel, so if you create 
a DataModel, then you can control when and what to load on an as needed 
basis.

Travis

Werner Punz wrote:

> Well, I posted the question a few days ago,
> but back then the new list on Apache sort of was
> empty, never got an answer. I try to post it again, now that the list 
> has picked up momentum.
>
> I have following problem.
> I want to have a Hibernate backed backend bean which I want
> to connect to a datascroller/datatable combination.
>
> The problem I see with the current API is, that it seems to be
> either resultset, with a permanent open db connection and
> plain jdbc, or load the entire resultset into the ram
> and "shove" it into the datatable.
>
> Now both combinations are not exactly what I want, I want
> to have the connections not totally open all the time (the framework 
> will take care of it anyway once not used anymore)
> and I want only the visible scope of database objects loaded.
>
> My idea which I have been thinking about would be some kind of proxy 
> patterned list which is given to the datatable.
> The list basically only loads one single page at a time and then 
> closes the connection but is giving the full size and keeping the page 
> size for the paging and the page pos.
> (Even with the problem that this thing can be altered between
> page requests during scroll operations by another user)
>
> But my question is, am I correct with the assumption that writing a 
> proxy list is the cleanest way to reach my goals, or is there another 
> solution which might be cleaner and easier to implement (like an 
> already implemented solution which already does this or an existing 
> hibernate hook of the myfaces components in CVS?)
>
> Werner
>

-- 
Travis Reeder
Ecommstats Web Analytics
www.ecommstats.com


Re: Datascroller question again

Posted by Werner Punz <we...@gmx.at>.
carsten@wildehor.de wrote:

>
> Hi. I am using Hibernate and MyFaces too. As data connections are a 
> rare resource I try to use them as short as possible. So in the case 
> of a data table I have a FactoryMethod like
> List getItems(String sortColum, boolean ascending);
> and
> List getItems(String sortColum, boolean ascending, Long pos, Long 
> fetchsize);
> where I open the conection, retrieve the objects, close the connection 
> and return the result. The tricky part is the caching. I am using 
> different approaches as it realy depends on the data shown. For an 
> user list shown as information for other customers it could be not 
> important to see new users before a half hour, where you can use a 
> asynchrounous cache were the update depends of time or is triggered by 
> jms or similar. The bad thing about databases are the limited 
> resources of connections. Once run out of connections your application 
> will stale as most of the internet users will try to reload the page 
> which leads to even more load on the database. On the opposite side, 
> (a)synchronized caches can be a performance killer for the application 
> servers. So choose your poison *g*
> I try to use no cache at all at the beginning of a project, but be 
> prepared to activate different ones for different views/kind of 
> objects. I would realy like to use a database cluster or even better a 
> data grid, but this is way out of my budget:(
> The conclusion is: there is no 'one' solution to your problem. I would 
> use the simplest and tune the application in a general way so you can 
> react on the specific application behaviour. I am using aspectj to 
> alter the caches so maybe i could you be from some help;)
>

Actually caching is a none issue, due to various reasons. Hibernate has 
excellent caching itself, and the data operations
are basically performed on plain tables, so access should be fast anyway 
(not too many users).
The connection problem indeed is there, but having used
hibernate already a few times, you have to jugde for yourself and keep 
the connection time as low as possible, as you said.
The hibernate caching still works well in that case.

The main problem more that I was looking sort of for the best option to 
marry hibernate with the datascroller (existing if possible) with the 
least work possible. I got several hints and will check them out.




Re: Datascroller question again

Posted by ca...@wildehor.de.
Hi. I am using Hibernate and MyFaces too. As data connections are a rare 
resource I try to use them as short as possible. So in the case of a data 
table I have a FactoryMethod like 
List getItems(String sortColum, boolean ascending);
and
List getItems(String sortColum, boolean ascending, Long pos, Long 
fetchsize);
where I open the conection, retrieve the objects, close the connection and 
return the result. The tricky part is the caching. I am using different 
approaches as it realy depends on the data shown. For an user list shown 
as information for other customers it could be not important to see new 
users before a half hour, where you can use a asynchrounous cache were the 
update depends of time or is triggered by jms or similar. The bad thing 
about databases are the limited resources of connections. Once run out of 
connections your application will stale as most of the internet users will 
try to reload the page which leads to even more load on the database. On 
the opposite side, (a)synchronized caches can be a performance killer for 
the application servers. So choose your poison *g*
I try to use no cache at all at the beginning of a project, but be 
prepared to activate different ones for different views/kind of objects. I 
would realy like to use a database cluster or even better a data grid, but 
this is way out of my budget:( 
The conclusion is: there is no 'one' solution to your problem. I would use 
the simplest and tune the application in a general way so you can react on 
the specific application behaviour. I am using aspectj to alter the caches 
so maybe i could you be from some help;)


Werner Punz <we...@gmx.at> wrote on 30.12.2004 23:18:20:

> Well, I posted the question a few days ago,
> but back then the new list on Apache sort of was
> empty, never got an answer. I try to post it again, now that the list 
> has picked up momentum.
> 
> I have following problem.
> I want to have a Hibernate backed backend bean which I want
> to connect to a datascroller/datatable combination.
> 
> The problem I see with the current API is, that it seems to be
> either resultset, with a permanent open db connection and
> plain jdbc, or load the entire resultset into the ram
> and "shove" it into the datatable.
> 
> Now both combinations are not exactly what I want, I want
> to have the connections not totally open all the time (the framework 
> will take care of it anyway once not used anymore)
> and I want only the visible scope of database objects loaded.
> 
> My idea which I have been thinking about would be some kind of proxy 
> patterned list which is given to the datatable.
> The list basically only loads one single page at a time and then closes 
> the connection but is giving the full size and keeping the page size for 

> the paging and the page pos.
> (Even with the problem that this thing can be altered between
> page requests during scroll operations by another user)
> 
> But my question is, am I correct with the assumption that writing a 
> proxy list is the cleanest way to reach my goals, or is there another 
> solution which might be cleaner and easier to implement (like an already 

> implemented solution which already does this or an existing hibernate 
> hook of the myfaces components in CVS?)
> 
> Werner

Datascroller question again

Posted by Werner Punz <we...@gmx.at>.
Well, I posted the question a few days ago,
but back then the new list on Apache sort of was
empty, never got an answer. I try to post it again, now that the list 
has picked up momentum.

I have following problem.
I want to have a Hibernate backed backend bean which I want
to connect to a datascroller/datatable combination.

The problem I see with the current API is, that it seems to be
either resultset, with a permanent open db connection and
plain jdbc, or load the entire resultset into the ram
and "shove" it into the datatable.

Now both combinations are not exactly what I want, I want
to have the connections not totally open all the time (the framework 
will take care of it anyway once not used anymore)
and I want only the visible scope of database objects loaded.

My idea which I have been thinking about would be some kind of proxy 
patterned list which is given to the datatable.
The list basically only loads one single page at a time and then closes 
the connection but is giving the full size and keeping the page size for 
the paging and the page pos.
(Even with the problem that this thing can be altered between
page requests during scroll operations by another user)

But my question is, am I correct with the assumption that writing a 
proxy list is the cleanest way to reach my goals, or is there another 
solution which might be cleaner and easier to implement (like an already 
implemented solution which already does this or an existing hibernate 
hook of the myfaces components in CVS?)

Werner

Re: custom dataTable and commandButton

Posted by Ray Clark <rc...@yahoo.com>.
I was just trying different things tonight and oh my
gosh, I found a combination that works.  If I change
the UIRptTableColHdr class to extend UIComponentBase
instead of HtmlDataTable it worked.  Does this help
someone figure out the problem?  I don't know if it is
a bug in the RI or if I was just extending the wrong
class.  Any ideas?

Thanks,
Ray

--- Ray Clark <rc...@yahoo.com> wrote:

> Ok here goes.
> 
> What I have is a set of 5 custom tags to output a
> <table> with its associated tags.  I've boiled it
> down
> about as far as it can go.  The commandButton would
> go
> in the col tag.  If it is just in the col tag by
> itself, it works fine.  If it is in a col tag inside
> a
> row tag it works fine.  But if it is in a col tag
> inside a row tag inside a colHdr tag, it fails. 
> What
> happens is, when it fails, all phases are executed,
> but the method isn't called.  I haven't include the
> tag that outputs the <table> tag and another tag. 
> They don't seem to make any difference in the
> execution.  So this is about as trimmed down as I
> can
> make it I think.
> 
> I really appreciate your help.  Let me know if you
> need anything else.
> 
> Here is the jsp:
> 
> <%@ taglib uri="http://java.sun.com/jsf/html"
> prefix="h"%>
> <%@ taglib uri="http://java.sun.com/jsf/core"
> prefix="f"%>
> <%@ taglib uri="/WEB-INF/tld/customjsf.tld"
> prefix="cjsf" %>
> 
> <!DOCTYPE HTML PUBLIC "-//w3c//dtd html 4.0
> transitional//en">
> 
> <html>
> 	<f:view>
> 		<head><title>Sample page to test commandButton
> inside custom tags</title></head>
> 		<body>
> 			<h:form id="tblmaintForm">
> 				<h:panelGrid columns="1">
> 					<cjsf:col>
> 						<h:commandButton
> action="#{allAuthUser.sortAppIdAscButton}" value="1
> works"/>
> 					</cjsf:col>
> 					<cjsf:row>
> 						<cjsf:col>
> 							<h:commandButton
> action="#{allAuthUser.sortAppIdAscButton}" value="2
> works"/>
> 						</cjsf:col>
> 					</cjsf:row>
> 					<cjsf:colHdr>
> 						<cjsf:row>
> 							<cjsf:col>
> 								<h:commandButton
> action="#{allAuthUser.sortAppIdAscButton}" value="3
> fails"/>
> 							</cjsf:col>
> 						</cjsf:row>
> 					</cjsf:colHdr>
> 				</h:panelGrid>
> 			</h:form>
> 	    </body>
> 	</f:view>
> </html>
> 
> Here are the component classes:
> 
> /*
>  * Created on Dec 19, 2004
>  *
>  */
> package
> com.monsanto.ag_it.fieldops.aim.tblmaint.component;
> 
> import javax.faces.component.UIColumn;
> 
> /**
>  * @author rcclark
>  *
>  * This component implements the RptTableColTag
>  */
> public class UIRptTableCol extends UIColumn {
> 	
> 	public UIRptTableCol() {
> 		setRendererType("tblmaint.rptTableColRenderer");
> 	}
> }
> 
> /*
>  * Created on Dec 19, 2004
>  *
>  */
> package
> com.monsanto.ag_it.fieldops.aim.tblmaint.component;
> 
> import javax.faces.component.html.HtmlDataTable;
> 
> /**
>  * @author rcclark
>  *
>  * This component implements the RptTableColHdrTag
>  */
> public class UIRptTableColHdr extends HtmlDataTable
> {
> 			
> 	public UIRptTableColHdr() {
> 	
> setRendererType("tblmaint.rptTableColHdrRenderer");
> 	}
> }
> 
> /*
>  * Created on Dec 19, 2004
>  *
>  */
> package
> com.monsanto.ag_it.fieldops.aim.tblmaint.component;
> 
> import javax.faces.component.UIOutput;
> 
> /**
>  * @author rcclark
>  *
>  * This component implements the RptTableRowTag
>  */
> public class UIRptTableRow extends UIOutput {
> 	
> 	public UIRptTableRow() {
> 		setRendererType("tblmaint.rptTableRowRenderer");
> 	}
> }
> 
> Here are the renderers:
> 
> /*
>  * Created on Dec 19, 2004
>  *
>  */
> package
> com.monsanto.ag_it.fieldops.aim.tblmaint.renderer;
> 
> import java.io.IOException;
> import java.util.Iterator;
> 
> import javax.faces.component.UIComponent;
> import javax.faces.context.FacesContext;
> import javax.faces.context.ResponseWriter;
> import javax.faces.render.Renderer;
> 
> import
>
com.monsanto.ag_it.fieldops.aim.tblmaint.component.UIRptTableCol;
> import
>
com.monsanto.ag_it.fieldops.aim.tblmaint.component.UIRptTableColHdr;
> 
> /**
>  * @author rcclark
>  *
>  * Renderer for the RptTableTag
>  */
> public class RptTableColRenderer extends Renderer {
> 	
> 	private String tagType = null;
> 
> 	public void encodeBegin(FacesContext context,
> UIComponent rptTableCol) 
> 			throws IOException {
> 
> 		// First determine if this is a th or td cell
> 		Object rptTblSection =
> rptTableCol.getParent().getParent();
> 		
> 		tagType = "td";
> 		if (rptTblSection instanceof UIRptTableColHdr) {
> 			tagType = "th";
> 		}
> 
> 		ResponseWriter writer =
> context.getResponseWriter();
> 		
> 		UIRptTableCol rptTblCol = (UIRptTableCol)
> rptTableCol;
> 
> 		writer.write("\t\t\t");
> 		writer.startElement(tagType, rptTableCol);
> 
> //System.out.println("col id=" + (String)
> rptTableCol.getAttributes().get("id"));
> //		if (!rptTblCol.getId().substring(0,
> 3).equals("_id")) {
> 			writer.writeAttribute("id",
> rptTblCol.getClientId(context), null);
> //		}
> 
> 		String colClass = (String)
> rptTableCol.getAttributes().get("colClass");
> 		if (colClass != null) {
> 
=== message truncated ===


__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

Re: custom dataTable and commandButton

Posted by Ray Clark <rc...@yahoo.com>.
Ok here goes.

What I have is a set of 5 custom tags to output a
<table> with its associated tags.  I've boiled it down
about as far as it can go.  The commandButton would go
in the col tag.  If it is just in the col tag by
itself, it works fine.  If it is in a col tag inside a
row tag it works fine.  But if it is in a col tag
inside a row tag inside a colHdr tag, it fails.  What
happens is, when it fails, all phases are executed,
but the method isn't called.  I haven't include the
tag that outputs the <table> tag and another tag. 
They don't seem to make any difference in the
execution.  So this is about as trimmed down as I can
make it I think.

I really appreciate your help.  Let me know if you
need anything else.

Here is the jsp:

<%@ taglib uri="http://java.sun.com/jsf/html"
prefix="h"%>
<%@ taglib uri="http://java.sun.com/jsf/core"
prefix="f"%>
<%@ taglib uri="/WEB-INF/tld/customjsf.tld"
prefix="cjsf" %>

<!DOCTYPE HTML PUBLIC "-//w3c//dtd html 4.0
transitional//en">

<html>
	<f:view>
		<head><title>Sample page to test commandButton
inside custom tags</title></head>
		<body>
			<h:form id="tblmaintForm">
				<h:panelGrid columns="1">
					<cjsf:col>
						<h:commandButton
action="#{allAuthUser.sortAppIdAscButton}" value="1
works"/>
					</cjsf:col>
					<cjsf:row>
						<cjsf:col>
							<h:commandButton
action="#{allAuthUser.sortAppIdAscButton}" value="2
works"/>
						</cjsf:col>
					</cjsf:row>
					<cjsf:colHdr>
						<cjsf:row>
							<cjsf:col>
								<h:commandButton
action="#{allAuthUser.sortAppIdAscButton}" value="3
fails"/>
							</cjsf:col>
						</cjsf:row>
					</cjsf:colHdr>
				</h:panelGrid>
			</h:form>
	    </body>
	</f:view>
</html>

Here are the component classes:

/*
 * Created on Dec 19, 2004
 *
 */
package
com.monsanto.ag_it.fieldops.aim.tblmaint.component;

import javax.faces.component.UIColumn;

/**
 * @author rcclark
 *
 * This component implements the RptTableColTag
 */
public class UIRptTableCol extends UIColumn {
	
	public UIRptTableCol() {
		setRendererType("tblmaint.rptTableColRenderer");
	}
}

/*
 * Created on Dec 19, 2004
 *
 */
package
com.monsanto.ag_it.fieldops.aim.tblmaint.component;

import javax.faces.component.html.HtmlDataTable;

/**
 * @author rcclark
 *
 * This component implements the RptTableColHdrTag
 */
public class UIRptTableColHdr extends HtmlDataTable {
			
	public UIRptTableColHdr() {
		setRendererType("tblmaint.rptTableColHdrRenderer");
	}
}

/*
 * Created on Dec 19, 2004
 *
 */
package
com.monsanto.ag_it.fieldops.aim.tblmaint.component;

import javax.faces.component.UIOutput;

/**
 * @author rcclark
 *
 * This component implements the RptTableRowTag
 */
public class UIRptTableRow extends UIOutput {
	
	public UIRptTableRow() {
		setRendererType("tblmaint.rptTableRowRenderer");
	}
}

Here are the renderers:

/*
 * Created on Dec 19, 2004
 *
 */
package
com.monsanto.ag_it.fieldops.aim.tblmaint.renderer;

import java.io.IOException;
import java.util.Iterator;

import javax.faces.component.UIComponent;
import javax.faces.context.FacesContext;
import javax.faces.context.ResponseWriter;
import javax.faces.render.Renderer;

import
com.monsanto.ag_it.fieldops.aim.tblmaint.component.UIRptTableCol;
import
com.monsanto.ag_it.fieldops.aim.tblmaint.component.UIRptTableColHdr;

/**
 * @author rcclark
 *
 * Renderer for the RptTableTag
 */
public class RptTableColRenderer extends Renderer {
	
	private String tagType = null;

	public void encodeBegin(FacesContext context,
UIComponent rptTableCol) 
			throws IOException {

		// First determine if this is a th or td cell
		Object rptTblSection =
rptTableCol.getParent().getParent();
		
		tagType = "td";
		if (rptTblSection instanceof UIRptTableColHdr) {
			tagType = "th";
		}

		ResponseWriter writer = context.getResponseWriter();
		
		UIRptTableCol rptTblCol = (UIRptTableCol)
rptTableCol;

		writer.write("\t\t\t");
		writer.startElement(tagType, rptTableCol);

//System.out.println("col id=" + (String)
rptTableCol.getAttributes().get("id"));
//		if (!rptTblCol.getId().substring(0,
3).equals("_id")) {
			writer.writeAttribute("id",
rptTblCol.getClientId(context), null);
//		}

		String colClass = (String)
rptTableCol.getAttributes().get("colClass");
		if (colClass != null) {
			writer.writeAttribute("class", colClass, null);
		}

		String colSpan = (String)
rptTableCol.getAttributes().get("colSpan");
		if (colSpan != null) {
			writer.writeAttribute("colSpan", colSpan, null);
		}

		String rowSpan = (String)
rptTableCol.getAttributes().get("rowSpan");
		if (rowSpan != null) {
			writer.writeAttribute("rowSpan", rowSpan, null);
		}
	}
	public void encodeChildren(FacesContext context,
UIComponent rptTableCol)
			throws IOException {

		ResponseWriter writer = context.getResponseWriter();

		Iterator iter =
rptTableCol.getChildren().iterator();
		while (iter.hasNext()) {
			UIComponent child = (UIComponent)iter.next();
			child.encodeBegin(context);
			if (child.getRendersChildren()) {
				child.encodeChildren(context);
			}
			child.encodeEnd(context);
		}
	}
	public void encodeEnd(FacesContext context,
UIComponent rptTableCol) 
			throws IOException {

		ResponseWriter writer = context.getResponseWriter();
		
		writer.endElement(tagType);
		writer.write("\r\n");
	}
	public boolean getRendersChildren() {
		return true;
	}
	public boolean isTransient() {
		return true;
	}
}

/*
 * Created on Dec 19, 2004
 *
 */
package
com.monsanto.ag_it.fieldops.aim.tblmaint.renderer;

import java.io.IOException;
import java.util.Iterator;

import javax.faces.component.UIComponent;
import javax.faces.context.FacesContext;
import javax.faces.context.ResponseWriter;
import javax.faces.render.Renderer;

import
com.monsanto.ag_it.fieldops.aim.tblmaint.component.UIRptTableColHdr;

/**
 * @author rcclark
 *
 * Renderer for the RptTableTag
 */
public class RptTableColHdrRenderer extends Renderer {

	public void encodeBegin(FacesContext context,
UIComponent rptTableColHdr) 
			throws IOException {

		ResponseWriter writer = context.getResponseWriter();
		
		UIRptTableColHdr rptTblColHdr = (UIRptTableColHdr)
rptTableColHdr;

		writer.write("\t");
		writer.startElement("thead", rptTableColHdr);
		
//		if (!rptTblColHdr.getId().substring(0,
3).equals("_id")) {
			writer.writeAttribute("id",
rptTblColHdr.getClientId(context), null);
//		}

		writer.write("\r\n");
	}
	public void encodeChildren(FacesContext context,
UIComponent rptTableColHdr)
			throws IOException {

		ResponseWriter writer = context.getResponseWriter();
		int dataRowIdx = -1;

		Iterator iter =
rptTableColHdr.getChildren().iterator();
		while (iter.hasNext()) {
			dataRowIdx++;
			((UIRptTableColHdr)
rptTableColHdr).setRowIndex(dataRowIdx);

			UIComponent child = (UIComponent)iter.next();
			child.encodeBegin(context);
			if (child.getRendersChildren()) {
				child.encodeChildren(context);
			}
			child.encodeEnd(context);
		}
	}
	public void encodeEnd(FacesContext context,
UIComponent rptTableColHdr) 
			throws IOException {

		ResponseWriter writer = context.getResponseWriter();

		writer.write("\t");
		writer.endElement("thead");
		writer.write("\r\n");
	}
	public boolean isTransient() {
		return true;
	}
	public boolean getRendersChildren() {
		return true;
	}
}

/*
 * Created on Dec 19, 2004
 *
 */
package
com.monsanto.ag_it.fieldops.aim.tblmaint.renderer;

import java.io.IOException;
import java.util.Iterator;

import javax.faces.component.UIComponent;
import javax.faces.context.FacesContext;
import javax.faces.context.ResponseWriter;
import javax.faces.render.Renderer;

import
com.monsanto.ag_it.fieldops.aim.tblmaint.component.UIRptTableRow;

/**
 * @author rcclark
 *
 * Renderer for the RptTableTag
 */
public class RptTableRowRenderer extends Renderer {

	public void encodeBegin(FacesContext context,
UIComponent rptTableRow) 
			throws IOException {

		ResponseWriter writer = context.getResponseWriter();
		
		UIRptTableRow rptTblRow = (UIRptTableRow)
rptTableRow;
		
		writer.write("\t\t");
		writer.startElement("tr", rptTableRow);

//		if (!rptTblRow.getId().substring(0,
3).equals("_id")) {
			writer.writeAttribute("id",
rptTblRow.getClientId(context), null);
//		}

		String rowClass = (String)
rptTableRow.getAttributes().get("rowClass");
		if (rowClass != null) {
			writer.writeAttribute("class", rowClass, null);
		}

		writer.write("\r\n");
	}
	public void encodeChildren(FacesContext context,
UIComponent rptTableRow)
			throws IOException {

		ResponseWriter writer = context.getResponseWriter();

		Iterator iter =
rptTableRow.getChildren().iterator();
		while (iter.hasNext()) {
			UIComponent child = (UIComponent)iter.next();
			child.encodeBegin(context);
			if (child.getRendersChildren()) {
				child.encodeChildren(context);
			}
			child.encodeEnd(context);
		}
	}
	public void encodeEnd(FacesContext context,
UIComponent rptTableRow) 
			throws IOException {

		ResponseWriter writer = context.getResponseWriter();

		writer.write("\t\t");
		writer.endElement("tr");
		writer.write("\r\n");
	}
	public boolean getRendersChildren() {
		return true;
	}
	public boolean isTransient() {
		return true;
	}
}

Here are the tag classes:

/*
 * Created on Dec 19, 2004
 *
 */
package
com.monsanto.ag_it.fieldops.aim.tblmaint.taglib;

import javax.faces.application.Application;
import javax.faces.component.UIComponent;
import javax.faces.context.FacesContext;
import javax.faces.el.ValueBinding;

import
net.sourceforge.myfaces.taglib.html.HtmlColumnTag;

/**
 * @author rcclark
 *
 * This implements the cols for the generic dataTable
tag to support MSIS
 */
public class RptTableColTag extends HtmlColumnTag {
	
	private String colClass = null;
	private String colSpan = null;
//	private String id = null;
	private String rowSpan = null;
	
	public String getComponentType() {
		return "tblmaint.rptTableCol";
	}
	public String getRendererType() {
		return "tblmaint.rptTableColRenderer";
	}

	public void setProperties(UIComponent component) {
		// always call the superclass method
		super.setProperties(component);
		
		setString(component, "colClass", colClass);
		setString(component, "colSpan", colSpan);
//		setString(component, "myId", id);
		setString(component, "rowSpan", rowSpan);
	}
	public void setString(UIComponent component, String
attributeName,
			String attributeValue) {

		if (attributeValue == null) {
			return;
		} else {
			if (isValueReference(attributeValue)) {
				setValueBinding(component, attributeName,
attributeValue);
			} else {
				component.getAttributes().put(attributeName,
attributeValue);
			}
		}
	}
	public void setValueBinding(UIComponent component,
String attributeName,
			String attributeValue) {

		FacesContext context =
FacesContext.getCurrentInstance();
		Application app = context.getApplication();
		ValueBinding vb =
app.createValueBinding(attributeValue);
		component.setValueBinding(attributeName, vb);
	}
	/**
	 * @return Returns the colClass.
	 */
	public String getColClass() {
		return colClass;
	}
	/**
	 * @param colClass The colClass to set.
	 */
	public void setColClass(String colClass) {
		this.colClass = colClass;
	}
	/**
	 * @return Returns the colSpan.
	 */
	public String getColSpan() {
		return colSpan;
	}
	/**
	 * @param colSpan The colSpan to set.
	 */
	public void setColSpan(String colSpan) {
		this.colSpan = colSpan;
	}
	/**
	 * @return Returns the rowSpan.
	 */
	public String getRowSpan() {
		return rowSpan;
	}
	/**
	 * @param rowSpan The rowSpan to set.
	 */
	public void setRowSpan(String rowSpan) {
		this.rowSpan = rowSpan;
	}
}

/*
 * Created on Dec 19, 2004
 *
 */
package
com.monsanto.ag_it.fieldops.aim.tblmaint.taglib;

import javax.faces.component.UIComponent;

import
net.sourceforge.myfaces.taglib.html.HtmlDataTableTag;

/**
 * @author rcclark
 *
 * This implements the column headers for the generic
dataTable tag to support MSIS
 */
public class RptTableColHdrTag extends
HtmlDataTableTag {
	
	public String getComponentType() {
		return "tblmaint.rptTableColHdr";
	}
	public String getRendererType() {
		return "tblmaint.rptTableColHdrRenderer";
	}

	public void setProperties(UIComponent component) {
		// always call the superclass method
		super.setProperties(component);
	}
}

/*
 * Created on Dec 19, 2004
 *
 */
package
com.monsanto.ag_it.fieldops.aim.tblmaint.taglib;

import javax.faces.application.Application;
import javax.faces.component.UIComponent;
import javax.faces.context.FacesContext;
import javax.faces.el.ValueBinding;
import javax.faces.webapp.UIComponentTag;

/**
 * @author rcclark
 *
 * This implements the rows for the generic dataTable
tag to support MSIS
 */
public class RptTableRowTag extends UIComponentTag {

	private String rowClass = null;

	public String getComponentType() {
		return "tblmaint.rptTableRow";
	}
	public String getRendererType() {
		return "tblmaint.rptTableRowRenderer";
	}

	public void setProperties(UIComponent component) {
		// always call the superclass method
		super.setProperties(component);

		setString(component, "rowClass", rowClass);
	}
	public void setString(UIComponent component, String
attributeName,
			String attributeValue) {

		if (attributeValue == null) {
			return;
		} else {
			if (isValueReference(attributeValue)) {
				setValueBinding(component, attributeName,
attributeValue);
			} else {
				component.getAttributes().put(attributeName,
attributeValue);
			}
		}
	}
	public void setValueBinding(UIComponent component,
String attributeName,
			String attributeValue) {

		FacesContext context =
FacesContext.getCurrentInstance();
		Application app = context.getApplication();
		ValueBinding vb =
app.createValueBinding(attributeValue);
		component.setValueBinding(attributeName, vb);
	}
	/**
	 * @return Returns the rowClass.
	 */
	public String getRowClass() {
		return rowClass;
	}
	/**
	 * @param rowClass The rowClass to set.
	 */
	public void setRowClass(String rowClass) {
		this.rowClass = rowClass;
	}
}

Here is the tld:

<?xml version="1.0" encoding="ISO-8859-1" ?>
<!DOCTYPE taglib
  PUBLIC "-//Sun Microsystems, Inc.//DTD JSP Tag
Library 1.2//EN"
  "http://java.sun.com/dtd/web-jsptaglibrary_1_2.dtd">
<taglib>
	<tlib-version>1.0</tlib-version>
	<jsp-version>1.2</jsp-version>
	<short-name>cust</short-name>
	<uri>//WEB-INF/tld/customjsf.tld</uri>
	<description>JSF Custom Components</description>

	<tag>
		<name>rptTable</name>
	
<tag-class>com.monsanto.ag_it.fieldops.aim.tblmaint.taglib.RptTableTag</tag-class>
		<attribute>
			<name>id</name>
			<description>JavaScript id</description>
		</attribute>
		<attribute>
			<name>tableClass</name>
		</attribute>
	</tag>
	<tag>
		<name>colHdr</name>
	
<tag-class>com.monsanto.ag_it.fieldops.aim.tblmaint.taglib.RptTableColHdrTag</tag-class>
		<attribute>
			<name>id</name>
		</attribute>
	</tag>
	<tag>
		<name>data</name>
	
<tag-class>com.monsanto.ag_it.fieldops.aim.tblmaint.taglib.RptTableDataTag</tag-class>
		<attribute>
			<name>id</name>
		</attribute>
		<attribute>
			<name>value</name>
			<required>true</required>
		</attribute>
		<attribute>
			<name>var</name>
		</attribute>
	</tag>
	<tag>
		<name>row</name>
	
<tag-class>com.monsanto.ag_it.fieldops.aim.tblmaint.taglib.RptTableRowTag</tag-class>
		<attribute>
			<name>id</name>
		</attribute>
		<attribute>
			<name>rendered</name>
		</attribute>
		<attribute>
			<name>rowClass</name>
		</attribute>
	</tag>
	<tag>
		<name>col</name>
	
<tag-class>com.monsanto.ag_it.fieldops.aim.tblmaint.taglib.RptTableColTag</tag-class>
		<attribute>
			<name>colClass</name>
		</attribute>
		<attribute>
			<name>colSpan</name>
		</attribute>
		<attribute>
			<name>id</name>
		</attribute>
		<attribute>
			<name>rendered</name>
		</attribute>
		<attribute>
			<name>rowSpan</name>
		</attribute>
	</tag>
</taglib>

Here is the faces-config file:

<?xml version="1.0"?>

<!DOCTYPE faces-config PUBLIC
  "-//Sun Microsystems, Inc.//DTD JavaServer Faces
Config 1.0//EN"
  "http://java.sun.com/dtd/web-facesconfig_1_0.dtd">

<faces-config>
	<!-- global navigation rules -->
	<navigation-rule>
		<navigation-case>
			<from-outcome>allAuthUser</from-outcome>
		
<to-view-id>/secure/dataentry/allAuthUser.jsp</to-view-id>
		</navigation-case>
	</navigation-rule>
	<!-- page specific navigation rules -->
	<navigation-rule>
		<from-view-id>/login.jsp</from-view-id>
		<navigation-case>
			<from-outcome>loginSuccess</from-outcome>
		
<to-view-id>/secure/selection/selection.jsp</to-view-id>
			<redirect/>
		</navigation-case>
	</navigation-rule>
	
	<!-- converters -->
	<converter>
		<converter-id>tblmaint.AppId</converter-id>
	
<converter-class>com.monsanto.ag_it.fieldops.aim.tblmaint.converter.AppIdConverter</converter-class>
	</converter>
	<converter>
		<converter-id>tblmaint.TableRequired</converter-id>
	
<converter-class>com.monsanto.ag_it.fieldops.aim.tblmaint.converter.TableRequiredConverter</converter-class>
	</converter>
	<converter>
	
<converter-id>tblmaint.TableRequiredInteger</converter-id>
	
<converter-class>com.monsanto.ag_it.fieldops.aim.tblmaint.converter.TableRequiredIntegerConverter</converter-class>
	</converter>

	<!-- validators -->
	<validator>
	
<validator-id>tblmaint.TablePriviligeLevelInd</validator-id>
	
<validator-class>com.monsanto.ag_it.fieldops.aim.tblmaint.validator.TablePriviligeLevelIndValidator</validator-class>
	</validator>
 
 	<!-- managed beans -->
	<managed-bean>
		<managed-bean-name>user</managed-bean-name>
	
<managed-bean-class>com.monsanto.ag_it.fieldops.aim.tblmaint.to.UserTO</managed-bean-class>
		<managed-bean-scope>session</managed-bean-scope>
	</managed-bean>
	<managed-bean>
		<managed-bean-name>allAuthUser</managed-bean-name>
	
<managed-bean-class>com.monsanto.ag_it.fieldops.aim.tblmaint.model.AllAuthUserModel</managed-bean-class>
		<managed-bean-scope>session</managed-bean-scope>
	</managed-bean>

	<!-- Components -->
	<component>
		<component-type>tblmaint.rptTable</component-type>
	
<component-class>com.monsanto.ag_it.fieldops.aim.tblmaint.component.UIRptTable</component-class>
	</component>
	<component>
	
<component-type>tblmaint.rptTableColHdr</component-type>
	
<component-class>com.monsanto.ag_it.fieldops.aim.tblmaint.component.UIRptTableColHdr</component-class>
	</component>
	<component>
	
<component-type>tblmaint.rptTableData</component-type>
	
<component-class>com.monsanto.ag_it.fieldops.aim.tblmaint.component.UIRptTableData</component-class>
	</component>
	<component>
	
<component-type>tblmaint.rptTableRow</component-type>
	
<component-class>com.monsanto.ag_it.fieldops.aim.tblmaint.component.UIRptTableRow</component-class>
	</component>
	<component>
	
<component-type>tblmaint.rptTableCol</component-type>
	
<component-class>com.monsanto.ag_it.fieldops.aim.tblmaint.component.UIRptTableCol</component-class>
	</component>
	
	<!-- Render Kits -->
	<render-kit>
		<renderer>
		
<component-family>javax.faces.Output</component-family>
		
<renderer-type>tblmaint.rptTableRenderer</renderer-type>
		
<renderer-class>com.monsanto.ag_it.fieldops.aim.tblmaint.renderer.RptTableRenderer</renderer-class>
		</renderer>
	</render-kit>
	<render-kit>
		<renderer>
		
<component-family>javax.faces.Data</component-family>
		
<renderer-type>tblmaint.rptTableColHdrRenderer</renderer-type>
		
<renderer-class>com.monsanto.ag_it.fieldops.aim.tblmaint.renderer.RptTableColHdrRenderer</renderer-class>
		</renderer>
	</render-kit>
	<render-kit>
		<renderer>
		
<component-family>javax.faces.Data</component-family>
		
<renderer-type>tblmaint.rptTableDataRenderer</renderer-type>
		
<renderer-class>com.monsanto.ag_it.fieldops.aim.tblmaint.renderer.RptTableDataRenderer</renderer-class>
		</renderer>
	</render-kit>
	<render-kit>
		<renderer>
		
<component-family>javax.faces.Output</component-family>
		
<renderer-type>tblmaint.rptTableRowRenderer</renderer-type>
		
<renderer-class>com.monsanto.ag_it.fieldops.aim.tblmaint.renderer.RptTableRowRenderer</renderer-class>
		</renderer>
	</render-kit>
	<render-kit>
		<renderer>
		
<component-family>javax.faces.Column</component-family>
		
<renderer-type>tblmaint.rptTableColRenderer</renderer-type>
		
<renderer-class>com.monsanto.ag_it.fieldops.aim.tblmaint.renderer.RptTableColRenderer</renderer-class>
		</renderer>
	</render-kit>
	
	<!-- Lifecycle -->
	<lifecycle>
	
<phase-listener>com.monsanto.ag_it.fieldops.aim.tblmaint.util.PhaseListenerUtil</phase-listener>
	</lifecycle>
</faces-config>

Here is the phase listener:

package com.monsanto.ag_it.fieldops.aim.tblmaint.util;

import javax.faces.event.PhaseEvent;
import javax.faces.event.PhaseId;
import javax.faces.event.PhaseListener;

/**
 * This clas contains general purpose methods used by
this application.
 */
public class PhaseListenerUtil implements
PhaseListener {

	public PhaseId getPhaseId() {
		PhaseId phaseId = PhaseId.ANY_PHASE;
		return phaseId;
	}
	public void afterPhase(PhaseEvent e) {
		System.out.println("afterPhase " + e.getPhaseId());
	}
	public void beforePhase(PhaseEvent e) {
		System.out.println("beforePhase " + e.getPhaseId());
	}
}

Here is the backing bean:

package
com.monsanto.ag_it.fieldops.aim.tblmaint.model;

import org.apache.log4j.Logger;

public class AllAuthUserModel {	
	private Logger logger =
Logger.getLogger("com.javawebapps");


//--------------------------------------------------------------------------------
	// The following are all of the commandButton methods
for this model

//--------------------------------------------------------------------------------
	/**
	 * Refresh the page with the sorted list
	 * 
	 * @return navigation action
	 */
	public String sortAppIdAscButton() {
System.out.println("in sortAppIdAscButton");
		return "allAuthUser";
	}
	/**
	 * Refresh the page with the sorted list
	 * 
	 * @return navigation action
	 */
	public String sortAppIdDscButton() {
System.out.println("in sortAppIdDscButton");
		return "allAuthUser";
	}
}

Thanks,
Ray

--- Ray Clark <rc...@yahoo.com> wrote:

> Thanks for the response.  I was going to try and
> trim
> down the page and play with moving the commandButton
> around to see if it worked some places and not
> others.
>  It may be Monday, but I'll send it out as soon as I
> can.
> 
> Thanks a bunch,
> Ray
> 
> --- Heath Borders <he...@gmail.com> wrote:
> 
> > Get the page into a state where you're using the
> > fewest number of tags
> > (so that we have to dig through the least amount
> of
> > code).  Then,
> > you're going to need to post the all code
> associated
> > with the custom
> > tags (your Tag, Component, and Renderer) for each
> > tag.
> > 
> > 
> > On Thu, 30 Dec 2004 18:01:08 -0800 (PST), Ray
> Clark
> > <rc...@yahoo.com> wrote:
> > > Does anyone have any ideas on what would cause
> my
> > > commandButton, that works fine outside my custom
> > tag,
> > > not to invoke its method when it is inside my
> > custom
> > > tag?
> > > 
> > > I get no message, no logging error, the page
> looks
> > > like it works fine, all the phases are
> processed,
> > and
> > > yet it doesn't call my method.
> > > 
> > > I'll post whatever code you want.  I just didn't
> > know
> > > what to post.
> > > 
> > > Here is the part of my jsp that has the command
> > button
> > > inside my custom tags.
> > > 
> > > <cjsf:rptTable tableClass="tableClass"
> > > id="rptTableId">
> > >         <cjsf:colHdr>
> > >                 <cjsf:row>
> > >                         <cjsf:col
> > colClass="header">
> > >                                 <h:commandButton
> > > action="#{allAuthUser.sortAppIdAscButton}"
> > value="A"/>
> > >                                 <h:outputText
> > value="User Id"/>
> > >                         </cjsf:col>
> > > 
> > > Thanks,
> > > Ray
> > > 
> > > --- Ray Clark <rc...@yahoo.com> wrote:
> > > 
> > > > Well, I now have my app up and running under
> > > > myFaces.  I had to do some tweeking to get the
> > app
> > > > to run under myFaces.  But it is running now.
> > > >
> > > > I still have the same problem.  I can't get
> the
> > > > commandButton to invoke the method in the
> action
> > > > attribute during the invoke application phase.
> > > >
> > > > I have a set of 5 custom tags that render a
> > table
> > > > and its associated tags.  I needed to do a
> > custom
> > > > component because the JSF DataTable doesn't
> > support
> > > > rowspan, colspan, and I think multi line
> column
> > > > headers (ie multi tr tags in the thead tag).
> > > >
> > > > The only message that I see is in the log at
> > > > startup.  It says.
> > > >
> > > > session.ManagerBase - Cannot serialize session
> > > > attribute
> > > >
> > >
> >
>
net.sourceforge.myfaces.application.jsp.JspStateManagerImpl.SERIALIZED_VIEW-/secure/dataentry/allAuthUser.jsp
> > > > for session 1B0C75CC467BB3B9D2EB116EDD3263BB
> > > > java.io.NotSerializableException:
> > > >
> > javax.faces.application.StateManager$SerilizedView
> > > >      at
> > > >
> java.io.ObjectOutputStream.writeObject0(Unknown
> > > > Source)
> > > >      ...
> > > >
> > > > Other than that everything seems to be running
> > fine
> > > > but it just doesn't call my method.  Anyone
> got
> > any
> > > > ideas?
> > > >
> > > > Thanks,
> > > > Ray
> > > >
> > > > Ray Clark <rc...@yahoo.com> wrote:
> > > > Thanks so much for responding.
> > > >
> > > > The page renders correctly.  The problem is
> that
> > the
> > > > method for the button is only invoked if I
> have
> > the
> > > > button under the rptTable tag.  The method
> > doesn't
> > > > get invoked if I move it anyplace else.
> > > >
> > > > Thanks,
> > > > Ray
> > > >
> > > > Heath Borders <he...@gmail.com> wrote:
> > > > Do your colHdr, row, or col tags have
> > > > getRendersChildren() set to
> > > > true? if so, it is your responsibility to make
> > sure
> > > > that
> > > > h:commandButton is rendered (usually, by
> calling
> > the
> > > > encodeBegin,
> > > > encodeChildren, encodeEnd methods).
> > > >
> > > >
> > > > On Thu, 30 Dec 2004 05:51:20 -0800 (PST), Ray
> > Clark
> > > > wrote:
> > > > >
> > > > >
> > > > > 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
> 
=== message truncated ===


__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

Re: custom dataTable and commandButton

Posted by Ray Clark <rc...@yahoo.com>.
Thanks for the response.  I was going to try and trim
down the page and play with moving the commandButton
around to see if it worked some places and not others.
 It may be Monday, but I'll send it out as soon as I
can.

Thanks a bunch,
Ray

--- Heath Borders <he...@gmail.com> wrote:

> Get the page into a state where you're using the
> fewest number of tags
> (so that we have to dig through the least amount of
> code).  Then,
> you're going to need to post the all code associated
> with the custom
> tags (your Tag, Component, and Renderer) for each
> tag.
> 
> 
> On Thu, 30 Dec 2004 18:01:08 -0800 (PST), Ray Clark
> <rc...@yahoo.com> wrote:
> > Does anyone have any ideas on what would cause my
> > commandButton, that works fine outside my custom
> tag,
> > not to invoke its method when it is inside my
> custom
> > tag?
> > 
> > I get no message, no logging error, the page looks
> > like it works fine, all the phases are processed,
> and
> > yet it doesn't call my method.
> > 
> > I'll post whatever code you want.  I just didn't
> know
> > what to post.
> > 
> > Here is the part of my jsp that has the command
> button
> > inside my custom tags.
> > 
> > <cjsf:rptTable tableClass="tableClass"
> > id="rptTableId">
> >         <cjsf:colHdr>
> >                 <cjsf:row>
> >                         <cjsf:col
> colClass="header">
> >                                 <h:commandButton
> > action="#{allAuthUser.sortAppIdAscButton}"
> value="A"/>
> >                                 <h:outputText
> value="User Id"/>
> >                         </cjsf:col>
> > 
> > Thanks,
> > Ray
> > 
> > --- Ray Clark <rc...@yahoo.com> wrote:
> > 
> > > Well, I now have my app up and running under
> > > myFaces.  I had to do some tweeking to get the
> app
> > > to run under myFaces.  But it is running now.
> > >
> > > I still have the same problem.  I can't get the
> > > commandButton to invoke the method in the action
> > > attribute during the invoke application phase.
> > >
> > > I have a set of 5 custom tags that render a
> table
> > > and its associated tags.  I needed to do a
> custom
> > > component because the JSF DataTable doesn't
> support
> > > rowspan, colspan, and I think multi line column
> > > headers (ie multi tr tags in the thead tag).
> > >
> > > The only message that I see is in the log at
> > > startup.  It says.
> > >
> > > session.ManagerBase - Cannot serialize session
> > > attribute
> > >
> >
>
net.sourceforge.myfaces.application.jsp.JspStateManagerImpl.SERIALIZED_VIEW-/secure/dataentry/allAuthUser.jsp
> > > for session 1B0C75CC467BB3B9D2EB116EDD3263BB
> > > java.io.NotSerializableException:
> > >
> javax.faces.application.StateManager$SerilizedView
> > >      at
> > > java.io.ObjectOutputStream.writeObject0(Unknown
> > > Source)
> > >      ...
> > >
> > > Other than that everything seems to be running
> fine
> > > but it just doesn't call my method.  Anyone got
> any
> > > ideas?
> > >
> > > Thanks,
> > > Ray
> > >
> > > Ray Clark <rc...@yahoo.com> wrote:
> > > Thanks so much for responding.
> > >
> > > The page renders correctly.  The problem is that
> the
> > > method for the button is only invoked if I have
> the
> > > button under the rptTable tag.  The method
> doesn't
> > > get invoked if I move it anyplace else.
> > >
> > > Thanks,
> > > Ray
> > >
> > > Heath Borders <he...@gmail.com> wrote:
> > > Do your colHdr, row, or col tags have
> > > getRendersChildren() set to
> > > true? if so, it is your responsibility to make
> sure
> > > that
> > > h:commandButton is rendered (usually, by calling
> the
> > > encodeBegin,
> > > encodeChildren, encodeEnd methods).
> > >
> > >
> > > On Thu, 30 Dec 2004 05:51:20 -0800 (PST), Ray
> Clark
> > > wrote:
> > > >
> > > >
> > > > 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.
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > > This doesn't work.
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> 
=== message truncated ===


__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

Re: custom dataTable and commandButton

Posted by Ray Clark <rc...@yahoo.com>.
Thanks for the response.  I was going to try and trim
down the page and play with moving the commandButton
around to see if it worked some places and not others.
 It may be Monday, but I'll send it out as soon as I
can.

Thanks a bunch,
Ray

--- Heath Borders <he...@gmail.com> wrote:

> Get the page into a state where you're using the
> fewest number of tags
> (so that we have to dig through the least amount of
> code).  Then,
> you're going to need to post the all code associated
> with the custom
> tags (your Tag, Component, and Renderer) for each
> tag.
> 
> 
> On Thu, 30 Dec 2004 18:01:08 -0800 (PST), Ray Clark
> <rc...@yahoo.com> wrote:
> > Does anyone have any ideas on what would cause my
> > commandButton, that works fine outside my custom
> tag,
> > not to invoke its method when it is inside my
> custom
> > tag?
> > 
> > I get no message, no logging error, the page looks
> > like it works fine, all the phases are processed,
> and
> > yet it doesn't call my method.
> > 
> > I'll post whatever code you want.  I just didn't
> know
> > what to post.
> > 
> > Here is the part of my jsp that has the command
> button
> > inside my custom tags.
> > 
> > <cjsf:rptTable tableClass="tableClass"
> > id="rptTableId">
> >         <cjsf:colHdr>
> >                 <cjsf:row>
> >                         <cjsf:col
> colClass="header">
> >                                 <h:commandButton
> > action="#{allAuthUser.sortAppIdAscButton}"
> value="A"/>
> >                                 <h:outputText
> value="User Id"/>
> >                         </cjsf:col>
> > 
> > Thanks,
> > Ray
> > 
> > --- Ray Clark <rc...@yahoo.com> wrote:
> > 
> > > Well, I now have my app up and running under
> > > myFaces.  I had to do some tweeking to get the
> app
> > > to run under myFaces.  But it is running now.
> > >
> > > I still have the same problem.  I can't get the
> > > commandButton to invoke the method in the action
> > > attribute during the invoke application phase.
> > >
> > > I have a set of 5 custom tags that render a
> table
> > > and its associated tags.  I needed to do a
> custom
> > > component because the JSF DataTable doesn't
> support
> > > rowspan, colspan, and I think multi line column
> > > headers (ie multi tr tags in the thead tag).
> > >
> > > The only message that I see is in the log at
> > > startup.  It says.
> > >
> > > session.ManagerBase - Cannot serialize session
> > > attribute
> > >
> >
>
net.sourceforge.myfaces.application.jsp.JspStateManagerImpl.SERIALIZED_VIEW-/secure/dataentry/allAuthUser.jsp
> > > for session 1B0C75CC467BB3B9D2EB116EDD3263BB
> > > java.io.NotSerializableException:
> > >
> javax.faces.application.StateManager$SerilizedView
> > >      at
> > > java.io.ObjectOutputStream.writeObject0(Unknown
> > > Source)
> > >      ...
> > >
> > > Other than that everything seems to be running
> fine
> > > but it just doesn't call my method.  Anyone got
> any
> > > ideas?
> > >
> > > Thanks,
> > > Ray
> > >
> > > Ray Clark <rc...@yahoo.com> wrote:
> > > Thanks so much for responding.
> > >
> > > The page renders correctly.  The problem is that
> the
> > > method for the button is only invoked if I have
> the
> > > button under the rptTable tag.  The method
> doesn't
> > > get invoked if I move it anyplace else.
> > >
> > > Thanks,
> > > Ray
> > >
> > > Heath Borders <he...@gmail.com> wrote:
> > > Do your colHdr, row, or col tags have
> > > getRendersChildren() set to
> > > true? if so, it is your responsibility to make
> sure
> > > that
> > > h:commandButton is rendered (usually, by calling
> the
> > > encodeBegin,
> > > encodeChildren, encodeEnd methods).
> > >
> > >
> > > On Thu, 30 Dec 2004 05:51:20 -0800 (PST), Ray
> Clark
> > > wrote:
> > > >
> > > >
> > > > 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.
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > > This doesn't work.
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> 
=== message truncated ===



		
__________________________________ 
Do you Yahoo!? 
Jazz up your holiday email with celebrity designs. Learn more. 
http://celebrity.mail.yahoo.com

Re: custom dataTable and commandButton

Posted by Heath Borders <he...@gmail.com>.
Get the page into a state where you're using the fewest number of tags
(so that we have to dig through the least amount of code).  Then,
you're going to need to post the all code associated with the custom
tags (your Tag, Component, and Renderer) for each tag.


On Thu, 30 Dec 2004 18:01:08 -0800 (PST), Ray Clark
<rc...@yahoo.com> wrote:
> Does anyone have any ideas on what would cause my
> commandButton, that works fine outside my custom tag,
> not to invoke its method when it is inside my custom
> tag?
> 
> I get no message, no logging error, the page looks
> like it works fine, all the phases are processed, and
> yet it doesn't call my method.
> 
> I'll post whatever code you want.  I just didn't know
> what to post.
> 
> Here is the part of my jsp that has the command button
> inside my custom tags.
> 
> <cjsf:rptTable tableClass="tableClass"
> id="rptTableId">
>         <cjsf:colHdr>
>                 <cjsf:row>
>                         <cjsf:col colClass="header">
>                                 <h:commandButton
> action="#{allAuthUser.sortAppIdAscButton}" value="A"/>
>                                 <h:outputText value="User Id"/>
>                         </cjsf:col>
> 
> Thanks,
> Ray
> 
> --- Ray Clark <rc...@yahoo.com> wrote:
> 
> > Well, I now have my app up and running under
> > myFaces.  I had to do some tweeking to get the app
> > to run under myFaces.  But it is running now.
> >
> > I still have the same problem.  I can't get the
> > commandButton to invoke the method in the action
> > attribute during the invoke application phase.
> >
> > I have a set of 5 custom tags that render a table
> > and its associated tags.  I needed to do a custom
> > component because the JSF DataTable doesn't support
> > rowspan, colspan, and I think multi line column
> > headers (ie multi tr tags in the thead tag).
> >
> > The only message that I see is in the log at
> > startup.  It says.
> >
> > session.ManagerBase - Cannot serialize session
> > attribute
> >
> net.sourceforge.myfaces.application.jsp.JspStateManagerImpl.SERIALIZED_VIEW-/secure/dataentry/allAuthUser.jsp
> > for session 1B0C75CC467BB3B9D2EB116EDD3263BB
> > java.io.NotSerializableException:
> > javax.faces.application.StateManager$SerilizedView
> >      at
> > java.io.ObjectOutputStream.writeObject0(Unknown
> > Source)
> >      ...
> >
> > Other than that everything seems to be running fine
> > but it just doesn't call my method.  Anyone got any
> > ideas?
> >
> > Thanks,
> > Ray
> >
> > Ray Clark <rc...@yahoo.com> wrote:
> > Thanks so much for responding.
> >
> > The page renders correctly.  The problem is that the
> > method for the button is only invoked if I have the
> > button under the rptTable tag.  The method doesn't
> > get invoked if I move it anyplace else.
> >
> > Thanks,
> > Ray
> >
> > Heath Borders <he...@gmail.com> wrote:
> > Do your colHdr, row, or col tags have
> > getRendersChildren() set to
> > true? if so, it is your responsibility to make sure
> > that
> > h:commandButton is rendered (usually, by calling the
> > encodeBegin,
> > encodeChildren, encodeEnd methods).
> >
> >
> > On Thu, 30 Dec 2004 05:51:20 -0800 (PST), Ray Clark
> > wrote:
> > >
> > >
> > > 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.
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > > This doesn't work.
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > > 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.
> > >
> > >
> >
> >
> > --
> > -Heath Borders-Wing
> > hborders@mail.win.org
> >
> > __________________________________________________
> > Do You Yahoo!?
> > Tired of spam? Yahoo! Mail has the best spam
> > protection around
> > http://mail.yahoo.com
> >
> >
> > ---------------------------------
> > Do you Yahoo!?
> >  Take Yahoo! Mail with you! Get it on your mobile
> phone.
> 
>                 
> __________________________________
> Do you Yahoo!?
> The all-new My Yahoo! - What will yours do?
> http://my.yahoo.com
> 


-- 
-Heath Borders-Wing
hborders@mail.win.org

Re: custom dataTable and commandButton

Posted by Ray Clark <rc...@yahoo.com>.
Does anyone have any ideas on what would cause my
commandButton, that works fine outside my custom tag,
not to invoke its method when it is inside my custom
tag?

I get no message, no logging error, the page looks
like it works fine, all the phases are processed, and
yet it doesn't call my method.

I'll post whatever code you want.  I just didn't know
what to post.

Here is the part of my jsp that has the command button
inside my custom tags.

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

Thanks,
Ray

--- Ray Clark <rc...@yahoo.com> wrote:

> Well, I now have my app up and running under
> myFaces.  I had to do some tweeking to get the app
> to run under myFaces.  But it is running now.
>  
> I still have the same problem.  I can't get the
> commandButton to invoke the method in the action
> attribute during the invoke application phase.
>  
> I have a set of 5 custom tags that render a table
> and its associated tags.  I needed to do a custom
> component because the JSF DataTable doesn't support
> rowspan, colspan, and I think multi line column
> headers (ie multi tr tags in the thead tag).
>  
> The only message that I see is in the log at
> startup.  It says.
>  
> session.ManagerBase - Cannot serialize session
> attribute
>
net.sourceforge.myfaces.application.jsp.JspStateManagerImpl.SERIALIZED_VIEW-/secure/dataentry/allAuthUser.jsp
> for session 1B0C75CC467BB3B9D2EB116EDD3263BB
> java.io.NotSerializableException:
> javax.faces.application.StateManager$SerilizedView
>      at
> java.io.ObjectOutputStream.writeObject0(Unknown
> Source)
>      ...
>  
> Other than that everything seems to be running fine
> but it just doesn't call my method.  Anyone got any
> ideas?
>  
> Thanks,
> Ray
> 
> Ray Clark <rc...@yahoo.com> wrote:
> Thanks so much for responding.
>  
> The page renders correctly.  The problem is that the
> method for the button is only invoked if I have the
> button under the rptTable tag.  The method doesn't
> get invoked if I move it anyplace else.
>  
> Thanks,
> Ray
> 
> Heath Borders <he...@gmail.com> wrote:
> Do your colHdr, row, or col tags have
> getRendersChildren() set to
> true? if so, it is your responsibility to make sure
> that
> h:commandButton is rendered (usually, by calling the
> encodeBegin,
> encodeChildren, encodeEnd methods).
> 
> 
> On Thu, 30 Dec 2004 05:51:20 -0800 (PST), Ray Clark
> wrote:
> > 
> > 
> > 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.
> > 
> > 
> > 
> > 
> > 
> > 
> > 
> > 
> > 
> > This doesn't work.
> > 
> > 
> > 
> > 
> > 
> > 
> > 
> > 
> > 
> > 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. 
> > 
> > 
> 
> 
> -- 
> -Heath Borders-Wing
> hborders@mail.win.org
> 
> __________________________________________________
> Do You Yahoo!?
> Tired of spam? Yahoo! Mail has the best spam
> protection around 
> http://mail.yahoo.com 
> 
> 		
> ---------------------------------
> Do you Yahoo!?
>  Take Yahoo! Mail with you! Get it on your mobile
phone.



		
__________________________________ 
Do you Yahoo!? 
The all-new My Yahoo! - What will yours do?
http://my.yahoo.com 

Re: custom dataTable and commandButton

Posted by Ray Clark <rc...@yahoo.com>.
Well, I now have my app up and running under myFaces.  I had to do some tweeking to get the app to run under myFaces.  But it is running now.
 
I still have the same problem.  I can't get the commandButton to invoke the method in the action attribute during the invoke application phase.
 
I have a set of 5 custom tags that render a table and its associated tags.  I needed to do a custom component because the JSF DataTable doesn't support rowspan, colspan, and I think multi line column headers (ie multi tr tags in the thead tag).
 
The only message that I see is in the log at startup.  It says.
 
session.ManagerBase - Cannot serialize session attribute net.sourceforge.myfaces.application.jsp.JspStateManagerImpl.SERIALIZED_VIEW-/secure/dataentry/allAuthUser.jsp for session 1B0C75CC467BB3B9D2EB116EDD3263BB
java.io.NotSerializableException: javax.faces.application.StateManager$SerilizedView
     at java.io.ObjectOutputStream.writeObject0(Unknown Source)
     ...
 
Other than that everything seems to be running fine but it just doesn't call my method.  Anyone got any ideas?
 
Thanks,
Ray

Ray Clark <rc...@yahoo.com> wrote:
Thanks so much for responding.
 
The page renders correctly.  The problem is that the method for the button is only invoked if I have the button under the rptTable tag.  The method doesn't get invoked if I move it anyplace else.
 
Thanks,
Ray

Heath Borders <he...@gmail.com> wrote:
Do your colHdr, row, or col tags have getRendersChildren() set to
true? if so, it is your responsibility to make sure that
h:commandButton is rendered (usually, by calling the encodeBegin,
encodeChildren, encodeEnd methods).


On Thu, 30 Dec 2004 05:51:20 -0800 (PST), Ray Clark
wrote:
> 
> 
> 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.
> 
> 
> 
> 
> 
> 
> 
> 
> 
> This doesn't work.
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 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. 
> 
> 


-- 
-Heath Borders-Wing
hborders@mail.win.org

__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

		
---------------------------------
Do you Yahoo!?
 Take Yahoo! Mail with you! Get it on your mobile phone.

Re: custom dataTable and commandButton

Posted by Ray Clark <rc...@yahoo.com>.
Thanks so much for responding.
 
The page renders correctly.  The problem is that the method for the button is only invoked if I have the button under the rptTable tag.  The method doesn't get invoked if I move it anyplace else.
 
Thanks,
Ray

Heath Borders <he...@gmail.com> wrote:
Do your colHdr, row, or col tags have getRendersChildren() set to
true? if so, it is your responsibility to make sure that
h:commandButton is rendered (usually, by calling the encodeBegin,
encodeChildren, encodeEnd methods).


On Thu, 30 Dec 2004 05:51:20 -0800 (PST), Ray Clark
wrote:
> 
> 
> 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.
> 
> 
> 
> 
> 
> 
> 
> 
> 
> This doesn't work.
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 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. 
> 
> 


-- 
-Heath Borders-Wing
hborders@mail.win.org

__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

Re: custom dataTable and commandButton

Posted by Heath Borders <he...@gmail.com>.
Do your colHdr, row, or col tags have getRendersChildren() set to
true?  if so, it is your responsibility to make sure that
h:commandButton is rendered (usually, by calling the encodeBegin,
encodeChildren, encodeEnd methods).


On Thu, 30 Dec 2004 05:51:20 -0800 (PST), Ray Clark
<rc...@yahoo.com> wrote:
> 
> 
> 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="#{allAuthUser.sortAppIdAscButton}" 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="#{allAuthUser.sortAppIdAscButton}" 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. 
> 
> 


-- 
-Heath Borders-Wing
hborders@mail.win.org