OnActions

Hi,
it is possible to execute method with OnActions from a field an image?

Giuseppe Urru

onAction is normally fired on a field when enter is given, it is not possible todo so on a img/media field
Why whould you need it?

Is this related to why a field with onAction doesn’t fire for me?

More specifically, with Servoy 2.1 and Java 1.5 on Linux I have a text field in a table-view form. the test field is NOT modifiable. I’ve defined an onAction, but clicking the field doesn’t fire the method. The tableview form normally lives in a tab-panel, but displaying it in its own right doesn’t help.

I can verify that the method works, by running it from the Methods menu in developer - it then pops up the desired form with the correct related record.

Have I missed anything?

Thanks,
Neale.

Are you using 2.1.1 ? see http://forum.servoy.com/viewtopic.php?t=3031

No, not 2.1.1 - still on 2.1.

“The onAction behaviour in tableview(others work already) will work in the Servoy 2.1.1 final release” sounds encouraging - I’ll try to slot i the upgrade to 2.1.1 early next week.

BTW, what did I miss in the 2.1.1 release notes? Whatever it is, I still can’t see it {:frowning:

Thanks,
Neale.

Jan,
We recently had a need for this feature.

Most of our products are available in multiple colors and are shown through a tab panel list view. Each row contains the color name (editable) and color swatch (image). We wanted to click the color swatch to show a form dialog of the full size product image.

Bezier,
The only thing I can think of is to attach your onAction method to a transparent label and place it on top of the image_media field.

This appears to work just fine with Servoy 2.1.1 :-)

One small oddity - when we click on the non-editable text field (to fire the onAction, which displaysa form in a popup) the “e” for editing displays in the lower status area - but AFAICT there is nothing being edited {:frowning:

Thanks,
Neale.