jsf-2

Retrieving the value of the selected item in a SelectOneMenu List

百般思念 提交于 2019-12-12 05:27:13
问题 i just want to retrieve the login of the selected User in the SelectOneMenu List here's the code : My xhtml 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:f="http://java.sun.com/jsf/core" xmlns:h="http://java.sun.com/jsf/html" xmlns:ui="http://java.sun.com/jsf/facelets" xmlns:p="http://primefaces.org/ui"> <h:head> <title>JSF

OmniFaces graphicImage method throws IllegalArgumentException

醉酒当歌 提交于 2019-12-12 05:09:21
问题 as already covered in this SO post I was successfully creating an h:outputLink with of:graphicImageURL('imageBean.getFirstImage(Long id, boolean thumbnail)') . This works fine on my local machine. However, when I deploy it on one of my production servers (two instances of the software, both sharing the exact same Java Code, runs perfectly fine on Server A but not on Server B), it throws the following exception: Caused by: java.lang.IllegalArgumentException: argument type mismatch at sun

Mixing Primefaces 3.5 and Richfaces 4.3, will the bundled jQuery conflict?

℡╲_俬逩灬. 提交于 2019-12-12 05:03:38
问题 I'm developing a JSF project in which I must integrate both component libraries. In last versions the main problem was the jquery.js version and extras implementation in jQuery. I've looked the new version of PrimeFaces and RichFaces libraries and I noticed that both have the same jquery.js version. Can I work with both without conflicts? 回答1: I tried to use Richfaces 4.3.2 and Primefaces 3.5 together as they both include the same jQuery version 1.8.3, but it terribly failed . The inspection

jsf 2.0 @ViewScoped redirect (navigation) to target=“_blank”

好久不见. 提交于 2019-12-12 04:58:25
问题 Basically the same question as here How do I retain a ViewScoped bean on the page from which I redirect to a different browser tab: firstPage.xhtml: <h:commandLink action="#{controller.redirect}" value="#{bean.value} target="_blank"/> When redirect/navigation finishes with initializing the other beans, it destroys this #{bean} in the process. In the redirected code I am not even using #{bean}. This used to work with <a4j:keepAlive> Here's my current setup. bean class: @ViewScoped public class

CODI ViewAccessScoped session behavior

强颜欢笑 提交于 2019-12-12 04:58:15
问题 I have a prototype small application built using JSF 2.0 with Primefaces 3.4.2., Spring 3 and Hibernate 4 For ManagedBeans I am using scope as @ViewAccessScoped . I have noticed that while doing pagination in datatables and selection of rows, same view session is used for all sessions, i.e. if I select 3rd row in datatable using Chrome and if I open another browser session using Firefox or Internet Explorer, I can see the same session with 3rd row being selected of datatable. What could be

How to log every URI access with the JSF servlet and the rest servlet

…衆ロ難τιáo~ 提交于 2019-12-12 04:54:04
问题 I'm using a default JSF servlet and RestEasy servlet to serve URI requests (Wildfly 8.1). I want every single URI request to be logged with a @SessionScoped backing bean. Either CDI bean ( @Named ) or ManagedBean ( @ManagedBean ) so that I can log the http requests from this visitor. My requirements: I don't want to invoke the logging of the access from each JSF page, nor from each REST Resource Java file. Every request must be linkable to @SessionScoped annotated backing bean Visit . The

How to override ContentFlow configuration in Primefaces

房东的猫 提交于 2019-12-12 04:52:07
问题 I want to override onclickActiveItem function and need to retrieve current active item index or call something with onMakeActive in Primefaces, what best way to do ? I was able to call function with the following way : <p:contentFlow value="#{imagesView.images}" var="image" widgetVar="img"> <p:graphicImage value="/images/imgs/img#{image}.jpg" styleClass="content" onclick="select(#{image})" /> </p:contentFlow> then in javascript : function setImageIndex(i){ return; } function select(i) {

which phase should i use to intercept the login attempt in JSF

空扰寡人 提交于 2019-12-12 04:51:33
问题 i am using a PhaseListener And i can see that my credentials is available directly from the RESTORE_VIEW all the way up to INVOKE_APPLICATION and RENDER_RESPONSE. Which all makes sense. I wonder what the best practice is when it comes to validating these credentials. I am thinking of i could validate at the RESTORE_VIEW. I am pretty sure i dont want to wait until the UPDATE_MODEL since i believe that might be a security risk. Though a little more uncertain if i should let the phase run

Getting the filtered list in datatable

[亡魂溺海] 提交于 2019-12-12 04:49:43
问题 I am trying to filter a datatable using filter field in the column and get the filtered list (which populates datatable) and update another component (Toplam TL Teminati and Toplam Dolar Teminati) according to the filtered list's values in my page. Is there anyway to do this in Primefaces 2.2.1 and JSF 2? If not can you rec commend a workaround for this case? Thanks in advance. 回答1: To give you an example of how I achieved custom filter logic in my Primefaces 2.2.1 dataTable, I am giving you

Binding dynamic text fields created by javascript to bean

雨燕双飞 提交于 2019-12-12 04:49:28
问题 i have the following code, this creates the number of textfields that i enter inside the textField. <?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://java.sun.com/jsf/html"> <head> <meta http-equiv="content-type" content="text/html; charset=utf-8" /> <title>Dashboard | BlueWhale Admin</title> <link rel="stylesheet" type="text