[Gambas-user] Gambas webform, routing to another webform

Matias De lellis mati86dl at gmail.com
Thu May 23 17:45:36 CEST 2019


Wow. Thanks Benoît,
It's all the info I needed. =)

I attach a very basic example that exemplifies how to login in an Webform,
saving a username in the session, and jump to another webform, where he
greets the user.

For some it will be useful. ;)

El jue., 23 may. 2019 a las 11:44, Benoît Minisini (<g4mba5 at gmail.com>)
escribió:

> Le 23/05/2019 à 14:50, Matias De lellis a écrit :
> > Hi Benoît, everyone,
> >
> > I was trying to make a small configuration fronted for a pagekite [1]
> relay.
> > I use pagekite for tests, a while ago, but I need to make it more
> dynamic.
> > Basically I need to manage the users that connect to the relay. With this
> > commit [2] it's easy, but I want to do the fronted that manage it.
> >
> > Only need an CRUD with users, ports and secret key. It's easy .. No? ;)
> >
> > Well. The important thing is also that I need a simple login and control
> > the routes. If it is logged, show the main fronted (on /relays), and if
> not,
> > redirect to the login webform (on /login)
> >
> > Since this is a relatively new control, there are few examples
> (Practically
> > only those who are with the source code). and I do not find any that
> shows
> > how to redirect to another webform. :S
> >
> > In the original announcement[3], you said this:
> >
> >  > How to switch from one web form to another one is not designed yet. At
> >  > the moment, the url 'http://<server>/<root>/abcd' is supposed to
> display
> >  > the web form whose class name is 'abcd'. There is no way to have
> >  > different instances of the same web form.
> >
> > But I could not make it work.. :(
> >
> > Delving into the code, I found that basically you deleted it[4], but I
> > do not
> > see how to replace it. You can guide me in what is the alternative to
> > solve this.?
> > A single example with a webButton that redirects to another webform,
> > should be more than enough. :smiley:
> >
> > Of course, thank you very much ..
> >
> > Regards,
> > Matias
> >
> > ..and p.s: Congratulations for your new stage as a self-employed
> > company. =)
> >
> > [1]: https://pagekite.net/
> > [2]:
> >
> https://github.com/pagekite/PyPagekite/commit/9b11980a43cbe9f0c4fc7f749188cb6266737600
> > [3]:
> http://gambas.8142.n7.nabble.com/New-gb-web-form-component-td54380.html
> > [4]:
> >
> https://gitlab.com/gambas/gambas/commit/ab231c0bda9ff2eff0764dd7dad9269e3c4123d4
> >
>
> WebForm.Startup is a property that allows to define the name of the web
> application startup form.
>
> By default, it's the project startup form, which should be your login form.
>
> Then, in your login form, once your user is authenticated, you set the
> WebForm.Startup property to the name of your real application startup form.
>
> Regards,
>
> --
> Benoît Minisini
>
> ----[ Gambas mailing-list is hosted by https://www.hostsharing.net ]----
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.gambas-basic.org/pipermail/user/attachments/20190523/a0fcd699/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: WebformLoginExample-0.0.1.tar.gz
Type: application/gzip
Size: 11896 bytes
Desc: not available
URL: <https://lists.gambas-basic.org/pipermail/user/attachments/20190523/a0fcd699/attachment-0001.gz>


More information about the User mailing list