jsf-2.0

Why does a subTable break a4j:commandLink's reRender?

Here is a minimal rich:dataTable example with an a4j:commandLink inside. When clicked, it sends an AJAX request to my bean and reRenders the dataTable. <rich:dataTable id="dataTable" value="#{carManager.all}" var="item"> <rich:column> <f:facet name="header">name</f:facet> <h:outputText value="#{item.name}" /> </r...

JSF 2.0 AJAX: jsf.ajax.request to call method not only rerender an area of page

Hi, I'm looking for a soultion of the following problem: _The is a list of links with different types of cars. _The user can click on each car in the list and a ajax request should be sent. _The response of the ajax request should be dependent on the id (of each car) and displayed in an panelGroup. So what I need is a possibility to cal...

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. When request the URL, a StackOverflowError will always be thrown: java.lang.StackOverflowError at org.apache.catalina.core.ApplicationHttpRequest$AttributeNamesEnumerator.<init>(A...

java.util.Map with HtmlDataTable

Hi, I'm developing an application on GlassFish v3 which uses Suns-RI of JavaEE6 and JSF2.0, etc. And the bad thing is, that no changes/switches away from Suns RI can be made (to use MyFaces or something like that). Now, the problem is, that I want to build HtmlDatatable by hand ( in Java code). The datatable should represent a jav...

The jsf2 h:outputText tag is not formating the h:outputText with the MessageFormat

The jsf2 h:outputText tag is not formating the h:outputText with the MessageFormat my faces config <application> <resource-bundle> <base-name>Messages_pt_BR</base-name> <var>bundle</var> </resource-bundle> </application> My resource bundle: ... EventPageTitle=Event: {0} ... My JSF2 XHTML: <h:outputText val...

Using JSP 2.0 tags in Facelets

Is someone using Facelets with JSP 2.0 tags? How to add tag library to xhtml page? In JSP I used: <% taglib prefix="example" tagdir="/WEB-INF/tags/my" %> and : <example:sample/> How can I do the same in facelets with JSP 2.0 tags? ...

JSF : able to do mass update but unable to update a single row in a datatable

I have a simple data object: Car. I am showing the properties of Car objects in a JSF datatable. If i display the properties using inputText tags, i am able to get the modified values in the managed bean. However i just want a single row editable. So have placed a edit button in a separate column and inputText and outputText for every p...

JSF2 ResourceBundleLoader override?

I need to have resource messages that contain EL expressions be resolved when loaded from a ResourceBundle. Basically I have a number of properties files containing the text. Some of the text will look like the following: welcomeText=Welcome #{userbean.name} The only possible way I can see this working currently is implementing a custo...

Problem in JSF2 with client-side state saving and serialization

I have a problem in JSF2 with client side state saving and serialization. I have created a page with a full description and a small class diagram: http://tinyurl.com/jsf2serial. For the client-side state saving I have to implement Serializable at the classes Search, BackingBean and Connection. The exception that was thrown is: java.io...

Does the Eclipse IDE support JSF 2.0?

I have the WTP 3.1 plugin installed and have also installed the Glassfish v3 plugin. I am able to register my server. When I create a dynamic web project, I can see that the maximum dynamic web module version available is 2.5. I then choose the default configuration for Glassfish v3 but, when I look at it JSF, it is not selected by defa...

Navigate to the Same Page After Action in JSF 2

I have a component done in JSF 1.x, this component has a command button as follows <h:commandButton ... action="#{templateController.next}" /> Where templateController was passed as an EL binding and can be any object that implements a certain interface. The generic implementation of next() was just executing code and then returning a...

Make element visible on ajax in JSF2

I have dataTable in my page. Initially I want it to be hidden, and show after fetching data by AJAX request. I know how to fetch data and put into table, but I don't know how to show table if it is hidden. Here is the code: <h:commandButton value="aa"> <f:ajax execute="from to validTo" render="transportOffers"/> </h:commandButton> <p:...

How JSF2.0 binds Managed Beans with xhtml?

i have very basic question about How JSF2.0 binds Managed Beans with xhtml? say i have inputtext with value="#{MymanagedBean.property}" how this MymanagedBean reference is resolved in JSF 2 ? please consider following points while answering. in ealier version i.e. with JSF 1.2 we have to write binding in faces-config.xml but with J...

jsf: propagate the viewscope to new popup window

in jsf2.0 is it possible to propagate the viewscope to new popup window, so that if new url is opened as model popup and parent page should get binding value from same/single viewscoped managed bean. i tried by passing parent page's javax.faces.ViewState as url parameter to model popup page but getting viewexpired exception. i dont...

Spring3 portlets with JSF2

Did anybody ever used the new Spring3 with JSF2 and portlets (JSR286) ? I used JSF1.2 with portlets (JSR168) we had some problems with stuff like file uploading, portlet intercommunication and other stuff. There aren't a lot of resources online on this topic. ...

JSF f:event preRenderView is triggered by f:ajax calls and partial renders, something else?

So we have an f:event: <f:metadata> <f:event type="preRenderView" listener="#{dashboardBacking.loadProjectListFromDB}"/> </f:metadata> Which is triggered as desired on initial page load (render). However this preRenderView event is also triggered by an ajax partial page render, which re-renders an h:panelgroup with the id p...

JSF2: Using EL in navigation rules. Redirect on timeout?

I am wondering the following: When a request comes into the JSF servlet, is it possible to redirect to a session timeout page if a session bean indicates that the session has not been logged in? For example: <navigation-rule> <from-view-id>*</from-view-id> <navigation-case> <if>#{not userBean.loggedIn}</if> <to...

JSF 2 Annotations with Websphere 7 (JEE5, JAVA 1.6)

Hey all, I'm currently writing a simple JSF 2 app for WAS 7. When I define the bean via the faces-config.xml, everything works great <managed-bean> <managed-bean-name>personBean</managed-bean-name> <managed-bean-class>com.prototype.beans.PersonBean</managed-bean-class> <managed-bean-scope>request</managed-bean-scope> </m...

Error with JSF2 and RichFaces

Hi, I'm trying to use RichFaces on a working JSF2 application. I incorporated the RichFaces jars, changed the web.xml but got the following error: 17:49:13,097 SEVERE [javax.enterprise.resource.webcontainer.jsf.application] Error Rendering View[/login.xhtml]: java.lang.NullPointerExcept ion at com.sun.faces.application.Applicat...

How to pass a action string into a JSF 2 composite component?

I'm creating a simple menuing composite component in JSF 2. However, I am unable to pass a String attribute into the composite component to use in the action attribute of the <h:commandLink>. My component looks like: <composite:interface> <composite:attribute name="title" required="true" type="java.lang.String"/> <composite:at...