facelets

File upload using RichFaces

I am currently looking in to some file uploading using Java Server Faces. I've found this great introduction to it using RichFaces. However, I have some troubles understanding the process here. First the user selects a file and if the immediate upload is set to true the file is processed using ajax, so far so good. When it comes to the ...

How to generate facelets documentation

For JSP and some JSF tags there is a tool called TLDdoc that generates JavaDoc-style documentation for the JSP and JSF tags. Does anybody know an equivalent for Facelets? There is a tool called facelets-doc that aims to support Facelets but either it's not finished, or the lack of documentation doesn't mention how to make it work. I ha...

How do I get the scope attribute on my table headers when using MyFaces 1.1?

Hi, I'm using MyFaces 1.1.7 with Facelets and Tomahawk. When creating a regular data table, like: <h:dataTable value = "#{Datamanager.data}" var = "row"> <h:column> <f:facet name = "header"> <t:div> <h:outputText value = "Name" /> </t:div> </f:facet> <h:outputText valu...

Explain to me the different JSF component libraries relate

Even though i spend whole days developing a JSF application, i've never had any training on the matter and I have to admin I am a still confused how the whole JSF puzzle fits together. JSF just looks a bit thrown together to me. jsf-api jslt facelets myfaces trinidad tobago jsp api I'd be very grateful if anyone could give me a quick...

Dynamically generate pairs of columns with rich:columns

Is it possible to dynamically generate pairs of columns using RichFaces' rich:columns component? (Version 3.3.0) Ideally, I'd like to generate something resembling the following: +------+--------------+--------------+--------------- | Name | 1/2/09 | 2/2/09 | 3/2/09 (etc.) +------+------+-------+------+-------+----------- |...

facelets: passing bean name with ui:param to action attribute

Hello, Due to some custom components which expect a bean name (NOT the bean instance) in their attributes I need to pass the actual bean name between pages. As the bean itself is also used by non-custom components, I would like to avoid using additional ui:param (like described here http://stackoverflow.com/questions/1083834/passing-act...

How does rich:dataTable's stateVar attribute work?

I'm trying to output the row index for each row in a rich:dataTable. It looks like the stateVar attribute would do this, but I can't figure out how to use it. The reference documentation for this is hopeless: The attribute provides access to a component state on the client side Simply outputting the state variable yields "org.ajax...

Why facelets ignore href-attribute of a link when I use <a href="url" jsfc="h:outputLink"> ?

I have next facelet composition: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"&gt; <html xmlns="http://www.w3.org/1999/xhtml" xmlns:ui="http://java.sun.com/jsf/facelets" xmlns:h="http://java.sun.com/jsf/html" xmlns:f="http://java.sun.co...

JSF & Facelets - Getting Started

I'd like to learn how to develop Java-based web front-ends (I already work with J2EE server-side). Microsoft's path appears quite straight-forward (ASP.NET; like it or not). However, I'm not sure about Java's. JSF1.2/JSP or Facelets, and to get something like a date picker learn IceFaces/Dojo? Any thoughts on a learning path would be...

JSF multiple backing beans on one page

I have done some reading and playing and I still have some questions I was hoping someone might answer: So, can I use two or more backing beans in a single JSF page? <h:intputText value="#{myFirstBean.firstProperty}" /> <h:intputText value="#{mySecondBean.secondProperty}" /> If I can, why should I not do it? (I assume I should not, b...

rich:tabPanel has a strange Behaviour: it does not select the correct tab

Hello everyone. I've found a strange behaviour using rich:tabPanel in RichFaces 3.3.0.GA and Facelets 1.1.14 The problem occurs when I try to nest a tabPanel in a rich:panel, simpleTogglePanel, or h:panelGrid. The panel is in sever mode. It suddenly switch to first tab. It's not that easy to reproduce: If I've got three tabs: click...

How do I package a Facelets composite component for use in another web app?

Let's say I've created a simple composite component in one of my JSF 2.0 web applications using Facelets. Now, I want to use that component in another webapp. Rather than copy the .xhtml file from one app to another, I would like to create a library that I can simply include in each of the webapps. How do I package my composite compon...

JSF 2.0 and Facelets

In blogs i have read that JSF 2.0 is inlcuding Facelets. So i only included JSF-api.jar and JSF-impl.jar to my Java build path. But if i try to use Facelet tags, they don't work. Do i need to configure Facelets anywhere or must i include any further libraries? THX. ...

Inner UI:repeat does not bind to a bean in a nested UI:repeat

HI, I am using nested ui:repeats to display my data. the outer UI:repeat works and binds to bean just fine, but the inner does not bind to the bean. In sumary, I would like to display a list of people where each person has a name and a list of email addresses. Here is my code: <ui:repeat value="#{myFamily.personList}" var="eachPerson" >...

How to freeze or disable an update input form

Hi, I wonder if it is possible for me to freeze or disable the entire update form? I have an input h:form with a check box in it. when users check the box, I would like to freeze or disable the entire form so that disallow users from changing inputs. Thanks, and I am using JSF, Spring Web Flow, Facelets, and Trinidad. ...

JSF problem with FireFox 3.5 caching, wyciwyg:// prefix

Hi all, I am new to JSF and have a problem with my simple JSF application. I use Facelets and Richfaces on WebLogic 10.3.2 (11g). The application is essentially 3 pages: A <--> B <--> C where the intermediate arrows denote navigation rules. The navigation is performed through a4j:commandButtons The problem is in Firefox 3.5, when I cl...

How to insert <br /> tags into a java String

I am trying to insert line break tags into some text and displaying it on a web page. The < and > signs are being translated into &lt; and &gt; and the tags are showing up as text on the web page. The text looks like this when I select it from the database (I've output it to SYSOUT): version 12.4 service timestamps debug datetime ser...

How to change the width of h:outputLabel

Hi, I am having a hard time trying to change the width of my h:outputLabel, but I still could not get it changed. By using CSS, I can change the color, font, frame, anything but NOT the WIDTH. Thank you so much. ...

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

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