Alpha Software Mobile Development Tools:   Alpha Anywhere    |   Alpha TransForm subscribe to our YouTube Channel  Follow Us on LinkedIn  Follow Us on Twitter  Follow Us on Facebook

Announcement

Collapse

The Alpha Software Forum Participation Guidelines

The Alpha Software Forum is a free forum created for Alpha Software Developer Community to ask for help, exchange ideas, and share solutions. Alpha Software strives to create an environment where all members of the community can feel safe to participate. In order to ensure the Alpha Software Forum is a place where all feel welcome, forum participants are expected to behave as follows:
  • Be professional in your conduct
  • Be kind to others
  • Be constructive when giving feedback
  • Be open to new ideas and suggestions
  • Stay on topic


Be sure all comments and threads you post are respectful. Posts that contain any of the following content will be considered a violation of your agreement as a member of the Alpha Software Forum Community and will be moderated:
  • Spam.
  • Vulgar language.
  • Quotes from private conversations without permission, including pricing and other sales related discussions.
  • Personal attacks, insults, or subtle put-downs.
  • Harassment, bullying, threatening, mocking, shaming, or deriding anyone.
  • Sexist, racist, homophobic, transphobic, ableist, or otherwise discriminatory jokes and language.
  • Sexually explicit or violent material, links, or language.
  • Pirated, hacked, or copyright-infringing material.
  • Encouraging of others to engage in the above behaviors.


If a thread or post is found to contain any of the content outlined above, a moderator may choose to take one of the following actions:
  • Remove the Post or Thread - the content is removed from the forum.
  • Place the User in Moderation - all posts and new threads must be approved by a moderator before they are posted.
  • Temporarily Ban the User - user is banned from forum for a period of time.
  • Permanently Ban the User - user is permanently banned from the forum.


Moderators may also rename posts and threads if they are too generic or do not property reflect the content.

Moderators may move threads if they have been posted in the incorrect forum.

Threads/Posts questioning specific moderator decisions or actions (such as "why was a user banned?") are not allowed and will be removed.

The owners of Alpha Software Corporation (Forum Owner) reserve the right to remove, edit, move, or close any thread for any reason; or ban any forum member without notice, reason, or explanation.

Community members are encouraged to click the "Report Post" icon in the lower left of a given post if they feel the post is in violation of the rules. This will alert the Moderators to take a look.

Alpha Software Corporation may amend the guidelines from time to time and may also vary the procedures it sets out where appropriate in a particular case. Your agreement to comply with the guidelines will be deemed agreement to any changes to it.



Bonus TIPS for Successful Posting

Try a Search First
It is highly recommended that a Search be done on your topic before posting, as many questions have been answered in prior posts. As with any search engine, the shorter the search term, the more "hits" will be returned, but the more specific the search term is, the greater the relevance of those "hits". Searching for "table" might well return every message on the board while "tablesum" would greatly restrict the number of messages returned.

When you do post
First, make sure you are posting your question in the correct forum. For example, if you post an issue regarding Desktop applications on the Mobile & Browser Applications board , not only will your question not be seen by the appropriate audience, it may also be removed or relocated.

The more detail you provide about your problem or question, the more likely someone is to understand your request and be able to help. A sample database with a minimum of records (and its support files, zipped together) will make it much easier to diagnose issues with your application. Screen shots of error messages are especially helpful.

When explaining how to reproduce your problem, please be as detailed as possible. Describe every step, click-by-click and keypress-by-keypress. Otherwise when others try to duplicate your problem, they may do something slightly different and end up with different results.

A note about attachments
You may only attach one file to each message. Attachment file size is limited to 2MB. If you need to include several files, you may do so by zipping them into a single archive.

If you forgot to attach your files to your post, please do NOT create a new thread. Instead, reply to your original message and attach the file there.

When attaching screen shots, it is best to attach an image file (.BMP, .JPG, .GIF, .PNG, etc.) or a zip file of several images, as opposed to a Word document containing the screen shots. Because Word documents are prone to viruses, many message board users will not open your Word file, therefore limiting their ability to help you.

Similarly, if you are uploading a zipped archive, you should simply create a .ZIP file and not a self-extracting .EXE as many users will not run your EXE file.
See more
See less

