jsf-2

Filter Facet is not working in Richface 4.3x

≯℡__Kan透↙ 提交于 2019-12-12 02:48:50
问题 In the Code below, You can observe two things: 1) Default sorting is getting utilized. 2) Image based custom filter is used. Problem I am facing : When I click on filter image default sorting is getting triggered. Need a way by which If I click on filter, default sorting doesn't get triggered. (This was achieved in Richface 3.3 by putting this custom filter in filter facet.) Any help or hint would be greatly appreciated. <rich:column sortBy="#{model.modVal}" label="Model Value" sortable="true

JSF 2: possible to initialize session-scoped beans on session start?

99封情书 提交于 2019-12-12 02:45:01
问题 Is it possible in JSF 2 to initialize a session-scoped managed bean as soon as the session context is loaded? I know it's possible with Application Scoped beans and the eager attribute in the @ManagedBean annotation, but does something similar exist for session beans? I have a session-scoped bean that I want to have loaded regardless of if a specific page is visited. 回答1: Are you sure you need a bean? If it is some general initialization stuff, you can use a HttpSessionListener , and on

Primefaces tag rowSelectListener not found.

房东的猫 提交于 2019-12-12 02:44:50
问题 Below is my JSF page. <?xml version='1.0' encoding='UTF-8' ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xmlns:h="http://xmlns.jcp.org/jsf/html" xmlns:p="http://primefaces.org/ui"> <h:head> <title>Test page</title> </h:head> <h:body> <p:dataTable var="order" value="#{orderBean.orderList}" selection="#{orderBean.currentOrder}" selectionMode="single"> <p:column> #{order

Expression Language Other way to invoke method

主宰稳场 提交于 2019-12-12 02:44:18
问题 I have the following code and I'm searching for an other way to do this. public static RequestContextData getRequestContextData() { FacesContext fc = FacesContext.getCurrentInstance(); ExpressionFactory ef = fc.getApplication().getExpressionFactory(); MethodExpression me = ef.createMethodExpression( fc.getELContext(), "#{requestContextData.getRequestContextData}", String.class, new Class[0]); Object o = me.invoke(fc.getELContext(), null); RequestContextData request = (RequestContextData) o;

Change input based on combo value

烈酒焚心 提交于 2019-12-12 02:43:08
问题 I know this question exists somewhere else in SO but either the solutions are old (and JSF seems to have improved a lot) or I cannot make the solution work. As simple as it sounds, I would like to replace the text of an input element based on the value of a combo box. I would like to use Ajax, and would like this to work even if there is only one element in the combo (it doesn't matter if by default the selection of the combo is empty). <h:selectOneMenu id="fnamecombo" valueChangeListener="#

.Cannot export chart as image in Primefaces?

雨燕双飞 提交于 2019-12-12 02:33:28
问题 I cannot export prime-faces chart as Image. categoryModel is same as Prime-show Case. Is it need dependency lib to export? <ui:composition xmlns="http://www.w3.org/1999/xhtml" ...... template="/common/commonLayout.xhtml"> <ui:define name="content"> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> <script type="text/javascript"> //<![CDATA[ function exportChart() { //export image $('#output').empty().append(chart.exportAsImage()); //show the dialog dlg.show(); } //]]> <

Bean properties not being updated

点点圈 提交于 2019-12-12 02:29:25
问题 My bean is viewscoped. I have a simple string property with a getter and setter. The getter works fine(checked by initialising the property), but not the setter. In the setter method I am building a Stringbuffer using each of the incoming parameter. Code: public String getParamval() { return paramval; } public void setParamval(String paramval) { logger.info("Incoming value:" + paramval); pvals.append(paramval); this.paramval = "VAL"; } Is that wrong? I have tested within the setter to see if

Bean method not getting invoked when changed to java.sql.Date

你。 提交于 2019-12-12 02:29:14
问题 I have a strange issue with one of my bean method. If I make date datatype from java.util.Date to java.sql.Dat e, one of the method in my managedBean called actionEdit is not getting invoked when I click a button in jsf page. My actionEdit() method public void actionEdit(){ try { beanValues.add(selectedRow); for (Schedule editValues : beanValues) { editValues.setStartDate(selectedRow.getStartDate()); editValues.setRemarks(selectedRow.getRemarks()); } ScheduleDAO.editSchedule(beanValues);

how to get which tab is clicked when accordion is loaded intially on a page

你离开我真会死。 提交于 2019-12-12 02:23:42
问题 I have an accordion panel with tabs containing name of students. I select on one of the tab and choose edit. I am calling a tab change listener and getting student object and trying to edit it works fine. But My problem is when for the first time Accordion loads, even though I select on the tab,and click on edit, I will get not get student object. Its giving me null pointer exception. since Tab change event does not get called for the first time it loads. How do I solve this? private StudBean

NullPointer RenderResponse.execute JSF2.1.7

百般思念 提交于 2019-12-12 02:17:28
问题 We have JSF2.1.7 in weblogic10.3.4 ,we get the following at some times , what could be the root cause java.lang.NullPointerException at com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:96) at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:101) at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:139) at javax.faces.webapp.FacesServlet.service(FacesServlet.java:594) at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run