jsf

JSF ISO-8859-2 charset

Hi! I have problem with setting proper charset on my jsf pages. I use MySql db with latin2 (ISO-8859-2 charset) and latin2_croatian_ci collation. But, I have problems with setting values on backing managed bean properties. Page directive on top of my page is: <%@ page language="java" pageEncoding="ISO-8859-2" contentType="text/html; ...

Display XML diferent in JSF (using XSLT or some another suggestion)

Hello everybody! At runtime I receive xml document and I want to display it somehow different in JSF. For example: This: <invoker.ArrayOfDictionary> <dictionary> <invoker.Dictionary> <id>gcide</id> <name>The Collaborative International Dictionary of English v.0.48</name> </invoker.Dictionary> <invoker.Diction...

How To: Use FileUpload.setFileUploadListener(MethodBinding) with a MethodExpression

Hi, I have a problem with adding a FileUploadListener object to HtmlFileUpload (rich:fileupload) programmatically: This works but is deprecated: HtmlFileUpload upload = new HtmlFileUpload(); upload.setFileUploadListener(FacesContext.getCurrentInstance() .getApplication().createMethodBinding( "#{actions.storedObjects["+this.get...

jsFunction pass data to backingbean

I have a javascript that is calling a function addData(param1,param2,param3,param4) which is calling addClip at the end And I need to pass those to a backing bean. <a4j:form> <a4j:jsFunction name="addClip" action="#{backingBean.goGo}"> <a4j:actionparam name="param1" assignTo="#{backingBean.param1}"/> </a4j:jsFunction> <...

JSF - When to use message-bundle and resource-bundle ?

When should I use resource-bundle and message-bundle tags for i18n in faces-config? The differences between those two are not very clear to me. ...

Download link page JSF

Hi, How can I produce a URL which somebody could open and that would immediately download a file e.g. pdf? I have been using ice:outputResource but that requires the user clicks on a link. Is it possible to do this in JSF? Thanks, Dwayne ...

get a backing bean property value from another bean

It is possible to access or to get a backing bean property value from another backing bean in JSF? ...

JSF 2.0: java based custom component + html table + facelets = data model not updated

Hi, I'm having problems getting the data model of a HtmlDataTable to be correctly updated by JSF 2.0 and Facelets. I have created a custom Java-based component that extends HtmlDataTable and dynamically adds columns in the encodeBegin method. @Override public void encodeBegin(FacesContext context) throws IOException { if (this.findCo...

JSF Managed Beans in a Servlet

Is there a way to access JSF managed beans from a servlet? ...

JSF Servlet Arch Help needed.

i want a mechanism in my web app as described below: user will enter mydomain.com/CompanyName , depending upon the CompanyNameit will show its logo and its customized page, and i will take that parsed parameter in session again upon each request i will compare the parsed CompanyName and one stored in session , and if they matched then a...

Server-initiated Rendering: EJB -> FacesContext?

I've already asked this question on the Icefaces forum, but meanwhile I realized that this is a more generic problem. I'd like to update parts of a JSF page when I get a message in my MDB. The problem is, how do I get the FacesContext from the EJB container? In the message processing function FacesContext.getCurrentInstance() returns...

RichFaces rich:inplaceInput null validation having trouble with different component

Hello In my webapp I've just inserted some <rich:inplaceInput> elements to allow XML JAXB unmarshalled data coming into a table to be editable. Briefly: <h:outputText value="Directory:" /> <rich:inplaceInput value="#{f.dir}" defaultLabel="click to edit" showControls="true"> <a4j:support event="onviewactivated" reRender="table"...

JSF: Using same jsp page for different outcomes

Would it be possible to use a navigation-case as shown below with the same view-id but different from-outcomes? In the managed bean, I wanted to compare the from-outcome values and decide on the group panel that I would display on the page. How can I get the from-outcome value in my managed bean? <navigation-case> <from-outcome>modi...

Error while using JSFUnit/HtmlUnit/CSSParser

We've just recently converted our project to using Maven for builds and dependency management, and after the conversion I'm getting the following exception while trying to run any JSFUnit tests in my project. Exception class=[java.lang.UnsupportedOperationException] com.gargoylesoftware.htmlunit.ScriptException: CSSRule com.steadystate....

JSF f:view beforePhase firing multiple times as I LEAVE the page

Still trying to get my problems with page loaders firing like crazy in JSF> From this link: http://www.javabeat.net/tips/122-jsf-best-practices.html It appears that if I put a that it will fire once when entering the page. However, it fires like 4 times when LEAVING the page, kind of defeats the point. Any ideas? ...

Is it possible to use objects as function paremeters in EL with JBoss EL resolver?

There is this sentence in JBoss EL resolver online documentation: It's important to fully understand how this extension to EL works. When the page is rendered, the parameter names are stored (for example, hotel.id and user.username), and evaluated (as value expressions) when the page is submitted. You can't pass objects as paramete...

JSF Newsletter Module

How to develop newsletter module in JSF Web application? Newsletter with the functionality of subscribing and unsubscribing by the members via email ...

sort arrow is always showing up once sorting is used

We have several pages as tabs where datatable is used in most of the pages. When we sort on a particular coulmn and exit the page and re enter this page the arrow appears (up/down depending on how we exit the page). But the data is not sorted in the direction the arrow shows. I have set preserveSort and preserveDataModel to false. The ar...

How can I pass a dynamic backing bean into a JSF 2.0 page using facelets?

Hi, I am using a JSF 2.0 to create a web app (purely jee6, without spring/seam etc.). I would like to have a single xhtml page but pass the proper backing bean / entity into it. For example, I would like to be able to edit a user other than the logged in user, I have a user edit page which displays the information of the logged in user ...

Accessing FacesContext from Web Service

I'm developing a Web Service which will be called by clients which are written by me. In the web service I need to use application-wide objects which eases the load of application on the system. I have implemented my application-wide objects as shown in this question. I can use my object in a jsf page with no problem as follows. MyObj...