richfaces

Assign a unique client ID to each <rich:dataTable /> row?

社会主义新天地 提交于 2019-12-24 19:22:22
问题 I'm relatively new to working with the UI in Seam, so I'm hoping there is something simple I can replace the three instances of UNIQUE_ID with in the following example. The goal is to have a <rich:dataTable /> wherein each row has the ability to show/hide a <rich:modalPanel /> with more details about the particular object instance. <rich:dataTable var="object" value="#{bean.myObject}"> <rich:column> <h:outputText value="#{object.summary}" /> </rich:column> <rich:column> <a onclick="Richfaces

Calling another a4j:jsFunction in an a4j:jsFunction oncomplete event

故事扮演 提交于 2019-12-24 19:13:33
问题 I define some java script function which will call the back-end functions using a4j:jsFunction.For example : <a4j:jsFunction name="function1" action="#{Bean1.action1}" oncomplete="function2();"/> <a4j:jsFunction name="function2" action="#{Bean1.action2}" oncomplete="SomeJSFunc2();"/> Then in the a4j:commandButton , I set the onclick property to call my defined function like it: <a4j:commandButton onclick="function1" oncomplete="SomeJSFunc3();"> When the a4j:commandButton is clicked , #{Bean1

how to invoke JSF Validator on keyup event?

夙愿已清 提交于 2019-12-24 16:41:18
问题 I am using JSF 2.0 and Richfaces 4.1.0 Final Though some similar questions exist like Link I want to implement JSF Validator on inputtext box on keyup event. Can any body give a pointer of some useful tutorial please? 回答1: You can attach ajax listeners to DOM events on any JSF HTML input component by <f:ajax> tag. <h:inputText id="foo" value="#{bean.foo}"> <f:ajax event="keyup" execute="@this" render="fooMessage" /> <f:validator validatorId="fooValidator" /> </h:inputText> <h:message id=

How to trigger JSF render from jQuery

隐身守侯 提交于 2019-12-24 16:18:03
问题 Is it possible to trigger jsf <f:ajax render> inside an jQuery? For example something like this: /* if component Y changes trigger render event on component Y */ $("#source_compoment").bind("change", function(e) { $("#target_component").trigger("render"); }); Or with other words is there an equivalent for "f:ajax render" within jQuery? 回答1: Yes , make a hidden button <h:commandButton id="myHiddenButtonID" value="RenderSomething" style="display:none"> <f:ajax render="target_component"></f:ajax

How to disable rich calendar using JQuery or javascript (client side)

萝らか妹 提交于 2019-12-24 14:59:54
问题 All is in the question, I want to disable and enable a rich:calendar on the client side (using a javascript fonction for example). xhtml elements: <rich:calendar id="calendar" ... /> <h:selectBooleanCheckbox id="checkbox" onclick="change('checkbox', 'calendar')" ... /> JS Function : function change(checkbox, calendar){ if(jQuery('#'+checkbox).is(':checked')){ // Enable calendar jQuery('#'+calendar).removeAttr('disabled'); } else{ // Disable calendar jQuery('#'+calendar).attr('disabled',true);

Which rich:calendar event will be fired by changing a date value in the small preview calendar?

只愿长相守 提交于 2019-12-24 14:28:14
问题 I use a rich:calendar component and my method, which is registered at the attribute "valueChangeListener" is only fire, if a insert a new date manually. But if i used the small preview calendar of this component, nothing will be fired. With small preview calendar i means something like in this richfaces demo: http://livedemo.exadel.com/richfaces-demo/richfaces/calendar.jsf;jsessionid=5F76DD93066405333AE0F8F7706AE441?c=calendar&tab=usage I use Richfaces 3.3.* <rich:calendar id="Date" value="#

a4j:repeat - Dynamically appending a new element

自闭症网瘾萝莉.ら 提交于 2019-12-24 13:52:17
问题 I'm trying to implement (as part of a larger system) a feature where a user is able to post a message. When the user clicks the post button, I'm using RichFaces and a4j to retrieve the generated post using ajax. I'd rather not have the post show up automatically as soon as the response is returned. Rather, I'd like to add an output panel inside a hidden div. When the user clicks on the post button, that output panel will be populated but obviously hidden from the user. What I would like to do

rich:dataGrid borders issue rich faces 4

孤街浪徒 提交于 2019-12-24 13:17:56
问题 We are upgrading from jsf 1.2 to jsf 2. We are using apache myfaces 2.1 and rich faces 4.3. The issue is i am not able to get borders around <rich:dataGrid> component. I have seen posts describing how to remove the borders but no one specifies how to get borders. It seems that borders are by default rendered earlier (they were coming when rich faces 3 is used ) but after upgrading to rich faces 4 , ther are not rendered by default. Following is the xhtml snippet. <rich:dataGrid value="#{bean

How to make a clickable row in a rich:datatable?

冷暖自知 提交于 2019-12-24 10:39:28
问题 I have a JSF page with a rich:dataTable where, in each row, I put h:commandLink s to lead to pages with the details of the row selected. I wanted to make the whole row clickable, calling the action method when the user clicks anywhere in the row. Is that possible without JavaScript? And if JavaScript is the only way out, what would be the best way do it? Search for a commandLink and "click" it? Thanks in advance! 回答1: I got the whole rows clickable with a bit of styling. I made the links

JSF1005: Cannot instantiate validator of type javax.faces.Bean

本秂侑毒 提交于 2019-12-24 09:59:57
问题 I am getting error below on every action after migrating from JSF 1.2 and RF 3.3 to JSF 2.1 and RF 4. Also my CSS styles is not as to be. I think my CSS problem can related to this issue. 23.Ara.2011 23:03:42 com.sun.faces.application.ApplicationImpl createValidator SEVERE: JSF1005: Cannot instantiate validator of type javax.faces.Bean I search on the net but couldn't find any solution. How is this caused and how can I solve it? 回答1: Your webapp's runtime classpath is dirty. This is a pretty