more explanation on "a5ws_Login_User"

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    more explanation on "a5ws_Login_User"

    I follow the wiki on how to open a a5w pages via xbasic.

    i place this codes in the after search... where i confirm
    i have valid user id and user password (unencrypted)

    variable u and p...

    dim pResult as p
    pResult = a5ws_Login_User(u,p,"TabbedUI_panel_mobile.a5w")

    i expect to see tabbedUI_panel_mobile to open up.

    but nothing happen ?

    is there something else i need to do ?

    appreciate your guidance.

    thanks

    ken tjia

    #2
    Re: more explanation on "a5ws_Login_User"

    Ken,

    I don't know, that is kind of a weird function. But the WiKi says this:
    Note - once you have a value for RedirectURL, you need to redirect the user, for example:

    if return.error = .f.
    response.redirect("index.a5w") ' login success page
    else
    response.redirect("message.a5w") ' login failed message page
    end if
    Among other things, logically you would expect "false" to mean that the user login was unsuccessful, rather it means that there was no error. Furthermore, you would think that since you are passing in the target page, if the login was successful it would automatically redirect you to that target page, but all it does is populate the system variable, "RedirectURL". Like I said, this is a weird function.
    Peter
    AlphaBase Solutions, LLC

    [email protected]
    https://www.alphabasesolutions.com


    Comment


      #3
      Re: more explanation on "a5ws_Login_User"

      Peter, that's exactly how I have it deployed.

      Ken, in addition to fomatting it like Peter showed; why are you attempting to do this from an OnSearch event? I expect it logs the person ibut does not do the redirect. You'd have to run a test to see if that is true. I am prettu sure you cannot fire response.redirect() from an OnSearch event and expect a new A5W page to appear. I don't quite understand why you would have an auto-login function running in a search event. What I have done in the past is used a simple dialog with fields for username and password, and feed those values to the function. If they are not found in security, it shoots them to a message page saying so.
      Steve Wood
      See my profile on IADN

      Comment


        #4
        Re: more explanation on "a5ws_Login_User"

        The function only returns a value that CAN be used for a redirect. It does not actually DO the redirect. There was also a bug in the function that caused the "TargetPage" to be ignored with certain security settings. This was fixed in the latest production build 2291.

        From the help

        Result = A5WS_Login_User()
        result.RedirectURL
        Successful Login - Will contain the name of the page set as the redirect page after login from the web security configuration. If TargetPage has a value, result.RedirectURL will have the value from TargetPage.
        Failed Login - Will contain the name of the page set as the "Redirect page - login" from the web security settings.


        The xbasic example given in the help is slightly misleading. While you can set your own redirect target based on the value in Result.error
        Code:
        if return.error = .f.
           response.redirect("index.a5w") ' login success page
        else
           response.redirect("message.a5w") ' login failed message page
        end if
        you can also just use the target automatically to send the user to another page.
        Code:
        response.redirect(result.RedirectURL)
        If you don't supply a targetURL, it will return the values set in the security configuration as shown above.

        For example,

        If you have set the target as in your example:

        1. The login failed - result.RedirectURL will contain the name of the page set as the "Redirect page - login" from the web security settings.
        2. The login succeded - result.RedirectURL will contain the specified "TargetPage" sent in the function

        If you have NOT set the target as in your example:

        1. The login failed - result.RedirectURL will contain the name of the page set as the "Redirect page - login" from the web security settings.
        2. The login succeded - result.RedirectURL will contain the name of the page set as the redirect page after login from the web security configuration.

        Comment


          #5
          Re: more explanation on "a5ws_Login_User"

          Hi Everyone,
          yes a good question from Steve... Why i use after search event.

          Alpha & many web apps tools speak about going "Mobile".
          but the log in dialog that is being provided by Alpha is not usable
          for a truth mobile app (my opinion).

          In my thought, the user typically holding an iphone straight (portrait)
          never mind landscape position. he/she should be able to navigate and log in
          to an app.

          so i developed a nice keypad of my own, i added a new field in the security database
          called, mobile_pin, this typical six digits numeric as a start and i also added a new field
          called, password_in_text (kind a unencrypted) , this is where i place user password as
          ordinary text (as required by the a5ws_login_user function)

          In operation:
          User would key in this 6 digits number and perform the search,
          naturally it matched the user_id

          i constructed a mini a5w page with a keypad, much like a telephone dial pad.
          i also place codes to prevent the screen to stretch & scratch ?
          this minimize the behaviour of a typical multi touch iphone touch pad.
          and allowing this iphone/ipad to behave like a basic touch pad.
          with no stretch and all the whistle that we never need.

          so keypad is the main mobile login
          keypad1 is when user is valid, this iphone button will show
          i expect to have 6 choices, iphone, ipad, android pad 7", android pad 8",
          android pad 9" & android pad 10", android phone regular & big android phone
          like samsung galaxy.

          i suppose the liquid form can take care eventually, but such strange behaviour
          i decide to manually coded each device.

          keypad2, now will open a tabbed_ui, also full of problem.
          strange, unexplainable issues, for example

          session variable not get passed when i used iphone,
          while ipad would pass session perfectly.

          this is where i want to apply the a5ws_login....
          currently from the iphone button, i pushed to open this tabbedui
          ideally, once user is valid, mob1.a5w (the mobile login) would close
          and leave tabbedui the only active page.

          when tabbedui close/exit, then we fired up the mob1.a5w
          to wait for next log in.

          in real test on 3G network, perfectly working.
          i user "PERFECT BROWSER" app, to give me super speed and FULL SCREEN
          feature & locked the display in portrait position.

          pardon my English.

          hope this explain.

          ken tjia
          Attached Files

          Comment


            #6
            Re: more explanation on "a5ws_Login_User"

            further, i use the scroll feature very well thanks Selwyn.
            you notice i use sample of Video 41 to proof the ulink is in fact valid.

            this is done on pc browser, if i use it on iphone...
            this ulink never get transferred.

            i also use video 40 to grab the user's coordinate.
            so this would show a user current position etc.

            i hope Alpha would consider creating a true mobile log in.
            by the way, when i ran this on android pad and any android phone.

            the SCROLL GRID, never work.... only showing the first page.
            a very frustrating week, trying to do this based on the spirit of

            GENIE/DO IT YOURSELF without any code.

            sorry to say, it is getting better, but still full of challenge for me.
            other more intelligent members can easily fix these issues with few lines
            of java or html, but majority of us are just expect to rely on video and
            "no code"

            Comment


              #7
              Re: more explanation on "a5ws_Login_User"

              Jerry,
              thanks for the explanation & let me tried it once more this morning.
              i would like to confirm that once the user & password confirmed truth.

              this function would triggered and filled the

              session.__protected__ulink & would triggered all the necessary
              security values ? i found that the redirect pages are being restricted.

              i had to temporary set those redirected mobiles pages to "always allowed"
              i do believe there is something else i need to run, after reading some replies here & there.

              appreciate a better xbasic sample.....

              can this be triggered from a basic a5w page with xbasic ?

              Comment


                #8
                Re: more explanation on "a5ws_Login_User"

                Originally posted by Peter.Greulich View Post
                Ken,

                I don't know, that is kind of a weird function. But the WiKi says this:


                Among other things, logically you would expect "false" to mean that the user login was unsuccessful, rather it means that there was no error. Furthermore, you would think that since you are passing in the target page, if the login was successful it would automatically redirect you to that target page, but all it does is populate the system variable, "RedirectURL". Like I said, this is a weird function.
                hi Steve,
                thanks for the comment, yes what you said make sense.
                i tried to fired the xbasic a5ws_user_login to open up a a5w page
                and just don't see it can....

                so i am exploring the DIALOG as you suggested.
                now have to learn how to code a keypad..

                anyone out there can share such routine ?
                Last edited by Peter.Greulich; 12-30-2011, 05:36 PM. Reason: Add missing quote ]

                Comment


                  #9
                  Re: more explanation on "a5ws_Login_User"

                  Originally posted by Ken Tjia View Post
                  hi Steve,
                  thanks for the comment, yes what you said make sense.
                  i tried to fired the xbasic a5ws_user_login to open up a a5w page
                  and just don't see it can....

                  so i am exploring the DIALOG as you suggested.
                  now have to learn how to code a keypad..

                  anyone out there can share such routine ?
                  Hi Jerry,
                  I manage to create a brand new mobile login as per Steve's suggestion
                  this time using Dialog....


                  submit button has these codes...

                  dim u as c = "test"
                  dim p as c = "nnn"

                  dim pResult as p
                  pResult = a5ws_Login_User(u,p,"TabbedUI_panel_mobile.a5w")
                  xbasic_wait_for_idle(3)
                  response.redirect(pResult.RedirectURL)

                  see error i got back.....
                  Attached Files

                  Comment


                    #10
                    Re: more explanation on "a5ws_Login_User"

                    I am moving along to finalize this mobile login dialog..

                    i appreciate guidance on how to place dialog's field values to session variable ??

                    I presume we use "afterdialogvalidate" server side event.
                    where my mobile pin matched.
                    the data binding give me perfect name, password, ulink etc..

                    i would like to know how to populate session variables like:

                    session.ulink = dialog.ulink field
                    session.userid = dialog.userid field

                    i truly can't understand the write up...

                    Comment

                    Working...
                    X