facelets

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

JSF works only with the .xhtml ending

Hello, i start with the programming of a JSF Website. At the moment all files have the .xhtml ending. When i go to http://localhost:8080/myProject/start.jsf everything is all right. But when i rename the file from start.xhtml to start.jsf i became a NoClassDefFound Error. What is my mistake? <servlet-name>Faces Servlet</servlet-name>...

How to learn JSP/MVC, with previous experience in ASP.Net MVC?

Hi all, I just started to get into the door of the Java world. I have been programming in C# for the last 3 years, and been doing about 3 months of ASP.Net MVC. I absolutely love it, but the fact that I need Windows for it to run the latest and greatest libraries is a bit of a turn down... Plus I think learning another language helps wi...

Eclipse autocomplete (content assist) with facelets (jsf) and xhtml

How to activate eclipse (3.5, WTP) content assist in .xhtml pages for JSF (1.2) tags, using facelets? It works in .jsp files, but not xhtml. I google a lot, and in many places (including MyFaces wiki) it is said - "Eclipse can't work with xhtml and facelets" Since this works with .jsp files, I assume there might be some mechanism with ...

Is it possible to change the element id separator in JSF?

For example, the following snippet: <h:form id="levelone"> <h:inputText id="leveltwo" value="Test" /> </h:form> generates the following markup: <form id="levelone" name="levelone" method="post" action="/test/testPage.html" enctype="application/x-www-form-urlencoded"> <input id="levelone:leveltwo" type="text" name="level...

Netbeans 6.8 Facelets custom componentes autocompletion

I can create and use facelets custom components with netbeans. The steps I followed are: Create a Facelets tag library (mytaglib.xml). Declare the tag library in web.xml (javax.faces.FACELETS_LIBRARIES) Import the tagfile using namespace (xmlns:rde="http://test.com/mytaglib"). But I can not define the metadata of my custom components...

Richfaces 3.3.2 - JSF 1.2 - Facelets in RAD 7.5 and IBM WAS 7.0

Hello, I'd like to know which is the best way to use JBoss richFaces (3.3.2) with SUN RI jsf implementation (1.2) under RAD 7.5 and WAS 7.0, with facelets. We inverted class loader policy at the application level to obtain this, but I'm not sure this is the best way to do it (parent last policy could be potentially harmful). Thank you ...

What are the differences between JSP and Facelets?

Hello everyone. I'm new to Web Development, so please be patient with me. This might be a dumb question, but I need to get these terms clear in my head! I just started reading the Java EE 6 Tutorial, and I'm a little confused! I knew about JavaServer Pages (JSP), and even did some coding during my undergraduate studies. But now, in thi...

custom facelet component for input field

I'm creating a "big" form with a lot of input fields. To make things easier I tried to create a facelet componente which encapsulates the code for creating a table with two columsn where the first col contains the label and the second one the input field. The tag which includes the component looks like this: <ft:textInput cid="city" la...

Is it possible overload an EL method in JSF 1.1 / Facelets

Is it possible to overload an EL method in JSF 1.1 using Facelets as your view handler? If so, how? For example, I have this code defining my EL methods (which are defined in namespace k): public static String doStuff( String s ) { return doStuff( null, s ); } public statis String doStuff( Map<String,String> m, String s ) { .....

Can we use ui:include in JSF to display a component?

Hi everyone, I am new to JSF and I am trying to display a JSF2 component with ui:include <ui:include src="myComponent.xhtml"> <ui:param name="attr" value="aValue"/> </ui:include> The component is successfully displayed but the param is not passed to the JSF2 component. the attribute attr is defined in the interface of the componen...

Start class right after deployment, not at session start for JSF

For a web application I make use of JSF 1.2 and Facelets. The problem is that we now do the initialisation via a singleton pattern and that takes about 5-15 seconds because it read in data files (we are not using a database). This happens when the first user browses to the corresponding web page (the 2nd and other users don't have this ...

Why is BackingBean method called multiple times when requesting facelet?

Hi, I'm working and learning about JSF + Facelets these days. I have a BackingBean and a Facelet xHTML page. When I request the facelet-page (only one time) the backing-bean-method is called multiple times. What could be the reason for this? I can't see anything special. Thanks in advance. Here is the facelet: <?xml version="1.0" ...

Howto create a facelet-hyperlink with variable data as parameter?

Hi, I have two facelet-pages: customers.xhtml (with a list of customers) and customer.xhtml for detail-view of just one customer. I use a h:dataTable component inside the customers.xhtml: <h:dataTable var="customer" value="#{customerBackingBean.customers}">...</h:dataTable> Now I want to create a hyperlink for each customer in the ta...

How do I enable code-completion in Netbeans 6.8 for facelets in JSF 1.2?

I'd like to enable code completion for facelets + JSF 1.2 in NetBeans 6.8. I'd prefer to enable it for a free-form project that I build using my own Ant build.xml, but I see no options to enable that, so I'm willing to go with a "Web Application with Existing Sources". Sorry for all of the screen-shots. I just want to show what I did. ...

Should I use Facelets "jsfc" attribute ?

Facelets uses the jsfc attribute to convert HTML elements to their associated JSF components. This is rather helpful for fast prototyping as it allows you to create your views using a visual design tool. However I recently discovered this blog post by Cay Horstmann where he lays waste to the use of jsfc together with complex components s...

JSF Locale exception

I'm new to JSF and I would like to internationalize my web page so the web site visitor would be able to switch between languages by clicking on flag icons representing each locale. I have edited my faces-config.xml and added resource bundle, default locale, and supported locales. Then I wrote a bean called changeLang.java which is suppo...

JSF: How to invalidate an user session when he logs twice with the same credentials

I'm using JSF 1.2 with Richfaces and Facelets. I have an application with many session-scoped beans and some application beans. The user logs in with, let's say, Firefox. A session is created with ID="A"; Then he opens Chrome and logs in again with the same credentials. A session is created with ID="B". When the session "B" is created...

Facelets tab lib not recognised by Eclipse/Tomcat 6

Hello I included this in my index.jsp JSF file: <%@ taglib prefix="ui" uri="http://java.sun.com/jsf/facelets"%&gt; and Eclipse underlines the URL, hovering gives this: Cannot find the tag library descriptor for "http://java.sun.com/jsf/facelets" Deploying and trying to start Tomcat 6 using the Tomcat plugin causes this: |STDOUT| ...

How to define an onLoad function in JSF template that will be defined elsewhere

I'm designing the view for my site, which has a standard login and landing page, and I want to have an onLoad function called for my login page, but not for my other pages (yet). I've got a template.xhtml file, which has this insert: <div id="content"> <ui:insert name="content"/> </div> Then in login.xhtml I have: ...