jsf-2.0

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 ...

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...

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. ...

JSF2: navigation flow question

I am not sure if what I want is possible, but it worth a try to ask. Let say, I have 2 pages: List.jsf and CreateNew.jsf. List.jsf display data from datasource as <p:dataTable>. CreateNew.jsf insert a new entry into the datasource. What I want is from CreateNew.jsf, when I click create, it create a new entry in a database, then return ba...

Dyanamic Graphs using jsf.....

My requirement is I need to populate dyanamic graphs in a jsp page. I am using jsf for my project. I planning to use "jfreecharts" but dont know how to bind my jsp page with the back bean. I have some drop downs on the basis of the selection I my BackBean is fetching the data from the DB. Can you please suggest me some procedure to that ...

<h:dataTable> and SessionScoped beans

Hi all! Problem: searching for some more suitable design . Goal: I want to have table of some user information and with button "change password" in column for each user, after click : "change password" button disappeared (rendered ="false") and a inputSecreat field appeared - user entering the password and submitting it (by clicking ...

JSF2.0+RichFaces3.3.3 suggestionBox inside a modalPanel

Following this example http://livedemo.exadel.com/richfaces-demo/richfaces/dataTable.jsf?tab=editDataTable&amp;cid=101317 I created a modal panel used for editing an entry. The difference is that one of my inputText fields has a suggestion box: <h:inputText id="entryName" value="#{controller.currentItem.name}" validator="#{controller.en...

Enable cache of J2EE web application's resources

How can I control my web application's resource handling? I have users with extremely high latency times (~1s!) and I must test my application in such environments. What I can see right away is that my resources (css and image files) are always reloaded on every page, probably because the response header contains an Expire tag that does...

ajax redirect not working

Hello, This is my jsf code :- <h:commandButton id="cmdLogin" value="Login" actionListener="#{indexBean.login}"> <f:ajax execute="@form" render="@all" /> </h:commandButton> This is my login method of indexBean :- public void login(){ HttpServletResponse objHttpSe...

Preventing multiple getter invoke in a session managed bean ?

i'm using jsf 2.0.2 + richfaces 3.3.3. what can i do so my getter won't be invoked multiple time ?? i have this: @ManagedBean(name = "mybean") @SessionScoped public class mybean implements Serializable { public MyClass getMyClass() { if (FacesContext.getCurrentInstance().getRenderResponse()) { myClass = get_...

JSF2 EL: Access ResourceBundle keys which contain dots from within Javascript?

My JSF2 application is fully internationalized, using a ResourceBundle. Now i have a lot of Javascript-code, which does some alerts and stuff. There i would like to access my ResourceBundle. I could successfully access simple ResourceBundle keys like this: alert("#{bundle.message_email_sent}"); Unfortunately, my convention for keys ...

jsf 2 and maven with eclipse "run on server"

Hi, I check out the Mojarra JSF 2.0 helloworld sample from here (just enter guest as username). I import it as maven project to eclipse (v 3.5) with a tomcat 6 server. I have the mojarra dependencies for running JSF 2.0 inside a servlet container. When i package it and because the jsf dependencies have compile scope, these jar are alre...

How do I update row style on AJAX update?

I've got a datatable with row styling applied via rowClasses on the datatable. The rows contain AJAX buttons. When a button is clicked, it does some databasy stuff, updates it's text, and changes the datasource used by the datatable. The datatable then refreshes (as it's one of the ajax render options). The text of the buttons update...

How to access javax.faces.PROJECT_STAGE from the view/inside code?

[My Setup: Java EE 6 application, with EJB3.1, CDI/Weld, JSF2 running on Glassfish 3.0.1] I just read about the Faces ProjectStage on this page, which is a cool thing. So i configured it in my Web.xml, setting it to Development: <context-param> <param-name>javax.faces.PROJECT_STAGE</param-name> <param-value>Development</param-va...

JSF: How to add ajax functionality to component in backing bean?

I want to incorporate the functionality to a HtmlCommandButton. How do I go about doing that? I can't seem to find too many examples on the web. I see there is something called AjaxBehavoir, but I'm not sure how to incorporate that into my HtmlCommandButton. Essentially I want to do the following to my component: <f:ajax execute=...

JSF ViewHandlerWrapper causes NullPointerException

I have a little issue with a JSF ViewHandlerWrapper that I've coded. It works fine most of the times, but at times I will get a NullPointerException from the very core of Mojarra and thus started to wonder whether I implemented my ViewHandlerWrapper correctly. public class TokenViewHandler extends ViewHandlerWrapper { private ViewHa...

JSF2 / Primefaces layout performance

Right now I'm using a full page layout and p:layoutUnits and page composition in my webapp. I have a fixed header with a menubar, and a content layoutunit, and that's all. It was easy to set up, but in IE (7) when I navigate to a new page the whole page reloads (visibly), the header is cleared then loaded, and - even more annoyingly - th...

JSF2: add ui:include to binding object's children

Hi, I have a UIComponent that is binded to a backing bean. I'd like to add a child to the component that corresponds to the ui:include tag, through my backing bean's init method. for example: <p:tab> <ui:include src="/page.xhtml" /> </p:tab> I want to create this in my backing bean like: <p:tab binding="${bean.tab}" /> So ba...

ICEfaces v2.0.0 Internationalization problem - form is not redisplayed upon action listener call

Hello everyone, I am experiencing problems with localization. i am using JSF 2.0 Mojarra (xhtml not jsp) (2.02 - FCS) IceFaces Core 2.0.0 - beta1 IceFaces Compatibility Library v2.0.0. - beta1 Here is the sample of the xhtml page. DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xh...

JSF2, can I add JSF components dynamically?

Can I add JSF components dynamically? I know this should be possible in JavaScript somehow. Do anybody know how to do this in JSF? I think the major problem is how do I get or set values later via #{value}. I need to have a form with a button which should add one h:inputText to the form. Is this possible? ...