facelets

JSF problem with FireFox 3.5 caching, wyciwyg:// prefix

假如想象 提交于 2019-12-05 12:53:35
I am new to JSF and have a problem with my simple JSF application. I use Facelets and Richfaces on WebLogic 10.3.2 (11g). The application is essentially 3 pages: A <--> B <--> C where the intermediate arrows denote navigation rules. The navigation is performed through a4j:commandButtons The problem is in Firefox 3.5, when I click from B to C, I get a url starting from wyciwig:// . In more detail, the starting url is: http://localhost:7001/myapp/index.faces and the url I get when I navigate from B to C is this: wyciwyg://20/ http://localhost:7001/myapp/index.faces From a Google search I saw

Difference between ui:composition and ui:decorate in Facelets

倖福魔咒の 提交于 2019-12-05 11:51:56
问题 What are the differences between ui:composition and ui:decorate in Facelets ? Both seem to support ui:define as child tags . In what cases would you use each of these ? 回答1: Anything outside <ui:composition> tag is disregarded. This isn't true for <ui:decorate> , which is thus beneficial as "template-in-template". How that makes sense can maybe be better understood by looking at some real world examples in the below answers: What is the real conceptual difference between ui:decorate and ui

Duplicate component ID in JSF using composite component twice in view

南楼画角 提交于 2019-12-05 11:12:45
I "inherited" a JSF 2 (JSF 2.2.7) application in my company and facing a java.lang.IllegalStateException because two component seem to have the same ID. The structure of the view is as follows (I extracted the relevant code for illustration purpose, it may contain some typos/invalid syntax as I changed some names): <p:commandButton id="editButton" action="#{controller.prepareItem()}" update=":itemEditDlg" oncomplete="PF('itemtEditDlg').show()" /> <comp:editItemDlg id="itemEditDlg" /> <p:dialog id="anotherDlg" > <h:form id="anotherForm"> <c:forEach items="#{controller.allArgs}" var="arg" > <!--

JSF 2 Update Component Outside of Form and Outside of Facelet

风格不统一 提交于 2019-12-05 07:21:33
I have a form in the <ui:insert name="content" /> When I save the data with a p:commandButton I can update the form and things within the <ui:insert name="content" />. But I am having trouble figuring out how to update components in the <ui:include src="/sections/menus/topMenu.xhtml"/> Inside the topmenu I have a subview for a panel with links that get rendered depending on whether a person is logged in or not. when they are logged in I show their username. If I update the user name in the content part of the template, I want to update the ui so that the name in the menu also updates without a

Facelets without JSF

元气小坏坏 提交于 2019-12-05 07:02:19
I'm finishing on learning the Java language and looking to write very small web applications, since Facelets seems to be the replacement for JSP, and JSF seems overkill for small web apps, can I just learn Facelets and use it without the whole JSF stack? or should I just go with JSP for this small web apps? It can be used without JSF. Just map the FacesServlet on an URL pattern of *.xhtml in web.xml and do not declare xmlns:f="http://java.sun.com/jsf/core" xmlns:h="http://java.sun.com/jsf/html" in any Facelet template. It actually don't harm to declare them, but this way you won't

f:ajax doesn't work when parameters are passed using f:param

此生再无相见时 提交于 2019-12-05 05:03:14
问题 I am calling a method on the click of link. The following code works ajaxfully <ui:repeat value="#{myBean.names}" var="name" varStatus="idx"> <li> <h:commandLink value="#{name.label}"> <f:ajax execute="@this" event="click" render="@all" listener="#{myBean.changeActiveName}" > </f:ajax> </h:commandLink> </li> </ui:repeat> But when I try to pass parameter to the Ajax call it starts refreshing the whole page <ui:repeat value="#{myBean.names}" var="name" varStatus="idx"> <li> <h:commandLink value

ui:define with rendered=“false” attribute still rendering

我们两清 提交于 2019-12-05 04:17:24
<ui:define name="description" rendered="false"> <meta name="description" content="do not render" /> </ui:define> i'm using this code in my xhtml page, when i run the app, meta description is still rendering. i want to use meta description tag depending on some conditions. master layout: <html xmlns="http://www.w3.org/1999/xhtml" xmlns:ui="http://java.sun.com/jsf/facelets" xmlns:h="http://java.sun.com/jsf/html"> <h:head> <ui:insert name="description" /> </h:head> ........... </html> web page: <ui:composition xmlns="http://www.w3.org/1999/xhtml" xmlns:ui="http://java.sun.com/jsf/facelets" xmlns

Reuse some .xhtml pages on a JSF primefaces application

好久不见. 提交于 2019-12-05 02:24:13
问题 I developing a simple application using JSF and PrimeFaces and here's a problem that I'm facing: These are managed beans that have a Person property: ClientBean EmployeeBean I have the person.xhtml that shows the data from a person. I include the person.xhtml on a client.xhtml and employee.xhtml . I need to create two person.xhtml because I'm using different beans. What I want to do is something like that: <c:set var="person" value="clientBean.person" /> <ui:include src="person.xhtml"/> <c

f:param tag attribute 'disable' is not work

ⅰ亾dé卋堺 提交于 2019-12-05 00:28:56
问题 I try to use <f:param> tag to build output link URL with parameters depending on some my conditions. When I place this tag inside h:output link and try to set different values for 'disable' I see no effect. Here the my code <h:outputLink value="/WebApplication10/faces/index.xhtml"> Link1 <f:param disable="#{true}" name="name1" value="value1"/> <f:param disable="#{false}" name="name2" value="value2"/> </h:outputLink> I expect to see only one param in url but I see both. 回答1: Using disable=

AJAX render attribute doesn't work with rendered=“false” component [duplicate]

a 夏天 提交于 2019-12-04 23:40:34
问题 This question already has an answer here : Ajax update/render does not work on a component which has rendered attribute (1 answer) Closed 3 years ago . I have a component that I want to show/hide after user hits a commandButton . It's like this: <h:commandButton id="showButton" value="#{bean.wasPressed ? 'Hide' : 'Show'}"> <f:ajax listener="#{bean.toggle()}" render="explanation showButton" /> </h:commandButton> and <h:panelGroup id="explanation" rendered="#{bean.wasPressed}"> <h:outputText