jsf

How to get a newline in JSF (plain text)?

I am using JSF to generate text and need newlines to make the text easier to read. I have an HTML version which works great, I hacked it together using <br/> (I'm not proud of that, but it works). I would like to do the same for the plain text version such as inserting \n. I am doing something like this: <customTagLibrary:customTag> ...

web.xml for java server faces

Hi, I have just started learning about Java server faces and successfully tested out my first web app in JSF. What puzzles me is that the navigation rules are specified in my faces-config.xml located in my WEB-INF folder and no where in my web.xml have i specified the location of my faces-config.xml file location. So how does navigat...

i got the following error while deploying seam application

Exception during request processing: Caused by javax.servlet.ServletException with message: "#{registration.register}: javax.ejb.EJBTransactionRolledbackException" javax.faces.webapp.FacesServlet.service(FacesServlet.java:277) org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290) org.apache.cat...

<a4j:actionparam send value alway null

I have such code <a4j:region> <h:inputText label="User" id="user" size="30" value="#{bean2.val1}" required="true" > <a4j:support event="onblur" action="#{bean.action}" reRender="outputName" bypassUpdates="true"> <a4j:actionparam name="user" assignTo="#{bean.user}" value="#{user}" /> </a4j:support> </h:inputText> <...

Problem with expression language functions in Tomahawk tags

I'm using: Tomcat 6.0 Jsf 1.2 - Mojarra Implementation Tomahawk 1.1.9 I imported the taglib <%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn" %> when i call: <h:outputText value="#{fn:indexOf('ciao','i')}"></h:outputText> Output is 1 when i use <t:outputText value="#{fn:indexOf('ciao','i')}"></t:outputText> ...

conditional check in c:if always fails

The c:if test always fails for me and it never gets inside the loop. I am using the following namespaces xmlns:fn="http://java.sun.com/jsp/jstl/functions" xmlns:c="http://java.sun.com/jstl/core" The string ('array') to be split is "Tom and Jerry are GAP1 friends" <s:decorate template="/layout/display-text.xhtml"> <c:set var="arra...

Best JSF framework/library for "conversation state"

What do people think is the best JSF framework or library for a saving state longer than request scope (but w/o using session scope) that is backbutton/new window safe -- i.e. you have a "wizard"/multi-page form. For example, MyFaces has the 'SaveState' tag (http://bit.ly/8QHmX5) that allows you to maintain state across pages by saving...

How to get internal content of jsf component?

I have a component's library and this library has Chart component. Chart is actually a jpg image. I need to access this image. I need some basic tips where to search that image, maybe with examples based on some wellknown libraries like Tomahawk. ...

What is the difference between JSF, Servlet and JSP?

Is JSP = Servlet? And JSF = Pre-build UI based JSP (like asp.net web control)? ...

Webservice for a JSF application

Hi! We wrote a quite complicated application using a JSF + Spring + Hibernate. It has many business process. There are different kind of users (and roles). Users have to fill many forms and when all the forms are validated the "order" is sent to the server and it will be processed by another kind of user. Now we have to write webservice...

Fileupload in JSF(rich faces 3.1.6 or tomahawk 1.1.9)

is there any way to change the label of fileupload component button "Browse" to label of our own and to hide the place holder of file upload component of tomahawk 1.1.9..... Also, is there any component for file upload in richfaces 3.1.6... ...

java server faces in Eclipse 3.2

Is it possible to write a java server faces application in eclipse 3.2.0 ? I am asking this because eclipse 3.2.0 is not allowing me to add tomcat 6 as a server. is it that java server faces do not work on tomcat 5.5 ?? ...

JSF, Exception Logging using a aopalliance MethodInterceptor

I would like to log the exceptions that are thrown when serving JSF files in the same way other exceptions are logged in our web application. We annotate classes with logged exceptions with @LoggedExceptions and a MehtodInterceptor is matched against those classes with Guice AOP (This should be very similar for other implementations of ...

I'm getting 'Duplicate id error' after adding 'binding' attribute

Here is JSF code: <o:chart id="categoryLineChart" model="#{categoryReports.categoriesLineChart}" view="line" rendered="#{categoryReports.reportRendered}" height="#{categoryReports.scaleHeight}" width="#{categoryReports.chartWidth}" binding="#{categoryReports.lineChartComponent}"> <o:chartNoDataMe...

Richfaces tooltip componentcontrol param

I have a table where each cell click opens a tooltip using the componentControl tag, this works. But I wanted to pas a parameter to the tooltip, which is different per table cell. <rich:toolTip id="tooltip" attached="false" mode="ajax"> <ui:include id="projectDetailInclude" src="projectDetail.xhtml"> <ui:param name="projectDetail" v...

How to open print version of the site in a new page with jsf?

I need to make a link which opens print version of current page in a new tab. I already have correspondent css-file. But I don't know how to specify when this file should be used instead of standard. The simplest way is quite good. If I was using JSP I would simply add get parameter to print-link URL. Is there any way to achieve similar...

html select label based on value in java script

Can I get html select option label based on option value <select id="xx"> <option value="i_Have_value">I Need This Label</option> <option value="i_Have_value2">I Need This Label2</option> </select> By using jsf selectOneMenu and rich:comboBox in single form, i landed up in this kind of requirement. ...

What is the analog of jsp .tag-files in jsf or how to avoid coping and pasting jsf/facelets code?

I think the title is clear enough so I only add an example of typical situation. First block of code: <div id="mailpanel"> <h:panelGroup id="sendmailpane" styleClass="sendmailpane" layout="block" rendered="#{userReports.reportRendered}"> <o:inputTextarea promptText="#{msg['mail.listrules']}" promptTextStyl...

Seam2.2.0GA facesMessages.addFromResourceBundle() doesn't work with JBoss5.1.0GA

It seems a bug of Seam2.2.0GA or I missed something, here is the senario: use seam-gen generated the dummy project, change the AuthenticatorBean.java in the hot folder: add: @In FacesMessages facesMessages; public boolean authenticate() { ... facesMessages.addFromResourceBundle("hello"); } also change the *.war/WEB-INF/classes/mes...

RichFaces and Facelets, a good combo?

Hello, I've been programming using RichFaces and JSF for quite some time now, and like the features that Facelets offer (especially as part of JSF 2), but haven't used it yet. Are there any gotchas to watch out for or incompatibilities between RichFaces and Facelets? I use A4J ajax functionality a lot as part of RichFaces, so I am con...