facelets

Using one component (dataTable) id inside composite component

筅森魡賤 提交于 2019-12-21 20:47:44
问题 How can I use id of DataTable Component (Primefaces 2.2.1) inside Composite Component in Java Server Faces 2.1 ? Now, I have a view: <?xml version='1.0' encoding='UTF-8' ?> <!DOCTYPE composition PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <ui:composition xmlns="http://www.w3.org/1999/xhtml" xmlns:ui="http://java.sun.com/jsf/facelets" xmlns:p="http://primefaces.prime.com.tr/ui" xmlns:h="http://java.sun.com/jsf/html" xmlns:f="http:/

Deploy JSF composite components for shared use

时光总嘲笑我的痴心妄想 提交于 2019-12-21 20:37:35
问题 I work on a Java EE project which is planned to become quite large in future and I want to share as much code as possible. This included not only Java code, but also code for UI elements. I think about developing enterprise components based on clear defined subjects (like user administration, taxes, products) which interact on basis of messages, beans and so on. I also think about giving all these components some managed beans and JSF composites to provide some basic functionality for later

JSF with facelets in Tomcat7

巧了我就是萌 提交于 2019-12-21 20:00:07
问题 I am trying to deploy a JSF 2.0 application with Facelets 1.1.14 to Tomcat7. I am getting the following exceptions: INFO: Initializing Mojarra 2.0.0 (FCS b23) for context '/AdminUI' 3 Aug, 2011 7:44:32 PM com.sun.faces.spi.InjectionProviderFactory createInstance INFO: JSF1048: PostConstruct/PreDestroy annotations present. ManagedBeans methods marked with these annotations will have said annotations processed. 3 Aug, 2011 7:44:33 PM com.sun.faces.config.ConfigManager initialized INFO:

How to define an onLoad function in JSF template that will be defined elsewhere

流过昼夜 提交于 2019-12-21 17:49:03
问题 I'm designing the view for my site, which has a standard login and landing page, and I want to have an onLoad function called for my login page, but not for my other pages (yet). I've got a template.xhtml file, which has this insert: <div id="content"> <ui:insert name="content"/> </div> Then in login.xhtml I have: <ui:define name="content"> ... </ui:define> Normally I would put this in login.xhtml: <body onload="document.getElementById('login_form:name').focus();"> But since I'm using JSF's

Migrating from facelets 1.1 to faclets 2.0 - FaceletViewHandler

天大地大妈咪最大 提交于 2019-12-21 10:49:39
问题 I have read the following post which was very helpful Migrating from JSF 1.2 to JSF 2.0 but I am having a problem with the migration as I have a custom view handler which extends from FaceletViewHandler - this is not part of faclets 2. I am migrating on JBoss 4.2.2 the following: - JSF 1.2 to JSF 2.0 I also want to migrate the faclets - which i have a problem described above. In my application, I am also using Tomahawk - is there any problem with this migration? Thanks in advance. Elico. 回答1:

Migrating from facelets 1.1 to faclets 2.0 - FaceletViewHandler

老子叫甜甜 提交于 2019-12-21 10:49:04
问题 I have read the following post which was very helpful Migrating from JSF 1.2 to JSF 2.0 but I am having a problem with the migration as I have a custom view handler which extends from FaceletViewHandler - this is not part of faclets 2. I am migrating on JBoss 4.2.2 the following: - JSF 1.2 to JSF 2.0 I also want to migrate the faclets - which i have a problem described above. In my application, I am also using Tomahawk - is there any problem with this migration? Thanks in advance. Elico. 回答1:

Unable to find class 'com.sun.facelets.FaceletViewHandler'

99封情书 提交于 2019-12-21 06:20:31
问题 I have Richfaces application which I deploy to Glassfish v3. For many weeks (almost) everything works fine, but suddenly today a got following error. I have jsf-facelets-1.1.14.jar dependency in my pom.xml. I have no idea how to fix that. Help!! Source Document: jndi:/server/swmind.rcp.web/WEB-INF/faces-config.xml Cause: Unable to find class 'com.sun.facelets.FaceletViewHandler' at com.sun.faces.config.processor.AbstractConfigProcessor.createInstance(AbstractConfigProcessor.java:275) at com

JSF: Creating aliases for properties in backing bean

若如初见. 提交于 2019-12-21 04:51:26
问题 I am referring to pretty deep object hierarchies with pretty cryptic names in EL as in #{myBean.configBaseStack.excludeMethodFromAccounting.method.TimeoutBehaviorEnabled} . I would like to point to this very same property through an alias like in: <x:alias name="m" value="#{myBean.configBaseStack.excludeMethodFromAccounting.method" /> <h:inputText value="#{m.TimeoutBehaviorEnabled}" /> I guess one way to accomplish this would be to create these aliases in the backing bean, but I'd rather

How to conditionally include a file in my template using JSF and Facelets?

做~自己de王妃 提交于 2019-12-21 04:48:34
问题 So, my template includes a footer.xhtml <ui:include src="/WEB-INF/testtaker/Footer.xhtml"/> What I want to do is change the footer based on some users pref to different Footer_???.xhtml file. So, I'd like to do something like this: <ui:include src="/WEB-INF/testtaker/Footer_001.xhtml"> Content from original Footer.xhtml </ui:include> and if Footer_001.xhtml doesn't exist, then let it use the content between the tags, otherwise use the content from the file. I know this seems a little odd, but

Javascript does not work under JSF template

别说谁变了你拦得住时间么 提交于 2019-12-21 02:45:29
问题 I'm using JSF templates and Primefaces. Javascript code does not seem to be working under ui:composition and ui:define tags. The following code is not hitting the loaded() method. This is the content.xhtml file <h:head> <script language="javascript"> function loaded() { alert("Working!!"); } </script> </h:head> <ui:composition template="/template/template.xhtml"> <ui:define name="content"> <h:body style="width:100%;height:100%;" onload="loaded()"> <p class="item">Random text</p> </h:body> <