Sometimes I need to precede text with a few spaces,
especially when creating image/text buttons.
I found out that I can’t do this in the property editor:
the text simpy jumps back to its startposition after closing the editor.
When I change this on the form the modified text is displayed
correctly (with spaces) in the property editor!
Is this a bug?
is it possible to set a Servoy validation on such a field to prohibit entry of two /n’s (or 's)? if so, maybe we should all be doing that on html_area fields.
kazar:
is it possible to set a Servoy validation on such a field to prohibit entry of two /n’s (or 's)? if so, maybe we should all be doing that on html_area fields.
kazar
hmmm never thought of that, don’t know if that works, will try it!
Thanks for your replies guys.
I realy hope Servoy will fix the problems on short notice,
because this is very frustrating indeed.
Since the problem might be in the Sun-lib does this mean that it will
be fixed (or at least will be fixable) in release 4x?
HJK:
an onDataChange method is not working either.
the second argument is already receiving the wrong code.
it goes wrong, when you have text between two
, like this:
this text will disappear
in the the real text you will see than:
Harjo, I meant validation that is applied in Define Dataproviders (Properties) – what I had been thinking is to use the servoy.GlobalMethodValidator option
Success or failure of this idea would depend upon when these validators fire. Clearly a back-end trigger would be way too late. And your onDataChange test shows that the method is fired after the field is already exited – again, too late. Perhaps if you used the same method as a Servoy field validator (3.5 only) the validation would be run when the user attempts to leave the field (i.e., hopefully forcing focus to hold on the field) instead of after it is already exited?
I would test myself but feel really unclear on what type of argument or result a validation method would be looking for: a Boolean result only, or could one “trap the error” by pruning double-Breaks into single-Breaks within an If argument??
Hoping a code jockey can figure that out – I certainly ain’t a jockey! (look me up in 3 years at the rate I"m going )
that will not work, if the onDataChange is not working, the other things are not going to work. The data comes even wrong OUT of the HTML_AREA, so than you have the wrong data already…
I have talked to Johan about it, and he confirmes that it is the HTML-AREA of java itself. they could try to work around it, but could not tell the prio of this.
so the more people complain about this, the higher the prio get’s I think!
HJK:
that will not work, if the onDataChange is not working, the other things are not going to work. The data comes even wrong OUT of the HTML_AREA, so than you have the wrong data already…
OK, so I just tested and I think there may be some value in pursuing my idea… indeed it looks like a dataprovider validator method (Harjo – I do not mean applying it in form prop’s) is evaluated before it’s too late. Not sure whether you did tests that show that the focus has left the field before the validator fires, but that is not what I see. My test seems to indicate that the user cannot exit the record or change focus before the validation is run.
I just took a whack at creating a method that would work. My coding did not do the trick to prune the 2 breaks down into one, but I can report that if you apply a global method as a validator on the html_area field in the dataproviders Properties, the method will indeed fire before the focus on the field is lost.
I’ll leave it up to someone whose coding does not suck as bad as mine to come up with the right method to strip the extra breaks and leave the result of the method as True so that the validation error (see attachment) does not get triggered.
the right data, never leaves the HTML-AREA, so you can try anything you want, onFocusLost, dataChange, validators, you are always receiving the wrong data.
but, if someone still finds a dirty trick, let me know!
the right data, never leaves the HTML-AREA, so you can try anything you want, onFocusLost, dataChange, validators, you are always receiving the wrong data.
but, if someone still finds a dirty trick, let me know!
Me too.
it’s a bug related to sun’s html renderer, not to Servoy: but if you need styled text you have no chance. Rtf management is much more difficult.