jsf

Is there an elegant way to handle the rendered check much similar to an if else block

In the following scenario, the "hasA" condition is checked twice, is there a way to mimic this much similar to a if/else block so that the condition is evaluated only once <s:decorate template="/layout/display.xhtml"> <h:outputText value="Print A." rendered="#{hasA}"/> <h:outputText value="Pri...

Seam - ListSelectMenus with dependencies

Hi there, I'm trying to build some select boxes with dependencies on other select boxes. I'm fairly new to Seam - just to add this. Here is my JSF - for test purposes I'm trying to display a dataTable <f:facet name="header">Profil</f:facet> <a:form ajaxSubmit="true" reRender="testTable"> <s:decorate id="techTypeField" template="la...

JSF modular web application

Hello, talking about a modular web application like a Content Management System, where you can upload and install separated modules, I would like to know what is the best way to develop separeted modules (like News, rss Reader, Forum, etc...) using JSF, that could be put in packages and uploaded into the modular web application. Thank ...

Jsf How to create a Naming Container

I have a problem with duplicated ids in my JSF app. I've read in this post that one of the possible solutions is to use Naming Container. Can you give me some example how to use the Naming Container to avoid duplicated ids problem? I use Facelets. ...

Target Unreachable when Access a composite key from JSF

Inside my JSF I did <h:outputLabel value="Group:" for="group" /> <h:inputText id="group" value="#{newUserController.group.groupKey.groupId}" title="Group Id" /> Group.java @Entity public class Group { @EmbeddedId private GroupKey groupKey; @ManyToOne @JoinColumn(name="userId") private User user; //setter, g...

JSF 2.0 (Facelets) and Struts

Hello I am a newbie with Java EE 6. I started with JSF 2.0, Facelets, Managed Beans and really liked it. It was a great switch from JSP and servlets. It also made me a confused person. It may be the lack of my knowledge, but I have many questions swirling in my mind. Are Facelets and Managed beans a direct replacement of JSP and Servle...

Lazy loading problem in Spring/Hibernate/Richfaces application

Hello In a Spring application, I use the component rich: tree with Hibernate which display the hierarchy of applications using lazy loading. The problem is that the Hibernate session is closed which prevent lazy loading and i receive exception when the page is rendered. Finally I added opensessionViewFilter that's allows me to keep the s...

Preferred way to set up a JSF start page ?

Hi, I'm using JSF 2.0 to build a website. Eclipse generated the following web.xml file ... <servlet-mapping> <servlet-name>Faces Servlet</servlet-name> <url-pattern>/faces/*</url-pattern> </servlet-mapping> ... So to view my application i have to visit "localhost/myApp/faces/index.xhtml". I would prefer to view it directl...

JSF2.0 simple file input

I'm trying to add a very simple file input to my webapp which I'm doing using JSF2.0 and RichFaces 3.3.3, the thing is I really dislike the richfaces fileInput component and I'm looking for something simpler (in terms of use and looks), so far I've found: tomahawk's fileInput - but tomahawk only supports JSF1.2 trinidad fileInput - but...

Why a4j:output doesn't re-render parent panels

Hi, Good evening. I'm facing the following error: I have a selectOneRadio in one file that uses the a4:support to call something in the serverside. The problem is that I need to reRender a tab component that is in the outmost files in a series of includes. The reRender apparently doesn´t work in this case. here are the codes: My MBean: ...

Netbeans Java Debugger crashing with Out of Memory Errors

Recently, while working on a JSF web app, using Netbeans 6.8, I am constantly getting PermGen: Out Of Memory Errors. I have also noticed that this is not related to hot swapping the code, as some people suggested on the forums; I generally restart my local web server, Tomcat 6.0, whenever I redeploy the code. This used to happen to me on...

JSF ValueChangeEvent: how do I change the options on one SelectOneMenu based on my selection on a previous SelectOneMenu?

Ok I've been stuck with this for a couple of days (understatement). Say I have a selectOneMenu <h:selectOneMenu id="selectFamily" valueChangeListener="#{menuBean.changeFamily}" onclick="submit()" immediate="true" > <f:selectItems id="familyNames" value="#{menuBean.familyNames}" /> </...

how to use JSF in JSP- and XHTML-Files

My Webapplication has in fact two different View-Files: JSP-Files including JSF XHTML-Files including JSF In Version 2.0 of JSF you can use both, but I should use both with Spring and Spring Web Flow! So how can I define, that both View-Files are possible and work with Spring and Spring Web Flow? ...

How to enable/disable components in jsf/icefaces ?

Hi, I am looking for how to enable and disable the icefaces components based on the user login ? For example: if login as admin i need to enable the come more components and login as user, disable some components as well as add some other components in one page ? How to do this function in jsf/icefaces ? These two enable and disable in...

Panel reload after Checkbox Click

Hi everyone, I have the following scenario (using rich faces): ... <a4j:outputPanel id="foo"> <h:commandButton disabled="#{not _user.selected}" value="Do Stuff" /> </a4j:outputPanel> ... <h:selectBooleanCheckbox value="#{_user.selected}"> </h:selectBooleanCheckbox> ... I now want the 'foo' panel to reload when I cli...

JSF 2: outputLink whose parameters depend on user input

Here is my problem: I need to create a (seemingly) simple front-end for a report. The user enters a bunch of numbers, seperated by whitespace or commas, which are the IDs that will be brought up in a report. I use a converter to change this from a string to a List, and then from there back into a form where the numbers are delimited ...

How to disable the splashscreen of the rich:extendedDataTable

When the rich:extendedDataTable return it's result, there a splashscreen (a little animated gif) displayed. And I'm searching for a way to removed it. I noticed that in firebug .extdt-ss-vsbl { background-image:url(/swf-rf-poc/spring/a4j/g/3_3_2.SR1org/richfaces/renderkit/html/images/loading.gif); b...

JSF: How to refresh a page after download

I have a commandButton that will invoke a function to download a file (standard stuffs like InputStream, BufferedOutputStream ...) After download success, at the end of the function, I change some values of the current object and persist it into database. All of these work correctly. Now when file is done downloading, the content of the ...

How can dynmically change a line of a JavaScript function?

Hi all, Suppose I had the following function: function alertMesg() { alert("This ok function alerts message!"); } Now at run time I would like to change the alertMesg function to do something else. My thought was to do somehting like this. var temp = window.alertMesg.toString.replace("ok","great") temp = temp.replace('function a...

How to avoid jsession id being appended to url ?

We have a Spring , JSF application at Skill-Guru Problem: User opens the site by visiting through a url or directly typing www.skill-guru.com in url. Now when the user clicks on any link first time, a jsession id is appended to the url. for eg http://www.skill-guru.com/test/62/pmp-certification-practice-test;jsessionid=3FBFDD1C6C8A9A2...