InputDate Validation

I have used inputDate_ component in my jsff page.
1. I want to validation that user can select date only from current date to next 1 year only.
2. I want to validation that user can select date only from next week to next 1 year only.
User can't select any date except from this year only.
Please suggest me the regular expression or other validation code for this.

Hi,
regular expressions on compare patterns. In your case you can use a validator (property on inputDate). The validator signature that JDeveloper creates for you looks like
validate(FacesContext context, UIComponent component, Object value) Cast the value to Date and then do your allowed range calculation on this. If the validation is successful, just don't do anything, else (if it fails) issue
FacesMessage m = new FacesMessage(
FacesMessage.SEVERITY_ERROR, "your error code", "your error detail description");
throw new ValidatorException(n);Frank
Ps.: How to compare dates is something you can find example code using Google.

Similar Messages

  • URGENT HELP WITH DATES

    Hi, I need to compare two dates, so I can get the difference betweem them in hours.

    Try this.. This does it in days but I think you will get the idea..
    import java.io.*;
    import java.util.*;
    import java.text.*;
    public class Ex1805
         public static void main(String[] args)
              SimpleDateFormat sdf = new SimpleDateFormat("d/M/y");
              BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
              String inputDate;
              Date first = new Date(), second = new Date();
              final long MSInDay = 1000 * 60 * 60 * 24;
              boolean valid;
    // input first date
              valid = false;
              while(!valid)
                   try
                   System.out.print("Enter first date: ");
                   inputDate = br.readLine();
                   first = sdf.parse(inputDate);
                   valid = true;
                   catch(ParseException e)
                        System.out.println("Invalid     date. Please enter again.");
                   catch(IOException e)
                        System.out.println("IO Error");
    // input second date
              valid = false;
              while(!valid)
                   try
                   System.out.print("Enter second date: ");
                   inputDate = br.readLine();
                   second = sdf.parse(inputDate);
                   valid = true;
                   catch(ParseException e)
                        System.out.println("Invalid     date. Please enter again.");
                   catch(IOException e)
                        System.out.println("IO Error");
    //     calculate difference in days
              long milliseconds = second.getTime() - first.getTime();
              double doubleDays = (double)milliseconds / MSInDay;
              int days = (int)(doubleDays + 0.5);
              System.out.println("Number of days: " + days);

  • BAPI_EECATIMESHEET_GETWORKLIST

    Hi all! i'm trying to test the BAPI_EECATIMESHEET_GETWORKLIST and i dont get any results, can anybody tells me how it bapi works?
    I set a PROFILE, EMPLOYEE NUMBER and INPUTDATE valid values and it doesnt work. I use the CAT2 transaction with the same values and i get results.
    Is this BAPI that returns values to me, similar to those of the CAT2 transaction? If not, i wanna know what is the BAPI.
    I hope somebody can helps me.
    thx
    regds.
    Gregory.

    Hello,
    are there any news regarding this topic?
    thx, Vanessa

  • How to disable built-in InputDate's validator ? (JDev 11.1.1.2.0)

    How can I disable built-in InputDate's validator ?
    Edited by: user9212524 on Jun 8, 2010 5:22 AM

    I handle focus event on the InputDate. The default validator and my handler are conflict. They become an infinite loop.
    Please see more at How to control what ADF return on handle clientListener (JDev 11.1.1.2.0)
    So i want to validate the InputDate manually.
    Thank you very much !

  • Validator issue in inputDate

    Hi,
    Sorry for the spam but I am opening a new thread as I didn't receive any further responses to my query in the other thread
    Re: Query regarding validators in inputDate
    Summary:
    I have used the below pattern for inputDate
    <af:convertDateTime pattern="#{sessionScope.datePattern}"/>I gave "27-Apr-212" as the input and tried to submit the page. I got proper error saying enter value that matches the pattern 29-Nov-1998. I fired a second submit without modifying anything and this time it did not fire the validation and the value submitted was 27-Apr-0212.
    Is this a bug?
    Thanks
    Vishal

    What is the pattern value? Try "dd-MMM-yyyy".

  • Af:inputDate with both date and time: modal popup forces validation

    Hello,
    I am using an af:inputDate with an af:convertDateTime type='both' (displaying date and time).
    When the calendar popup is shown it's a modal popup. I guess it is because of the type='both'?
    My problem is: when the modal popup is shown I get also the validation popup with errors (for example required fields) which is shown too.
    Maybe someone could help?
    Is there a way to force non-modal popup for this kind of calendar?
    Is there a way to stop validation if I am already displaying another popup?
    Thanks in advance,
    Cindy

    Hi,
    U just override ok cancel button type="none"., inside the <af:panelGroupLayout id="pgl10" layout="horizontal" valign="middle">
    <af:commandButton id="ok" text="Ok" action="#{beanName.okAction}" immediate="true"/>
    <af:commandButton id="can" text="Cancel" action="#{beanName.cancelAction}" />
    </af:panelGroupLayout>
    Regards,
    parame

  • Conditionally Validating InputDate Fields...

    Hi !. My problem is the following one: My project let the user download some reports in excel format. I have like 6 sections each one with a buttom and 2 input date calendars. The thing is that, when the user enters data (let say "asd") and he tries to download another report from another section, a validation appears on a field from another section and the user cant download the report. I tried using af:subForm but I realized that that is for the binding layer not if I am using a convertDateTime for instance... So, what i thought is adding to every buttom a setActionListener to know which buttom was pressed and in a CustomConverter get a reference of it and don't raise up a message for a field that it is not contained in the section of the buttom. The problem is that I can't get a reference to that variable... Does anyone knows if there is another chance ?. Thankx.

    <p>So you want to keep the Group Header (GH) and the Details (D), but suppress the Group Footer (GF) if the count of details records is 1...</p><p>Open the section expert (right click on the grey sections to the left of the canvas) - make sure you have the GF highlighted.</p><p>There is an option named "Suppress" - to the right of that is a formula box [X+2].  Click on that and use a conditional formula for the suppresion.</p><p>Formula:</p><p>if Count({Customer.Customer ID}, {Customer.Customer Name}) = 1 </p><p>then false else true </p><p> </p><p>Note: you will need to replace {Customer.Customer ID} for some field in your details section and {Customer.Customer Name} in the formula with appropriate fields from your report. </p>

  • Date picker for af:inputDate   is not picking up the correct input date

    view source:
    <af:inputDate value="#{bindings.DateField.attributeValue}" label="#{bindings.DateField.hints.label}"
    required="#{bindings.DateField.hints.mandatory}"
    valueChangeListener="#{pageFlowScope.CollectApplicantInformation.datesItemChanged}"
    columns="#{bindings.DateField.hints.displayWidth}" shortDesc="#{CustomTooltip[DateField]}"
    autoSubmit="true" helpTopicId="AppDt" id="DateField" simple="true">
    <f:validator binding="#{bindings.DateField.validator}"/>
    *<f:converter converterId="CustomConverter"/>*
    </af:inputDate>
    Here I am not using <af:ConvertDateTime> insted using customConverter, so what code changes do I need to make sure the date picker always picks the already existind date in the inputDate rather picking the current date?
    Here is my CustomConverter.java
    CustomConverter.java
    public class CustomConverter extends DateTimeConverter implements ClientConverter, Converter
    public Object getAsObject(FacesContext context, UIComponent component, String value)
    String dataType = (String) resolveExpression("#{bindings." + component.getId() + ".attributeDef.javaType.name}");
    if (dataType != null && !dataType.equalsIgnoreCase("oracle.jbo.domain.Date") && !dataType.equalsIgnoreCase("oracle.jbo.domain.Timestamp"))
    String test = null;
    if (context == null || component == null)
    throw new NullPointerException();
    if (value != null)
    // To solve DB transaction dirty issue, Check isEmpty and return null.
    if (value.isEmpty())
    return null;
    // the "value" is stored on the value property of the component.
    // The Unified EL allows us to check the type
    ValueExpression expression = component.getValueExpression("value");
    if (expression != null)
    Class<?> expectedType = expression.getType(context.getELContext());
    if (expectedType != null)
    System.out.println("expectedType Value:::" + expectedType.getName());
    // try to convert the value (Object) to the TYPE of the "value" property
    // of the underlying JSF component
    try
    return TypeFactory.getInstance(expectedType, value);
    catch (DataCreationException e)
    String errorMessage;
    if (expectedType.equals(CustomNumber.class))
    errorMessage = "You can enter only Numbers in this field";
    else
    errorMessage = e.getMessage();
    if (errorMessage != null)
    FacesContext ctx = FacesContext.getCurrentInstance();
    FacesMessage fm = new FacesMessage(FacesMessage.SEVERITY_ERROR, "Invalid Format" , errorMessage);
    ctx.addMessage(component.getClientId(), fm);
    catch (CustomDomainException e)
    int errorCode = e.getErrorMessageCode();
    String[] errorMessage = e.getErrorMessageParams();
    if (errorCode == 7 && errorMessage != null)
    String msg = "Invalid " + errorMessage[0];
    FacesContext ctx = FacesContext.getCurrentInstance();
    FacesMessage fm = new FacesMessage(FacesMessage.SEVERITY_ERROR, "Application Error: ", msg);
    ctx.addMessage(component.getClientId(), fm);
    catch (JboException e)
    Throwable cause = e.getCause();
    if (cause == null)
    cause = e;
    test = "not good format";
    throw e;
    return null;
    else
    return value != null? value: null;
    public String getAsString(FacesContext context, UIComponent component, Object value)
    return value != null? value.toString(): null;
    public String getClientLibrarySource(FacesContext context)
    return null;
    @Override
    public Collection<String> getClientImportNames()
    return Collections.emptySet();
    @Override
    public String getClientScript(FacesContext context, UIComponent component)
    String formatMask = (String) resolveExpression("#{bindings." + component.getId() + ".format}");
    if (formatMask != null)
    String dataType = (String) resolveExpression("#{bindings." + component.getId() + ".attributeDef.javaType.name}");
    if (dataType.equalsIgnoreCase("oracle.jbo.domain.Date") || dataType.equalsIgnoreCase("oracle.jbo.domain.Timestamp"))
    if (component == null)
    _LOG.severe("The component is null, but it is needed for the client id, so no script written");
    return null;
    // Add a JavaScript Object to store the datefield formats
    // on the client-side. We currently store the format string
    // for each and every field. It'd be more efficient to have
    // an array of formats, then store for each field the
    // index of the format, especially if we could delay outputting
    // these objects to when the <form> closes.
    String clientId = component.getClientId(context);
    if (clientId != null)
    // =-=AEW Only if Javascript...
    Map<String, Object> requestMap = context.getExternalContext().getRequestMap();
    // this fetch could be at the place where we append, but has been
    // moved ahead to optimize use of StringBuilder
    String jsPattern = getJSPattern(context, component);
    String loc = _getLocaleString(context);
    // FIX - figure out size!!!
    // 127 chars for javascript + length of jspattern + locale + 12 chars for
    // tranforming to name in the worst case.
    StringBuilder buff = new StringBuilder(139 + jsPattern.length() + loc.length());
    if (requestMap.get(_PATTERN_WRITTEN_KEY) == null)
    requestMap.put(_PATTERN_WRITTEN_KEY, Boolean.TRUE);
    // only create the _dfs object if it doesn't exist, so we don't
    // wipe out _dfs[xxx] values if we ppr the first date field on a
    // page with multiple date fields.
    buff.append("if(window['_dfs'] == undefined){var _dfs=new Object();}if(window['_dl'] == undefined){var _dl=new Object();}");
    buff.append("_dfs[\"");
    buff.append(clientId);
    buff.append("\"]=");
    buff.append(jsPattern);
    buff.append(";");
    buff.append("_dl[\"");
    buff.append(clientId);
    buff.append("\"]=");
    buff.append(loc);
    buff.append(";");
    return buff.toString();
    else
    LOG.severe("NULLCLINET_ID_NO_SCRIPT_RENDERED");
    return null;
    else
    return null;
    else
    return null;
    private String _getLocaleString(FacesContext context)
    Locale dateTimeConverterLocale = getLocale();
    if (dateTimeConverterLocale != null)
    Locale defaultLocale = RenderingContext.getCurrentInstance().getLocaleContext().getFormattingLocale();
    if (!(dateTimeConverterLocale.equals(defaultLocale)))
    String loc = dateTimeConverterLocale.toString();
    StringBuffer sb = new StringBuffer(2 + loc.length());
    sb.append("'");
    sb.append(loc);
    sb.append("'");
    return (sb.toString());
    return "null";
    @Override
    @Deprecated
    public String getClientConversion(FacesContext context, UIComponent component)
    String formatMask = (String) resolveExpression("#{bindings." + component.getId() + ".format}");
    if (formatMask != null)
    String dataType = (String) resolveExpression("#{bindings." + component.getId() + ".attributeDef.javaType.name}");
    if (dataType.equalsIgnoreCase("oracle.jbo.domain.Date") || dataType.equalsIgnoreCase("oracle.jbo.domain.Timestamp"))
    String jsPattern = getJSPattern(context, component);
    Map<String, String> messages = new HashMap<String, String>();
    if (jsPattern != null)
    Class<?> formatclass = formatMask.getClass();
    System.out.println("FormatClass::" + formatclass);
    System.out.println(" Format Mask : " + formatMask);
    // SimpleDateFormat sdfDestination = new SimpleDateFormat(formatMask);
    String pattern = formatMask; //getPattern();
    if (pattern == null)
    pattern = getSecondaryPattern();
    String key = getViolationMessageKey(pattern);
    Object[] params = new Object[]
    { "{0}", "{1}", "{2}" };
    Object msgPattern = getMessagePattern(context, key, params, component);
    //if hintFormat is null, no custom hint for date, time or both has been specified
    String hintFormat = _getHint();
    FacesMessage msg = null;
    String detailMessage = null;
    if (msgPattern != null)
    msg = MessageFactory.getMessage(context, key, msgPattern, params, component);
    detailMessage = XhtmlLafUtils.escapeJS(msg.getDetail());
    Locale loc = context.getViewRoot().getLocale();
    SimpleDateFormat formatter = new SimpleDateFormat(pattern, loc);
    java.lang.Object obj = resolveExpression("#{bindings." + component.getId() + ".attributeValue}");
    String databaseDate=null;
    if(obj!=null)
    databaseDate = obj.toString();
    DateFormat df = new SimpleDateFormat(pattern,loc);
    System.out.println("DateComponent input value :::::::::::::::::::::::::"+databaseDate);
    Date today;
    try {
    // System.out.println("Before Conversion::::::::::::"+df.parse(databaseDate).toString());
    if(databaseDate!=null)
    today = df.parse(databaseDate);
    else
    today = new Date();
    System.out.println("After Conversion Date :::::::::::::::::::::::::::::"+today.toString());
    //Date today = new Date();
    String dt = formatter.format(today);
    String exampleString = dt;
    String escapedType = XhtmlLafUtils.escapeJS(getType().toUpperCase());
    StringBuilder outBuffer = new StringBuilder();
    outBuffer.append("new TrDateTimeConverter(");
    outBuffer.append(jsPattern);
    // loc = getLocale();
    if (loc != null)
    outBuffer.append(",'");
    outBuffer.append(loc.toString());
    outBuffer.append("','");
    else
    outBuffer.append(",null,'");
    outBuffer.append(exampleString);
    outBuffer.append("','");
    outBuffer.append(escapedType);
    outBuffer.append("'");
    if (msgPattern != null || hintFormat != null)
    messages.put("detail", detailMessage);
    messages.put("hint", hintFormat);
    outBuffer.append(',');
    // try
    // JsonUtils.writeMap(outBuffer, messages, false);
    // catch (IOException e)
    // outBuffer.append("null");
    outBuffer.append(')'); // 2
    return outBuffer.toString();
    catch(ParseException e)
    System.out.println("Parse Exception :::::::::::::::::::::"+e);
    return null;
    else
    // no pattern-matchable date
    return null;
    else
    return null;
    else
    return null;
    protected String getJSPattern(FacesContext context, UIComponent component)
    String jsPattern = null;
    String datePattern = (String) resolveExpression("#{bindings." + component.getId() + ".format}");
    if (datePattern != null)
    String secondaryPattern = getSecondaryPattern();
    if (datePattern != _NO_JS_PATTERN)
    int length = datePattern.length() * 2 + 2;
    if (secondaryPattern != null)
    length = length + 3 + secondaryPattern.length() * 2;
    StringBuilder outBuffer = new StringBuilder(length);
    jsPattern = _getEscapedPattern(outBuffer, datePattern, secondaryPattern);
    else
    jsPattern = datePattern;
    return jsPattern;
    private static void _escapePattern(StringBuilder buffer, String pattern)
    buffer.append('\'');
    XhtmlUtils.escapeJS(buffer, pattern);
    buffer.append('\'');
    private static String _getEscapedPattern(StringBuilder buffer, String pattern, String secondaryPattern)
    if (secondaryPattern != null)
    buffer.append('[');
    _escapePattern(buffer, pattern);
    if (secondaryPattern != null)
    buffer.append(",'");
    XhtmlUtils.escapeJS(buffer, secondaryPattern);
    buffer.append("']");
    return buffer.toString();
    private String _getHint()
    String type = getType();
    if (type.equals("date"))
    return getHintDate();
    else if (type.equals("both"))
    return getHintBoth();
    else
    return getHintTime();
    public static Object resolveExpression(String pExpression)
    FacesContext facesContext = FacesContext.getCurrentInstance();
    Application app = facesContext.getApplication();
    ExpressionFactory elFactory = app.getExpressionFactory();
    ELContext elContext = facesContext.getELContext();
    ValueExpression valueExp = null;
    valueExp = elFactory.createValueExpression(elContext, pExpression, Object.class);
    return valueExp.getValue(elContext);
    private static final String _NO_JS_PATTERN = new String();
    private static final TrinidadLogger _LOG = TrinidadLogger.createTrinidadLogger(DateTimeConverter.class);
    // RenderingContext key indicating the _dateFormat object
    // has been created
    private static final String _PATTERN_WRITTEN_KEY = "org.apache.myfaces.trinidadinternal.convert.DateTimeConverter._PATTERN_WRITTEN";
    *Problem is if any input date componet is displaying other than current date then the date picker is always picking the current date rather existing date*
    Please suggest me where to make changes?
    Edited by: 858782 on Oct 3, 2011 7:43 AM
    Edited by: 858782 on Oct 3, 2011 11:44 PM

    I need custom date foramts to be applied for different inputDates which are not defined in <af:convertDateTime>
    Thanks
    Edited by: 858782 on Oct 13, 2011 4:59 PM

  • Date field validations

    Hi,
    I am new to this technology . I have two input date fields for Start and End date. I want to do javascript validation to check the Start date should be less than End date. Please help how to do it.

    this code might help you
    <f:view>
    <af:document title="DateValidation" id="d1">
    <af:form id="f1">
    <af:panelFormLayout id="pfl1">
    <f:facet name="footer">
    <af:commandButton text="Submit" id="cb1" inlineStyle="vertical-align:middle;" immediate="true"
    partialSubmit="true" action="#{pageFlowScope.SriSampleBB.dateValidation}"/>
    </f:facet>
    <af:inputDate label="Start Date" id="id1" columns="18" partialTriggers="id2" autoSubmit="true" binding="#{pageFlowScope.SriSampleBB.startDate}">
    <af:convertDateTime pattern="ddMMMyyyy"/>
    <af:validateDateTimeRange maximum="#{pageFlowScope.SriSampleBB.endDate.value}" />
    </af:inputDate>
    <af:inputDate label="End Date" id="id2" partialTriggers="id1" columns="18" autoSubmit="true" binding="#{pageFlowScope.SriSampleBB.endDate}">
    <af:convertDateTime pattern="ddMMMyyyy"/>
    <af:validateDateTimeRange minimum="#{pageFlowScope.SriSampleBB.startDate.value}" />
    </af:inputDate>
    </af:panelFormLayout>
    </af:form>
    </af:document>
    </f:view>

  • Alternative to ADF InputDate

    Hi Guys,
    We are facing some frustration with adf inputDate. We need to change it to show Monday as first day of week (currently is sunday) and also, we want to implement something like clicking on the field instead clicking on the icon to show the datePicker.
    We are trying to use JQuery but there is a lot of work in order to process all the custom validations, etc.
    What would you recommend? Can we accomplish this requirements by using the original adf inputDate?
    Regards,
    P.S JDeveloper 11.1.1.6

    Hi Alejandro,
    Check the solution provided in this discussion (last entry): af:inputDate on focus/cursor
    (this is only for show the date picker on focus event)
    AP
    Update:
    To change first day of week check this out (I tested it and works like a charm): http://soadev.blogspot.com.es/2010/03/change-global-date-format-of-your.html

  • Problems Validating an Attribute of type oracle.jbo.domain.date

    I have a form that has a date input field. I am trying to customise the exception error for this field for when the user enters something other than my dd/MM/yyyy format. ie JBO-25009: oracle.jbo.domain.DataCreationException
    This Attribute uses a the oracle.jbo.domain.date data type. An exception is finally thrown when the transaction trys to commit.
    My problem is that I can't customise the exception because I can't catch where it is occuring. I have tried at the <setAttributeInternal>, <setAttribute> and <validateEntity> levels uses both try{}catch(Jbo Exception){} and try{}catch(AttrValException){}. I believe the reason for this is because the problem occurs because the parse value to functions are invalid dates so it never enters them.
    If this is true validation and any exception thrown should occur at the data type level, but the the oracle.jbo.domain.date class doesn't have a validate method.
    Can someone please help me get around this problem. Or tell me if the have a solution for date input validation.

    The usecase is as follows:
    I have a DynaAction Form with a input field for a date value. This field in the form is associated with an entity attribute that is of the type oracle.jbo.domain.date
    In the message bundle for this entity I specify a format (dd/MM/yyyy) and formatter for the field (oracle.jbo.format.DefaultDateFormatter). In the jsp page I display the field using the following tag within the <jbo:row> tags,
    <jbo:InputDate dataitem="ChangeDate" formname="ApplicationReleaseForm"/>
    The date picker script works well here and the formatter formats it correctly.
    My error occurs when an invalid date value is entered. Ie characters like "abc" or numeric values that don't match a date format ie my date format (dd/MM/yyyy) or the default format of the jbo.domain.date type(yyyy-MM-dd).
    On submitting my form the input is posted to an action that extends the Update action class. I use the following expression to cache the input from the form in the viewobject:
    ActionForward actionForward = super.execute(mapping,form,request,response);
    The invalid input appears to be able to slip through this call without causing an exception, unless I make the attribute manditory. In this case an exception is thrown causing the form to be returned and the mandatory value error message to be shown.
    If the attribute is not mandatory the exception is not thrown until I make a call to commit; eg
    context.getApplicationModule().getTransaction().commit();
    The DataCreationException is the initial exception that is caught and causes the rest of the transaction to fall over.
    It is my understanding that if the input is wrong then it should be picked up when the form data is pushed into the viewobject, ie in the call to execute and at the setAttributeInternal() method call for the attribute in the viewobject. I don't believe that the input gets this far as the input is not a valid date, indicating to me that the oracle.jbo.domain.date should be the object throwing the exception.
    I hope this gives you a better understanding of the process and where and what causes the problem to occur.

  • Problem using Tomahawk inputDate tag

    When I enter a blank value for any of the dropdowns in the inputDate component anerror is generated by the component and I can display the errorMessage using
    <t:message for="myDate" errorClass="validationMessage" infoClass="infoMessage"/>My question is is there any way to stop the validation happening or better still to remove the "blank" options from the dropdowns. I know there are emptyAmpmSelection/emptyMonthSelection where you can define what you want the blank to appear as but I just want the time dropdown to be AM or PM, nothing else. I can't even try to imagine why the blanks are there in the first place.
    Thansk ... J

    Just preselect the dropdown menu.
    E.g.<h:selectOneMenu value="#{myBean.selectedItem}">
    public MyBean() {
        this.selectedItem = "Use here the same value as one of the selectItem objects.";
    }

  • Af:inputDate in table does not behave normally (11.1.2.3.0)

    Hello all.
    I'm using jDev 11.1.2.3
    When we create a table and the table contains a date column, automatically we get the af:inputDate functionality.
    At run-time a tiny calendar icon appears next to the input field and help us choose a date.
    In 11.1.2.3 this feature is not working as it used to be. No matter which date we choose from the calendar, the selected date never gets into the field, and the little calendar does not close unless you set the focus in another field or record.
    This is not happening in the case of a form. Only in tables. I also tested in 11.1.2.1 and there is no problem at all.
    Should we consider this a bug?
    Thanks a lot
    ~apostolos
    <af:column sortProperty="#{bindings.EmployeesVO1.hints.HireDate.name}"
                                               sortable="true"
                                               headerText="#{bindings.EmployeesVO1.hints.HireDate.label}"
                                               id="c6">
                                        <af:inputDate value="#{row.bindings.HireDate.inputValue}"
                                                      label="#{bindings.EmployeesVO1.hints.HireDate.label}"
                                                      required="#{bindings.EmployeesVO1.hints.HireDate.mandatory}"
                                                      columns="#{bindings.EmployeesVO1.hints.HireDate.displayWidth}"
                                                      shortDesc="#{bindings.EmployeesVO1.hints.HireDate.tooltip}"
                                                      id="id1">
                                            <f:validator binding="#{row.bindings.HireDate.validator}"/>
                                            <af:convertDateTime pattern="#{bindings.EmployeesVO1.hints.HireDate.format}"/>
                                        </af:inputDate>
                                    </af:column>

    This is bug(only reproducable in firefox)
    I logged this to oracle support:
    Bug 14790363 : BROKEN DATE SELECTION IN ADF 11.1.2.3.0 WHEN AF:INPUTDATE IS INSIDE AF:TABLE
    Still waiting for patch.
    Dario

  • ADF Validation problem

    Dear all,
    I use adf validation something like this <af:inputText id="it1" required="true"/>.
    As i think, validation should trigger when the user click on submit button.
    But this kind of validation trigger on any click on the page. (eg. menu, panel box collapse and expand)
    So, even user don't want to submit the input , they want to go others page they need to fill this text box.
    Is there any solution for that?
    With Regards,
    WP
    Edited by: user8729650 on Oct 26, 2009 8:50 PM

    Thanks for helping me...
    This is my code on jsp. i put immediate=true. but it still validate.
    <af:form id="f1" >
    <af:pageTemplate viewId="/StarsTemplate.jspx" id="pt1" >
    <f:facet name="SideMenu"/>
    <f:facet name="Main">
    <af:panelTabbed id="pt2" >
    <af:showDetailItem text="showDetailItem 1" id="sdi1" immediate="true">
    <af:panelBox text="PanelBox1" id="pb1" immediate="true">
    <f:facet name="toolbar"/>
    <af:panelGroupLayout layout="vertical" >
    <af:inputText label="Label 1" >
    <af:validateLength maximum="10"/>
    </af:inputText>
    <af:inputText label="Label 2" immediate="true" id="label2"
    validator="#{ConfirmBean.CustomValidate}" value="#{ConfirmBean.test}"
    >
    </af:inputText> <af:message id="m1" for="label2" messageType="error" />
    <af:separator/>
    <af:inputText id="it1" required="true" immediate="true"/>
    <af:panelGroupLayout layout="horizontal">
    <af:commandButton text="Delete">
    <af:showPopupBehavior popupId="confirm" triggerType="action" align="afterEnd"/>
    </af:commandButton>
    </af:panelGroupLayout>
    <af:popup id="confirm">
    <af:dialog title="Confirm" dialogListener="#{ConfirmBean.dialogListener}">
    <af:activeOutputText value="You really want to save all changes?"/>
    </af:dialog>
    </af:popup>
    <af:commandButton text="commandButton 1" immediate="true" action="#{ConfirmBean.save}" id="cb1"/>
    </af:panelGroupLayout>
    </af:panelBox>
    <af:panelBox text="PanelBox2" id="pb2">
    <f:facet name="toolbar"/>
    <af:inputDate label="Label 1" id="id1"/>
    </af:panelBox>
    </af:showDetailItem>
    <af:showDetailItem text="showDetailItem 3" id="sdi3">
    <af:panelBox text="PanelBox3" id="pb3">
    <f:facet name="toolbar"/>
    </af:panelBox>
    </af:showDetailItem>
    </af:panelTabbed>
    </f:facet>
    </af:pageTemplate>
    </af:form>

  • Validate Date Range in inputDate component

    Hi
    I am using JDev 11.1.1.2.0
    I have an inputDate component which on click i need to give dates from today to future dates not passed dates.
    So i have included 'validate date time range' component in the inputDate component and in the minimum property i have declared 'adf.currentDate' using expression builder and set the maximum as Jan 31,2099.
    But when i execute my application i am able to select passed dates using the inputDate component, please help how can i check the date using a validator in inputDate component.
    Thanks
    Sudeep

    ya i had tried with that property too....
    i have declared minValue as adf.currentDate and on that it changes the value of maxValue to current date in Jan 3,2012
    i have convertDatetime component in my inputDate to display the selected date in certain format.
    It gives error as the format doesnot matches with the convertDatetime and inputDate component.
    How can i use the minValue and maxValue of inputDate component?
    the component:-
    <af:inputDate
    label="Planned Termination Date"
    id="id2"
    value="#{modifyuser.pterminationdate}"
    valueChangeListener="#{modifyuserfields.plannedTermDate}"
    minValue="adf.currentDate" maxValue="2099-12-31">
    <af:convertDateTime pattern="dd-MMM-yyyy"/>
    </af:inputDate>

Maybe you are looking for