MyFaces 1 « MyFaces « JSF Q&A

1. Troubles Iterating Over A HashMap with JSF, MyFaces & Facelets

I'm having some trouble looping over a HashMap to print out it's values to the screen. Could someone double check my code to see what I'm doing wrong. I ...

2. MyFaces vs Sun Reference Implementation of JSF

Maybe, some performance comparison or some noticeable specific differences is what I want to know. As I heard there is no really big difference. Hence, I've got one more question. For what ...

3. myfaces partialTriggers

Here is my myFaces Code the

<tr:commandButton text="Calculate Modulus" action="#{pageManager.form.calculateModulus}" id="modulusCalculation" partialSubmit="true"/> 

<tr:table value="#{pageManager.form.modulusCollection}" var="modulus" width="75%" 
        inlineStyle="align:center;" partialTriggers="modulusCalculation" autoSubmit="true">
    <tr:column ...

4. MyFaces 1.2.8 causes Tomcat 6 to crash on deployment

I've got a JSF app built with MyFaces 1.2.8, Facelets 1.1.14 and building it with Tomcat 6 through it's plugin in Eclipse Ganymede. I've just installed the latest versions of the above ...

5. Invalid byte 1 of 1-byte UTF-8 sequence

I have a MyFaces Facelets application, where the page coding is a bit rugged. Anyway, it's developed with Eclipse and built with Ant, and kindof runs ok in Tomcat 2.0.26. So ...

6. endless loop / StackOverflowError when using Apache MyFaces 2.0

I just like to give JSF 2.0 (MyFaces 2.0) a try using Tomcat 6.0. I am completely new to JSF. I just put a static xhtml as test.jsf in the application root. ...

7. MyFaces vs. Sun's Reference Implementation - latter not free?

Just a stupid beginner's question, which will be quickly solved, but I am curious. says: "MyFaces - The free JavaServerâ„¢ Faces Implementation" Errr ... is Sun's implementation not free, then? Thanks ...

8. Which implemtation of JSF 1.1 to use MyFaces or Sun RI

We want make a choice between SUN RI 1.1 JSF implementaiton and MyFaces. Appserver we will be using is Weblogic 8.1. Could you please provide main points for Comparison between the ...

9. Getting ClassCastException with JSF 1.2 Custom Component and BEA 10.3

Im getting a ClassCastException if i use Attributes in my Custom Headline Tag. Without Attributes rendering works fine. Calling <t:headline value="test" /> gives a ClassCastException even before a Method in my ...

10. JSF (Myfaces) converter resource bundle messages

does anyone know where I can get a list of the converters used by JSF so I can set a custom message for them in the resource bundle?

11. How to prepopulate repeating h:selectOneMenu?

