0 Replies Latest reply on May 13, 2009 4:37 PM by Dean Hiller

    validation error on list pulldown(invalid value)

    Dean Hiller Expert

      Every once in a while, we run into
      scirpt:accDec:j_id45: Validation Error: Value is not valid

      for a pull down menu.  This is very annoying...sometimes we end up writing our own SessionScoped EntityConverter instead of using the s:entityConverter tag.  I am not sure why this is not working.  I even copied my previous code that was working.  In fact, this whole pattern gets a bit confusing.  Currently, what we do is

      1. at the top of the page, add a #{actionBean.fillInList} This could go in pages.xml file but there have been weird behavior when doing that sometimes like executing if logic when without it, it doesn't execute that stuff
      2. add a #{actionBean.accountList} and #{actionBean.account} for the selection and actionBean is session scoped
      3. add the s:entityConverter to the pulldown

      This is my personal pattern.  not sure if there is a better way though in one instance it seems to be working and the other instance it is not working.

      Then, here is something weird....a developer on the team hacked in a equals method into the Account bean and that fixed the problem!!!  somehow, the list of beans displayed and the list gotten doesn't work.

      BIG NOTE: The only difference between my thing that works and the one that does not work is one is in Session and one is in Conversation!!!!  Actually, that would make sense then.  In Session, the hibernate cache is blown away every time so the instances of the list and the one selected would be different?  Is there any way to make this easier though?  Maybe entityconverter should really do comparisons by ID!!!  instead of using equals?