Servoy 6.0 alpha 3

Rossen,

This is also fixed in next v6 build, when in table view the dropdown also shows named elements that are also in the body.

Rob

rossent:
One minor issue which I believe applies not only to Servoy 6.0 alpha 3:
When using the wizard to create a form, if I choose to place fields as labels, the title label is associated with the data label through its “labelFor” property. However, if I try to set manually the same (trying to select for the labelFor property not a field but a label) the available labels on the form do not show up in the property drop-down list - I need to manually type in the name of the label.

jcompagner:
rossen,

about your UUID problem, i can’t reproduce this
first i tried this:

var x = "";

function doSomething()
{
companyname = application.getUUID();
x = companyname;

application.output(companyname);
application.output(x);

}




that updates a record and sets a uuid on a column, i also copied the column to a form variable and then output both (and they are all the same)

then i used that data to create a value list (that returns the uuid) and use a combo on that same field x that has that valuelist
after i select a value in the combo from that valuelist i also print x again
and x is still exactly that value above.

this is the output:

99529435-A5DB-459A-A342-B5DFA92FC4F5
99529435-A5DB-459A-A342-B5DFA92FC4F5
5735A05E-F68D-4017-966B-6C2D4A632999
5735A05E-F68D-4017-966B-6C2D4A632999
19D757C0-D793-4FEF-8768-C586A7301C67
19D757C0-D793-4FEF-8768-C586A7301C67
9AB380B7-B4BA-4BC7-BD10-D018CF2CDAD2
9AB380B7-B4BA-4BC7-BD10-D018CF2CDAD2

thats creating of 4 records

then i assign nr 2 to the x and print the x:

5735A05E-F68D-4017-966B-6C2D4A632999

can you create a case with an example?

Hi Johan,

I created a case [359849] with an attached sample solution reproducing the issue. Turns out it applies only to COMBOBOX and not TYPE_AHEAD fields. Let me know if you need more info on this.

I have read that Servoy 6.0 has "extended inheritance model ". I hope now i can subclass every object in my solution (similar to what i do now with subform). If so, how can i create a field object to use in my forms ?

Michele, that is still not the case, for your case we have templates, where you can create templates for a specific field or group of elements.

The "extended inheritance model " means that you can now overwrite every property of anything on a subform from a super form.
So the super forms elements are not fixed anymore, you can move them, give them another color specific for that subform.

Ok, but templates are only in 6.0 or i have them even in actual version ?

Thanks

templates you already have in 5

jcompagner:

rossent:
Labels/buttons which have an assigned onAction event callback but have their property showClick set to “false” do not allow the user to invoke the action by using only the keyboard (for example, using the TAB key to focus the element and pressing the ENTER key - users are forced to use the mouse).

In addition, if the property showFocus is set to “true”, the focus rectangle is displayed only in the Smart Client but not in the Web Client (in both cases, regardless the display of the focus rectangle, the action cannot be invoked using the keyboard if the showClick property is set to “false”).

currently labels that do have an onaction attached but showclick is false are really just labels, they are not buttons on the os/swing level at all.
So they don’t get the default keyboard bindings and we currently only have an MouseListener attached to it, So please make a case that we also have a KeyListener and also call on action when pressing the enter key.

I created a case for this but it was basically refused [will not fix].

My question is this: in Servoy, how can I have an UI component which does not look like a button but is still focusable and clickable by mouse and keyboard and works in both the Smart Client and Web Client (in other words, users can invoke its onAction event using either the mouse or the keayboard and when it is the “active” element on the form the standard focus rectangle is displayed around it and users can use the TAB key to cycle through them and the same behavior is on both the smart client and web)

Currently, only buttons with their showClick property set to true allow the user to “click” them using both mouse and keyboard, however they are always rendered as buttons on the Smart Client. We need specifically clickable and focusable “links” which work not only on the web but in the smart client too. Using the HTML_AREA does not work (cannot focus the links in the smart client). Using HTML and tag in a label text does not work (it focuses in the smart client but you cannot “click” it pressing the ENTER key). Allowing to style the buttons will work fine, but currently if the showClick is set to true, in the smart client we can manipulate only the borders and the text a bit - the background is always rendered using the OS theme (and we want that for regular buttons, but not for these “links”)

For us it is very important to allow users to interact with the buttons and links on the forms using both mouse and keyboard and we need this to work on both Smart and Web Client. How can this be achieved?

If you want to show focus then i guess you come very close by placing a button, set the border to empty
then in the onload of that form you do:

elements.button.putClientProperty(“contentAreaFilled”,false);

To get around the fact that swing let thet system paint the button and that will paint a border.

and in the webclient you already have just a “label” where you can press enter on.

jcompagner:
If you want to show focus then i guess you come very close by placing a button, set the border to empty
then in the onload of that form you do:

elements.button.putClientProperty(“contentAreaFilled”,false);

To get around the fact that swing let thet system paint the button and that will paint a border.

and in the webclient you already have just a “label” where you can press enter on.

The elements.button.putClientProperty(“contentAreaFilled”,false); does not produce the expected results. Basically, the button is still painted as a standard button using the OS theme

What I am after is something like this: LinkButton : Link Button « Swing Components « Java - of course, on the web client should be rendered as a regular link which when clicked invokes the attached onAction even (like the regular buttons)

did you also really set the border to empty??
[attachment=0]buttonwithfocusandkeyboard.png[/attachment]

jcompagner:
did you also really set the border to empty??

I had to call putClientProperty(“contentAreaFilled”, false); not only on form load, but also every time I call controller.recreateUI()

Now, is there any way to show the text underlined, like a link? Unfortunately, the Servoy styles do not support the text-decoration style attribute…

Hi Rossen,

Use HTML in the button label and you can apply any style and text-decoration you want.

Hope this helps.

rossent:
I had to call putClientProperty(“contentAreaFilled”, false); not only on form load, but also every time I call controller.recreateUI()

weird i didn’t have to do that at all. In my last example (of the picture) i even did it on the button click itself, so first it displayed a button
then i click on it and it was just like a label…
And what is even more strange, i would say if you call recreateUI() that it would revert your client property!
(because the button is recreated)

ROCLASI:
Hi Rossen,

Use HTML in the button label and you can apply any style and text-decoration you want.

Hope this helps.

Yes, I did that. And got the underline… but the statement “apply any style and text-decoration you want” in the smart client is really limited to only whatever the crappy Java HTML rendering can do… and this approach forces me to stuff unnecessary HTML code… and now I have to start escaping un-safe HTML characters in the link text… yes, possible, but why having to jump over so many hoops to get a simple think like that working? A side note, In .NET and Delphi, there are standard components right out of the box which do exactly that without any of those workarounds. Servoy should really update the standard components pallet to include some of the 21st century UI stuff and make it work consistent in the Smart Client and the Web Client, but that is a separate topic altogether.

So, so far I was able to make a button look and act like a hyper-link in the smart client. In the web client however, the “link button” does not show the hand cursor when hovering over, even though I have set the rolloverCursor property to HAND (shows up fine in the smart client). This applies actually to “regular” buttons - just give it a try: place a button on a form, set its rolloverCursor property to HAND and compare the results in Smart and Web client… seems like a bug to me