facelets


Hide .xhtml source - facelets/icefaces?

微笑、不失礼 提交于 2020-01-22 15:27:12
问题 I'm new to Icefaces and Facelets both, but I'm using them on a new project. I've got everything working configured and working fine. However, when I visit mywebapp/file.xhtml, the entire facelets template source comes up in my browser. How could I hide this to prevent users from viewing my server-side templates? 回答1: Put all templates into WEB-INF/someDirectory/templates. Then according to the facelets documentation put this inside your web.xml for all other xhtml files: <security-constraint>

How to save an array in JSF with ui:repeat + h:inputText + managed bean?

孤者浪人 提交于 2020-01-22 08:15:48
问题 In a postgres database I have a table with, among others, an int[] field. In my model I have a persisted bean that maps the table, including the int[] field. In this class I have implemented all the needed setters/getters. Now, I have a managed bean which plays also the controller role, and links to the model bean. So, in my xhtml I'm trying to do this: <ui:repeat value="#{drawsetController.selected.editableBaseSetList}" var="baseNumber"> <h:inputText value="#{baseNumber}"/> </ui:repeat>

Using managed-property with CommandButton in Java Server Faces

穿精又带淫゛_ 提交于 2020-01-21 23:09:55
问题 In addition to my question "Creating an “Edit my Item”-page in Java Server Faces with Facelets" I would liek to cover an issue that this provided. When I press the commandButton the ID=100 is removed and the page is refreshed, and this is Before it even runs the method, right, so this means that I do not have the ID when i press the button. How do you solve this? By having this Managed Bean public class BeanWithId implements Serializable { private String id; private String info; private void

Using managed-property with CommandButton in Java Server Faces

独自空忆成欢 提交于 2020-01-21 23:09:08
问题 In addition to my question "Creating an “Edit my Item”-page in Java Server Faces with Facelets" I would liek to cover an issue that this provided. When I press the commandButton the ID=100 is removed and the page is refreshed, and this is Before it even runs the method, right, so this means that I do not have the ID when i press the button. How do you solve this? By having this Managed Bean public class BeanWithId implements Serializable { private String id; private String info; private void

How to customize h:head when using ui:composition template?

£可爱£侵袭症+ 提交于 2020-01-19 09:56:08
问题 I am using JSF to render an HTML page. I design the page like it : <f:view xmlns="http://www.w3.org/1999/xhtml" xmlns:ui="http://java.sun.com/jsf/facelets" xmlns:p="http://primefaces.org/ui" xmlns:h="http://java.sun.com/jsf/html" xmlns:f="http://java.sun.com/jsf/core"> <h:head> <meta http-equiv="content-type" content="text/html; charset=UTF-8" /> <meta name="language" content="fr" /> <title><ui:insert name="title">My app</ui:insert></title> </h:head> <h:body> <div id="top"> <ui:include src="

migrating to facelets 2.0 from facelets 1.x

与世无争的帅哥 提交于 2020-01-16 12:04:08
问题 I'm building a web App using JSF 2.0 and had a jaf-facelets.1.1.10 jar in my WEB-INF > lib folder, so now I'm trying to remove that so I can use the built int facelets 2.0 I was reading through this Question which balusC answered and I've done that, except teh part where it saysI need to replace FaceletViewHandler by ViewHandlerWrapper. for that I saw this question, but I don't have any faceletViewhandler classes in my project. as of now, my webxml looks like this ( please check taht I didn't

binding on p:dataTable which is included multiple times causes ID unqiueness exceptions

。_饼干妹妹 提交于 2020-01-16 01:55:48
问题 I'm attempting to use a special PrimeFaces data exporter implementation as being used in this answer: https://stackoverflow.com/a/14413932/396732 Our use case however is a little more complex, e.g. using Facelets to show the respective datatable for export, which has row expansions with sub tables in them. insiderListManagerDialogs.xhtml: <ui:include src="insiderListManagerListDialog.xhtml"> <ui:param name="idPrefix" value="il-emp" /> <ui:param name="widgetVarPrefix" value="ilEmp" /> <ui

RichFaces application, should I use rich:dataTable or jQGrid, pros cons?

て烟熏妆下的殇ゞ 提交于 2020-01-14 19:15:47
问题 Following on from here, I need to have an inline editable grid in my web application using RichFaces 3.3.3, JSF 1.2 and Facelets. My options are the rich:dataTable RichFaces control, or the jQuery plugin, jQGrid I have tried both and found the following so far: jQGrid works really well, but I am not sure what will happen if I try to refresh JSF controls from the grid, if that's possible? I am hesitant to use or trigger RichFaces modal windows from the jQGrid, can this cause problems? Or

RichFaces application, should I use rich:dataTable or jQGrid, pros cons?

怎甘沉沦 提交于 2020-01-14 19:09:54
问题 Following on from here, I need to have an inline editable grid in my web application using RichFaces 3.3.3, JSF 1.2 and Facelets. My options are the rich:dataTable RichFaces control, or the jQuery plugin, jQGrid I have tried both and found the following so far: jQGrid works really well, but I am not sure what will happen if I try to refresh JSF controls from the grid, if that's possible? I am hesitant to use or trigger RichFaces modal windows from the jQGrid, can this cause problems? Or

“PWC3999: Cannot create a session after the response has been committed” [duplicate]

烂漫一生 提交于 2020-01-13 15:31:48
问题 This question already has answers here : Adding <h:form> causes java.lang.IllegalStateException: Cannot create a session after the response has been committed (5 answers) Closed 3 years ago . I'm having this weird problem with one of the pages of my application. It's throwing the error I mention on the title: PWC3999: Cannot create a session after the response has been committed I've checked other posts regarding this subject, but I don't see anything that applies to this situation, because

工具导航Map