[JBoss JIRA] (RF-13105) Problem with expanded for collapsiblePanel inside dataTable
by Brian Leathem (JIRA)
[ https://issues.jboss.org/browse/RF-13105?page=com.atlassian.jira.plugin.s... ]
Brian Leathem updated RF-13105:
-------------------------------
Issue Type: Bug (was: Feature Request)
Description:
If one of the collapsiblePanels is expanded and another server action (pageination, button click,...) is done, all the collapsiblePanels are expanded.
{code}
<rich:dataTable var="var" value="#{bean.someValue}" id="table">
<rich:column>
<rich:collapsiblePanel expanded="#{var.property}" switchType="client" id="panel">
<h:inputText value="#{var.editValue1}" />
...
<a4j:commandButton action="#{bean.someAction}"
value="save" render="table"/>
</rich:collapsiblePanel>
</rich:column>
</rich:dataTable>
{code}
was:
https://community.jboss.org/message/818174
<rich:dataTable var="var" value="#{bean.someValue}" id="table">
<rich:column>
<rich:collapsiblePanel expanded="#{var.property}" switchType="client" id="panel">
<h:inputText value="#{var.editValue1}" />
...
<a4j:commandButton action="#{bean.someAction}"
value="save" render="table"/>
</rich:collapsiblePanel>
</rich:column>
</rich:dataTable>
if one of the collapsiblePanels ist expanded and another server action (pageination, button click,...) is done, all the collapsiblePanels are expanded.
Forum Reference: https://community.jboss.org/message/818174
> Problem with expanded for collapsiblePanel inside dataTable
> -----------------------------------------------------------
>
> Key: RF-13105
> URL: https://issues.jboss.org/browse/RF-13105
> Project: RichFaces
> Issue Type: Bug
> Security Level: Public(Everyone can see)
> Components: component-menu, component-tables
> Affects Versions: 4.3.2
> Environment: Windows 7, IE 8,
> Reporter: Mahesh Bonagiri
>
> If one of the collapsiblePanels is expanded and another server action (pageination, button click,...) is done, all the collapsiblePanels are expanded.
> {code}
> <rich:dataTable var="var" value="#{bean.someValue}" id="table">
> <rich:column>
> <rich:collapsiblePanel expanded="#{var.property}" switchType="client" id="panel">
> <h:inputText value="#{var.editValue1}" />
> ...
> <a4j:commandButton action="#{bean.someAction}"
> value="save" render="table"/>
> </rich:collapsiblePanel>
> </rich:column>
> </rich:dataTable>
> {code}
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
11 years, 4 months
[JBoss JIRA] (RF-13105) Problem with expanded for collapsiblePanel inside dataTable
by Brian Leathem (JIRA)
[ https://issues.jboss.org/browse/RF-13105?page=com.atlassian.jira.plugin.s... ]
Brian Leathem updated RF-13105:
-------------------------------
Fix Version/s: 5-Tracking
> Problem with expanded for collapsiblePanel inside dataTable
> -----------------------------------------------------------
>
> Key: RF-13105
> URL: https://issues.jboss.org/browse/RF-13105
> Project: RichFaces
> Issue Type: Bug
> Security Level: Public(Everyone can see)
> Components: component-menu, component-tables
> Affects Versions: 4.3.2
> Environment: Windows 7, IE 8,
> Reporter: Mahesh Bonagiri
> Fix For: 5-Tracking
>
>
> If one of the collapsiblePanels is expanded and another server action (pageination, button click,...) is done, all the collapsiblePanels are expanded.
> {code}
> <rich:dataTable var="var" value="#{bean.someValue}" id="table">
> <rich:column>
> <rich:collapsiblePanel expanded="#{var.property}" switchType="client" id="panel">
> <h:inputText value="#{var.editValue1}" />
> ...
> <a4j:commandButton action="#{bean.someAction}"
> value="save" render="table"/>
> </rich:collapsiblePanel>
> </rich:column>
> </rich:dataTable>
> {code}
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
11 years, 4 months
[JBoss JIRA] (RF-13102) rich:calendar with date pattern- input gets cleared on click
by Brian Leathem (JIRA)
[ https://issues.jboss.org/browse/RF-13102?page=com.atlassian.jira.plugin.s... ]
Brian Leathem updated RF-13102:
-------------------------------
Fix Version/s: 4.3.4
> rich:calendar with date pattern- input gets cleared on click
> ------------------------------------------------------------
>
> Key: RF-13102
> URL: https://issues.jboss.org/browse/RF-13102
> Project: RichFaces
> Issue Type: Bug
> Security Level: Public(Everyone can see)
> Components: component-input
> Affects Versions: 4.2.3.Final, 4.3.2
> Reporter: Jonáš Trantina
> Assignee: Brian Leathem
> Fix For: 4.3.4
>
>
> When a rich:calendar component has datePattern without a day (e.g. MM/yyyy) then selected date is cleared when opening the calendar (you can see today date instead of the previously selected date).
> However, when the form is sent, the value is correctly assigned to the binded value.
> Example:
> {noformat}
> <rich:calendar value="#{richBean.date}" datePattern="yyyy-MM"/>
> {noformat}
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
11 years, 4 months
[JBoss JIRA] (RF-13106) Quickstart names in the POM files are not consistent and often are not clear
by Brian Leathem (JIRA)
[ https://issues.jboss.org/browse/RF-13106?page=com.atlassian.jira.plugin.s... ]
Brian Leathem updated RF-13106:
-------------------------------
Fix Version/s: 4.3.4
> Quickstart names in the POM files are not consistent and often are not clear
> ----------------------------------------------------------------------------
>
> Key: RF-13106
> URL: https://issues.jboss.org/browse/RF-13106
> Project: RichFaces
> Issue Type: Bug
> Security Level: Public(Everyone can see)
> Components: examples
> Reporter: Sande Gilda
> Fix For: 4.3.4
>
>
> Quickstart names in the pom.xml files are not consistent and often are too generic and not clear which quickstart is building.
> When you run `mvn clean install '-Pdefault,!complex-dependencies'` from the root directory of the quickstarts, it often is not clear which quickstart is compiling. Some start with "JBoss AS Quickstarts" and some do not. Some use the quickstart folder name in the description, some don't.
> As described in the CONTRIBUTING.md file, the <name> in the quickstart pom.xml file should follow the template:
> JBoss <target-product> Quickstart: <quickstart-name> < - optional-subfolder-name> where target-product is the Target Product metadata specified in the README.md file, quickstart-name is the quickstart folder name, and optional-subfolder-name is the name of any nested subfolder containing a pom.xml file.
> JDF-430 addressed the EAP and WFK quickstarts. The root build not displays the following. Note the RichFaces and JDG quickstarts need to be updated.
> [INFO] Reactor Build Order:
> [INFO]
> [INFO] JBoss EAP Quickstart: bean-validation
> [INFO] JBoss EAP Quickstart: bmt
> [INFO] JBoss WFK Quickstart: cdi-add-interceptor-binding
> [INFO] JBoss EAP Quickstart: cdi-alternative
> [INFO] JBoss EAP Quickstart: cdi-decorator
> [INFO] JBoss EAP Quickstart: cdi-interceptors
> [INFO] JBoss EAP Quickstart: cdi-injection
> [INFO] JBoss EAP Quickstart: cdi-portable-extension
> [INFO] JBoss EAP Quickstart: cdi-stereotype
> [INFO] JBoss EAP Quickstart: cdi-veto
> [INFO] JBoss WFK Quickstart: deltaspike-authorization
> [INFO] JBoss WFK Quickstart: deltaspike-beanbuilder
> [INFO] JBoss WFK Quickstart: deltaspike-beanmanagerprovider
> [INFO] JBoss WFK Quickstart: deltaspike-deactivatable
> [INFO] JBoss WFK Quickstart: deltaspike-exception-handling
> [INFO] JBoss WFK Quickstart: deltaspike-helloworld-jms
> [INFO] JBoss WFK Quickstart: deltaspike-partialbean-basic
> [INFO] JBoss WFK Quickstart: deltaspike-partialbean-advanced
> [INFO] JBoss WFK Quickstart: deltaspike-projectstage
> [INFO] JBoss EAP Quickstart: ejb-asynchronous
> [INFO] JBoss EAP Quickstart: ejb-asynchronous - ejb
> [INFO] JBoss EAP Quickstart: ejb-asynchronous - client
> [INFO] JBoss EAP Quickstart: ejb-in-ear
> [INFO] JBoss EAP Quickstart: ejb-in-ear - ejb
> [INFO] JBoss EAP Quickstart: ejb-in-ear - web
> [INFO] JBoss EAP Quickstart: ejb-in-ear - ear
> [INFO] JBoss EAP Quickstart: ejb-in-war
> [INFO] JBoss EAP Quickstart: ejb-remote - server-side
> [INFO] JBoss EAP Quickstart: ejb-remote - client
> [INFO] JBoss EAP Quickstart: ejb-remote
> [INFO] JBoss EAP Quickstart: ejb-security
> [INFO] JBoss EAP Quickstart: ejb-security-plus
> [INFO] JBoss EAP Quickstart: ejb-security-interceptors
> [INFO] JBoss EAP Quickstart: ejb-throws-exception
> [INFO] JBoss EAP Quickstart: ejb-throws-exception - ejb-api
> [INFO] JBoss EAP Quickstart: ejb-throws-exception - ejb
> [INFO] JBoss EAP Quickstart: ejb-throws-exception - web
> [INFO] JBoss EAP Quickstart: ejb-throws-exception - ear
> [INFO] JBoss EAP Quickstart: ejb-multi-server
> [INFO] JBoss EAP Quickstart: ejb-multi-server - app-one
> [INFO] JBoss EAP Quickstart: ejb-multi-server - app-one - ejb
> [INFO] JBoss EAP Quickstart: ejb-multi-server - app-one - ear
> [INFO] JBoss EAP Quickstart: ejb-multi-server - app-two
> [INFO] JBoss EAP Quickstart: ejb-multi-server - app-two - ejb
> [INFO] JBoss EAP Quickstart: ejb-multi-server - app-two - ear
> [INFO] JBoss EAP Quickstart: ejb-multi-server - app-main
> [INFO] JBoss EAP Quickstart: ejb-multi-server - app-main - ejb
> [INFO] JBoss EAP Quickstart: ejb-multi-server - app-main - web
> [INFO] JBoss EAP Quickstart: ejb-multi-server - app-main - ear
> [INFO] JBoss EAP Quickstart: ejb-multi-server - app-web
> [INFO] JBoss EAP Quickstart: ejb-multi-server - client
> [INFO] JBoss EAP Quickstart: greeter
> [INFO] JBoss EAP Quickstart: greeter-spring
> [INFO] JBoss EAP Quickstart: helloworld
> [INFO] JBoss WFK Quickstart: helloworld-errai
> [INFO] JBoss WFK Quickstart: helloworld-gwt
> [INFO] JBoss WFK Quickstart: helloworld-html5
> [INFO] JBoss EAP Quickstart: helloworld-jms
> [INFO] JBoss EAP Quickstart: helloworld-mdb
> [INFO] JBoss EAP Quickstart: helloworld-osgi
> [INFO] JBoss EAP Quickstart: helloworld-rs
> [INFO] JBoss EAP Quickstart: helloworld-singleton
> [INFO] JBoss EAP Quickstart: helloworld-ws
> [INFO] JBoss EAP Quickstart: hibernate3
> [INFO] JBoss EAP Quickstart: hibernate4
> [INFO] CarMart Single Node (No Cluster)
> [INFO] Transactional CarMart
> [INFO] JBoss AS Quickstarts: JBoss Data Grid HelloWorld
> [INFO] HotRod Endpoint Example
> [INFO] Memcached Endpoint Example
> [INFO] REST Endpoint Example
> [INFO] JBoss Data Grid Quickstart Parent
> [INFO] JBoss EAP Quickstart: kitchensink
> [INFO] JBoss WFK Quickstart: kitchensink-angularjs
> [INFO] JBoss WFK Quickstart: kitchensink-backbone
> [INFO] JBoss WFK Quickstart: kitchensink-deltaspike
> [INFO] JBoss EAP Quickstart: kitchensink-ear
> [INFO] JBoss EAP Quickstart: kitchensink-ear - ejb
> [INFO] JBoss EAP Quickstart: kitchensink-ear - web
> [INFO] JBoss EAP Quickstart: kitchensink-ear - ear
> [INFO] JBoss WFK Quickstart: kitchensink-html5-mobile
> [INFO] JBoss EAP Quickstart: kitchensink-jsp
> [INFO] JBoss EAP Quickstart: kitchensink-ml
> [INFO] JBoss EAP Quickstart: kitchensink-ml-ear
> [INFO] JBoss EAP Quickstart: kitchensink-ml-ear - ejb
> [INFO] JBoss EAP Quickstart: kitchensink-ml-ear - web
> [INFO] JBoss EAP Quickstart: kitchensink-ml-ear - ear
> [INFO] JBoss EAP Quickstart: kitchensink-spring-asyncrequestmapping
> [INFO] JBoss EAP Quickstart: kitchensink-spring-basic
> [INFO] JBoss EAP Quickstart: kitchensink-spring-controller
> [INFO] JBoss EAP Quickstart: kitchensink-spring-matrixvariables
> [INFO] JBoss EAP Quickstart: kitchensink-spring-springmvctest
> [INFO] JBoss EAP Quickstart: log4j
> [INFO] JBoss EAP Quickstart: logging
> [INFO] JBoss EAP Quickstart: logging-tools
> [INFO] JBoss EAP Quickstart: mail
> [INFO] JBoss EAP Quickstart: numberguess
> [INFO] JBoss EAP Quickstart: payment-cdi-event
> [INFO] JBoss EAP Quickstart: picketlink-authentication-http-basic
> [INFO] JBoss EAP Quickstart: picketlink-authentication-http-digest
> [INFO] JBoss EAP Quickstart: petclinic-spring
> [INFO] JBoss EAP Quickstart: picketlink-authentication-idm-jsf
> [INFO] JBoss EAP Quickstart: picketlink-authentication-idm-multi-tenancy
> [INFO] JBoss EAP Quickstart: picketlink-authentication-jsf
> [INFO] JBoss EAP Quickstart: picketlink-authentication-rs-endpoint
> [INFO] JBoss EAP Quickstart: picketlink-authentication-two-factor
> [INFO] JBoss EAP Quickstart: picketlink-authorization-idm-jpa
> [INFO] JBoss EAP Quickstart: picketlink-authorization-rs-rbac
> [INFO] JBoss WFK Quickstart: picketlink-deltaspike-authorization
> [INFO] JBoss AS Quickstarts: Hello world with JSF front end
> [INFO] JBoss AS Quickstarts: Kitchensink-rf
> [INFO] JBoss AS Quickstarts: RichFaces Bean Validation
> [INFO] JBoss EAP Quickstart: servlet-async
> [INFO] JBoss EAP Quickstart: servlet-filterlistener
> [INFO] JBoss EAP Quickstart: servlet-security
> [INFO] JBoss EAP Quickstart: shopping-cart
> [INFO] JBoss EAP Quickstart: shopping-cart - server
> [INFO] JBoss EAP Quickstart: shopping-cart - client
> [INFO] JBoss WFK Quickstart: shrinkwrap-resolver
> [INFO] JBoss EAP Quickstart: tasks
> [INFO] JBoss EAP Quickstart: tasks-jsf
> [INFO] JBoss EAP Quickstart: tasks-rs
> [INFO] JBoss EAP Quickstart: temperature-converter
> [INFO] JBoss EAP Quickstart: wicket-ear
> [INFO] JBoss EAP Quickstart: wicket-ear - ejb
> [INFO] JBoss EAP Quickstart: wicket-ear - war
> [INFO] JBoss EAP Quickstart: wicket-ear - ear
> [INFO] JBoss EAP Quickstart: wicket-war
> [INFO] JBoss EAP Quickstart: xml-dom4j
> [INFO] JBoss EAP Quickstart: xml-jaxp
> [INFO] JBoss EAP Quickstart: cmt
> [INFO] JBoss EAP Quickstart: jts
> [INFO] JBoss EAP Quickstart: jts - application-component-2
> [INFO] JBoss EAP Quickstart: jts - application-component-1
> [INFO] JBoss EAP Quickstart: jta-crash-rec
> [INFO] JBoss EAP Quickstart: wsat-simple
> [INFO] JBoss EAP Quickstart: wsba-coordinator-completion-simple
> [INFO] JBoss EAP Quickstart: wsba-participant-completion-simple
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
11 years, 4 months
[JBoss JIRA] (RF-13108) rich:calendar nested a4j:ajax event not firing
by Brian Leathem (JIRA)
[ https://issues.jboss.org/browse/RF-13108?page=com.atlassian.jira.plugin.s... ]
Brian Leathem commented on RF-13108:
------------------------------------
Thanks for reporting this [~nathandennis]. Would you please update the description with:
1) What you actually to observe
2) What you expect to observe
This will help me get up-to-speed with the details of the bug you are observing.
> rich:calendar nested a4j:ajax event not firing
> ----------------------------------------------
>
> Key: RF-13108
> URL: https://issues.jboss.org/browse/RF-13108
> Project: RichFaces
> Issue Type: Bug
> Security Level: Public(Everyone can see)
> Components: component-a4j-core, component-validators
> Affects Versions: 4.3.2
> Environment: jboss 7.1.3 richfaces 4.3.2.final, chrome
> Reporter: nathan dennis
> Labels: a4j:ajax, rich:calendar, rich:message
>
> nested a4j:ajax change event isn't functioning as expected.
> ajax event isn't always fired. after speaking with ppitonak it seemed as if the order of the ajax with relation to the validators was import. however after closer inspection (and may be a different problem), the value wasnt making back to the bean even when the event was fired.
> {code:xml}
> <?xml version='1.0' encoding='UTF-8' ?>
> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
> <ui:composition 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:c="http://java.sun.com/jsp/jstl/core"
> xmlns:a4j="http://richfaces.org/a4j"
> xmlns:rich="http://richfaces.org/rich"
> template="/resources/scaffold/pageTemplate.xhtml">
> <f:metadata>
> <f:viewParam name="id" value="#{screeningBean.id}"/>
> </f:metadata>
> <ui:define name="main">
> <h:form id="create">
>
> <h:panelGrid columnClasses="label,component,required" columns="3">
> <h:outputLabel for="startTimeOverride" value="Start Time Override:"/>
> <rich:calendar value="#{screeningBean.screening.beginTime}" id="startTimeOverride"
> popup="true" datePattern="dd/M/yy hh:mm a" required="true"
> showApplyButton="true" >
> <f:validateRequired />
> <a4j:ajax event="change" bypassUpdates="#{true}"/>
> </rich:calendar>
> <rich:message for="startTimeOverride" ajaxRendered="true" />
> <h:outputLabel for="endTimeOverride" value="End Time Override:" />
> <rich:calendar value="#{screeningBean.screening.endTime}" id="endTimeOverride"
> popup="true" datePattern="dd/M/yy hh:mm a"
> showApplyButton="true" >
> <f:validateRequired />
> <f:validator validatorId="dateRangeValidator" />
> <rich:validator />
> <a4j:ajax event="change" bypassUpdates="#{true}"/>
> </rich:calendar>
> <rich:message for="endTimeOverride" ajaxRendered="true" />
> </h:panelGrid>
> <div class="buttons">
> <a4j:commandButton value="Complete"
> action="#{screeningBean.updateScreening(2)}"
> execute="@form"
> onclick="this.disabled=true; var that = this; setTimeout(function() that.disabled=false;},500);"
> styleClass="btn btn-primary btn-primary-a4j" />
> </div>
> </h:form>
> </ui:define>
> </ui:composition>
> {code}
> {code:title=DateRangeValidator.java}
> /**************************************************************
> * Copyright (c) 2012 - 2013, Monarch, All rights reserved.
> *
> * @author Nathan Dennis
> *
> */
> package org.monarchnc.view.validators;
> import java.text.DateFormat;
> import java.text.SimpleDateFormat;
> import java.util.Date;
> import javax.faces.application.FacesMessage;
> import javax.faces.component.UIComponent;
> import javax.faces.component.UIInput;
> import javax.faces.context.FacesContext;
> import javax.faces.validator.FacesValidator;
> import javax.faces.validator.Validator;
> import javax.faces.validator.ValidatorException;
> import javax.persistence.EntityManager;
> import org.apache.deltaspike.core.api.provider.BeanProvider;
> import org.monarchnc.view.ScreeningBean;
> // TODO: Auto-generated Javadoc
> /**
> * The Class DateRangeValidator.
> */
> @FacesValidator("dateRangeValidator")
> public class DateRangeValidator implements Validator {
>
>
> /* (non-Javadoc)
> * @see javax.faces.validator.Validator#validate(javax.faces.context.FacesContext, javax.faces.component.UIComponent, java.lang.Object)f
> */
> public void validate(final FacesContext ctx, final UIComponent component, final Object value) throws ValidatorException {
>
> ScreeningBean screeningBean = BeanProvider.getContextualReference(screeningBean.class, false);
>
> Date date =(Date) value;
> if(screeningBean.getScreening().getBeginTime() != null && date != null)
> if(!date.after(screeningBean.getScreening().getBeginTime())){
> throw new ValidatorException(new FacesMessage(FacesMessage.SEVERITY_ERROR,"End Date must be after Start Date!!.\n","End Date must be after Start Date!!\n"));
>
> }
>
>
> }
> }
> {code}
> {code:title=ScreeningBean.java}
> @Named
> @Transactional
> @ConversationScoped
> public class ScreeningBean implements Serializable{
> Screening screening = new Screening();
> public Class<? extends ViewConfig> claim(){
> if (this.conversation.isTransient())
> {
> this.conversation.begin();
> }...
> }
> public Screening getScreening() {
> return screening;
> }
> public void setScreening(Screening screening) {
> this.screening = screening;
> }
> }
> {code}
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
11 years, 4 months
[JBoss JIRA] (RF-13108) rich:calendar nested a4j:ajax event not firing
by Brian Leathem (JIRA)
[ https://issues.jboss.org/browse/RF-13108?page=com.atlassian.jira.plugin.s... ]
Brian Leathem updated RF-13108:
-------------------------------
Labels: a4j:ajax rich:calendar rich:message waiting_on_user (was: a4j:ajax rich:calendar rich:message)
> rich:calendar nested a4j:ajax event not firing
> ----------------------------------------------
>
> Key: RF-13108
> URL: https://issues.jboss.org/browse/RF-13108
> Project: RichFaces
> Issue Type: Bug
> Security Level: Public(Everyone can see)
> Components: component-a4j-core, component-validators
> Affects Versions: 4.3.2
> Environment: jboss 7.1.3 richfaces 4.3.2.final, chrome
> Reporter: nathan dennis
> Labels: a4j:ajax, rich:calendar, rich:message, waiting_on_user
>
> nested a4j:ajax change event isn't functioning as expected.
> ajax event isn't always fired. after speaking with ppitonak it seemed as if the order of the ajax with relation to the validators was import. however after closer inspection (and may be a different problem), the value wasnt making back to the bean even when the event was fired.
> {code:xml}
> <?xml version='1.0' encoding='UTF-8' ?>
> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
> <ui:composition 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:c="http://java.sun.com/jsp/jstl/core"
> xmlns:a4j="http://richfaces.org/a4j"
> xmlns:rich="http://richfaces.org/rich"
> template="/resources/scaffold/pageTemplate.xhtml">
> <f:metadata>
> <f:viewParam name="id" value="#{screeningBean.id}"/>
> </f:metadata>
> <ui:define name="main">
> <h:form id="create">
>
> <h:panelGrid columnClasses="label,component,required" columns="3">
> <h:outputLabel for="startTimeOverride" value="Start Time Override:"/>
> <rich:calendar value="#{screeningBean.screening.beginTime}" id="startTimeOverride"
> popup="true" datePattern="dd/M/yy hh:mm a" required="true"
> showApplyButton="true" >
> <f:validateRequired />
> <a4j:ajax event="change" bypassUpdates="#{true}"/>
> </rich:calendar>
> <rich:message for="startTimeOverride" ajaxRendered="true" />
> <h:outputLabel for="endTimeOverride" value="End Time Override:" />
> <rich:calendar value="#{screeningBean.screening.endTime}" id="endTimeOverride"
> popup="true" datePattern="dd/M/yy hh:mm a"
> showApplyButton="true" >
> <f:validateRequired />
> <f:validator validatorId="dateRangeValidator" />
> <rich:validator />
> <a4j:ajax event="change" bypassUpdates="#{true}"/>
> </rich:calendar>
> <rich:message for="endTimeOverride" ajaxRendered="true" />
> </h:panelGrid>
> <div class="buttons">
> <a4j:commandButton value="Complete"
> action="#{screeningBean.updateScreening(2)}"
> execute="@form"
> onclick="this.disabled=true; var that = this; setTimeout(function() that.disabled=false;},500);"
> styleClass="btn btn-primary btn-primary-a4j" />
> </div>
> </h:form>
> </ui:define>
> </ui:composition>
> {code}
> {code:title=DateRangeValidator.java}
> /**************************************************************
> * Copyright (c) 2012 - 2013, Monarch, All rights reserved.
> *
> * @author Nathan Dennis
> *
> */
> package org.monarchnc.view.validators;
> import java.text.DateFormat;
> import java.text.SimpleDateFormat;
> import java.util.Date;
> import javax.faces.application.FacesMessage;
> import javax.faces.component.UIComponent;
> import javax.faces.component.UIInput;
> import javax.faces.context.FacesContext;
> import javax.faces.validator.FacesValidator;
> import javax.faces.validator.Validator;
> import javax.faces.validator.ValidatorException;
> import javax.persistence.EntityManager;
> import org.apache.deltaspike.core.api.provider.BeanProvider;
> import org.monarchnc.view.ScreeningBean;
> // TODO: Auto-generated Javadoc
> /**
> * The Class DateRangeValidator.
> */
> @FacesValidator("dateRangeValidator")
> public class DateRangeValidator implements Validator {
>
>
> /* (non-Javadoc)
> * @see javax.faces.validator.Validator#validate(javax.faces.context.FacesContext, javax.faces.component.UIComponent, java.lang.Object)f
> */
> public void validate(final FacesContext ctx, final UIComponent component, final Object value) throws ValidatorException {
>
> ScreeningBean screeningBean = BeanProvider.getContextualReference(screeningBean.class, false);
>
> Date date =(Date) value;
> if(screeningBean.getScreening().getBeginTime() != null && date != null)
> if(!date.after(screeningBean.getScreening().getBeginTime())){
> throw new ValidatorException(new FacesMessage(FacesMessage.SEVERITY_ERROR,"End Date must be after Start Date!!.\n","End Date must be after Start Date!!\n"));
>
> }
>
>
> }
> }
> {code}
> {code:title=ScreeningBean.java}
> @Named
> @Transactional
> @ConversationScoped
> public class ScreeningBean implements Serializable{
> Screening screening = new Screening();
> public Class<? extends ViewConfig> claim(){
> if (this.conversation.isTransient())
> {
> this.conversation.begin();
> }...
> }
> public Screening getScreening() {
> return screening;
> }
> public void setScreening(Screening screening) {
> this.screening = screening;
> }
> }
> {code}
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
11 years, 4 months