jsf

How to combine JSF togglePanel to trigger visibility of some other div/element/?

I was looking through a number of websites, but i couldn't find out how to use a toggle panel to change the visibility of another element. Please see the example.. <rich:togglePanel switchType="client" stateOrder="panelOneOff, panelOneOn"> <f:facet name="panelOneOff"> <rich:toggleControl> <h:outputText value=...

Error with JSF a4j + tomahawk + myfaces: Resources framework is not initialised, check web.xml for Filter configuration

I am trying to use <a4j:commandLink> in my JSP and I get the following error that I don't understand at all: Exception while calling encodeBegin on component : { Component-Path : [Class: org.ajax4jsf.framework.ajax.AjaxViewRoot,ViewId: /pages/clienteAM.jsp] [Class: javax.faces.component.html.HtmlForm,Id: clientesForm] [Class: jav...

Examples of usage of JSF

Are their any good websites (characterized by high usage), that use JSF for their back-end? I have just started working with the basics of the framework. If I see some websites using JSF, may be I will be able to better appreciate the use of the technology. Also could you mention the benefits of using JSF validation viz a viz the browse...

How to redirect a Java ResponseWriter?

For debug reasons, I want to see the ouput of my ResponseWriter directly in standard output. Because the response will be processed by JavaScript I am not able to see the output there. Is there an easy solution to redirect the ResponseWriter to standard output? ...

JSF <h:outputFormat>: use array values as parameters

On my JSF2 page, i'm using internationalized error messages. In my backing bean, i'm putting the messages into the flash Scope: flash.put("error", exception.getType()); On the page, this string gets translated this way: <h:outputText value="#{bundle[flash.error]}"/> Works fine. NOW i want to be also able to put (an arbitrary num...

JSF/Hibernate NotBlank validation.

I have a simple JSF+RichFaces form with some fields and obviously a backing bean to store them. In that bean all the necessary properties have validation annotations (jsr303/hibernate), but I can't seem to find an annotation which would check if the property (String) is blank. I know there's a @NotBlank annotation in spring modules, but ...

JSF 1.2 facelets custom component

Hi! I am trying to develop custom control in JSF 1.2 (using facelets). I followed steps from different tutorials (defining .tld, taglib.xml, registered component in faces-config.xml and implementing UIComponent (component renders itself) and UIComponentELTag classes) and my component is rendered, I have value bound to it, but attribute...

JSF - Forcing use of JSESSIONID in url for iFrame without 3rd party cookie support

HI all! I am working on a JAVA/JSF app that runs within an iFrame. The client authenticates Outside of the iFrame, then redirects back to a page that contains the application inside of an iFrame. If the client has 3rd party cookies disabled, the iFrame will not be able to access the cookie, and it will never see the jsessionid. What I w...

How to disable All JSF images from JSF/ADF components?

Hi, I wonder if there is a way to disable the rendering of all images from all JSF components. As you know, JSF/ADF components have thier own builtin images, which is really nice but I have a weird requirement to not displaying those images at all. I am using JSF and ADF Faces (not ADF Rich Faces). Thanks in advance. ...

JSF vs HTML(JSP) for enterprise portals UI layer. Which one to Choose? and WHY?

Hi, Recently my company has decided to rebuild an enterprise portal, which will be used by people across the globe to resister there product for extended warranty. They have come up with J2EE ( spring MVC ) and Oracle as technology stack for the Business layer, and have decided to use JSF (java server faces) to design the front-end st...

get HttpServletResponse from liferay portal

I am trying to get the HttpServletResponse from liferay portal. I am also working with icefaces. PortletResponse response1 = (PortletResponse)FacesContext.getCurrentInstance().getExternalContext().getResponse(); HttpServletResponse response = (HttpServletResponse)response1; I get the following Exception: Caused by: java.lang....

JSF - Error accessing inherited properties/methods with EL

I am trying to get a generic tree backing-bean to work. I have one generic class called ACLTree, and then an implementation of it. In my JSF document I try to access a value per #{mybackingbean.property}. But I get an ELException: javax.el.ELException: /modules/useradmin/acl.xhtml @30,55 value="#{ACOTree.root}": java.lang.IllegalAccess...

JSF 2.0: Action doesn't work

Hi guys, I set up a JSF2.0 project with maven. Everything works fine exept action handling :-( Here is my .xhtml page: <h:form> <h:commandButton id="submit" value="Absenden" action="#(projectController.saveProject)"> </h:commandButton> </h:form> and here my managed bean: @ManagedBean @SessionScoped pub...

Can't seem to redirect from a ViewScoped constructor.

I'm having trouble redirecting from a view scoped bean in the case that we don't have the required info for the page in question. The log entry in the @PostContruct is visible in the log right before a NPE relating to the view trying to render itself instead of following my redirect. Why is it ignoring the redirect? Here's my code: @Ma...

Passing a parameter with h:commandButton

I have a a4j:commandButton which is supposed to redirect me to an appropriate "Edit" page based on an Id, which I wanted to pass as a parameter, something like this: <h:commandButton action="/details.jsf?faces-redirect=true" value="details"> <f:attribute name="id" value="#{bean.id}" /> </h:commandButton> The problem is, it doesn't...

Rendering of <h:commandbutton> in Firefox?

When we set disabled attribute for is set as true, in Firefox the button still looks like it is enabled but in IE it is working fine. Is it a limitation with Firefox or JSF. ...

Rerender RichFaces error message after ajax request

I am using custom ajax-called javacode that does some processing on the server. In this process various errors can occure that I add to the FacesContext via addMessage(). I want to display these messages in the same <rich:messages>-tag that I use for my validation errors. Do you know a way to display these messages in the <rich:messag...

Composite Components - send more than one f:setPropertyActionListener jsf2

I am trying to create a custom component that recieves a link and adds style class. In the original link, that the user may have f:setPropertyActionListener more than once. I don't want to create propertyActionListenerValue1 and propertyActionListenerTarget1 propertyActionListenerValue2 propertyActionListenerTarget2 etc for each one. ...

JSF 2.0 method invocation

Invoking methods using EL Expression: Can I get the size of a list using an EL Expression? e.g. <h:outputText value="#{myList.size()}" /> This doesnt seem to work. ...

Spring El Expression

I'm switching from faces-config to Spring and wanted to know how you can pass a property from one bean to another: e.g. <bean id="myBean" class="Bean1"> </bean> <bean id="myBean2" class="Bean2"> <constructor-arg ref="#{myBean1.value}"/> </bean> ...