richfaces

Why does required=“true” not fail validation when disabled=“true” is specified

瘦欲@ 提交于 2019-12-13 05:16:11
问题 <a4j:outputPanel id="tapalSectionSendToPanel" ajaxsingle="true"> <h:inputText id="sendToId1" value="#{MainBean.SectionBean.sendTo}" class="createresizedTextbox" required="true" requiredMessage="#{msg.labl_required}" disabled="true" /> <h:message for="sendToId1" style="color:red" /> </a4j:outputPanel> i need to validate textbox for empty validation and should show required when i click button without entering any value in textbox. It works fine without disabled="true" . Whats the alternative

Edit row data from richfaces datatable

喜你入骨 提交于 2019-12-13 04:45:57
问题 my application show the list of customer using richfaces datatable as show in image: When user click the edit option an editable row must appear to edit the row data like in image: my jsf page index.xhtml <h:form> <rich:panel style="width:100%;" header="List of Customer" > <rich:dataTable style="width: 100%;" value="#{customerDataBaseQuery.customerDataModel}" var="c" rowClass="odd even" columnClasses=" c1,c2,c3,c4,c5,c6,c7" onrowmouseover="this.style.fontWeight='bold'" onrowmouseout="this

How can I take a backingbean GSON string to Highcharts

笑着哭i 提交于 2019-12-13 04:45:32
问题 I'm fairly new when it comes to JS, jQuery and JSON stuff, so any help is greatly appreciated. I have a project I am trying to work with Highcharts on, that's JSF 2.2, RichFaces 4. I've already got my backing bean which pulls data from a database, and put's store's in a collection. I then convert the collection to a GSON string. A sample of the data, from a printout of the GSON object is {"Pool Price":[{"date":"Date.UTC(2012,5,4,1)","data":"1144.144"},{"date":"Date.UTC(2012,5,4,2)","data":

JSF/JAVA boolean switchers (private for JSF, public static for Beans)

陌路散爱 提交于 2019-12-13 03:48:16
问题 I'm using boolean switchers to resolve a choosed behaviour of application, for example SAVEACCEPTED enables SAVE button of form. <h:commandButton action="#{bean.save}" disabled="#{!bean.saveaccepted}"> JSF need private boolean and its getters and setters, but if I want to resolve some internal logic in application server, it must be defined static. For example IF (USERFOUND) SAVEACCEPTED = true; So, I'm using settings class and there are public static booleans defined. And in the beans there

Long polling (pending request) for JSF

人盡茶涼 提交于 2019-12-13 02:37:00
问题 I need to implement long polling or pending request for a chatroom. I tried a4j:push, but it seems doesn't work like a real long polling approach (see the following discussion: https://community.jboss.org/message/16614). The question is: which alternatives do I have to realize long polling? I'm using JSF 1.2, JAVA EE 6 and RichFaces 3.3.2. Thaks in advance! 回答1: You need to use the a4j:poll component from RichFaces. The exadel live demo has a very nice sample and explains the main properties.

How to send selected date of rich:calendar to my bean?

↘锁芯ラ 提交于 2019-12-13 00:37:28
问题 I am using richfaces calendar in my JSF 1.1 project. If I select a date, I want to send the selected date to my bean. How can I do it? I write simple code for this but it comes always null. Here is my JSF page: <rich:panel style="width: 15%;"> <rich:calendar cellWidth="24px" cellHeight="22px" value="#{functions.selectedDate}" datePattern="yyyy-MM-dd" style="width:200px;"> </rich:calendar> </rich:panel> Here is my bean: import java.util.Date; public class functions { private Date selectedDate;

Change listener without submitting the form

丶灬走出姿态 提交于 2019-12-12 21:57:31
问题 I've got a list box and I want to catch change in selection in order to fill an other one according to it. I've tried in the following way: <h:selectOneMenu id="comunitaValle" value="#{struttura.nomeComunitaDiValle}" onchange="submit()" valueChangeListener="#{struttura.getComuniInComunita}"> <f:selectItems value="#{struttura.comunitaValleList}" /> </h:selectOneMenu> It works fine, but the fact that in this page there are other parameters marked as required="true" and when the form is

JSF a4j:commandButton not working when 'disabled' is set

余生颓废 提交于 2019-12-12 20:25:49
问题 When I include a 'disabled' attribute on an a4j:commandButton, the button's action is not performed. Taking the 'disabled' attribute out causes it to work properly. I am not doing any special validation (that I'm aware of) and am not seeing any validation error messages. Here is part of my page: <t:dataTable id="myTable" var="region" value="#{MyPageBackingBean.regions}" width="100%"> ... <a4j:commandButton value="Update" action="#{region.doUpdate}" oncomplete="alert('done');" disabled="#{

Selecting a row in sorted rich:dataTable

你。 提交于 2019-12-12 16:44:07
问题 I have a rich:dataTable component (RF 4.2.2.Final). I've added the rowclick listener for the table to update a detailed view based on the row selection. Everything was working fine. But now I'm trying to get my dataTable to have sortable headers. I follow the RF showcase and find out that the row selection doesn't work properly if the data in the dataTable isn't in natural order - it means in order in which the data is in the list in appQueryBean. But I'm sure that similar case is fine in RF

Configuring for RichFaces: java.lang.ClassNotFoundException: org.ajax4jsf.Filter

妖精的绣舞 提交于 2019-12-12 12:21:17
问题 I have a project that contains some RichFaces components. All other components get displayed but the RichFaces. From the server logs I get: java.lang.ClassNotFoundException: org.ajax4jsf.Filter I am aware that with RichFaces 4.0 no filters are needed in the Web.xml. Here is my library : commons-beanutils-1.7.0.jar commons-collections-3.2.jar commons-digester-1.8.jar commons-digester.jar commons-discovery.jar commons-logging-1.0.4.jar cssparser-0.9.5.jar guava-r08.jar jhighlight-1.0.jar jsf