Let's follow up this discussion at the Neptune Community
(this forum will be kept in read-only mode)
Hi guys, I have another question:
The scenario looks like this: a have a selection screen in my application and when the user presses the OK-button, I want to change the data tables in the application class accordingly.
Any help is appreciated.
I think I just found the solution: in the press-event of the button, call an ajax function which you declared earlier.
There you can send a POST ajax command to the application class, where the HANDLE_ON_AJAX method is called! :)
Use the ajax id in the handle on ajax method.
I made a tutorial video where it should be explained:
Thanks Njål, that was very helpful!
But I have another question, regarding the same application:
so I managed to capture the button click and react to it in the application class, but I'm still having problems with the data transfer between the Neptune application and the application class. I have a form on my application which is similar to a selection screen and with the click of a button, the application class should select the right data.
How do I get the values from the inputfield (in my case: ValueHelpFields) to the application class? I see that I can bind a class-attribute to the "value" attribute of the ValueHelpFields, so I thought I just have to bind a public string attribute to the ValueHelpField element and the data transfers automatically between the application and the application class, but that doesn't seem to work (all attributes are greyed out). Or do I need a specific data element for this?
What DOES work is writing the values from the inputfields (getLiveValue) in the AJAX_VALUE field as a string, but I guess that's not how it's supposed to be done.
Can you please give me a hint, how can I can make the values in the inputfields available in my application class? I'm quite lost here.
Thanks in advance!
Press the button next to the ajax_id on the model binding. You can then select extra models to send from the client to the server.
If you bind this to a structure in the backend and bind the individual fields of the structure to input elements you can use the values in the server logic.
For reference take a look at this app which should be in your system:
Scroll down to the serach button:
Now if you look at the ListBooking list you can see that when that is loaded it is first sending the PageBook1 model which includes the values from the input field:
This is the most difficult thing to understand at the start. But once you get used to it it is really powerful. You just bind data to structures and internal tables and you can use the changed or inserted values directly from the attributes in the application class