Struggling on h:inputText tag for date type property

I am struggling to display a simple form which is attached to a bean having a Date type property.
I get the following exception each time I try to access the form, even it does not display as a blank form for the first time access.
Exception:
[#|2008-01-04T14:39:13.500+0530|SEVERE|sun-appserver-pe9.0|javax.enterprise.system.container.web|_ThreadID=12;_ThreadName=httpWorkerThread-3031-1;_RequestID=676ba2b1-9b5e-4a96-adb5-b1a792507b40;|StandardWrapperValve[jsp]: Servlet.service() for servlet jsp threw exception
javax.faces.FacesException: Error performing conversion of value ' of type class java.lang.String to type class java.util.Date for managed bean userBean.
javax.servlet.ServletException: Error performing conversion of value ' of type class java.lang.String to type class java.util.Date for managed bean userBean.The JSP page contains the following tag for the inputText
            <h:inputText value="#{userBean.dob}" id="dob" required="true">
                <f:convertDateTime pattern="MM/dd/yyyy" />
            </h:inputText>
            <h:message for="dob" />I want to display a blank form with all the text fields blank.
Any help will be much appreciated.

You should be able to do
   <h:inputText value="#{bean.lastDate}"/>Where 'bean' is the managed bean name containing
the method getLastDate().
When the view is rendered, the getter (getLastDate())
will be called to display whatever value is returned.

Similar Messages

  • [svn:fx-trunk] 12788: By popular demand, we now allow for empty child property tags for Array type properties.

    Revision: 12788
    Revision: 12788
    Author:   [email protected]
    Date:     2009-12-10 07:46:54 -0800 (Thu, 10 Dec 2009)
    Log Message:
    By popular demand, we now allow for empty child property tags for Array type properties. Coerced to empty array '[]'.
    QE notes: None
    Doc notes: None
    Bugs: SDK-24500
    Reviewer: Paul
    Tests run: Checkin
    Is noteworthy for integration: No
    Ticket Links:
        http://bugs.adobe.com/jira/browse/SDK-24500
    Modified Paths:
        flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/mxml/builder/AbstractBuilder.java
        flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/mxml/builder/ComponentBuilder.jav a

    Hi John,
    Sorry to tell but tab completion is still failing on my Windows XP/Indesign CS5 (caught by Indesign).
    I just saw your remark on coloring text, here is an example pulled out from Peter's book "ScriptUI for dummies":
    var w = new Window ("dialog");
    var s = w.add ("statictext", undefined, "Static");
    var e = w.add ("edittext", undefined, "Edit");
    var b = w.add ("button", undefined, "Button");
    // The window's backround
    w.graphics.backgroundColor = w.graphics.newBrush (w.graphics.BrushType.SOLID_COLOR, [0.5, 0.0, 0.0]);
    // Font and its colour for the first item, statictext
    s.graphics.font = ScriptUI.newFont ("Helvetica", "Bold", 30);
    s.graphics.foregroundColor = s.graphics.newPen (w.graphics.PenType.SOLID_COLOR, [0.7, 0.7, 0.7], 1);
    // Font and colours for the second item, edittext
    e.graphics.font = ScriptUI.newFont ("Letter Gothic Std", "Bold", 30);
    e.graphics.foregroundColor = e.graphics.newPen (e.graphics.PenType.SOLID_COLOR, [1, 0, 0], 1);
    e.graphics.backgroundColor = e.graphics.newBrush (e.graphics.BrushType.SOLID_COLOR, [0.5, 0.5, 0.5]);
    // Font for the tird control, a button. Can't set colours in buttons
    b.graphics.font = ScriptUI.newFont ("Minion Pro", "Italic", 30);
    w.show ();
    Loic

  • Domain for data type in Oracle 8i database

    Hi Sir,
    Does Oracle database supports domain creation for data type.
    for example, can I create a domain called shorttext which is VARCHAR2(50). Then when I specify a data type for a column in table, then I just declare the column as domain.
    eg. address SHORTTEXT;
    --where SHORTTEXT is a domain.
    How is this implemented in Oracle database and supported by front end tools like Oracle Developer 6.0.
    Hope someone can provide some clear explanation on this.
    Thanks.

    The ordimagesignature is not something you can see or hear. It is strictly binary metadata about the image, used only to compare images to each other.
    What are you trying to do?
    Larry

  • Date type-specific Customizing missing for date type ACTActPln

    Hi all.
    I'm using a Web Service obtained by copying the CRM 7.0 built-in WS APPTACTCRTRC.
    I'm using it to create Appointments using an Adobe Interactive Form.
    It goes everything fine (a Date is created in the system, with all the input data properly set) excepted the dates...
    The WS uses two TIMESTAMPS, TIMESTAMP_FROM for StartDateTime and TIMESTAMP_TO for EndDateTime, whereas the GUI transaction to create Dates accepts dates and times in separated fields.
    Going in Debug I can see that the execution ends with the following error, referred to the involved entity (CRM_APPOINTMENT):
    Date type-specific Customizing missing for date type ACTActPln
    CRM_APPOINTMENT uses date profile 0000000001 with three possible date types: ORDERACTUAL, ORDERPLANNED and ORDERPROPOSED and I cannot find anywhere date type ACTActPln (just to add it in customizing).
    Is anyone able to enlight me?
    Thank you in advance!
    Alessandro
    PS I've years of experience in Java programming but I'm quite new to the SAP world. Maybe the problem is not a problem at all, but it seems to me as such. Even if it has a trivial solution, please let me know. Thx!

    Hi,
    Well I was about to write that you should enter date in decimal format. but you already did that as mentioned in How to set a date in a Form where the bound date format is a decimal?
    In response to following from above thread (copied for others to understand my response)
    Hi all.
    I'm successfully using the LiveCycle Designer and I've managed to remotely create Appointments using a CRM Web Service (a mere copy of APPTACTCRTRC).
    The only problem I'm encountering is that I'm not able to set the dates/times (start and end of the appointment).
    Dragging each of the two fields from the WSDL based Data Connection I obtain a Decimal Field limited to 15 digits.
    How can I write a date and time in such a field?
    I've tried with a retroverse date as YYYYMMDDHHmmss (for example, 20100301124500) but it does not work
    (the appointment is indeed created, but with the start date and time fields filled with
    the current date/time and the end date and time fields filled with the current date and time plus 10 minutes).
    The retroverse date above is only 14 digit long, so, maybe, this is the problem.
    But, given the field definition, I'm not able to fill a blank space between the date and the time.
    I'm not able to put a dot either.
    What should I do?
    Any suggestions?
    Thank you in advance.
    Alessandro
    15 digit in UTC time format here is fraction of second so you should enter 201003011245000 (add one more zero).
    14th Oct 2010 16:00 should be written as 201010141600000, so just try it and and see if it works, I guess if you do not supply end time then by default it will be starttime + 10 min but this is just guess.
    Regards,
    Gourav

  • [Q] Using viewCriteria for Date type

    To Query data, I used ViewCriteria.
    But it works well for Varchar2, Number type.
    But it does not work for Date type.
    for example
    If I set variables like the below, it works,
    attrName = "OrdName";
    attrValue = "Nick";
    But, If I set variables like the below, it does not work
    attrName = "AppDate";
    attrValue = "04.5.12";
    ViewCriteria vc = order.createViewCriteria();
    ViewCriteriaRow vcr = vc.createViewCriteriaRow();
    vcr.setAttribute(attrName, attrValue);
    vc.addElement(vcr);
    order.applyViewCriteria(vc);
    order.executeQuery();
    Can I solve this problem ?

    using a custom expression in the view criteria, ex.
    vcr.setAttribute("DateField", "LIKE TO_DATE('" + dateField.toString() + "', 'yyyy-mm-dd')");
    similarly, you can use other expressions to remove the default BC4J problems w/ dates (>, <, between) - At least I know you can't use = to get it to work right.
    The default handling of BC4J is to say = TO_DATE(whatever you put in the value portion) where it needs to be LIKE to work properly - for some reason - probably a patch is available for it.

  • Conversion Exit for data type FLTP

    Can someone suggest me a conversion Exit for data type FLTP?

    Hi,
    CHAR_FLTP_CONVERSION
    FLTP_CHAR_CONVERSION
    Have a look at the function module documentation.
    Regards,
    Reema.
    PS. pl. award points to useful answers.

  • [Access 2010] Change default formats for data types

    Whenever I import data, the default format for Boolean data types is "-1,0." I know how to subsequently change this format to "Yes/No," but I'd like to change the default
    setting to "Yes/No." Is this possible?
    Thanks in advance.

    Hi,
    I found you post the same question in other place and got the advice. I agree with Mr. Kees suggestion. The data type is a build-in default setting with Access, we can't change it. We may try the workaround via VBA to test.
    http://forums.cnet.com/7723-6129_102-627633/access-2010-change-default-formats-for-data-types/#message5617496
    Please Note: Since the web site is not hosted by Microsoft, the link may change without notice. Microsoft does not guarantee the accuracy of this information.
    Have a good time.
    Regards,
    George Zhao
    TechNet Community Support
    It's recommended to download and install
    Configuration Analyzer Tool (OffCAT), which is developed by Microsoft Support teams. Once the tool is installed, you can run it at any time to scan for hundreds of known issues in Office
    programs.

  • Set data type property

    Hi all.
    I'm on devsuite 10g.
    Is there a way to set the data type property of an item at runtime???
    Thanks all for the collaboration,
    Fabrizio

    You can't it's a design time only construct

  • Selecting #of bits for data types in Java

    hi,
    i would like to know if we can constrain compiler on allocating memory to basic data types, such as int, float, short etc. i would like to read an exactly four byte integer into an int, 2 byte short into a short etc. i need to read these parameters exactly of their specified number of bytes - not more or less - as if i read anything more/less, i will be reading a part of other parameter.
    i know that C allows us to do this by letting us to specify number of bits we like to allocate for each data type (for eg. unsigned int:16; means i need an unsigned int of exactly 16bits (2 bytes long) -no more and no less).
    Is there anything similar i can do in Java?
    any suggestion is greately appreciated.
    Thanks,

    All primitive types in Java are well-defined. In contrast to C/C++, an int in Java is allways 32 bits, using one's complement, a char is allways 16 bits etc.
    Java does not give you direct acces to physical memory - that would compromise the basic design of Java.
    You can read individual bytes from files, and you can do all the integer arithmetic in Java as you can in C/C++. To convert eg. fout bytes to one int, you could do the following:
    byte b1= (some byte value),
         b2,
         b3,
         b4;
    int i= (((b1 << 8) | b2 << 8) | b3 << 8) | b4;
    b1 being the most significant byte, b4 being the least significant.
    Did this answer you questions?

  • Need help regarding the maximum limit for data type

    Hi,
    this is Sravan. for my application am inserting the bulk data in XML format into a column of Database table.
    the sample inserted XML data will be in format... like
    '<ACC count = "10">
    <Acc ac_no = "1111111111" cn_nr = "US" eflag = "Y" />
    <Acc ac_no = "1111111111" cn_nr = "US" eflag = "Y" />
    <Acc ac_no = "1111111111" cn_nr = "US" eflag = "Y" />
    <Acc ac_no = "1111111111" cn_nr = "US" eflag = "Y" />
    <Acc ac_no = "1111111111" cn_nr = "US" eflag = "Y" />
    <Acc ac_no = "1111111111" cn_nr = "US" eflag = "Y" />
    <Acc ac_no = "1111111111" cn_nr = "US" eflag = "Y" />
    <Acc ac_no = "1111111111" cn_nr = "US" eflag = "Y" />
    <Acc ac_no = "1111111111" cn_nr = "US" eflag = "Y" />
    <Acc ac_no = "1111111111" cn_nr = "US" eflag = "Y" />
    </ACC>'
    this data in XML can have more than 1000 accounts.
    now, i need to take a Parameter value from XML node and write into a file. for this i have written a procedure by looping the Nodes from XML data and building Dynamic Query like..
    if nvl(v_int, 0) > 0 then
    v_sql := '';
         for v_count in 1..v_int
         loop
         if v_sql is null then
              v_sql := 'select extractvalue(empdetails, ''/ACC/Acc' || v_count ||'/@ac_no'')||extractvalue(empdetails, ''/ACC/Acc' || v_count
    ||'/@cn_nr'')||extractvalue(empdetails, ''/ACC/Acc' || v_count ||'/@eflag'') string from sample1';
         elsif v_sql is not null then
                   v_sql := v_sql || ' union all select extractvalue(empdetails, ''/ACC/Acc' || v_count ||'/@ac_no'')||extractvalue(empdetails, ''/ACC/Acc' || v_count
    ||'/@cn_nr'')||extractvalue(empdetails, ''/ACC/Acc' || v_count ||'/@eflag'') string from sample1';
              end if;
         end loop;
    end if;
    i will get this variable "v_int" from <ACC count = "10"> ACC count Attribute, here 10 is the value for v_int variable but in real time the variable value can be more than 1000.
    at the time of Building Dynamic Query I make using the Variable v_SQL which is of Data Type "Long",
    this variable stores dynamic query which is build at the time of executing procedure but this v_sql Variable is throughing Exception that ....
    "numeric or value error Character String Buffer is Too Small"... but Long Data type will store upto 2GB..
    this variable cant able to hold much data which is dynamically build.
    will you please help me to resolve this issue Or will u suggest me another method to pick the data from XML column.
    thanks,
    sravan.

    user11176969 wrote:
    i changed the code, now its working fine.
    direct assigning the dynamic query to a Clob variable raised error.
    for dynamic query building i used another variable and assigned this variable value to actual query variable.Nice!

  • Problem in using OCIBindByName  for date type column

    Hi,
    Can you please guide me about my following problem?
    I am trying to fetch the data from system table "FLOWS_020100.WWV_FLOW_ACTIVITY_LOG1$" in Oracle Express edition 10.2.0.3 database, using the OCI library on Windows with C++
    This table has a TIMESTAMP column of date type.
    I've the following query as below:
    select TIME_STAMP from FLOWS_020100.WWV_FLOW_ACTIVITY_LOG1$ where TIME_STAMP > to_date('31/OCT/12 23:59:59', 'DD-MON-YY HH24:MI:SS') order by TIME_STAMP asc;
    For this, first I am preparing the query as below:
    select TIME_STAMP from FLOWS_020100.WWV_FLOW_ACTIVITY_LOG1$ where TIME_STAMP > :PKVAL order by TIME_STAMP asc;
    Before calling OCIExecute(), I am setting the PKVAL buffer to following value:
    "to_date('31/OCT/12 23:59:59', 'DD-MON-YY HH24:MI:SS') "
    & calling the OCIBindByName function with data type as SQLT_DATE.
    But when the OCIExecute is called, my program crashes with access violation
    Can you please guide me what is the correct way to pass the date value in query to OCI? How do we bind the date values?
    Thanks in advance for your time and help.
    Best Regards.

    I had a similar problem. TO_DATE doesn't appear to function w/ BindByName or BindByPos.
    You are going to have to bite the bullet and use an actual date.
    Here's an example (I am using two dates in my query):
    int main (int argc, char **argv, char **envp)
    static text invalidQuery = (text )"SELECT f1.my_val, COUNT(f1.my_val) invalid_count, (SELECT COUNT(*) FROM my_db_table f2 WHERE f2.my_val = f1.my_val AND f2.foo_dt = :1 ) total_count FROM my_db_table f1 WHERE f1.foo_dt = :1 AND ( (f1.vld_bar_sw IS NULL OR f1.vld_bar_sw = 'N') OR (f1.vld_foo_sw IS NULL OR f1.vld_foo_sw = 'N') ) group by my_val order by my_val asc";
    OCIDate boundDateVal;
    sb2 inputYear;
    ub1 inputMonth;
    ub1 inputDay;
    char inputYearStr [] = "0000";
    char inputMonthStr [] = "00";
    char inputDayStr [] = "00";
    /* I get and validate the date as input, but you can set it however you'd like */
    inputYear = (sb2) (atoi (inputYearStr));
    inputMonth = (ub1) (atoi(inputMonthStr));
    inputDay = (ub1) (atoi(inputDayStr));
    /* Allocating Date*/
    OCIDateSetDate ( &boundDateVal, inputYear, inputMonth, inputDay );
    OCIDateSetTime( &boundDateVal, 0, 0, 0);
    returnVal = OCIBindByPos(invalidStmt, &firstInputBindHPtr, myErrorHandle, (ub4) 1,
    (dvoid *) &boundDateVal, (sword) sizeof(boundDateVal),
    SQLT_ODT, /*dty OCIDate*/
    (dvoid *) 0, (ub2 *) 0, (ub2 *) 0, (ub4) 0, (ub4 *) 0, OCI_DEFAULT);
    if ( !(returnVal == OCI_SUCCESS || returnVal == OCI_SUCCESS_WITH_INFO) )
    displayErrors (returnVal, myErrorHandle, "OCIBindByPos-contactDate 1 ");
    cleanup();
    exit(1);
    }//if
    returnVal = OCIBindByPos(invalidStmt, &secInputBindHPtr, myErrorHandle, (ub4) 2,
    //(dvoid *) &InputArguments.contactDate, (sword) sizeof(InputArguments.contactDate),
    (dvoid *) &boundDateVal, (sword) sizeof(boundDateVal),
    SQLT_ODT, /*dty OCIDate*/
    (dvoid *) 0, (ub2 *) 0, (ub2 *) 0, (ub4) 0, (ub4 *) 0, OCI_DEFAULT);
    if ( !(returnVal == OCI_SUCCESS || returnVal == OCI_SUCCESS_WITH_INFO) )
    displayErrors (returnVal, myErrorHandle, "OCIBindByPos-contactDate 2 ");
    cleanup();
    exit(1);
    }//if
    }//main
    ** I have had issues w/ OTN not correctly translating certain characters, so hopefully the above example is readable or you can figure out which characters may be missing.

  • Optional Prompt for Date type parameter in Crystal Report.

    Hi Every One,
    I have a date type parameter in crystal report.When I am convert it to optional prompt it is showing following message.
    But the Type field is gray out when I was selecting list of values Dynamic.
    Please suggest.
    Thanks and Regards
    DEV

    Hi,
    Please check SAP note:
    1710595 - CR_Defining "Optional Prompt" as True for SAP Crystal
    Reports Does Not Work
    Thanks & Regards,
    Nagarajan

  • Default values for data types

    what are default values for all the data types that exist  in abap
    Title was edited by:
            Alvaro Tejada Galindo

    Hi
    For CHAR data type default is SPACE
    for INTEGER,PACK and FLOAT types it is ZERO '0'
    for NUMERIC also so many Zeros
    for Time(TIMS) it is 6 zeros and Date(DATS) it is 8 zeros
    Regards
    Anji
    Message was edited by:
            Anji Reddy Vangala

  • Static input help for DATS type

    Hello,
    I'd like to link static input help for screen field of DATS type. If I click on help linked to this screen field I get CONVT_NO_NUMBER error: 'Unable to interpret "=2" as a number.'
    My steps:
    - In Screen Painter I selected desired screen field and selected DATS type and "1 Show at selection" in its details.
    - I defined global variable with same name as desired screen field
    What's the problem?
    Best regards,
    Josef Motl

    Hi,
    do this way.....
    first declare the variable in program as
    1. data: date type sy-datum.
    2. now go to your screen,(click on F6) use get from Program
    now choose date form it , and say ok, now save it and activate it.
    delete the old one..
    now you will be able to get all the things which you want.
    automatical validation also possible, and F4 also possible.
    Regards
    vijay

  • No support for date type in object views !?

    The very simple example below raises
    SQL Error: ORA-00932: types de donn&eacute;es incoh&eacute;rents ; attendu : DATE ; obtenu : DATE
    Occurs on XE and 10.2.0.3 on HP-UX
    Any clue?
    Thanks,
    Robert
    create type t1 as object (id number, time date)
    create view t1v of t1
    with object identifier (id)
    as select 1, sysdate from dual
    ;

    There is no need for a constructor when all attributes are assigned.Unless there is a date value, apparently ;)
    It also works if you explicitly <tt>CAST(SYSDATE AS DATE)</tt> so perhaps the internal limitation is to do with the two internal DATE types (type 12 and 13, if you check DUMP output).

Maybe you are looking for