facelets

JSF/Facelets : CSS file is not being recognized using <h:outputStylesheet> tag

…衆ロ難τιáo~ 提交于 2019-12-09 02:17:14
问题 I'm working on a project using JSF/Facelets. I want to do some CSS changes on my View XHTML, but nothing happen when i deploy my web application in my Tomcat Server. I've tried many tricks but i've got the same result. Anyway, here's my "styles.css" : body { width: 750px; } #header { width: 100%; font-size: 36px; font-weight: bold; line-height: 48px; background-color: navy; color: white; } #footer { width: 100%; font-weight: bold; background-color: navy; color: white; } And this is the main

JSF 2.0 and Primefaces with Facelets

南楼画角 提交于 2019-12-09 02:02:19
问题 I'm trying to incorporate primefaces into my JSF 2.0 web project. I've recently updated from facelets 1.x to 2.0 and Added primefaces jar to my library folder. Everything is fine except, the way I have my templates structured has a conflict with the primefaces. my template.xhtml looks like this: <?xml version="1.0" encoding="utf-8"?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xmlns:ui

How to include/import a JSP page inside a Facelets page?

落花浮王杯 提交于 2019-12-08 12:23:14
问题 Does somebody know if it is possible to include/import a JSP page inside a Facelets page? After several unsuccessful tries with <c:import> , <jsp:include> , <ui:include> and some research on internet I think it’s time to ask it in stackoverflow. someJSFpage.xhtml : <?xml version="1.0" encoding="ISO-8859-15" ?> <!DOCTYPE html> <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"

Command button with EL method argument does not invoke action method

ぐ巨炮叔叔 提交于 2019-12-08 12:05:53
问题 I am trying to delete a database entry by sending the primary key "userId" as EL method argument via a command button to my managed bean. My current code looks like Bean: @ManagedBean @RequestScoped public class HibernateUserHandling { ... public void deleteUser(String userIdViaXhtml) { Session session = sessionFactory.openSession(); session.beginTransaction(); session.createQuery("DELETE FROM AddressDetails WHERE USERID = :userIdViaXhtml"); session.createQuery("DELETE FROM UserDetails WHERE

how to transfer parameter from managedbean to a jsf page

丶灬走出姿态 提交于 2019-12-08 11:52:28
问题 I want to transfer a parameter from a jsf page to another jsf page. Like this: a.xhtml <h:form> <h:commandLink class="navi" value="press" action="#{Bean.action}"> <f:param name="id" value="5555" /> </h:commandLink> </h:form> Bean.java public String action() { HttpServletRequest request = (HttpServletRequest) FacesContext .getCurrentInstance().getExternalContext().getRequest(); String param = request.getParameter("id"); return "b?id=" + param; } b.xhtml <h:inputText value=#{param.id} /> By

ui:repeat - adding / removing elements from list does not work properly

拈花ヽ惹草 提交于 2019-12-08 09:00:30
问题 I have following code in my .xhtml file <h:form id="registration3Form"> <h:panelGroup id="terms_outer_panel"> <h:commandLink styleClass="item-7" action="#{registerBusinessWizardController.addCourse}" value="#{msgBundle['registerThirdPage.panel.addSchedule']}"> </h:commandLink> <ui:repeat value="#{registerBusinessWizardController.courses}" var="course"> <h:panelGroup id="terms_inner_panel"> <div class="term"> <h:inputText id="price" styleClass="item-2" value="#{course.price}" /> <h:inputText

Facelet selectOneMenu with POJOs and converter problem

无人久伴 提交于 2019-12-08 08:17:59
问题 I want to have a facelet page with a formular and a dropdown menu. With the dropdown menu the user shoul select a POJO of the type Lieferant: public class Lieferant extends AbstractPersistentWarenwirtschaftsObject { private String firma; public Lieferant(WarenwirtschaftDatabaseLayer database, String firma) { this(database, null, firma); } public Lieferant(WarenwirtschaftDatabaseLayer database, Long primaryKey, String firma) { super(database, primaryKey); this.firma = firma; } public String

Ways to include a dynamically generated facelet

荒凉一梦 提交于 2019-12-08 07:50:43
问题 In current project I need to create a panel that will contain an HTML content created by the user elsewhere in the application. This content can be easily inserted like this: <h:outputText value="#{myBean.dynamicHTMLContent}" escape="false"/> An example content: <p>User text</p> Now we need to give the user more freedom and allow him to use tokens in the HTML code that will be resolved by the application later: <p>User text</p><p>User image: {niceImage}</p> The application parses user content

Multiple JSF components inside a PanelGrid

爷,独闯天下 提交于 2019-12-08 07:02:25
问题 I am trying to get the reusable group of jsf 1.2 components inside a panelgrid using Facelet tag file with @Balusc's previous answer at How to make a grid of JSF composite component? as a reference. I have copied /WEB-INF/tags/input.xhtml and example.taglib.xml and the main application xhtml. However, I am running into some issues. 1. If I don't pass the id and simply do <my:input id="cat" type="text" label="FirstName" bean="#{bean}" property="fName" required="true" /> <my:input id="dog" type

DocType is not showing in the rendered output from JSF

本秂侑毒 提交于 2019-12-08 04:28:15
问题 I am trying into integrate JSF1.2, Richfaces 3.3.0 GA, Facelets1.1 and JQuery. The issue i am facing is the rendered output is starting from i.e its missing the Doc type and HTML Tag. For example <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.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"><ui:composition> <head> <