jsf-2

JSF2 composite components: are #{cc.childCount} and <composite:insertChildren/> mutually exclusive?

痴心易碎 提交于 2019-12-19 18:52:10
问题 I just dont get it: If I want my composite component to insert children, I use <composite:insertChildren/> but #{cc.childCount} always returns 0 in that case. On the other hand, If I do not use <composite:insertChildren/> I always get correct childCount without children being rendered. Why is that happening? All I want to do in my component is to render some "default" panel if there are no children and do not render it in other case - behavior similar to <ui:insert name="param_name">default

Could not complete the operation due to error c00ce56e

a 夏天 提交于 2019-12-19 16:38:12
问题 I've upgraded from rich faces 3.3 to rich faces 4.2 because ajax didn't work for IE9. Now it still not works. After receiving the Response IE gets an JS error "SCRIPT58734: Der Vorgang konnte aufgrund des folgenden Fehlers nicht fortgesetzt werden: c00ce56e." while trying data.responseText=request.responseText on jsf.js.html?ln=javax.faces&conversationContext=2, Line 1 Row 21747 I think it's because of an incorrecct HTTP header Content-Type: text/xml;charset=UTF8 should be Content-Type: text

save image file in specific directory jsf primefaces project

橙三吉。 提交于 2019-12-19 12:20:33
问题 I want to save byte[] file into a specific directory : I get it from this method : public void setUploadedPicture(UploadedFile uploadedPicture) { System.out.println("set : "+uploadedPicture.getFileName()+" size : "+uploadedPicture.getSize()); this.uploadedPicture = uploadedPicture; } and I access the byte[] with : uploadedPicture.getContents() I tested this link but no result how to save it into a specific directory either inside my project or outside thank you ** * ** * *** EDIT * ** * ** *

can't use the “end” property of JSF 2.0 repeat tag's varStatus

左心房为你撑大大i 提交于 2019-12-19 11:57:17
问题 I'm using the repeat tag of JSF 2.0 to loop through a list of objects and display some of their properties. I want to use the varStatus attribute of repeat so that I can access the loop index, the number of the last list item, and to tell whether the end of the list has been reached (so the spacer won't be displayed). I thought this would work: <ui:repeat var="anObject" varStatus="repeatStatus" value="#{objectList}"> <h:panelGroup> <h:outputText value="Item #{repeatStatus.index + 1} of #

primefaces schedule event color is not working after replacing Primefaces Jar 3.3 by 4.0

做~自己de王妃 提交于 2019-12-19 11:47:34
问题 I use primefaces 4.0 and i try to change the color of the event in Primefaces Lazy Schedule, so i have the following xhtml code <style type="text/css"> .Ajout .fc-event-skin { background: #00FF00; } .Livraison .fc-event-skin { background:#DF013A; </style> <p:schedule value="#{scheduleController.lazyEventModel}" locale="fr" showWeekends="true" eventSelectListener="#{scheduleController.onEventSelect}" > <p:ajax event="eventSelect" listener="#{scheduleController.onEventSelect}" update=

How to reproduce specific Friendly URL?

喜欢而已 提交于 2019-12-19 11:28:04
问题 we are trying to refactor an JSP/XSLT application to JSF. We use a CMS for content management. Technologies : JSF 2.0 using Mojarra, PrimeFaces 2.2.1 and Tomcat 6.29 The organisation of the data structure is the following: There are Sites. Sites contain Channels. Channels contain Contents. Sites, channels and content are translated. The URLs look like: http://whatever/firstSite http://whatever/firstSite/aChannel http://whatever/firstSite/aChannel/aSubChannel/myGreatContent It's the translated

How can I open a pop up of my JSF portlet's edit mode?

假装没事ソ 提交于 2019-12-19 10:47:12
问题 When opening the configuration mode of a Liferay portlet it opens in a pop up dialog: How can I get my JSF portlet to open a similar pop up but for edit mode of my JSF portlet? I am using Liferay 6.2. 回答1: In Liferay 6.2+: For the most part, you can open edit mode of a JSF portlet the same way for both JSF and JSP portlets: via the client-side JS Liferay.Util.Window.getWindow() method. To create the dialog, you will need to get a render URL for the portlet in edit mode and pop up state via

How can I open a pop up of my JSF portlet's edit mode?

痴心易碎 提交于 2019-12-19 10:47:09
问题 When opening the configuration mode of a Liferay portlet it opens in a pop up dialog: How can I get my JSF portlet to open a similar pop up but for edit mode of my JSF portlet? I am using Liferay 6.2. 回答1: In Liferay 6.2+: For the most part, you can open edit mode of a JSF portlet the same way for both JSF and JSP portlets: via the client-side JS Liferay.Util.Window.getWindow() method. To create the dialog, you will need to get a render URL for the portlet in edit mode and pop up state via

JSF 2 managed bean does not get instantiated

删除回忆录丶 提交于 2019-12-19 10:46:05
问题 I am having this problem in this sample jsf project I created. Managed beans do not get instantiated. Bean class: @ManagedBean(name="loginMB") @RequestScoped public class LoginMB extends AbstractMB { private static final long serialVersionUID = -8523135776442886000L; @ManagedProperty("#{userMB}") private UserMB userMB; //getters and setters public String login() { UserSupport userSupport = new UserSupportImpl(); User user = userSupport.isValidLogin(email, password); if (user != null) {

JSF 2.0 ViewExpiredException on Glassfish 3.1 when using iframe in Safari

六月ゝ 毕业季﹏ 提交于 2019-12-19 10:43:50
问题 I have a JSF 2.0 web application running on glassfish 3.1 that is working fine on IE, FF, Safari and Chrome. When I added the url of my website inside a iframe of another website then I am getting ViewExpiredException after clicking any button inside iframe - This happens only on Safari, works fine in IE, FF, Chrome. <iframe style="width: 100%; height: 800px" src="url_of_my_website" frameBorder="0"></iframe> Following are my observations Deployed the same application on glassfish 3.0.1 and