-
1. Re: hoe can i do...
mmichalek Jan 14, 2008 12:11 PM (in response to pdaniel)I think that your reRender needs to point at some component that was already rendered for it to work. So, you could put the table in something like a subview or panelGroup which is always rendered, and reRender that on the ajax call.
-
2. Re: hoe can i do...
pdaniel Jan 14, 2008 12:23 PM (in response to pdaniel)If i do this then the table header will stay always on the screen even if i didn't press the search button. I need a way to hide the table header until the search button is pressed.
-
3. Re: hoe can i do...
pdaniel Jan 14, 2008 12:30 PM (in response to pdaniel)portions of my files :
my command button, above i have the search fields:
<a4j:commandButton action="#{controller.executeSearch}" value="Search" reRender="documentSearchResults" />
outside the form i have :
<a4j:include viewId="/portlets/myportlet/jsf/include/search_table.jspx" />
the search_table file :
<jsp:root
xmlns:jsp="http://java.sun.com/JSP/Page"
xmlns="http://www.w3.org/1999/xhtml" version="2.0">
<f:subview id="searchtable"
xmlns:p="http://java.sun.com/jsf/portlet/components"
xmlns:f="http://java.sun.com/jsf/core"
xmlns:ui="http://java.sun.com/jsf/facelets"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:a4j="http://richfaces.org/a4j"
xmlns:rich="http://richfaces.org/rich">
<h:panelGroup id="documentSearchResults">
<rich:dataTable var="docsearch" id="doclist" value="#{not empty bean.listBean}" cellpadding="2" cellspacing="2" width="100%"> -
4. Re: hoe can i do...
mmichalek Jan 14, 2008 12:44 PM (in response to pdaniel)I'm not sure if this is your exact code, but according to what was posted here, your dataTable needs attention:
Your value attribute should be value="#{bean.listBean}" and you need to add a rendered attribute to the dataTable (rendered="#{not empty bean.listBean}")
So that would give you:<rich:dataTable var="docsearch" id="doclist" value="#{bean.listBean}" rendered="#{not empty bean.listBean}" cellpadding="2" cellspacing="2" width="100%">
-
5. Re: hoe can i do...
pdaniel Jan 14, 2008 12:55 PM (in response to pdaniel)Thx alot, i've added not empty the value instead of added it to the rerendered attribute. But i still have a problem. Wen i press first time the search button my table header appears without the style sheet. When i press second time on the button the css is applied. I have this problem only in IE. Do you have any clue?
-
6. Re: hoe can i do...
mmichalek Jan 14, 2008 1:22 PM (in response to pdaniel)I don't have ideas for that one. Some things I would check: Do the default RichFaces styles apply to the table? Does it help if you specify a styleClass on the table? What happens if you manually refresh the page after the first button click?
I would also mess around with the org.richfaces.LoadStyleStrategy and org.ajax4jsf.COMPRESS_STYLE web.xml parameters and check if that makes any difference. You can also try changing the enable-cache paramter on the ajax4jsf filter. (Other posts and documentation give more specifics on these parameters)
These are just some things I would check - I really have no idea what's causing your problem. -
-
8. Re: hoe can i do...
viggo.navarsete Feb 4, 2008 4:58 PM (in response to pdaniel)any updates? Were you able to make it work pdaniel?