facelets

How do I include a body into a tagfile

一曲冷凌霜 提交于 2019-12-08 04:16:33
问题 I have a tagfile I intend to use as an input template: <ui:composition xmlns:c="http://java.sun.com/jsp/jstl/core" xmlns:f="http://java.sun.com/jsf/core" xmlns:h="http://java.sun.com/jsf/html" xmlns:ui="http://java.sun.com/jsf/facelets"> <div class="qr"> <label>#{question}</label> <div class="helpButton"></div> <!-- body here --> <!-- errors output eventually to go here --> </div> </ui:composition> It is stored in my /WEB-INF/tags folder with a .taglib.xml and necessary web.xml context-param.

JSF: Serving Resources From a Jar

本秂侑毒 提交于 2019-12-08 03:56:16
问题 I´m in the process to create a couple of jars packed with facelets templates for usage through the organisation. Stuck in JSF 1.2 this functionality does not come out of the box. Stack: Jboss EAP 5.1 Seam 2.2 Richfaces 3.3.3 It seems to me that I primarily need two resources: Resource resolver that finds Faclets resources A thing that serve css and js resources from a jar Resource resolver seems to be the easy part: http://ocpsoft.org/opensource/create-common-facelets-jar/ The thing that

Using EL in attribute of composite component

痴心易碎 提交于 2019-12-08 03:52:43
问题 My JSF custom component code: <composite:interface name="translation"> <composite:attribute name="fieldName"/> <composite:attribute name="required" default="true" /> </composite:interface> <composite:implementation> <h:inputText required="#{cc.attrs.required}" requiredMessage="Please enter #{cc.attrs.fieldName} in english"/> </composite:implementation> This works fine if I specify the required attribute as follows: <comp:translation fieldName="myTranslation" required="true" /> But does not

How do I use the latest version of jQuery and get back the '$' for jQuery in RichFaces?

a 夏天 提交于 2019-12-08 03:43:49
问题 RichFaces 3.3.3 comes baked in with jQuery 1.3.2 and prototype and scriptaculous as well. How can I try and use the latest version of jQuery? Can I use the Google CDN one? Also the $() object is defaulted to prorotype and to use jQuery I have to do jQuery() is there a way to get back the $ for jQuery without breaking RichFaces? UPDATE: You can use multiple versions of jQuery side by side. For now, I've gone ahead and used the version that comes baked with RichFaces. 回答1: You can use $ with

Backing bean property that should return a string with html code returns empty string

你说的曾经没有我的故事 提交于 2019-12-08 02:31:23
问题 I have a property in my backing bean that returns html code: public String getHtmlPrevisualizar() { return "<html><head><title></title></head><body>Hello world.</body></html>"; } What I want to do is show this html code in a iframe. I do this with javascript. This is the xhtml page: <!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:h="http://java.sun.com/jsf/html" xmlns:a4j

Checkbox inside ui:repeat not refreshed by Ajax

雨燕双飞 提交于 2019-12-08 01:26:17
问题 I work with Mojarra 2.1.3. When the user click on button "refresh don't work", it refresh the content of the ui:repeat.I expect the checkbox to be checked, just as at the initialization. What I've found: If I remove h:head in the facelet "refresh don't work" works... Any idea ? The facelet: <h:head></h:head> <h:body> <h:form id="myForm" > <h:panelGroup id="panelToRefreshOutsideRepeat"> <ui:repeat value="#{sandbox.columns}" var="column"> <h:panelGroup id="panelToRefreshInsideRepeat"> <h2

How to render a custom attribute of <h:outputLink>?

限于喜欢 提交于 2019-12-07 22:55:09
问题 I am trying to implement pinterest's pinit button using a snippet like the one below: <h:outputLink value="http://pinterest.com/pin/create/button/" class="pin-it-button" count-layout="horizontal"> <f:param name="url" value="#{beanOne.someMethod}/sometext{prettyContext.requestURL.toURL()}"/> <f:param name="media" value="#{beanOne.someOtherMethod}/sometext/somemoretext/#{beanTwo.someMethodTwo}-some-text.jpg"/> <f:param name="description" value="#{beanTwo.someOtherMethodTwo}"/> <img border="0"

JSF 2.2 CDATA is escaped

一世执手 提交于 2019-12-07 19:21:28
问题 I have found some weird behaviour after upgrading to Mojarra 2.2.3. The following Javascript declaration gets mangled: In the .xhtml file: <script type="text/javascript"> <!-- /* <![CDATA[ */ $(document).ready(function() { if ($('#some_identifier').size() > 0) ... /* ]]> */--> </script> This is mangled into the following nonsense: <script type="text/javascript"> <!-- /* <![CDATA[ */ $(document).ready(function() { if ($('#some_identifier').size() > 0) ... /* ]]> */--> </script> This breaks all

Browsing file system to select directory in JSF

谁都会走 提交于 2019-12-07 18:46:24
问题 is there a way to implement browsing file system directory in facelets i don't want the user to type the directory i search it in primefaces showcases but i didn't find it . Any help will be appreciated 回答1: For security reasons you cannot browse the filesystem with HTML/JavaScript. If you want to do such a thing you could use a Java applet or a Flash element, but I found such things repulsive. The reason you want to do this is unclear to me. If it's for downloading a file and selecting a

This page calls for XML namespace declared with prefix br but no taglibrary exists

∥☆過路亽.° 提交于 2019-12-07 14:34:04
问题 I just finished the Netbeans introduction to Hibernate tutorial ( http://netbeans.org/kb/docs/web/hibernate-webapp.html#01 ) and I am getting the following error: "This page calls for XML namespace declared with prefix br but no taglibrary exists" Now, I have seen a similar question somewhere else: http://forums.sun.com/thread.jspa?threadID=5430327 but the answer is not listed there. Or, if it is, then I am clearly missing it -- line one of my index.xhtml file reads "http://www.w3.org/1999