Modifying working form with one spot per order to multiple spots per order I met problems with prepopulating h:selectOneMenu. Exception is java.lang.IllegalArgumentException: Value binding '#{spot.deliveryTypes}'of UISelectItems with component-path {Component-Path : [Class: ...

12. JSF - How do I force an application-scoped bean to instantiate at application startup?

I can't seem to find a way to force an application-scoped managed bean to be instantiated/initialized when the web app is started. It seems that application-scoped beans get lazy-instantiated the first ...

13. JSF and rotated components? (Specifically, buttons)

I'm trying to implement in jsf something that will serve sort of a 3 way pick list: alt text I can do this pretty easily. My only problem is making the buttons ...

14. how to create callendar with specified periods in jsf/myfaces? is it possible?

I`m preparing application where user can book a room for specified period. I want to show user a callendar where he will be able to select start and end date of ...

15. Memory leaks in MyFaces

EDIT: The solution that you can find in comments below assumes changing JSF implemenetation from MyFaces to Sun's Mojarra.
Hi, I have got really annoying problem with MyFaces 2.0.0 ...

16. Tomcat myfaces dynamic source files

I'm going to try and make as much sense as possible here. We are working on a myfaces 2 app in tomcat. On our local dev machines, whenever we want to ...

17. myfaces EL support disabled?

I am starter in JSF2.0.
I am using MyFaces.
My little tutorial apps are ok, but I noticed in the logs of MyFaces the following:

org.apache.myfaces.util.ExternalSpecifications isUnifiedELAvailable INFO: MyFaces ...

18. Dealing with jsf session and browser refreshes

I'm writing an application in JSF 1.2 that has a session in a backing bean. The biggest stability issue happens when the user refreshes the page (by pressing F5) or uses the ...

19. file upload in JSF using myfaces component

I am creating a JSF application where file uploading functionality is required.I have added all the required jar files in my /WEB-INF/lib folder.

but still when trying to deploy the application on ...

20. java jsf myfaces facelets

I need to understand why the paging doesn't work here

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "">

<html xmlns=""
 xmlns:f="" xml:lang="en" lang="en">

 <ui:composition template="WEB-INF/templates/Main_Template.xhtml">
  <ui:define name="content">

21. How do you switch backing bean objects in JSF?

Suppose I several tags, text input, radios, etc referencing one instance object. I would like to use a dropdown on that page to switch the references mentioned before to another ...

22. JSF 2 setup issue in Tomcat 7 (java.lang.InstantiationException: com.sun.faces.application.ServletContextSensitiveSingletonStore)

I have an issue that keeps arising with JSF 2 and Tomcat 7.0.0. When I setup Apache MyFaces 2.0.4 (by putting all the jars in my WEB-INF/lib folder), Tomcat deploys my ...

23. JSF 2.0 javascript onload/oncomplete

I'm working with Myfaces 2.0 after a long project using MyFaces 1.1 + Tomahawk + Ajax4JSF. 2.0 is definitely a huge improvement. Although I can't seem to get an onload javascript ...

24. JSF Session issue in different browser windows

We have an application which is built on JSF 2.0(MyFaces) and runs on Weblogic app server. We are facing an issue regarding http Session. Issue: Suppose I have opened the app in ...

25. JSF keep session active during long running process

We have a long-running process in our JSF (MyFaces implementation) WebApp. It is required to have an active session during this long-running process. Will bringing focus on various components ...

26. Passing action method names as arguments to facelets componenets

I am calling a template and am passing in parameters like below:

<ui:include src="WEB-INF/Subviews/ProductEdit.xhtml">
    <ui:param name="items" value="#{produtList}"></ui:param>
    <ui:param name="itemToEdit" value="#{productToEdit}"></ui:param>
and in the ProductEdit.xhtml, I have something ...

27. How to make myfaces-impl refresh on file change?

There is an init-param facelets.REFRESH_PERIOD for the Facelets servlet. However, it's senseless to set it to a specific value. When it's too small, say 10 seconds, the cache will be timeout ...

28. Hibernate+JSF 2.0: object lose content from database when updated

I am glad to be here :) this is my first question. I have a h:form where i display data to be entered/updated. It is defined by the parameter, if the page ...

29. JSF 2 Session Beans Problems

I have a JSF 2.1 (MyFaces) app running using several Session Beans (All the beans are session beans). The timeout is defined in web.xml as such:

Which translates to ...

30. Getting same instance of `componentType` in composite component on every use

Hi Have this Wierd Issue in which I am using a Composite Component which I wrote and I get values from the previous use of the backing bean of the CC ...

31. jsf application performance improvement tips

How to improve performance of jsf myfaces based application ? Some tips that I have collected so far


  • Set following init parameters to false in web.xml
    • org.apache.myfaces.trinidad.DEBUG_JAVASCRIPT
    • org.apache.myfaces.trinidad.DISABLE_CONTENT_COMPRESSION
    • org.apache.myfaces.trinidad.CHECK_FILE_MODIFICATION
  • use client-side state saving
  • clear pageflow context map ...

32. MyFaces never throw exception for undefined custom tags

I'm trying to write some custom Facelets 2.0 tags, after several hours work, I found that my UIInput subclass is not even instantiated. Then, I changed the actual namespace to something ...

33. @ManagedProperty injected AFTER @PostConstruct

THIS PROBLEM IS ALREADY SOLVED IN THE MYFACES 2.1 IMPLEMENTATION i have a link which passes an Integer parameter properly like this:

<h:link outcome="/process/createProcess">
    <f:param name="id" value="#{process.idprocess}" />

34. JSF 2.1 ViewScopedBean @PreDestroy method is not called

i have in a view Scoped Bean a method with the @PreDestroy annotation and another with the @PostConstruct method. @PostConstruct method is properly called every time i navigate to the page that ...

35. Tomcat 7 + MyFaces 2.1 :

I'm setting up a simple application using Tomcat 7 and MyFaces 2.1. I create the app, create a simple index.xhtml, deploy it and when I visit it on the browser I get ...

36. Pluto 2.0 + MyFaces Portlet bridge + JSF 2.0 Application

Recently I have explored the possibilities to integrate a regular JSF 2.0 application as a portlet a portlal. The first thing I've done is downloaded Pluto 2.0 (bundled with tomcat) and Myfaces ...

37. How can I fix a JSF/MyFaces dropdown appearing behind an Ext panel?

I've got a JSF/MyFaces dropdown list within an ExtJS (3.x) panel. When the dropdown is expanded, the list appears behind the Ext panel. Happens in all IE/Chrome/Opera/FF. How can I fix ...

38. JSF MyFaces: Monitoring numberOfViewsInSession and numberOfLogicalViews

I'm currently working on a web application with about 10 pages and a medium complexity. We started our performance tests the other day and the following exception could be noticed in the ...

39. JSF Application-scoped bean does not retain info

I am trying to use an application-scoped bean but every time I call the lazily initialized getter methods, it initializes the values again. I've used the debugger to confirm that ...

40. Archetype for MyFaces-Test

I'm using mvn archetype:generate -DarchetypeCatalog= Is there a parameter for generating Unit tests for MyFaces-Test?

41. Can not find getFlash() method in Myfaces

I am trying to use above code seems like getFlash() does not exist in JSF2 implementation of Myfaces. How how can I access it. Above line gives me this error
The method getFlash() ...

42. How do I use CODI Conversation? Specifically, how to end it?

Based on advice posted here and here, I looked into and installed MyFaces CODI with my application. My biggest concern was overcoming the shortcomings of Weld's ...

43. MyFaces 2.0.2 + TinyMCE

I was recently trying to integrate TinyMCE in my Myfaces application. I have downloaded and extracted TynyMCE in my webapp folder. I have written the following code:

<h:outputScript library="tiny_mce" name="tiny_mce.js" target="head" />
<h:outputScript ...

44. jsf f:ajax not working with IE 7

f:ajax tag is not working with IE 7. Is there any solution for this ? Below is the code:

<h:dataTable id="TestTable" value="#{lookupEventHandlerBean.tbList}" var="tb_var">
<h:column id="TestColumn">
<f:facet name="header">
<h:outputText value="Select"></h:outputText>
<h:selectOneRadio enabledClass="RadioClass" id="radio1" value="#{tb_var.selectedBool}" onclick="selectRadio(this)">
<f:selectItem  itemValue="true" id="radio1Lbl" itemLabel=""/>
</h:column> ...

45. @EJB in @ViewScoped @ManagedBean causes

I've read @EJB in @ViewScoped managed bean causes, but my state saving setting is server. Here is what I have: web.xml:

<?xml version="1.0" encoding="UTF-8"?>
<web-app version="3.0" xmlns="" xmlns:web="" xmlns:xsi="" xsi:schemaLocation="">

46. I need to create an Collections, List or Arrays of in JSF an MyFaces, can be DONE?

I to all!!!. I'm new here and need some help. I am doing an application using JSF and MyFaces, I need to create an array of components, but do not ...

47. With MyFaces CODI, I am not getting different windowid values in different browser tabs -- why?

I am using MyFaces CODI because it allows me to use CDI annotations with ViewAccessScoped -- works great for that. The problem is that I have found that multiple browser ...

48. MyFaces Extensions Validator vs MyFaces Commons Validators

What is the difference between MyFaces Extensions Validator vs MyFaces Commons Validators? The JSF 2.0 Cookbook by Anghel recommends the MyFaces Commons Validators, at which point ...

49. tomcat7+El2.2+jsf1.2 not working

expression language is not working in tomcat7 with jsf1.2 .#{message.name_prompt} is ouputed as #{message.name_prompt}. i tried to replace the el-api.jar in the tomcat lib folder with el-api-2.2.jar and put the el-impl-2.2.jar ...

50. MYFACES - how to change tree2 hierarchy?

I am using my-faces (2.1.3) in my project. I need to create a tree that as different hierarchy. For example the first will be a link/leaf and the second one will ...

51. tr:commandLink action method does not navigate to next page.Instead loads same page again

In my JSF application ,after successful login, i am navigating to my home page of my application where i have a Logout link. Here is the related html for logout link.

<div id="top_white">

52. MyFaces Commons Validator maven dependency repository

Seems like i am having a hard time finding the repository manager for this dependency:

Can someone give me a ...

53. myfaces plugin for netbeans 6.5

Hi Everyone, Please can any one refer me to where i can find and download MyFaces Plugin for netbeans 6.5 or I can get started with using MyFaces with JSF in ...

54. myfaces plugin for Netbeans 6.5

Hi Everyone, Can some one please refer me to how I can download MyFaces Plugin for netbeans 6.5 and How i can get started and configure it on netbeans 6.5. I ...

55. MyFaces in NB 6.7

Can someone point me to basic reference information on how to use MyFaces/Tomahawk in NB 6.7? Is there a NBM plugin available that provides a palette? Also the instructions for how ...

56. Netbeans and MyFaces

Hello there, Does anybody know how to integrate myfaces(Tomahawk or any of the latest implementation) with netbeans? I have followed a lot of instructions on google, but all of them fails... ...

57. file upload problem with myfaces and jsf crud application

i have made a jsf application that uploads image files to a folder under web pages directory called "images" in netbeans. the application then does a crud style display and the ...

58. MyFaces, NB cannot find JSF taglibs

59. MyFaces doesn't work with NetBeans 6.5?

BasicExample javax.faces.STATE_SAVING_METHOD server ...

61. Problem with MyFaces?

62. RCFaces with Myfaces

63. tag -br- with JSF myfaces

65. Sun RI vs MyFaces

Neither of these has any success or failure stories to share so far. Though I am using IBM's implementation, I think you may like to try out myfaces implemention. I guess it has some added features and better component range. In case you are doing an extensive research\ R&D over both the implmentations, let us know your findings here.

66. Myfaces commandNavigation

67. myFaces

69. MyFaces x:tree(2)

70. MyFaces - HtmlSelectOneMenu and ValueChangeEvent

Thanks for the reply, Mauro. Yes, this issue is related to the other post you replied to. Same problem, 2 different parts. Yes, I put this in a form, but did not do the submission - isn't event handling supposed to occur right away, and not at form submission? I set immediate="true" on the component. But yes, when I do a ...

71. MyFaces File Upload

72. Two MyFaces problems

73. JSF based Portlet with MyFaces bridge

74. myfaces tree2 hibernate and portlet

75. myfaces tabbed pane on click

76. MYFACES - newspaperTable - Help

77. Upload Files with MyFaces

79. JSF vs MyFaces

JSF is the standard (JSR-127), MyFaces is an implementation of that standard, and yes, it's open-source. Another one is Oracle's ADF Faces. I think tht one's free to use, although I don't lnow about it being open-source. There was also a Sun Reference Implementation JSF, which ws pretty feeble. I think they broke it and then abandoned it. JSFs aren't mix-and-match, ...

81. MyFaces & WSAD

82. Ajax with MyFaces Tree2 component

83. myFaces Tabs and validation

I am having a problem with myFaces tabs and can't find a solution. I have a page that imports two pages with the same data. The first tab is a read only page, and the second tab allows the user to edit fields. If the user is on the second page and gets an error they are sent back to the ...

85. ADF MyFaces and HttpUnit testing

Dear all Does anybody know how to test ADF Faces. Any tool would be of interest to me although Opensource and Free Software is prefered? My task is to write a set of unit tests to test an Oracle ADF and Apache MyFaces application. I have attempted to use both Cactus and HttpUnit. However I am struggling with a simple test ...

86. MyFaces: Getting started - help?

87. myfaces tree2 examples

89. MyFaces CollapsibelPanel Problem

90. MYFaces JSF UploadedFile Object

When using the object in the backing bean I get two different results with different browsers. When using IE the getName method returns the Path information along with the file name. When using FireFox only the file name is returned with getName. Does anyone have any clue as to which is operating correctly? Any other information on these differences would be ...

91. how to get tobago myfaces hello world to work?

I've been using JSF for some months now and I am trying to use the new tobago myface to work. This open source lacks help for the hello world app. I am having probelms with the themes I used the same source code found in the tobago-blank helloworld. The tobago-theme-speyside-1.0.7.jar is in my lib area and my web and tobago-config matches ...

92. [MyFaces] how to do this....?

93. List of components in MyFaces

94. ADF / Myfaces

96. strange behaviour of myfaces...

javax.servlet.ServletException: Could not restore StateHolder of type (missing no-args constructor?) at javax.faces.webapp.FacesServlet.service( at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter( at org.apache.catalina.core.ApplicationFilterChain.doFilter( at at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter( at org.apache.catalina.core.ApplicationFilterChain.doFilter( at at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter( at org.apache.catalina.core.ApplicationFilterChain.doFilter( at org.apache.catalina.core.StandardWrapperValve.invoke( at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext( at org.apache.catalina.core.StandardPipeline.invoke( at org.apache.catalina.core.ContainerBase.invoke( at org.apache.catalina.core.StandardContextValve.invoke( at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext( at org.apache.catalina.core.StandardPipeline.invoke( at org.apache.catalina.core.ContainerBase.invoke( at org.apache.catalina.core.StandardContext.invoke( at org.apache.catalina.core.StandardHostValve.invoke( at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext( at org.apache.catalina.valves.ErrorDispatcherValve.invoke( at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext( at org.apache.catalina.valves.ErrorReportValve.invoke( at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext( at org.apache.catalina.core.StandardPipeline.invoke( ...

97. MyFaces selectBooleanCheckbox incorrect valueChangeListener is called

I have two selectBooleanCheckbox in my jsp When the value of the checkboxes is true when the page is loaded from the database then for some reason when the checkbox1 is clicked the valueChangeListener of the second checkbox is called. < h:selectBooleanCheckbox id="loginDurationRestrictionFlag" value="#{securityProfile.loginDurationRestrictionFlag}" immediate="true" valueChangeListener="#{securityProfile.enableDates}" /> there is an on click of this checkbox written which submits the page. ( ...

98. MyFaces issue

99. Problem with MyFaces t:popup tag

Im running into a problem with a MyFaces t:popup tag. The code snip has an ouputText element of #{row.serviceDesc} with a graphic behind it. Hovering over the graphic will display a popup window the #{row.serviceDesc} being displayed. Im reusing the same field only for test purposes. The problem is the occurrence of #{row.serviceDesc} is incrementing properly outside of the t:popup, but ...

100. MyFaces Accordion Panel Issue