facelets

JSF - <h:outputText> (escape special chars)

允我心安 提交于 2019-12-30 11:36:11
问题 I am trying set 1 ® 2 in outputText: <h:outputText value="1<sup>®<sup/>2" escape="false"/> What is incorrect? I get 2 in uppercase. 回答1: You can choose one of the following In your original proposal you had a misplace the / it should be before the sup <h:outputText value="1<sup>®</sup>2" escape="false"/> You can also remove the sup completely (but than your (R) wont be small) <h:outputText value="1®2" escape="false"/> Finally you can use it directly without escaping <h:outputText value="1®2"/

JSF - <h:outputText> (escape special chars)

早过忘川 提交于 2019-12-30 11:36:06
问题 I am trying set 1 ® 2 in outputText: <h:outputText value="1<sup>®<sup/>2" escape="false"/> What is incorrect? I get 2 in uppercase. 回答1: You can choose one of the following In your original proposal you had a misplace the / it should be before the sup <h:outputText value="1<sup>®</sup>2" escape="false"/> You can also remove the sup completely (but than your (R) wont be small) <h:outputText value="1®2" escape="false"/> Finally you can use it directly without escaping <h:outputText value="1®2"/

How to include common content into multiple level template page

安稳与你 提交于 2019-12-30 10:33:05
问题 I am trying include a common page into a template but all I get is a blank page without error. common.xhtml actually has the content that indicate in the template.xhtml. It seems the template.xhtml doesn't recognize the two level include. template.xhtml <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:s="http://jboss.com/products/seam/taglib" xmlns:c="http://java.sun.com

Eclipse - Can't find facelet tag library for uri http://java.sun.com/jsf/html

不羁的心 提交于 2019-12-30 06:20:46
问题 In my index.xhtml , I have a namespace defined like this xmlns:h="http://java.sun.com/jsf/html" . The server at this url indicates that the page cannot be found. Do you know where the page has moved ? Eclipse Info Version: Indigo Release Build id: 20110615-0604 回答1: For solving this problem this is what I did : 1. Close the eclipse project 2. Open the eclipse project 3. Right click on the project 4. Click on Validate => The (false) warnings are gone. 回答2: The XML taglib namespace URI does not

What are the differences between JSP and Facelets? [duplicate]

六月ゝ 毕业季﹏ 提交于 2019-12-30 01:48:06
问题 This question already has answers here : Why Facelets is preferred over JSP as the view definition language from JSF2.0 onwards? (2 answers) Closed 3 years ago . I just started reading the Java EE 6 Tutorial, and I'm a little confused! I knew about JavaServer Pages (JSP), and even did some coding during my undergraduate studies. But now, in this tutorial, I don't see anything about JSP. Instead I read about Facelets, a new View Definition Framework (as it is described in this tutorial). I

Facelets multi-level templates - ui:define not rendered

独自空忆成欢 提交于 2019-12-29 08:50:49
问题 I have 2 basic templates - one with a side menu, and one without - that both ui:include a common page which contains ui:insert tags (templates are largish, so basic example below). Using Mojarra everything worked ok, but now I have migrated to MyFaces the ui:insert tags are ignored and the content of the related ui:define does not get rendered (i.e. 'Here are my results' is not displayed). Should I be specifying included-page.xhtml as a template somehow? I tried <ui:composition template=

h:commandButton multiple actions: download file and render ajax table

余生长醉 提交于 2019-12-29 01:21:11
问题 I currently have 2 command buttons and one listbox. Based on listbox selection, the result generated can be shown in a download-able file or rendered as an HTML table. The getFile() code is based on BalusC's PDF Handling tutorial, while getTable() sets resultTable . <h:form> <fieldset> <h:selectManyListbox id="listbox" value="#{form.items}"> <f:selectItems value="#{form.allItems}"> </h:selectManyListbox> </fieldset> <h:commandButton value="Get File" action="#{form.getFile}"> <h:commandButton

h:commandButton multiple actions: download file and render ajax table

坚强是说给别人听的谎言 提交于 2019-12-29 01:21:00
问题 I currently have 2 command buttons and one listbox. Based on listbox selection, the result generated can be shown in a download-able file or rendered as an HTML table. The getFile() code is based on BalusC's PDF Handling tutorial, while getTable() sets resultTable . <h:form> <fieldset> <h:selectManyListbox id="listbox" value="#{form.items}"> <f:selectItems value="#{form.allItems}"> </h:selectManyListbox> </fieldset> <h:commandButton value="Get File" action="#{form.getFile}"> <h:commandButton

javax.el.ELException: Failed to parse the expression [{pz:instanceof(object,'com.project.domain.MyClass')}]

廉价感情. 提交于 2019-12-28 16:02:48
问题 Currenty I have a web project with JSF 1.2 and Facelets running in tomcat 6.0.18.0. I decided to upgrade the servlet container, thus i deployed in tomcat 7 and all seemed ok until we hit one view using my custome facelet functions. javax.el.ELException: Failed to parse the expression [{pz:instanceof(object,'com.project.domain.MyClass')}] Caused by: org.apache.el.parser.ParseException: Encountered " ":" ": "" at line 1, column 5. Was expecting one of: "}" ... "." ... "[" ... This error occurs

NumberFormatException for input String [duplicate]

落花浮王杯 提交于 2019-12-28 15:12:39
问题 This question already has answers here : Showing Hibernate/JPA results in JSF datatable causes: java.lang.NumberFormatException: For input string: “[propertyname]” (2 answers) Closed 4 years ago . I have the following method in a JSF backing bean: public List<Rent> getTopMemebers(){ return rentDAO.findByMonthAndYear(MonthReport, YearReport); } I am displaying this in a datatable: <p:dataTable value="#{rentController.topMemebers}" var="item"> <p:column> <h:outputText value="#{item.rentid}"/> <