jsf-2

Custom CSS doesn't get applied when using <h:head> instead of <head>

南笙酒味 提交于 2020-01-06 17:17:06
问题 if I put: <head> //.. </head> <body> //.. </body> The style from my CSS is applied correctly, but when I change to : <h:head> //.. </h:head> <h:body> //.. </h:body> My style it seems wrong some parts of CSS. Why this is happenning ? Update: To simplify my problem i'm show two images below: Without <h:head>.. <h:body> (this is the correct CSS style) With <h:head>..<h:body> I just change to and the same thing to and this error happens. I'm new about JSF, there's something that i have to do ?

Custom CSS doesn't get applied when using <h:head> instead of <head>

南楼画角 提交于 2020-01-06 17:15:23
问题 if I put: <head> //.. </head> <body> //.. </body> The style from my CSS is applied correctly, but when I change to : <h:head> //.. </h:head> <h:body> //.. </h:body> My style it seems wrong some parts of CSS. Why this is happenning ? Update: To simplify my problem i'm show two images below: Without <h:head>.. <h:body> (this is the correct CSS style) With <h:head>..<h:body> I just change to and the same thing to and this error happens. I'm new about JSF, there's something that i have to do ?

h:commandLink not working inside dataTable

对着背影说爱祢 提交于 2020-01-06 15:40:10
问题 In my JSF file I have below at the start. <h:form><h:commandLink value="Create New Staff Account" action="adminCreateStaffMember"/></h:form> . By use of this, when I create on Create New Staff Account I get re-directed to the page where I have form to create new account. BUT, When I use the same inside dataTable , NO ACTION is taken. I am still on same page :( <h:dataTable var="c" value="#{newStaffMemberServiceBean.newStaffMemberDataBeanList}" styleClass="order-table" headerClass="order-table

Whats the best way of sending a lot of parameters between pages?

假如想象 提交于 2020-01-06 15:11:43
问题 I have one JSF page and I would like to get to another with a lot of parameters. when I add them to query string by f:param at h:link it would be very long and unclear, like this: http://www.example.org/?id1=1&id2=2&id3=3&id4=34324&id5=fdgfrde&id6=434&id7=4324&id7=5543&id8=rewr&id9=fwefe&id10=1021021&id11=retert what is the best why of sending this parameters between pages? 回答1: Based on your requirement, for example which data is not going to chaged frequently those data can be obtained from

Error executing TommEE 1.0 with JSF 2.0

血红的双手。 提交于 2020-01-06 15:00:53
问题 I'm trying use apache-tomee-1.0.0 with my JSF 2.0 web app... but I can't do it :(. My problem is when I run the server logs this error: 30-ago-2012 18:49:39 org.apache.catalina.core.StandardContext listenerStart GRAVE: Excepción enviando evento inicializado de contexto a instancia de escuchador de clase com.sun.faces.config.ConfigureListener java.lang.RuntimeException: com.sun.faces.config.ConfigurationException: CONFIGURATION FAILED! org.apache.openejb.jsf.CustomApplicationFactory at com.sun

JBoss AS 7, Java EE 6 how to get clients IP?

血红的双手。 提交于 2020-01-06 14:04:14
问题 I have a simple question, but I'm searching for longer time, but I always found the same answers,which i don't really know how to handle... i want to get the IP adress of the client, when he registers to my application... i found something like this: @ManagedBean(name="testController") @SessionScoped public class TestController implements Serializable { private static final long serialVersionUID = -3244711761400747261L; protected final HttpServletRequest req; public TestController

Action not triggered when button is enabled/disabled with ajax

匆匆过客 提交于 2020-01-06 13:52:43
问题 I am stuck with a problem that doesnt make any sense to me. I have a listbox which fires selectionChange-Events with simple Ajax. The idea is that the edit-button isnt enabled until a item in the list is selected. So I created the following code. <h:form> <h:selectManyListbox value="#{bean.selectedIds}"> <f:selectItems value="#{bean.listOfItems}" /> <f:ajax render="edit" listener="#{bean.selectionChanged}" /> </h:selectManyListbox> <br /> <h:commandButton id="add" value="#{msgs.add}" action="

DefaultMenuItem with a value from a .properties file (resource bundle)

萝らか妹 提交于 2020-01-06 12:44:09
问题 Ok so I'm trying to move my project from Primefaces 3.5 to 4.0 and I'm struggling with the new MenuModel API. I'm sure it's something stupid, but I can't display a DefaultMenuItem for my Breadcrumb where the value is from a .properties file (defined in faces-config as resource bundle). What I had with Primefaces 3.5 : MenuItem menuItem; // Where "getPath()" returns all the pages needed to get to the current one for (Page page : currentPage.getPath()) { menuItem = new MenuItem(); // Where

Why doesn't my f:ajax work with h:selectOneMenu?

你说的曾经没有我的故事 提交于 2020-01-06 12:42:38
问题 Using JSF 2.0, Glassfish 3.2, Primefaces 2.2.1 I have a page with several composite components. In one of these components, I have an h:selectOneMenu. I am trying to add f:ajax to call a method when a new value is selected. Here is what the h:selectOneMenu component in the page looks like: <h:selectOneMenu id="selectRmDD" styleClass="editSelectRmDD" value="#{scheduleEditSessionBean.selectedRoom}" > <f:selectItems id="roomList" value="#{scheduleEditSessionBean.roomList}"/> <f:ajax listener="#

How to make JSF validator, valueChangeListener and actionListener be called once but not multiple times when binding and View scope are used

China☆狼群 提交于 2020-01-06 08:49:06
问题 The JSF component uses binding and backing bean is of View scope . The component have validator and valueChangeListener set. And when component's value is changed partial request is sent to server. And validator and valueChangListener are called many times but not once within request. How to make them to be called once during request? If remove binding the methods are called correctly once. But is it possible to do not remove binding and make listeners be called once? Sample of used code is