facelets

RichFaces rich:clientId within facelets

Hi there, I'm trying to something like this: <?xml version="1.0"/> <ui:composition ....> <h:inputText id="#{id}InputText" value="#{value}"/> <rich:calendar id="#{id}Shevron" popup="true" datePattern="ddMMyy" showInput="false" todayControlMode="hidden" enableManualInput="false" s...

JSF 2: Facelets composition (template) not rendered for error-page

I'm using JSF 2.0 with Facelets in a Java EE 6 application server (GlassFish v3). I have configured an error page for exceptions, in web.xml: <error-page> <exception-type>java.lang.Throwable</exception-type> <location>/error-all.xhtml</location> </error-page> This is the /error-all.xhtml test page: <!DOCTYPE composition PUBLI...

chrome renders js different depending on the extension of the file to render [testcase included]

I was trying to implement an image panner I found here Chrome renders the same document differently depending on the extension of the file requested. I have created a test case, where it works when the file it's not named as test.xhtml You can download the test case from here Does anybody know why or how to solve it? I want my files to...

Facelets charset problem

Hi! In my earlier post there was a problem with JSF charset handling, but also the other part of the problem was MySQL connection parameters for inserting data into db. The problem was solved. But, I migrated the same application from JSP to facelets and the same problem happened again. Characters from input fields are replaced when in...

Remove Foobar.xhtml from URL with JSF

I have written a facelets web application using tomcat as a application server. My program has a foobar.xhtml and the URL to it is: http://localhost:8080/Myapplication/foobar.faces Can I change something in my application so that a link to: http://localhost:8080/Myapplication/ ..will actually render my application on http://localhost...

JSF Facelets: Sometimes I see the URL is .jsf and sometimes .xhtml. Why?

Been try to learn JSF, and sometimes I see the URL is .jsf and sometimes is .xhtml. Can sometimes fill my knowledge, please? When I create a JSF using Facelet, the file extension is .xhtml, so where does .jsf URL extension come from? ...

Facelet components layouts and javascript

Hi all, I have a question regarding the placement of javascript within facelet components. This is more regarding best practice/style than a programming issue, but I feel like all the solutions I have thought of have been hacks at best. Ok here is my scenario: I have a facelet template like so (my faces, and apache Trinidad)... <ui:com...

Redirecting to a Facelet is not working when extending FaceletViewHandler

I'm overriding the handleRenderResponse method defined in com.sun.facelets.FaceletViewHandler: protected void handleRenderException(FacesContext context, Exception ex) I'm overriding this method so I can redirect the user to a custom error page (which contain the desired look and feel and other stuff). This is the way I'm trying to ...

Better <h:selectManyCheckbox> layout?

I have a JSF page. At one point, I have a <h:selectManyCheckbox> that is displaying a number of items. The tag provides 2 attributes you can set to define whether the contents should be displayed horizontally or vertically. However, with more than a few items both choices look bad. Go with horizontal, and everything ends up bunched up...

JSF Tag exception caused by f:setPropertyActionListener: Parent is not of type ActionSource

I have a web application written in plain old JSF that I want partially migrate to ICEfaces to use some of its components, namely confirmation panel for now. To use it, I changed my forms with links that require confirmation to ice: tag library from h:. Links I use should fire method that takes a parameter. The parameter is sent via f:se...

JSF2: limiting cc:attribute to a given object type within a List

If I had a managed bean as follows: @ManagedBean @RequestSchoped public class Example { private List<String> stringList; private List<Long> longList; // getters, setters, etc. down here } and had a custom component which accepted a List as an attribute: <?xml version='1.0' encoding='UTF-8' ?> <!DOCTYPE html PUBLIC "-//W...

Facelets custom tag not rendering

Hi! I am trying to create a custom tag with Facelets but it isn't rendering (i.e. the tag appears unreplaced in the response). The tag (/WEB-INF/facelets/tags/inputThumbnailSelector.xhtml): <html xmlns="http://www.w3.org/1999/xhtml" xmlns:f="http://java.sun.com/jsf/core" xmlns:h="http://java.sun.com/jsf/html" xmlns:ui="ht...

is it possible to do this in jsf?

I have a / group of radio buttons , and a CommandButton Two cases 1)When one of the button is clicked + The command Button is clicked, I should display some other section(say a DIV) and the execution stops. means, The Command Button should not submit the form to the server 1)When NONE of the button is clicked + The command Button is ...

Conditionally Print Stack Trace on Error Page Depending on Log Level using Facelets, Seam, and Logback

I would like to print the stack trace for the exception that was caught by pages.xml, but I only want to do so if the most granular logging level is more granular than warn. This way, testers can copy/paste the stack trace, but end users will never see it. Environment details: IBM WebSphere Application Server 7 (logging level details)...

Xhtml pages and HttpSession test , no jstl ?

I have a dynamic web application in JEE with JSF, Facelets, Richfaces. My pages are all xhtml pages. So JSTL isn't working in it. For my account pages and all other private pages to be reachable, I want to test if the user got connected, so if the attribute session in HttpSession is not null. If it's null, the user gets redirected in th...

JSF/Seam -- Nested/Recursive iteration

I've got a situation where I would like to perform nested iterations on a series of options and display the results using JSF. As an example, think of a discussion board. Each comment may contain a parent comment and 0-n child comments. So, my root object would be something like this: public class MyObject { ... public List<Comment...

Templates with Facelets and calling action from template's component ?

Hello everyone ! I'm a newbie in JSF, facelet, richfaces... and I understood managed beans, methods called within JSF components However, I wanted to use facelets template with the ui:composition, ui:define, like master pages in asp.net But I have an action that's meant to be called in a masterpage component... and I keep having the s...

Create drop down menu in seam with s:selectItems

Hi guys, I have just started to learn seam framework. I decided to code two drop down menus. One listing categories and other listing subcategory. The idea is that user will first select a category and depending on that a subcategory will be populated. <h:selectOneMenu value="#{manager.category}" required="true"> <a:support ev...

problem with <p:dialog> and facelets

hi all i'm facing a litte problem with primefaces and facelets here's the problem: i got a template file, that will be my base for all my screens. <p:growl id="cadastroMessages" /> <p:panel header="#{header}"> <h:form id="#{formId}"> <h:panelGrid columns="4"> <p:commandButton value="#{msg.novo}" action="#{ma...

Problems referring a css from an XHTML

In my JSF Application (My faces 1.2.3) , I am referring to a css file as <link href="css/nav.css" type="text/css" rel="stylesheet" />, This worked when the rendered HTML is accessed as an HTML file using the browser but not inside my customized servlet container. It wasn't referring correctly, eventhough the relative path was corre...