facelets

Practical implications of Facelets ui:remove tag

核能气质少年 提交于 2019-12-23 16:27:07
问题 I want to understand the basic mechanism of <ui:remove> . As per my knowledge, <ui:remove> is basically used in conjunction when basic HTML stuff is part of your Facelets page. When you want, when rendering of the Facelets page happen, it should ignore this part of HTML code, we can use the <ui:remove> tag. Still I am confused about practical implications of <ui:remove> . How often we need to use this Facelets tag? Additionally, the Facelets page is not compiled everytime when the page is hit

JSF2.1.7 renders <!--[if IE ]> tag as text

荒凉一梦 提交于 2019-12-23 16:08:40
问题 We upgraded our JSF to latest version 2.1. previously we were in JSF2.0.4. Our xhtml pages has Targeting IE Using Conditional Comments tag,which were not rendered as text. But with new JSF2.1.7 this is being rendered as text in IE . Any ideas how to get around this issue? 回答1: Use <h:outputText escape="false"> instead. <h:outputText value="<!--[if IE]><link rel="stylesheet" type="text/css" href="ie.css"/><![endif]-->" escape="false" /> 回答2: You can do something like this: <f:verbatim> <!--[if

How to use <ui:include> inside a <h:dataTable>?

心已入冬 提交于 2019-12-23 12:54:08
问题 I want to inlude <ui:include> one page dynamically several times. Code: <h:dataTable ..> <h:column> <ui:include src="#{create_page}"> <h:column> <h:dataTable> Now when I submit it persists only the last inlude. It remembers only the values for the last included page. I want unique entity object in each create_page. How can I do that? 回答1: The <ui:include> is as being a tag handler executed during view build time, while the <h:dataTable> is as being an UI component executed during view render

Managed Bean as Facelet parameter lets composite component prevent resolving

荒凉一梦 提交于 2019-12-23 10:55:19
问题 In the given case, I want to use a facelet with different ManagedBeans, so the regarding action-bean is given as an parameter: <?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:ui="http://java.sun.com/jsf/facelets" xmlns:h="http://java.sun.com/jsf/html" > <h:body> <ui:include src="ratings.xhtml" > <ui:param name="createAction" value="

Different facelets (for use in templates) in JSF 2 per locale

社会主义新天地 提交于 2019-12-23 09:34:50
问题 I have a template somewhere that has <ui:insert name="help_contents" /> and a page that defines <ui:define name="help_contents><!-- actual contents --></ui:define> , where the contents in the definition should be JSF-based (not just plain html/xhtml), handled by the faces servlet and differing based on locale. But I don't want to do this with resource bundles, since that would require large swathes of text per property and having to break it up for every component that's interspersed with the

EL evaluation in a JSF page is not sequential

霸气de小男生 提交于 2019-12-23 06:04:55
问题 I have an XHTML with ui:composition tag which I am loading on AJAX. I am using a jQuery Ajax GET to load the URL of this XHTML. In the loaded page, I have an EL expression and after that I am also including another source which has a few more EL expressions. invariably, the EL expressions of the included source are being evaluated earlier than the one appearing before it. Some.xhtml <ui:composition ... #{relationshipAction.followMember(param['relateToProfile'])} <ui:include src="someOther

JSF calling method with non String parameters

℡╲_俬逩灬. 提交于 2019-12-23 05:17:35
问题 I have in my JSF: <h:commandButton value="Add to Cart" rendered="#{movieDisplayController.movie.available != 0}" action="#{cartController.addMovie(movieDisplayController.movie, '2')}"> </h:commandButton> The action is underlined in red in eclipse (kepler JEE) and displays: Method must have signature "String method(), String method(), String method(String), String method(String, String), String method(String, String, String), String method(String, String, String, String), String method(String,

Using dynamic ui:include inside ui:repeat results in NullPointerException

前提是你 提交于 2019-12-23 03:39:13
问题 I want to create dynamic dialog windows by using <ui:repeat> and <p:dialog> with <ui:include> . But there's an exception when I tried like below. main.xhtml <p:outputPanel id="windowsPanel" layout="block" style="width:100%;"> <p:outputPanel rendered="#{mainView.dynamicWindows ne null}"> <ui:repeat var="item" value="#{mainView.dynamicWindows}"> <p:dialog binding="#{item.dialog}"> <ui:include src="#{item.includedWindowPath}" /> </p:dialog> </ui:repeat> </p:outputPanel> </p:outputPanel> MainView

JSF & ui:repeat - issue with adding an object to cart

我怕爱的太早我们不能终老 提交于 2019-12-23 01:06:15
问题 Once again I need some help with my pizza-search-programm I have written with Java Server Faces. The program: A user can search for pizzas by entering a form. A filtered search is possible as the user can decide whether he searches for a pizza name, a pizza id or other specified criteria. The program will generate a SQL query which returns pizza objects and stores it into a list of objects. A JSF page displays the list of pizza objects by iterating them through a ui:repeat tag. Pizza name,

JSF : dynamically loaded page commandButton not working

隐身守侯 提交于 2019-12-22 23:20:52
问题 I have a page that contains a PrimeFaces accordion panel, in each panel is a PrimeFaces datatable. Below the datatable is a button "Add study" for example and when this button is click I want to dynamically load a page into a <h:panelGroup> using a <ui:include> . When the button is being click I want to dynamically change the src value from the <ui:include> so that my page is loaded in the <h:panelGroup> . Now the problem is the following: My managed bean is set to @RequestScoped and when I