jsf

Removing JSF messages from the flash

I have one page that does something and when the user clicks a button, the user is redirected to another page and a message is displayed. Here is my code: public String confirm() { FacesContext context = FacesContext.getCurrentInstance(); Flash flash = context.getExternalContext().getFlash(); flash.setKeepMessages(true); ...

Unhighlight a Row in a rich:ScrollableDataTable

Hello, In my application I need a user to be able to select a row in a table. When they are done working with the data from that row they click a cancel/reset button to reset some other page elements. What I need to do is to also have the reset button unhighlight or unselect the highlighted/selected row in the datatable. I have been ...

Phases skipped when using PrettyFaces (JSF)

When using PrettyFaces to map a page containing a form, all phases after Restore View are skipped and the response is rendered. Thus the form is not submitted and the model is not updated. ...

How to set the width for the dataTable rendered column in JSF ?

JSF h:column tag fix width Hi, I tried this way, But I couldn't get this working. With the rendered HTML , I don't see a width Attribute either for the Header or for the dataTable rows. I am using JSF 1.2 without any component libs. Any idea ? What could be the problem? ...

Does the jsf lifecycle apply to the outcome facelet when I click a button?

I have a simple login.xhtml facelet which contain a username and password input and a command button. The command button simply have an action="welcome" outcome which display the welcome.xhtml facelet. I'm very new to JSF. As i read the JSF lifecycle, when i click the button then the invoke application lifecyle handle the navigation and...

recommendation for a good JSF profiler

Any recommendations for a good JSF profiler? I am using Tomcat 6 JSF2, Hibernate & Spring ...

Why having multiple managed beans?

This is more of a general question, so that I a better understand about JSF and managed bean. So when people having multiple managed bean, is it solely because they want to group methods with the same scoped(RequestScoped, ApplicationScoped, SessionScope...) together? Or is there some other reason? What would happen if you inject managed...

Unnecessary Session Beans in Ajax Enabled JSF Frameworks

I've noticed that when using Ajax heavy JSF 1.2 implementations like Richfaces you're somehow forced to declare more managed beans than you'll want as Session scoped so that state can be maintained across multiple Ajax requests; there are components that will just stop working. For instance, I developed this application lately in which...

Submit Listener Method in the BackBean is not getting invoked.

My result tables/images will be displayed in the same page. But the submit button is not invoked. I have two drop downs on which the values of the other two drop downs are dependent. If I am writting immediate="true" the method is invoked but only two values are set with whom I have associated processValueChange action the other selected...

Get request parameter values in JSF

I have a <odc:tabbedPanel/> component. Inside this I have a page in the <odc:bfPanel/> component. I want to access a value (of a inputtext or radiobutton) from the page in the <odc:bfPanel/> in my <odc:tabbedPanel/> managed bean class. Please guide me as to how do I go about this. Please note here that I do not want to use the session h...

Why jsp: tags are not parsed?

I have this login.xhtml JSF page: <?xml version="1.0"?> <jsp:root version="2.0" xmlns:jsp="http://java.sun.com/JSP/Page" xmlns:f="http://java.sun.com/jsf/core" xmlns:h="http://java.sun.com/jsf/html"&gt; <jsp:directive.page contentType="text/html"/> <f:view> <h:inputText value="#{userBean.id}"/> </f:view> </jsp:root> Output HTM...

How to overcome caching problem of jsf?

I have 7 drop down in my jsp(Using JSF tag-Select One Menu), 2 drop downs are dependent on other 2 drop downs. The scope of my Managed Bean is session.I have a single page and my result is a graph/table depending on the drop down menu selection. But my selection is getting cached and at times on refreshing the code my bean and my jsp pag...

JSF: display h:selectManyCheckBox vertically in h:dataTable

I have a simply facelet which display a list of products in tabular format. In the last column of each row, there is a checkbox used to mark the product for deletion. Until now i have to put a selectBooleanCheckBox on each row and have a "mark for deletion" property in the Product entity but i think it's ugly because i have some presenta...

How to build a URL in the JSF page?

I'm trying to create a <a> tag in my Facelets XHTML page, but can't understand how to do it.. This is what I'm doing: <h:outputLink value="static/faq.xhtml">FAQ</h:outputLink> Am I using the right tag? ...

rich:Jquery not working when use in a facelet component

I've created a component that manages postal codes using mask with a rich:jquery, Here the code of the component: <h:inputText id="#{id}-postalCode" value="#{myBeanPath.postalCode}" size="7" /> <rich:jQuery selector="#postalCode" query="mask('a9a 9a9')" timing="onload" /> It works fine in a standard jsf page, but not when it's in ...

Skipping a nested <a4j:region>

I have a JSF file with a rather large form, the form consists of 3 parts: user data (a set od calendars and data inputs), user items (a data table and a small table with some inputs and a button that adds a new entry based on the information provided in the small table), others (something like user data). I have one huge and every part ...

Where can I find JSFUnit real-life example?

I'm trying to use JSFUnit framework, but can't understand how to allocate projects/files. How many projects/sub-projects should I have and whether it is possible to have just ONE project, as it normally happens with JUnit and similar frameworks. Would be nice to see some example. I still can't understand whether I need to create a separ...

parameter in URL jsf2

I need to have this link: http://myserver:/myproject/innerpage/clip.jsf&amp;id=9099 to extract the id from a code like this: HttpServletRequest request = (HttpServletRequest)FacesContext.getCurrentInstance().getExternalContext().getRequest(); String clipId = request.getParameter("id"); When I run it on tomcat I get: message /O...

JSF Datatable current Page Primefaces

Hi, I would like to display the current page of a datatable outside of the table (I actually need it for paging a the items on a google maps component). How can I get the current page of the datatable? Thanks, D ...

Embedding a link (or other html) in a JSF message

I want to embed a link in a JSF message, is this possible? When I try it, the rendered html of the h:messages tag escapes the html characters. I tried setting the escape attribute of the h:messages tag to false, but that didn't help. ...