text_field Issue in HH:mm for NG Client

Forum to discuss the new web client version of Servoy.

text_field Issue in HH:mm for NG Client

Postby smilanshah » Thu Jan 04, 2018 11:59 am

We have text_field and showing data into HH:mm
In smart client it seems working proper and as expected but when we run the same in NG Client then below error is coming

ERROR org.sablo.websocket.utils.JSONUtils - Error while converting value: 12:10 of key: null to type: [email protected] current json: null


Hence can you please guide us what is wrong in above ASAP?
smilanshah
 
Posts: 18
Joined: Sat May 20, 2017 11:41 am

Re: text_field Issue in HH:mm for NG Client

Postby Andrei Costescu » Thu Jan 04, 2018 12:30 pm

Can you give more info? Like:
  • what is the type of the dataprovider for that field? (numeric column/var or Date or ...)
  • do you have a full stack trace for that error in servoy_log.txt file?
  • does this happen when editing the value on client or when showing the form?
  • the actual value of in the dataprovider at that time.
Andrei Costescu
Servoy
Andrei Costescu
 
Posts: 939
Joined: Tue Jun 26, 2007 3:14 pm

Re: text_field Issue in HH:mm for NG Client

Postby smilanshah » Thu Jan 04, 2018 1:10 pm

Sure.

1. type of the dataprovider is TEXT but in database its INT. So assume that if HH:mm value is say 01:00 then in database value would be 60, if 02:00 then 120 in this way.
2.
ERROR com.servoy.j2db.util.Debug - A dataprovider that is not able to send itself to client... (PropertyDescription[name: Dataprovider (int), type: [email protected], config: null, default value: null], 12:10)

3. When form is open at that time value is not showing into text_field
smilanshah
 
Posts: 18
Joined: Sat May 20, 2017 11:41 am

Re: text_field Issue in HH:mm for NG Client

Postby Andrei Costescu » Thu Jan 04, 2018 2:08 pm

I think I need a small sample with only one form and one text field to see this.

I did try it out with a new table with one int column, column converter (table editor column settings) int (minutes) -> String (HH:mm) and put a text field on that column with format HH:mm. Converters worked fine.
But it doesn't show anything useful in Smart Client either. It shows ":mm" when in DB I have 601 for example.
And it is to be expected because that format is not a date format but a String format where HH means uppercase hex char and :mm means nothing...

So you must be doing it in a different way.

BTW, at point 2 above I was aiming for a full stack trace - if available. Also I see from that message that the dataprovider seems to be int not string.
Andrei Costescu
Servoy
Andrei Costescu
 
Posts: 939
Joined: Tue Jun 26, 2007 3:14 pm

Re: text_field Issue in HH:mm for NG Client

Postby smilanshah » Thu Jan 04, 2018 3:25 pm

Hi Andrei

Thanks for you feedback.

Let me give you the full stack trace and the approach we are using.

KIndly find the attached files for the same.

1. servoy_log.txt -> full stack
2. DB Snap -> database the field and logic

Let us know if you need any further details.
You do not have the required permissions to view the files attached to this post.
smilanshah
 
Posts: 18
Joined: Sat May 20, 2017 11:41 am

Re: text_field Issue in HH:mm for NG Client

Postby Andrei Costescu » Thu Jan 04, 2018 5:27 pm

Ok, the stack trace hinted that the DP thinks it's a number when it actually is a String.
I was able to reproduce the problem in my sample by removing the format from the text field.

Support case SVY-12014 is created.
You can follow that case to see when it is fixed (will probably be fixed in 8.2.3).

As a workaround until this bug is fixed you can set a format (like "##:##" - or anyway, a format that does what you need) on the field. That helps the text field find the right type for the DP.
Andrei Costescu
Servoy
Andrei Costescu
 
Posts: 939
Joined: Tue Jun 26, 2007 3:14 pm


Return to Servoy NGClient

Who is online

Users browsing this forum: No registered users and 1 guest

cron