jsf-2

JSF web application not working in IE9. But it works fine in IE8

旧巷老猫 提交于 2019-12-12 20:21:33
问题 I have developed web application using JSF 2.0. It is working fine in IE 8 and other browsers (firefox and google chrome). But it is not working in IE9. Can you please explain the IE9 compatibility for JSF and how it could be done so that I can make my App works in IE9. 回答1: We also had some issues with IE9 and our workaround was to use a filter that tells the IE9 to work in compatibility mode. Notice that this should be the last resort. You should first try to solve your concrete problem

Drag and Drop between different layout units in Primefaces

自古美人都是妖i 提交于 2019-12-12 20:13:36
问题 I have 4 layout units in full-page Primefaces layout. I have outputlabel in west layout unit. I want to drag it and drop it to center layout-unit. The drop area which I want to drop output label to here is a panel in tabView. When I start the dragging outputLabel don't go out from west layout-unit. Also when I drag it to out of west layout-unit it disappears. How can I solve my problem? I've been working on it for 2 days but I haven't succeed. Here is my code: <!DOCTYPE HTML PUBLIC "-//W3C/

Composite component validation in JSF 2.0

左心房为你撑大大i 提交于 2019-12-12 20:02:28
问题 I have composite component in JSF 2.0 <composite:interface> <composite:attribute name="inputId"/> <composite:attribute name="labelValue"/> <composite:attribute name="inputValue" /> <composite:attribute name="required" /> <composite:attribute name="requiredMessage" /> </composite:interface> <composite:implementation> <div class="control-group"> <h:outputLabel for="#{cc.attrs.inputId}" value="#{cc.attrs.labelValue}" class="control-label" /> <div class="controls"> <h:inputText id="#{cc.attrs

AJAX pages with CDI beans and @ConversationScoped

和自甴很熟 提交于 2019-12-12 19:39:34
问题 I'm interested What is the proper way to use JSF pages with AJAX when I use CDI. I tested to configure the CDI beans with @SessionScoped but I found that there is a problem with AJAX. Is it proper to use AJAX with CDI beans configured with @ConversationScoped ? And I found that I have to put conversation.begin(); into the Bean constructor and conversation.end(); into Java method which must be when the session is completed. Can I somehow do this automatically? P.S Can I use this code to

Inconsistent Composite Component clientId when using a MethodExpression attribute

你。 提交于 2019-12-12 19:37:20
问题 Hi suppose you have the following composite component: <!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:ui="http://java.sun.com/jsf/facelets" xmlns:h="http://java.sun.com/jsf/html" xmlns:f="http://java.sun.com/jsf/core" xmlns:composite="http://java.sun.com/jsf/composite" > <composite:interface> <composite:attribute name="action" targets="#{cc.clientId}:value"/> </composite

Truncating big text value in p:dataTable and exporting the table with the full text

强颜欢笑 提交于 2019-12-12 19:23:37
问题 I am using Primefaces 3.5 with JSF 2 and have a dataTable: <p:dataTable id="dataTable" var="refType" value="#{rtmUiController.listAllRefTypes()}" paginator="true" rows="10" filteredValue="#{rtmUiController.filteredRefTypes}" paginatorTemplate="{CurrentPageReport} {FirstPageLink} {PreviousPageLink} {PageLinks} {NextPageLink} {LastPageLink} {RowsPerPageDropdown}" rowsPerPageTemplate="10,25,50,100" resizableColumns="true" emptyMessage="No reference type found."> The table contains the following

How to access FacesContext in Hibernate Envers without Seam?

泄露秘密 提交于 2019-12-12 19:11:32
问题 We're implementing Envers in our project for database auditing, and have run into a snag. We don't know how to determine what user is making the change. All the examples I can find use Seam and their Component.getInstance technique. Glassfish 3.1.2.2 Mojarra 2.1.13 Hibernate 4.1.6.Final Here's our custom Revision Entity @Entity @RevisionEntity(CustomRevisionListener.class) public class CustomRevisionEntity { @Id @GeneratedValue @RevisionNumber private int id; private String login; getters

How to show full page URL of welcome file in address bar

对着背影说爱祢 提交于 2019-12-12 18:58:00
问题 I have "/pages/index.xhtml" page. The problem is when i run the application, this index page name doesn't appears at address bar. It only shows http://localhost:8080/myApplication/ . What I want to see is http://localhost:8080/myApplication/pages/index.xhtml Is there any solution? here is my welcome file from web.xml <welcome-file-list> <welcome-file>pages/index.xhtml</welcome-file> </welcome-file-list> 回答1: You need to send a redirect from / to /pages/index.xhtml . Easiest is to use a real

Show a confirm message before <p:rowEditor> updates the model on click of “OK” button

谁都会走 提交于 2019-12-12 18:24:02
问题 I'm using <p:rowEditor> as follows: <p:column headerText="Libellé"> <p:cellEditor> <f:facet name="output"> <h:outputText value="#{lot.libelle}" /> </f:facet> <f:facet name="input"> <p:inputText value="#{lot.libelle}" /> </f:facet> </p:cellEditor> </p:column> <p:column> <p:rowEditor /> </p:column> I would like to show a confirm message before the <p:rowEditor> updates the model on click of the "OK" button. How can I achieve this? 回答1: You can use onstart attribute of <p:ajax event="rowEdit">

PrimeFaces 3.0 - How can I set a TreeNode icon programmatically from backing bean?

旧时模样 提交于 2019-12-12 18:07:21
问题 I am trying to create a treeview using the PrimeFaces <p:tree> component. I copied the sample code from the PrimeFaces 3.0 Showcase and I have a simple treeview displaying very simple static content that is declared programmatically on the backing bean. One of the showcase examples shows how you can assign icons (the JQueryUI type) to a <p:treeNode> in the Facelet code. That's nice eye-candy for the showcase, but how can I assign the icon via the associated TreeNode in the backing bean code?