facelets

Change color/syntax highlighting for JSF/Facelets EL expressions in Eclipse

做~自己de王妃 提交于 2019-12-10 23:37:36
问题 I have installed both plugins: WTP and JBoss Tools (3.3) for Eclipse Indigo, but could not found a way to configure special syntax highlighting for EL expression in JSF (.xhmtl Facelets views). The EL expressions they look like other html-attributes, but I want they have special highlighting (highlighted with other color for all #{...} expressions), so one can easier understand what are being rendered and navigate through the code faster. Does anyone know, is it possible in Eclipse. I know,

JSF 2.0 commandButton do nothing

拈花ヽ惹草 提交于 2019-12-10 22:44:25
问题 I have a problem implementing a simple CRUD application, I have read nearly all the items found in google, stackoverflow and roseindia, but my problem persists. I made this simple facelet: <ui:composition template="./../../templates/adminTemplate.xhtml"> <ui:define name="tope"> <h1>Ingreso de Noticias</h1> </ui:define> <ui:define name="content"> <h:form id="newsForm"> <h:panelGrid columns="2"> <h:outputLabel value="Lugar: "/> <h:inputText value="#{noticiasBean.entity.lugar}"/> <h:outputLabel

Customize ui:include rendering to add prefix/postfix

这一生的挚爱 提交于 2019-12-10 22:43:00
问题 I need to customize the ui:include renderer in a way that when it generates the HTML output also adds a comment stating the starting and the ending of the included file. Example, supposing a blank file.xhtml : Input <ui:include src="file.xhtml" /> Output <!-- START file.xhtml --> <!-- END file.xhtml --> At the moment I'm using JSF2.2 with MyFaces, any idea on how I could do that? 回答1: I would suggest to define following facelet tag : <?xml version='1.0' encoding='UTF-8' ?> <!DOCTYPE html

How to reference component inside a composite component when using a converter

青春壹個敷衍的年華 提交于 2019-12-10 20:23:43
问题 I have a composite component that mainly consists of a selectManyCheckbox component. As it should be designed in a generic way I pass in selectItems, ajax handling etc. from the calling level using <composite:insertChildren/> This works quite well for most of the stuff. Now I need to use this composite component with a converter. As the converter (a kind of Omnifaces' ListConverter) is not needed all the time (sometimes I want to have the value-binding of concrete entities that back the

Implementing @RequestParam in CDI/WELD using Qualifier and InjectionPoint as @HttpParam

£可爱£侵袭症+ 提交于 2019-12-10 17:32:39
问题 The glassfish error INFO: Initializing Mojarra 2.1.6 (SNAPSHOT 20111206) for context '/NNTPjsf' INFO: WEB0671: Loading application [NNTPjsf] at [/NNTPjsf] SEVERE: Exception while loading the app INFO: only once... INFO: NNTP.loadMessages... SEVERE: Exception while loading the app : WELD-001408 Unsatisfied dependencies for type [FacesContext] with qualifiers [@Default] at injection point [[field] @Inject net.bounceme.dur.nntp.HttpParamProducer.facesContext] org.jboss.weld.exceptions

JSF components not parsed inside a <script> block

我们两清 提交于 2019-12-10 17:14:59
问题 I had to change a <script> ... </script> in an JSF page and tried to evaluate a JSF component inside of the script. The EL was evaluated but the tag itself was untouched. What is the reason for this behaviour? Example: <script type="text/javascript"> //<![CDATA[ function doSomething() { $('.userNode').droppable({ activeClass : 'ui-state-active', hoverClass : 'ui-state-highlight', tolerance : 'intersect', drop : function(event, ui) { <h:panelGroup rendered="#{myBean.useThis}"> alert("code A");

Returning list of images on JSF page

天大地大妈咪最大 提交于 2019-12-10 16:18:04
问题 I have a dropdown list of items a user can select from (the view is JSF). I would like for an image to appear on the same JSF page after a user selects an item from the dropdown list (i.e. A user select the word "Cat" from the dropdown list, and group of different cat images appear) How would I code this in JSF? Note* I'm using JSF 2.0 with facelets, not JSPs. 回答1: Provide a list with image URL's in the dropdown and use h:graphicImage to display an image on the selected URL. Then, use f:ajax

Facelets custom tag not rendering

萝らか妹 提交于 2019-12-10 16:14:18
问题 I am trying to create a custom tag with Facelets but it isn't rendering (i.e. the tag appears unreplaced in the response). The tag (/WEB-INF/facelets/tags/inputThumbnailSelector.xhtml): <html xmlns="http://www.w3.org/1999/xhtml" xmlns:f="http://java.sun.com/jsf/core" xmlns:h="http://java.sun.com/jsf/html" xmlns:ui="http://java.sun.com/jsf/facelets" xmlns:t="http://myfaces.apache.org/tomahawk"> <ui:composition> <div style="position: relative;"> <img style="position: absolute; left: 0; top: 0;"

Use ManagedBean in FacesConverter

冷暖自知 提交于 2019-12-10 15:58:37
问题 I want to use ManagedBean in my Converter . The ManagedBean is responsible for getting data from database. In Converter I want to convert string into object which must be get from database. This is my Converter @FacesConverter(forClass=Gallery.class, value="galleryConverter") public class GalleryConverter implements Converter { // of course this one is null @ManagedProperty(value="#{galleryContainer}") private GalleryContainer galleryContainer; @Override public Object getAsObject(FacesContext

How to use HTML character entities inside EL in JSF?

你说的曾经没有我的故事 提交于 2019-12-10 14:54:32
问题 I want to use the em dash in a value attribute for an h:link component. Here is my attempt (currenctly not working): <h:link value="#{somethingHere} — #{anotherHere}"> <f:param name="identifier" value="#{somethingHere.identifier}" /> </h:link> This results in a FaceletsException : FaceletException: Error Parsing /index.xhtml: Error Traced[line: 13] The entity "mdash" was referenced, but not declared. at com.sun.faces.facelets.compiler.SAXCompiler.doCompile(SAXCompiler.java:394) ... I know I