things inside my dataTable aren’t displayed at all?
use a <h:column> tag and put the items to display inside of it..
id="dataTableDiagCodesMeta" rowClasses="color1,color2">
<h:column>
... content ...
</h:column>
</h:dataTable>
things inside my dataTable aren’t displayed at all?
use a <h:column> tag and put the items to display inside of it..
Don’t reload a page when a commandButton is clicked and the button is only meant to do an ajax request, use immediate=”true” and return null from the action method.
If a user decides to delete text that was entered in an inputTextbox, it magically reappears when the component is re-rendered.
The f:ajax render attribute doesn’t work if the component specified is the component holding the f:ajax component – the component specified has to have a different container/parent. The solution is to add an extra wrapper around the component. The wrapper must be referred to with the full id (including the form id).
Issue: The date saved when using f:convertDateTime is off by one day, or off by some number of hours.
The issue is due to the default date/time converter in JSF using GMT instead of the system’s default time zone, so you can
1) specify the time zone directly in the converter, e.g.
using
in the bean (from http://www.mail-archive.com/users@myfaces.apache.org/msg27626.html), or you could
2) use a custom converter for the Date values, which looks like this:
faces-congif.xml:
com.coaccess.utilities.CustomDateTimeConverter.java:
With this second method you remove the <f:convertDateTime> from the date fields completely and the usage of <f:convertDateTime> overrides the specified default (if you don’t remove the convertDateTime tag then the specified default won’t be used and the problem will persist). From http://www.ibm.com/developerworks/library/j-jsf3/.
Searching for “JBoss 5 with JSF 2” results in a bunch of messages explaining that “it can’t be done,” or “it shouldn’t be done,” or some other nonsense like “just remove JSF from JBoss” which obviously will break any already existing web application and is not an option in a production environment. The following is the solution and allows a web app in JBoss 5.0.1GA to use JSF 2 while leaving the built in JSF 1.2 on JBoss alone. So I think this is what people are actually looking for when they search for “JSF 2 with JBoss 5.” Note: I haven’t tried getting this to work with “MyEclipse,” only plain old Eclipse.
If you read the stuff you were copying and pasting then you’ll notice that .xhtml is used instead of the default .jsp. The additional information above should be everything necessary to get a basic example to work – the one at http://www.coreservlets.com/JSF-Tutorial/jsf2/#Getting-Started is the one I used.
You may run into these when trying to use JSF 2 on JBoss 5 without doing what’s listed above.
to the web.xml. This was contributed by Kley in the comments. Let me know if it works..
The WAR_BUNDLES_JSF_IMPL option is from Shivaji Byrapaneni at http://community.jboss.org/message/54085.
I can’t find the URL where I found the JBossInjectionProvider option.
The fact that the jboss-mc-int-servlet.jar is necessary is from http://community.jboss.org/thread/2656.
The rest is from me.