facelets

Duplicate id error with primefaces dialog in template

六月ゝ 毕业季﹏ 提交于 2019-12-11 13:12:19
问题 PF 3.5.10, Mojara 2.1.21, Omnifaces 1.5 I have Facelet-Template with p:menu and p:include for dialog mytemplate.xhtml: <h:form> ... <p:menubar> <p:menuitem value="Start Dialog" oncomplete="mydialogwidget.show()"/> <p:menuitem value="open another page" action="/app/mypage.xhtml?faces-redirect=true"/> </p:menubar> ... </h:form> <ui:insert name="content" /> <ui:include="/app/mydialog.xhtml" /> mydialog.xhtml: <ui:composition> <p:dialog widgetVar="mydialogwidget" ...> <h:form> <p:datatable

JSF / Mojarra 2.0.2: ui:repeat is totally broken when updating via AJAX

核能气质少年 提交于 2019-12-11 12:07:51
问题 Using ui:repeat for simple listing of elements produces very strange results - when you add an element, the first element is always replaced with the values from the last element before the submit. Same occurs when removing the elements - the first element shows actually the just removed element. With h:dataTable the same works perfectly. Running Mojarra 2.0.2. 回答1: This is probably because bug in Mojarra 2.0.2. At least in this case, updating to Mojarra 2.0.3 resolves the issue. However, the

Javascript in JSF - outputScript with no library, no name, and no body content

十年热恋 提交于 2019-12-11 11:33:57
问题 I want to implement a pacman game in an jsf/primefaces project. The game can be found here. Here is my jsf page: <!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" xmlns:f="http://java.sun.com/jsf/core" xmlns:ui="http://java.sun.com/jsf/facelets" xmlns:p="http://primefaces.org/ui"> <h:head> <title>Screen</title> <meta http-equiv="Content-Type

Setting dir=“rtl” in <html> tag doesn't seem to work, works in <h:body>

时光毁灭记忆、已成空白 提交于 2019-12-11 10:53:46
问题 I want to write the text of a JSF with dir="rtl" (Right To Left) when a condition is satisfied. I have checked in a HTML file that if you write in the html tag dir="rtl", like this: <html dir=rtl"> All the pages tags are set dir="rtl", without having to write dir="rtl" in each tag. But when I write in my XTHML file the following code, and the condition is false but it does not work, the pages tags are NOT set dir="rtl". <html xmlns="http://www.w3.org/1999/xhtml" xmlns:h="http://java.sun.com

Using Facelets as <error-page><location> causes IllegalStateException: getWriter() has already been called for this response

狂风中的少年 提交于 2019-12-11 10:03:21
问题 I'm trying to setup the Omniface's FaceExceptionFilter on my Glassfish 4.0 server, using Mojarra 2.2.8, Primefaces 4.0 and Omnifaces 1.8.1. The filters and error pages in web.xml are defined as follow: <filter> <filter-name>facesExceptionFilter</filter-name> <filter-class>org.omnifaces.filter.FacesExceptionFilter</filter-class> </filter> <filter-mapping> <filter-name>facesExceptionFilter</filter-name> <servlet-name>Faces Servlet</servlet-name> </filter-mapping> <filter> <filter-name

Using java to create a dynamic rich:panelMenu

蹲街弑〆低调 提交于 2019-12-11 09:13:17
问题 Hail This attempt at using component libs to access a Map<String, ArrayList<String>> <rich:panelMenu style="width:35%" mode="ajax" iconExpandedTopGroup="/img/logListIcon.png" iconCollapsedTopGroup="/img/logListIcon.png" iconCollapsedGroup="/img/logListFolderIconClosed.png" iconExpandedGroup="/img/logListFolderIconOpen.png" iconGroupTopPosition="left" iconItem="/img/logFileIcon.png"> <!-- feed iteration --> <ui:repeat items="#{PanelMenu.panelNodes}" var="map"> <rich:panelMenuGroup label="#{map

How to update a composite component form from another composite component?

孤街浪徒 提交于 2019-12-11 07:48:34
问题 I'm having problem trying to update an external form. To be more clear, I have a primary form that includes 2 different composite components, lets call include1 and include2. The page I want to update is the include2 being update after a search from a include1. this is how the 2 pages are being included. <ui:define name="include1"> <ui:param name="mbean" value="#{currentBean}" /> <libcomp:include1 /> </ui:define> <ui:define name="include2"> <ui:param name="mbean" value="#{currentBean}" />

How to handle specific namespace declaration in JSF template

橙三吉。 提交于 2019-12-11 07:35:27
问题 I have a master template that are used by all the other pages. Imagine that I some of pages that are using PrimeFaces components, and some are using facelets. At the moment I have to declare all the namespaces in the master template like this: <html xmlns="http://www.w3.org/1999/xhtml" xmlns:h="http://java.sun.com/jsf/html" xmlns:f="http://java.sun.com/jsf/core" xmlns:ui="http://java.sun.com/jsf/facelets" xmlns:p="http://primefaces.org/ui"> This means that the pages without PrimeFaces

JSF - Two Questions about actions on UIComponent

自闭症网瘾萝莉.ら 提交于 2019-12-11 07:28:58
问题 So, let me show us my troubles :) 1 - When i click on a commandbutton <h:commandButton value="Somethings"> <f:setPropertyActionListener target="#{bean.method}" value="some" /> <f:ajax render="rendering"/> </h:commandButton> I dont do any action to the commandButton . Just i fire the ajax call. If i add an action on the button (like action="bean.myAction ) it will be executedat the 5° phase of the JSF lifecycle (allright, only if i write event="action" in the f:ajax, but thats as default).

get .css file from a sub folder

早过忘川 提交于 2019-12-11 07:27:54
问题 In Netbeans I have a sub folder called css and a file in it called testcss.css . How do I get Facelets file from root to access the testcss.css file? <meta http-equiv="content-type" content="text/html; charset=windows-1252" /> <link rel="stylesheet" type="text/css" href="/testcss.css" title="style" /> My directory structure is: Root (not a folder) css (folder) testcss.css A screenshot of the structure is available here. 回答1: You should put CSS (and JS and image) resources in /resources folder