jsf-2

Change Attribute Display Type from Managed Bean in JSF

牧云@^-^@ 提交于 2019-12-25 16:42:02
问题 In my scenario i need to change attribute display type from managed bean using ajax <h:inputText id="text1" value="#{managedBean.value}" /> <h:selectOneRadio value="#{managedBean.option}"> <f:selectItem itemValue="Yes" itemLabel="Yes" /> <f:selectItem itemValue="No" itemLabel="No" /> <f:ajax listener="#{managedBean.changeAttrDisplayType}" event="click" render="text1"/> </h:selectOneRadio> If i click yes in the radio button,then attribute(id=text1) will render as textbox and if i click No then

Change Attribute Display Type from Managed Bean in JSF

妖精的绣舞 提交于 2019-12-25 16:41:31
问题 In my scenario i need to change attribute display type from managed bean using ajax <h:inputText id="text1" value="#{managedBean.value}" /> <h:selectOneRadio value="#{managedBean.option}"> <f:selectItem itemValue="Yes" itemLabel="Yes" /> <f:selectItem itemValue="No" itemLabel="No" /> <f:ajax listener="#{managedBean.changeAttrDisplayType}" event="click" render="text1"/> </h:selectOneRadio> If i click yes in the radio button,then attribute(id=text1) will render as textbox and if i click No then

Primefaces p:selectManyCheckbox doesn't work with c:forEach and f:selectItem

|▌冷眼眸甩不掉的悲伤 提交于 2019-12-25 12:56:19
问题 How to use these tags together as now they don't work: <p:scrollPanel mode="native" style="height: 200px;"> <p:selectManyCheckbox id="groups" value="#{myBean.selectedGroups}" layout="custom" > <c:forEach items="#{myBean.myGroups}" var="group" > <f:selectItem itemValue="#{group.id}" itemLabel="#{group.name}"/> </c:forEach> </p:selectManyCheckbox> </p:scrollPanel> I want to do this to put each <f:selectItem/> inside of the <li></li> later. Additional details: xmlns:c="http://java.sun.com/jsp

JSF 2.0 - set javax.faces.STATE_SAVING_METHOD on a specific manage bean only

谁都会走 提交于 2019-12-25 12:52:11
问题 In the web.xml, I've the following: <context-param> <param-name>javax.faces.STATE_SAVING_METHOD</param-name> <param-value>server</param-value> </context-param> This setting effects all jsf managed beans in my app. I've one particular bean that I want the state to be client. Is there a way to have only this one bean with set with client as STATE_SAVING_METHOD and the rest with server? 回答1: It appears that the answer to your question is 'no'. It was considered as a feature but ultimately was

How to do a dataTable containing a subtable with Primefaces in the same row? What's doing with mine?

断了今生、忘了曾经 提交于 2019-12-25 12:44:08
问题 Look at the behavior of my table, I want that the lines of field email appear inside of the field Email and not like that show in the image... Can anyone help me? 回答1: use <ui:repeat> over your email list, and print them inside e-mail column. <ui:repeat var="email" value="#{user.emailList}"> #{email} <br/> </ui:repeat> 来源: https://stackoverflow.com/questions/9982944/how-to-do-a-datatable-containing-a-subtable-with-primefaces-in-the-same-row-wha

composite attributes returns null in jsf custom components

岁酱吖の 提交于 2019-12-25 09:49:50
问题 I am implementing my custom component like below. Placed this file web-> resource folder <html xmlns="http://www.w3.org/1999/xhtml" xmlns:h="http://java.sun.com/jsf/html" xmlns:ui="http://java.sun.com/jsf/facelets" xmlns:composite="http://java.sun.com/jsf/composite" > <h:body> <composite:interface> <composite:attribute name="width" default="300"/> <composite:attribute name="height" default="400"/> </composite:interface> <composite:implementation> <h:inputText style="height: #{composite.attrs

composite attributes returns null in jsf custom components

a 夏天 提交于 2019-12-25 09:49:24
问题 I am implementing my custom component like below. Placed this file web-> resource folder <html xmlns="http://www.w3.org/1999/xhtml" xmlns:h="http://java.sun.com/jsf/html" xmlns:ui="http://java.sun.com/jsf/facelets" xmlns:composite="http://java.sun.com/jsf/composite" > <h:body> <composite:interface> <composite:attribute name="width" default="300"/> <composite:attribute name="height" default="400"/> </composite:interface> <composite:implementation> <h:inputText style="height: #{composite.attrs

error@malformedXML with ajax requests in JSF

早过忘川 提交于 2019-12-25 09:26:11
问题 Context : Weblogic 12.2.1 / JSF 2.1.6 / Richfaces 4.2.2 / Primefaces 3.4 I have a JSF application that was on Weblogic 10.3.6 and that I successfully deploy on Weblogic 12.2.1. I am facing the following error after each ajax request : Received 'error@malformedXML' event from <input ... [200] undefined: undefined This error usually occurres when the component to be rendered is not present in the page but as you'll see in the following pieces of code, this is not the case : Java private int

Issues while Upgrading Jsf1.0 to Jsf2.0

只谈情不闲聊 提交于 2019-12-25 08:16:46
问题 While upgrading application to Jsf2.0 created in Spring3 and Jsf1.0 (myfaces), i am facing some issues mentioned below. I have done following steps to upgrade the application. From IntelliJ IDEA: * Open project settings/Monitor/Dependencies * Removed facelet*jar, el*.jars, myfaces* jars from project * Added jsf2.0.x ri mojarra jars and tomahawk1.1.9.jar * Open project settings/monitor/web settings * Under "modules and libs to package": remove el-.jars,facelet-jar and myfaces jars * Added jsf2

NoClassDefFoundError when deploying dynamic web app from eclipse with jsf and tomcat 7.0 [duplicate]

人盡茶涼 提交于 2019-12-25 08:13:32
问题 This question already has answers here : java.lang.NoClassDefFoundError: javax/servlet/jsp/jstl/core/Config (2 answers) Closed 3 years ago . I am getting this error when ever deploying my jsf application java.lang.NoClassDefFoundError: javax/servlet/jsp/jstl/core/Config at com.sun.faces.application.view.JspViewHandlingStrategy.executePageToBuildView(JspViewHandlingStrategy.java:345) at com.sun.faces.application.view.JspViewHandlingStrategy.buildView(JspViewHandlingStrategy.java:154) at com