jsf-2

Layout Needs Manual refresh. Looks like it can't load external js

Deadly 提交于 2019-12-12 03:53:31
问题 I'm using JSF2 with Primefaces3.4.2 I have created a layout in layoutComplex.xhtml as below: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xmlns:h="http://java.sun.com/jsf/html" xmlns:f="http://java.sun.com/jsf/core" xmlns:ui="http://java.sun.com/jsf/facelets" xmlns:p="http://primefaces.org/ui"> <f:view contentType="text/html"> <h:head> <f:facet name="first"> <meta http-equiv="X-UA-Compatible"

Does AOP with AspectJ works with method from Managed Bean called from the view in JSF2?

倾然丶 夕夏残阳落幕 提交于 2019-12-12 03:52:46
问题 I’m currently facing a Problem using a combination of JSF 2 and AOP with AspectJ annotation. I don't know if Spring AOP is playing a role here...(I didn't well understand difference between SPRING AOP, ASPECTJ, GOOGLE GUICE...that's an another question) I'm trying to send an e-mail after i added some values in my database via click on a form in jsf view. I have a managedBean AddPartipant handled by JSF (linked to a view) to add participant via a form. I want to intercept the method who makes

Passing parameters between Request Scoped Managed Beans in JSF + EJB 3.1

依然范特西╮ 提交于 2019-12-12 03:48:29
问题 Our problem is a very basic, simple implementation of editing the database using JSF + EJB. Keeping things short: two separate XHTML views, use two separate Managed Beans @RequestScope. WebuserListBean and EditWebuserBean, and with @ManagedProperty we inject WebuserListBean, so we could obtain selected user data. So far no problems. Views are filled with data succesfully! BUT! We want to be able to edit the user! And here (to my surprise) we cannot overcome the problem. 1st try: Because the

<p:dialog appendToBody=“true” doesn't call Converter class

為{幸葍}努か 提交于 2019-12-12 03:45:46
问题 I am using Primefaces 3.4.2 with JSF 2.0 I have the following in a dialog popup in JSF page. <p:dialog header="Create New Request" style="font-weight:bold" widgetVar="newDialog" resizable="false" id="newDlg" showEffect="fade" hideEffect="fade" appendToBody="true" modal="true" position="center top" width="850" height="450"> <p:panelGrid columns="2"> <h:outputLabel value="Employee" for="employee" /> <p:selectOneMenu id="employee" value="#{mymb.employee}" converter="#{employeeConverter}"> <f

Primefaces Mobile p:fileupload upload method not called

余生颓废 提交于 2019-12-12 03:43:29
问题 I am working on a web application for mobile devices where a user can upload a file (image) on several occasions. Since I am using the Primefaces mobile renderkit, I have to use Primefaces' simple p:fileupload without ajax. The Problem: When I want to upload an Image I can select the file (components are rendered correctly) and then hit the "Upload" button. After I hit "Upload", the page refreshes but myBean.saveImage() is never called. myBean.fileUploadController.setFile isn't called either.

p:commandButton refreshes entire page instead of partially whereas f:ajax works fine

倖福魔咒の 提交于 2019-12-12 03:37:52
问题 I try to update a part of the page on button click. Right now, I have the following : template.xhtml <h:form prependId="false"> <h:commandButton value="NEWS" action="news"> <f:ajax render="newsContent"></f:ajax> </h:commandButton> <h:panelGroup layout="block" id="newsContent"> <ui:insert name="newsContent"> <ui:include src="/WEB-INF/partials/news/news.xhtml"/> </ui:insert> </h:panelGroup> </h:form> /WEB-INF/partials/news/news.xhtml <h:commandLink action="newsdetails"> <f:ajax render=

status update not working

你。 提交于 2019-12-12 03:35:31
问题 When I am clicking the Speak Out(p:commandButton) to submit a status, I am getting the following exception. The exception is caused by commentList() function by the line Query query = em.createQuery( "SELECT c FROM Comment c WHERE c.statusId=" + statusId, Comment.class); 1)Home.xhtml <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xmlns:ui="http://java.sun.com/jsf/facelets"

Primefaces 3.4 p:panelMenu: unable to control the state of p:submenu and p:menuitem

前提是你 提交于 2019-12-12 03:35:28
问题 Given the following collapsing Menu (p:panelMenu): <p:panelMenu style="width:200px"> <p:submenu label="#{uimsg.clm_title}" styleClass="pageFont"> <!-- <p:menuitem value="Delete" actionListener="#{buttonBean.delete}" ajax="true" icon="ui-icon-close"/> --> </p:submenu> <p:separator /> <!-- Sub-menu master Data --> <p:submenu label="#{uimsg.trsf_title}" styleClass="pageFont"> <p:menuitem value="#{uimsg.trsf_create}" ajax="true" icon="ui-icon-arrow-1-e" url="/transfers/editTransfer.xhtml" /> </p

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

Hibernate Primefaces AutoComplete text

我怕爱的太早我们不能终老 提交于 2019-12-12 03:19:17
问题 good morning. I am trying to create a simple page that lists in a dropdown all countries and then, after I choose a country the autocomplete for State shows up and after 3 chars typed it performs the autocomplete. It seems to be a simple issue. So, this is my State model package br.com.danielfc.model; // Generated 27/08/2015 23:59:43 by Hibernate Tools 4.3.1 import static javax.persistence.GenerationType.IDENTITY; import java.util.HashSet; import java.util.Set; import javax.persistence.Column