-
FEATURED COMPONENTS
First time here? Check out the FAQ!
Hi, I'm facing a strange situation with validator. I'm trying to run a piece of code like this:
http://zkfiddle.org/sample/2fnhdnp/16-custom-form-validator
Well, sometimes it works and sometimes don't. When I inspect ctx.getProperties("parent")
I see a HashMap<String, Property[]>
with parent
as key and three PropertyImpl
objects. It turns that I check ctx.getProperties("parent")[0].getValue()
to get Parent
but sometimes it is on [1], [2] and I got an invalid message telling me parent is null but actually it's not. How could I fix that? Basically this is happening with complex objects and validator works fine for String, Integer...
I don't what was happening but now it's working. I've created a method to get my object, no matter if it is on [0..n]
. Maybe there was something wrong with my form or some binding, because like I said, my validator was working fine for any property but Person
.
Asked: 2018-08-22 04:33:02 +0800
Seen: 6 times
Last updated: Aug 24 '18
what version are you testing? The fiddle in 8.5.2 I couldn't simulate what you are talking about.
chillworld ( 2018-08-22 13:07:57 +0800 )editI'm testing v.8.5.0. Like I said, it is strange, because sometimes I just refresh the page and
psinalberth ( 2018-08-22 17:54:52 +0800 )editparent
appears onPropertyImpl[1]
or 2. The only difference is that I'm using abandbox
insteadcombobox
. I'm thinking about creating a method to extract what I need fromProperty
array.