facelets

Define a property in Facelets page

橙三吉。 提交于 2019-12-12 03:23:06
问题 I know that by using <f:loadBundle> I can load whole property file. But is there any tag in Facelets by which I can define a property in Facelets file and can use in Facelets page. I know this can also be done by controller layer (like getSomeProperty() ) but I don't want to do this. I am just looking for a tag that do this. In other words we can do this in XML like this <properties> <propertyName>propertyValue</propertyName> <proprties> So in Facelets how can I do this? 回答1: Just define a

How to change display format of data on icefaces(jsf) xhtml pages?

喜你入骨 提交于 2019-12-12 03:15:58
问题 I have a List<String> in my JSF managed bean that I am trying to get on Facelets page with ICEfaces components. Below is the view: <ice:panelGrid> <ice:panelGrid> <ice:outputText value="Properties:" style="text-align:left;font-size:20px;"> </ice:outputText> <ice:selectManyListbox id="CriteriaListbox" style="width: 200px; height: 250px; " partialSubmit="true"> <!--<p:selectItem value="#{beanInfo.Properties}"/>--> <p:selectItem itemLabel="#{beanInfo.Properties}" itemValue="#{beanInfo.Properties

container class for gnu.mail.providers.nntp.NNTPMessage

大城市里の小女人 提交于 2019-12-12 02:54:43
问题 Why does Glassfish shows this facelets error: javax.el.ELException: /foo/client.xhtml @11,74 value="#{messageBean.messages}": javax.mail.MessagingException: Socket closed; nested exception is: java.net.SocketException: Socket closed Which I attribute to hitting leafnode on localhost too frequently and too rapidly. Glassfish logs below show successful message retrievals from leafnode, but multiple calls to SingletonNNTP.loadMessages(). How can deal with sockets correctly? Sometimes Leafnode

How to include many pages dynamically using ui:include Primefaces?

不羁的心 提交于 2019-12-12 02:17:23
问题 I am beginner. I am doing a project using Primefaces. I need to include many pages dynamically when triggering the p:menuitem . I already tried but the dynamic pages are not included properly when clicked on p:menuitem and that page only show when refresh of the page(browser). Sample Code <p:menu> <p:menuitem action="..." value="Page1"/> <p:menuitem action="..." value="Page2"/> <p:menuitem action="..." value="Page3"/> </p:menu> <p:outputPanel> <ui:include src="#{Pages.dynamicaPagesInclude}"/>

JSF 1.2: dynamic <ui:param />

笑着哭i 提交于 2019-12-12 01:52:43
问题 There are some answers on stackoverflow, but no one fits my needs :( I'm trying to conditionally build a <ui:param /> for my parent template with JSTL. Something like this: <ui:composition ... template="template.xhtml"> <c:if test="#{condition}"> <ui:param name="parameter" value="parameterValue" /> </c:if> <ui:define name="insertName"> {...} </ui:define> </ui:composition> I tried with both namespaces for JSTL: http://java.sun.com/jstl/core and http://java.sun.com/jsp/jstl/core, but neither

Organizing .xhtml files in subfolders

拈花ヽ惹草 提交于 2019-12-12 01:37:29
问题 I have a JSF 2.0 project wiht lots of .xhtml files. Due to a security filter I want to put some of the files in a /secure folder to then aply the filter on. I tried simply moving the files to a folder. But then I get an exception "/selectRole.xhtml Not Found in ExternalContext as a Resource" Do I need to add something to the faces-config or web.xml? 回答1: Your application is trying to read /selectRole.xhtml from a bean, or redirect action. In JSF2, the navigation rules are written in the beans

placeholder for <h:selectOneMenu>

旧城冷巷雨未停 提交于 2019-12-12 01:26:50
问题 I successfully done using placeholder in inputText but i tried this in selectOneMenu can't able to get . instead of martial status in selectOneMenu i want to use placeholder or atleast i want to change martial status color <h:selectOneMenu value=""> <f:selectItem itemValue="0" itemLabel="Marital status"/> <f:selectItem itemValue="1" itemLabel="Single"/> <f:selectItem itemValue="2" itemLabel="married"/> </h:selectOneMenu> 回答1: If I understood you right JSF 1 <f:selectItem itemLabel="Select

<f:selectItems itemDescription> does not work

不问归期 提交于 2019-12-12 00:57:17
问题 I have there code <p:selectOneMenu id="starter" value="#{reportRegisterManagedBean.starter}" style="width:160px" converter="#{reportStarterConverter}"> <f:selectItem itemLabel="Select Report Starter" itemValue="0" itemDescription="TEST" /> <f:selectItems value="#{reportRegisterManagedBean.startersSelectItems}" var="ds" itemLabel="#{ds.name}" itemValue="#{ds}" itemDescription="#{ds.description}" /> </p:selectOneMenu> here itemDescription="TEST" atribute works very well in <f:selectItem> tag.

Template content not displaying

帅比萌擦擦* 提交于 2019-12-11 17:14:00
问题 I have created a basic JSF template called Template.xhtml . This template is then being used by the page TestPage.xhtml . In my TestPage.xhtml i have only used the <ui:define> tag to override the pages title. Therefore, I would have expected the rest of the templates content to be displayed the same. However, only the header and footer of the template are being displayed. Template.xhtml <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE html> <html xmlns="http://www.w3.org/1999/xhtml" xmlns:ui=

Bean property becomes null when using CDI @Named Annotation [duplicate]

风流意气都作罢 提交于 2019-12-11 15:32:48
问题 This question already has an answer here : JSF does not populate @Named @RequestScoped bean with submitted input values (1 answer) Closed 2 years ago . I am using JSF2+CDI in a Tomcat 7 Container. I found a strange problem, I have got one @RequestScoped managed bean annotated with @Named annotation, Iam using its properties on a Facelet page. In that page three consecutive dropdown list is arranged. when the page loads i have initialized the first dropdown list using its getter method. In