Back to Four Js Website
Four Js Customer Forum
Subscribe for automatic updates:
RSS
Sign in for full access
|
Help
Four Js Development Tools Forum
>
Discussions by product
>
GDC
>
Request - action on an image
Most recent posts
Pages: [
1
]
« previous
next »
Reply
|
Print
Author
Topic: Request - action on an image (Read 16573 times)
Daniel N.
Posts: 6
Request - action on an image
«
on:
February 02, 2010, 08:29:36 am »
Hi
We search for a solution to have a button (not buttonedit) or an image
in EACH LINE of an input array that is "click-able" and triggers
an action.
I have not found that this is possible - therefore we would like to make
this request.
Thanks.
Best regards
Andrea
.
Posts: 115
Re: Request - action on an image
«
Reply #1 on:
February 02, 2010, 02:29:22 pm »
Hello Andrea,
I've asked the support team to transfer your message to "BDL" forum. It may looks like a four j's internal problem, but it's not: this kind of feature is not something that can be done entirely in GDC (like requests regarding fgltty for instance):
- we need to provide a definition in the .per
- this has to be implemented in GDC, but in GWC as well
This is why the discussion should be raised in the "language" part of the forum - so the right team can answer you.
Regards,
Pierre-Nicolas
Reuben B.
Posts: 1119
Re: Request - action on an image
«
Reply #2 on:
February 04, 2010, 12:56:19 am »
This is achieveable by using GWC, and not the GDC, so maybe perceived as a GDC issue, rather than a FGL issue, even though deep down it needs FGL change to be implemented properly.
The need for it in a GWC application is if you think of the shopping basket icon on each line of a list of products, click to add this line to your order. Similarly a link or button on each line of the array that needs to trigger a 4gl-action. In each instance clicking of the link or button needs to determine and set the current row and trigger an action.
For those interested, in the GWC, add a label to a column in the array, and set the presentation style attribute textFormat to html.
Display the result of the following function to the label field in the array ...
FUNCTION actionUrl_image(action, i, image)
DEFINE action STRING -- action to trigger
DEFINE i INTEGER -- row of array
DEFINE image STRING -- image to click on
RETURN SFMT("<img gwc:attributes=\"src '%3' ? ImageURI('%3') : ImageURI('1x1')\" onclick=\"gwc.capi.SessionVar('row_index','%2');gwc.capi.Action(gwc.core.state.ActionDidByName('%1')); return false;\" ></img>", action, i USING "<<<", image)
END FUNCTION
In the label field it will render an image, if you click on it it will set a session variable to indicate the row, and then trigger the action. So in your 4gl code you have...
ON ACTION image
CALL ui.Interface.FrontCall("session","getvar","row_index", row_index)
MESSAGE SFMT("Image clicked on row %1", row_index)
CALL fgl_set_arr_curr(row_index)
... to retreive the current row from the session variable and set it.
For buttons or links it is something similar except using a <a> tag or a <button> tag instead.
Of course being able to have an IMAGE or BUTTON in a TABLE and specifying an action to execute when clicking on the IMAGE or BUTTON in the TABLE would be preferable.
Product Consultant (Asia Pacific)
Developer Relations Manager (Worldwide)
Author of
https://4js.com/ask-reuben
Contributor to
https://github.com/FourjsGenero
Leo S.
Posts: 129
Re: Request - action on an image
«
Reply #3 on:
February 04, 2010, 09:18:50 pm »
uuh, that sounds very GWC specific..
What if the click to "button as link" would implicitly change the current row (similar to the ButtonEdit button click in an INPUT which changes the implicitly the current field) in INPUT ARRAY ?
This could be implemented transparently by the GDC and GWC without the need for specific frontcalls
Sisavanh S.
Posts: 80
Re: Request - action on an image
«
Reply #4 on:
February 05, 2010, 03:21:24 pm »
Hi everybody,
I've filed a FGL enhancement:
16348 - Actions on each line of a table
Many regards,
Sisavanh SENGSAVANH
Sebastien F.
Posts: 545
Re: Request - action on an image
«
Reply #5 on:
February 08, 2010, 01:38:12 pm »
Andrea,
Could you please explain us the real original need (why do you want a clickable button in array rows?)
And could you show us existing applications having that?
Before implementing something, we like to understand the original need and see if it's GUI standard.
Simple questions raise:
1) Do you want to jump to the row when clicking on the button of the row (have a real row change with AFTER/BEFORE ROW)?
2) Do you want the focus to be on row-buttons?
3) Do you want to enable/disable individually buttons in each row?
Thanks a lot.
Seb
Daniel N.
Posts: 6
Re: Request - action on an image
«
Reply #6 on:
February 09, 2010, 11:27:55 am »
Hi Seb
we have to write a new calculation program with complex multiple dialogs. First the user has to fill a few fields in a line of an array and than he can trigger an action for a sub routine to define the new product. This sub routine can be triggered in a new row and also in an existing row. Therefore we would make this action visible in each line of the array - not only in a special field, like buttonedit. A button in the toolbar or somewhere else on the window is not so fine. If the user wants to change a row,
he first has to click twice, first on the row that we want to change and then on the image.
I do not know if this is gui standard, I have seen clickable images in online shops. For example you can click on the image
of an article in an order row to get more details about the article.
I would answer your questions like this:
1. yes, clicking on the image should change to the wanted row. That means triggers after field/row and before row.
2. we need no focus, because image is not editable. But perhaps it is necessary to make row changig possible.
3. The action should be available, if there is an image in the cell/field. I would prefer clickable images, because
the image can be different in each row. I do not know, if this is possible with buttons.
Best regards
Andrea
hc_014.jpg
(119.88 KB, 1075x765 - viewed 2303 times.)
Pages: [
1
]
Reply
|
Print
« previous
next »
Jump to:
Please select a destination:
-----------------------------
General
-----------------------------
=> General Discussion
=> Ask Reuben
=> WWDC21
-----------------------------
Discussions by product
-----------------------------
=> Products announcements
=> Genero BDL
=> GWS
=> GAS and GBC
=> GDC
=> Genero Mobile for Android or iOS
=> Genero Studio
=> Reporting tools (GRW, GRE)
-----------------------------
Jobs
-----------------------------
=> Jobs
Powered by SMF 1.1.21
|
SMF © 2015, Simple Machines
Loading...