[Gambas-user] Can you esplain the order of message() in a webform

Benoît Minisini gambas at ...1...
Wed Sep 20 11:58:57 CEST 2017


Le 20/09/2017 à 08:09, marco bra a écrit :
> Thank Benoît
> i still need info i'm not Gambas wizard :-(
> in your sent code of the calling of wbcerca_Message, the "As Control" part
> is not recognized as valid type from gambas and also wich action string i
> need to pass?

Sorry, it's 'WebControl', not 'Control'.

You don't pass the Action parameter, it is send by the Message class, 
and contains the label of the clicked button.

> 
> Then i have to get access to a filtered recordset, i use that dialog
> message dialog to have some kind of debug to the underlaying web layer
> gambas logic and state.
> 
> Recordset recs count show me filtered total rows number but after in a
> later access form a pushbutton details of refrehed tableview it reset the
> value to the total initial recset so i cannot get detail access with
> webtable to details of filtered result, i alway get access to original
> recset row.
> 
> Is the some kind of sample or doc to get sample to browse filter and detail
> of recordset result via web using gambas ?

This is the same problem. Your program is run at each request from 
scratch, so you lose all your global variables. If you want to maintain 
data between request, you must store them in your session.

gb.web.form provides a store in each webform :

MyWebForm["key"] = Value

==> 'Value' is store in the session, and can be retrieved at each request.

If you access a database, you must reopen it and run the SQL again at 
each request.

It's a little brain-f..cking, but there is no magic to hide that!

Regards,

-- 
Benoît Minisini




More information about the User mailing list