facelets

Outcommented Facelets code still invokes EL expressions like #{bean.action()} and causes javax.el.PropertyNotFoundException on #{bean.action}

旧城冷巷雨未停 提交于 2019-11-26 02:15:04
问题 I\'ve the following code snippet in my Facelet: <h:commandLink id=\"cmdbtn\"> <f:ajax event=\"click\" execute=\"@form\" listener=\"#{screenShotBean.takeScreenshot}\" /> </h:commandLink> It works fine, but when I outcomment it like this, <!-- <h:commandLink id=\"cmdbtn\"> --> <!-- <f:ajax event=\"click\" execute=\"@form\" --> <!-- listener=\"#{screenShotBean.takeScreenshot}\" /> --> <!-- </h:commandLink> --> then it throws the following exception: javax.el.PropertyNotFoundException: Property \

The entity name must immediately follow the &#39;&&#39; in the entity reference

拟墨画扇 提交于 2019-11-26 02:07:20
问题 I want to put a packman game on my *.xhtml page.(I am using jsf 2 and primefaces 3.5) However, when I \"translated\" the html page in xhtml I get an error at this script: <script> var el = document.getElementById(\"pacman\"); if (Modernizr.canvas && Modernizr.localstorage && Modernizr.audio && (Modernizr.audio.ogg || Modernizr.audio.mp3)) { window.setTimeout(function () { PACMAN.init(el, \"./\"); }, 0); } else { el.innerHTML = \"Sorry, needs a decent browser<br /><small>\" + \"(firefox 3.6+,

Packaging Facelets files (templates, includes, composites) in a JAR

丶灬走出姿态 提交于 2019-11-26 01:58:58
问题 Is it possible to put JSF2 Facelets files with common content into a JAR to use it from other web applications inside e.g. <ui:composition template> , <ui:include src> , <cc:implementation> , etc? If yes, how can I achieve this? Is some extra configuration necessary? 回答1: You can put common resources in the /META-INF/resources folder of the JAR which is to be treated like as /WEB-INF/resources folder of the WAR. E.g. CommonWebProject |-- META-INF | |-- resources | | `-- common | | |-- css | |

When using <ui:composition> templating, where should I declare the <f:metadata>?

时光怂恿深爱的人放手 提交于 2019-11-26 01:53:50
问题 I have made a lot of progress in converting my JSF applications to book-markable pages, but I am wondering if I am doing it the right way. One question is that is there a best-practice location for the f:metadata tags? My typical Facelets client page looks like this: <ui:composition template=\"./pattern.xhtml\"> <ui:define name=\"content\"> <f:metadata> <f:viewParam name=\"userId\" value=\"#{bean.userId}\" /> <f:viewParam name=\"startRecord\" value=\"#{bean.startRecord}\" /> <f:viewParam name

Obtaining Facelets templates/files from an external filesystem or database

…衆ロ難τιáo~ 提交于 2019-11-26 01:46:05
问题 I am able to successfully get this to work with the template in my app: <ui:decorate template=\"/WEB-INF/templates/mytemplate.xhtml\"> I am also able to move template to /META-INF/templates/mytemplate.xhtml of a JAR and get this to work: <ui:decorate template=\"/templates/mytemplate.xhtml\"> I would actually like to put this file onto filesystem (or database for that matter). How can I achieve this? I found plenty of things related to com.sun.facelets.impl.DefaultResourceResolver , but I don\

Error parsing XHTML: The content of elements must consist of well-formed character data or markup

痴心易碎 提交于 2019-11-26 01:45:22
问题 As an extension of this question, I\'m trying to insert Javascript to a <h:commandButton /> \'s onclick property as action is already rendering an ajax table. What I want to do: Get the selected items in a list box and turn them into parameters to be used in a JSF FileServlet . i.e. para2=value1&param=value2&param=value3 Here\'s what I have: <script type =\"text/javascript\"> function myScript() { var box = document.getElementbyId(\'myForm:box\'); var length = box.options.length; var

Is it possible to use JSF+Facelets with HTML 4/5?

雨燕双飞 提交于 2019-11-26 01:25:11
问题 Facelets relies on XML namespaces to work with XHTML. How are HTML 4, and as far as I know, HTML 5 do not support namespaces. Also HTML 5 has some new elements that are not available in XHTML. Even HTML 4 and XHTML have some differences regarding elements and attributes they support. The question is: Is it possible to render HTML 4/5 documents using Facelets? If so, how? 回答1: Since Facelets is a XML based view technology which eats and emits in essence XML markup, you cannot use it with a

EL proposals / autocomplete / code assist in Facelets with Eclipse

删除回忆录丶 提交于 2019-11-26 01:02:18
问题 I tried to activate EL proposals in a Facelets page, but when I hit Ctrl+Space, it doesn\'t work. I managed to activate JSF tag proposals thank to other questions, but EL proposals aren\'t working. How can I activate this feature in Eclipse? Is it a known issue? For example: <h:inputHidden id=\"id\" value=\"#{Ctrl+Space not working!}\"/> 回答1: Eclipse doesn't support this out the box. Even the support in JSP is very limited. Only the properties of <jsp:useBean> and managed beans hardcoded as

java.lang.NoClassDefFoundError: javax/servlet/jsp/jstl/core/Config

十年热恋 提交于 2019-11-26 01:01:04
问题 I am developing an application for FB Login with website using Javascript and JSF. I have posted my code at here. The problem is, when I run my application it does\'t show the JSF page, it instead throws the following exception: Nov 28, 2013 7:21:46 PM org.apache.catalina.core.StandardWrapperValve invoke SEVERE: Servlet.service() for servlet [Faces Servlet] in context with path [/FacebookLogin] threw exception [javax/servlet/jsp/jstl/core/Config] with root cause java.lang.NoClassDefFoundError

Why Facelets is preferred over JSP as the view definition language from JSF2.0 onwards?

寵の児 提交于 2019-11-26 00:44:20
问题 I see that from JSF2.0 onwards Facelets view definition language is the preferred view definition language and not JSP which has been deprecated as a legacy fall back. I want to understand why Facelets is preferred over JSP as the view definition language from JSF2.0 onwards ? I know that JSP also has some templating behavior which is the main driving point for adopting Facelets . P.S: I have been through this post on stackoverflow but I do not think it answers my question. Hence posting this