3 Replies Latest reply on Feb 10, 2010 10:42 AM by v c

    how to debug "component ... has invalid value expression..." error?

    v c Newbie

      hihi all,


      i'm getting the component ... has invalid value expression ... errors showing up when i try to submit my form.


      but how do i debug this error?  it outputs the property and values of  the data objects bound to the component but there's no indication as to what exactly is causing the issue.


      does anyone know where the error is coming from?  or how to go  about debugging this type of issue?


      there are no other output even from  the console.


      thanks, -v

        • 1. Re: how to debug "component ... has invalid value expression..." error?
          liumin hu Master



          if you cant get clue in the error message, what i did is remove the component in the form one by one.




          1 of 1 people found this helpful
          • 2. Re: how to debug "component ... has invalid value expression..." error?
            Ilya Shaikovsky Master

            which component you using?


            E.g. if you using ListShuttle or OderingList - it means that you not defined converter for your objects or the converter works incorrectly.

            • 3. Re: how to debug "component ... has invalid value expression..." error?
              v c Newbie

              hihi liu, Ilya,


              thanks for your replies, your suggestions are both helpful.


              somehow (by another ajax submit button interaction on my form), i was able to get a java stacktrace exception to appear.  this was related to a date parse exception.


              after hours of more debugging, Ilya's insight is correct.  i had a rich:calendar object nested within a rich:orderingList object, and due to this nesting, somehow the behavior changes in that i needed to add a custom converter to this rich:calendar component -- even though this converter did nothing but just pass the value given to it back out in the exact same form without any modifications at all!  it turns out that, without this converter, somehow the rich:calendar component will reformat the date value to (i believe) the default java.util.Date.toString() format which looks like "Feb 10, 2010 10:25 am" if i remember correctly.  and this caused much problems during parsing because this format did not match the date format that i specified for the rich:calendar component which was "yyyy:MM:dd - HH:mm".  so each time i did something to cause the component to parse it's date value it would blow up.


              still though, this problem seemed impossible to know without the java stacktrace exception coming up all the way to the top.  i do not know why certain actions always give certain error messages on my form, so it seems to me i am lucky that my form contained more than one way to cause the error.  if i could only get the "component ... has invalid value expression..." error, i would still perhaps be in the dark and debugging this issue.


              perhaps, this "friendly" error message can also include the "raw/unfriendly" exception message in some way to give more information?  the friendly error is helpful in that it outputs the values of the data bound objects but in my case it did not give enough...


              bottom line though, as Ilya mentioned, it seems that any input component that is nested within the orderingList component requires a converter to be attached to it, even though the converter does no conversion at all and just passes the value back.


              anyhow, thanks all! ... just glad i got it resolved..!