richfaces

Execute backing bean action on load?

时光怂恿深爱的人放手 提交于 2019-12-17 23:15:03
问题 I would like to build a results page for a report export page. This results page must display the status of the export and offer the download of this export. The export is done in an action method. I can execute it via a commandButton but it must be executed automatically on load. How can I accomplish this? JSF: <h:commandButton value="Download report" action="#{resultsView.downloadReport}"/> Backing bean: public String downloadReport() { ... FileDownloadUtil.downloadContent(tmpReport, REPORT

What is viewstate in JSF, and how is it used?

元气小坏坏 提交于 2019-12-17 15:38:53
问题 In JSF, there is a viewstate associated with each page, which is passed back and forth with submits etc. I know that viewstate is calculated using the states of the various controls on the page, and that you can store it either client side or server side. The question is: how is this value used? Is it used to validate the values sent at submit, to ensure that the same request is not sent twice? Also, how is it calculated - I realise that richfaces may be calculated differently from myfaces,

IE9 + RichFaces Rendering problem

久未见 提交于 2019-12-17 14:07:44
问题 I have a web app which runs on JSF 2.0 + Richfaces 3.3.3. Looks great on all browsers except IE9. In IE9 without compatibility mode (With, no problem) it looks something like this (ignore blacked out text): Notice how all the components are framed and CSS is ignored (Not seen?) The JSP looks like this (Only relevant stuff): <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> <head> <meta http-equiv="Content-Type" content="text/html;

Unable to upload the file in java

邮差的信 提交于 2019-12-14 03:35:20
问题 I am using richface and JSF . I want to upload the image file with specific path . But it give me error My jsf page is as follows <ui:composition xmlns="http://www.w3.org/1999/xhtml" xmlns:h="http://java.sun.com/jsf/html" xmlns:ui="http://java.sun.com/jsf/facelets" xmlns:f="http://java.sun.com/jsf/core" xmlns:a4j="http://richfaces.org/a4j" xmlns:rich="http://richfaces.org/rich"> <ui:define name="header-title"> <h:panelGroup id="headerPanelGroup"> <span>Create New User</span> </h:panelGroup> <

Conditional invocation of rich:popup panel

扶醉桌前 提交于 2019-12-14 03:19:52
问题 Hello Everyone I would like to open a rich:popupPanel inside a conditional expression, actually what I'm trying is something like this: onclick="#{searchBackingBean.showLoginPanel==true ? #{rich:component('loginPopup')}.show();':''}" However I'm getting errors related to EL, how should I write this correctly?. Thanks a lot. 回答1: You may not nest EL expressions. I suggest to rewrite the expression as follows so that the condition is delegated to JavaScript: onclick="if (#{searchBackingBean

ExtendedDataTable in RichFaces 4: DataModel handling

不想你离开。 提交于 2019-12-13 16:30:59
问题 I have another question, somewhat related to the one I posted in January. I have a list, which is rich:extendedDataTable component, and it gets updated on the fly, as the user types his search criteria in a separate text box (i.e. the user types in the first 4 characters and as he keeps typing, the results list changes). And in the end it works fine, when I use RichFaces 3, but as I upgraded to RichFaces 4, I've got all sorts of compilation problems. The following classes are no longer

why a:commandLink's action attribute works but h:commandLink's does not?

隐身守侯 提交于 2019-12-13 15:37:58
问题 I had a very simple task today that I needed help with. First let me explain my environment. We are on a Java/Hibernate/SEAM/Facelets/JSF/RichFaces & A4J setup.. and I don't know to much about it. I work with it when all of the work on the old asp platform is complete. SO I had something like this (I just cannot remember if I had () after stockCheck.. I am home now): <h:commandLink value="Submit" action="session.stockCheck()"/> The stockCheck() method would NOT run though! It does not return

How to force the build phase in a JSF 1.2 page using JSTL?

左心房为你撑大大i 提交于 2019-12-13 13:07:17
问题 I am making use of JSTL tags in my JSF application. With certain actions, I need the component tree to be rebuilt as if it was an initial build. My current symptoms are incorrect object to component associations, duplicate ids, and other issues with stale components. This is using a c:foreach (cannot use a repeat tag, see example link) tag which is used in the build phase. My understanding is that it is possible to force a rebuild, but I haven't been able to find where or how that occurs. I

Render rich:extendedDataTable

試著忘記壹切 提交于 2019-12-13 07:56:30
问题 I need a rich:popup that shows a rich:extendedDataTable , and when the user presses a button, the popup should be shown, and the extendedDataTable must be re-rendered, here is the code: <rich:popupPanel id="popupId" show="false" modal="true"> <h:form> <rich:extendedDataTable value="#{bean.list}" var="item" rows="5" id="table"> <rich:column> <h:outputLabel value="#{item}" /> </rich:column> </rich:extendedDataTable> <a4j:commandButton value="x" immediate="true" oncomplete="#{rich:component(

Do not collapse whitespace when displaying the value of the backing bean in the JSF

浪尽此生 提交于 2019-12-13 07:46:24
问题 I found that the backing bean value displayed on the JSF page will collapse the white-space automatically .How can I make the value displayed do not collapse the white-space?? For example , I have a MBean which has a String variable test and assign the value "test test" , when I render it using <h1>${MBean.test}</h1> , it just give out test test which all the white-spaces in the middle collapse to a white-space only. This behavior also happens if I display the ArrayList from the MBean in the