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

embedded xdialog grid issue

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

    embedded xdialog grid issue

    I'm in the early stages of experimenting with grids in embedded xdialogs on desktop forms.I used action scripting to create some xdialog code. The only change I made to the Alpha generated code was to replace Alpha's
    varC_result = ui_dlg_box("Alpha Five",<<%dlg% with

    ui_modeless_dlg_box(dlgTitle,<<%dlg%.

    Itinitially works as advertised, but after exiting and reoping Alpha, when opening the form.it does not display the grid.Instead it gives the error message:
    Page not found for object:__hidden__testing_var_GridSettings.

    One of the Alpha geberated lines of code in the script is:
    dim global __hidden__testing_var_GridSettings.settings.a5wCode as c
    __hidden__testing_var_GridSettings.settings.a5wCode = <<%html%

    Any thoughts?
    John Zaleski

    #2
    Re: embedded xdialog grid issue

    I forgot to mention if I edit the xdialog object and preview it while editing it works again.
    John

    Comment


      #3
      Re: embedded xdialog grid issue

      Bump.I sure coulduse an answer on this. Alpha techs, are you listening ?
      John

      Comment


        #4
        Re: embedded xdialog grid issue

        John

        You've submitted a bug report?
        Al Buchholz
        Bookwood Systems, LTD
        Weekly QReportBuilder Webinars Thursday 1 pm CST

        Occam's Razor - KISS
        Normalize till it hurts - De-normalize till it works.
        Advice offered and questions asked in the spirit of learning how to fish is better than someone giving you a fish.
        When we triage a problem it is much easier to read sample systems than to read a mind.
        "Make it as simple as possible, but not simpler."
        Albert Einstein

        http://www.iadn.com/images/media/iadn_member.png

        Comment


          #5
          Re: embedded xdialog grid issue

          I agree with the send a bug report thought.

          Alpha techs, are you listening ?
          Probably not.

          The Alpha Software Message Board is a peer-supported online forum where users may request help from 3,000+ members.
          There can be only one.

          Comment


            #6
            Re: embedded xdialog grid issue

            Don't think it's a bug. What is the full code?

            Comment


              #7
              Re: embedded xdialog grid issue

              Al and Stan,
              I have not yet submitted a bug report, thinking I might have done something incorrectly.
              Gabriel here's the code on the embedded xdialog object on the form.As I mentioned earlier, it is code generated by Action scripting axcept for adding "modeless to the ui_dlg line.

              'Last Updated: 30-Jan-2010 04:06:19 PM
              'Created By : John
              'Updated By : John
              'Create an XDialog dialog box to prompt for parameters.
              DIM SHARED testing_var as C
              DIM SHARED varC_result as C
              dim global __hidden__testing_var_GridSettings.settings.a5wCode as c
              __hidden__testing_var_GridSettings.settings.a5wCode = <<%html%
              <%a5'A5SYSTEM
              %>
              <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
              <html>
              <head>
              <META HTTP-EQUIV="MSThemeCompatible" content="Yes"/>
              <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />

              <%a5
              'SYSTEM GENERATED COMMENT - PLEASE DO NOT REMOVE - Start Ajax1----------------------------------
              'Test to see if we are in an Ajax callback............................................................
              dim componentAlias as c
              'The componentAlias MUST be UNIQUE for each component on the page.
              'The componentAlias must not have any spaces in the name. Try to keep the componentAlias as short as possible.

              componentAlias = "GRID1"
              dim request.variables.__ajax as c = default ""
              dim request.variables.__formID as c = default ""
              'If it is an ajax callback for another component, then don't run this component.
              dim flagMustExecuteComponent as l = .t.
              if request.variables.__ajax = "true" then
              if word(request.variables.__formID,1,".") <> componentAlias then
              flagMustExecuteComponent = .f.
              end if
              end if
              'End test............................................................................................
              if flagMustExecuteComponent = .t. then
              Delete tmpl_GRID1
              DIM tmpl_GRID1 as P

              componentName = "C:\Program Files\a5V10\Samples\WebAppServerDemo\Web_Applications_Demo.WebProjects\Default.WebProject\zaleski_grid.a5wcmp"



              tmpl_GRID1 = a5w_load_component(componentName)

              'Following code allows you to override settings in the saved component.
              with tmpl_GRID1
              componentName = componentAlias

              EmbeddedMode = .t.
              componentPhysicalName = "C:\Program Files\a5V10\Samples\WebAppServerDemo\Web_Applications_Demo.WebProjects\Default.WebProject\zaleski_grid.a5wcmp"
              end with

              '=======================================compute the HTML for the Component=======================================
              delete x_GRID1
              dim x_GRID1 as p
              tmpl_GRID1.request = request
              tmpl_GRID1.session = session
              hourglass_cursor(.t.)
              x_GRID1 = a5_ajax_grid(tmpl_GRID1) 'SYSTEM GENERATED COMMENT - PLEASE DO NOT REMOVE (RUN:tmpl_GRID1)
              hourglass_cursor(.f.)

              'SYSTEM GENERATED COMMENT - PLEASE DO NOT REMOVE - Ajax2----------------------------------
              dim x_GRID1.IsAjaxResponse as l = default .f.
              if x_GRID1.IsAjaxResponse = .t. then
              'Discard any pending text in the output buffer.
              *output_rewind()
              ?x_GRID1.Ajaxresponse
              end
              end if
              '=============================================================================================================
              if x_GRID1.RedirectURL <> "" then
              response.redirect(x_GRID1.redirectURL)
              end
              end if
              end if 'end flagMustExecuteComponent test
              'SYSTEM GENERATED COMMENT - PLEASE DO NOT REMOVE - End Ajax1----------------------------------

              dim request.variables.__ajax as c = default ""
              'Only emit if not in an Ajax callback.
              if request.variables.__ajax = "" then
              ?x_GRID1.Output.Head.JavaScript
              ?x_GRID1.Output.Head.CSS_Link
              end if
              %>

              <script type="text/javascript">

              var $a = new Object();
              $a.simple = Class.create();
              $a.simple.prototype = {
              initialize: function(url,options){
              this.transport = this.getTransport();
              this.method = options.method || 'post';
              this.async = options.async || true;
              this.handleGeneric = options.handleGeneric || false;
              this.handleType = options.handleType || 'eval';
              this.handleContext = options.handleContext || false;
              if(this.handleGeneric == true){
              if(this.handleType == 'eval'){
              this.handle = $a._rh._eval;
              }
              } else{
              this.handle = options.handle || null;
              }
              this.errorHandle = options.errorHandle || options.handle;
              this.errorHandleContext = options.errorHandleContext || options.handleContext;
              this.data = options.data || '';
              this.fill = $(options.fill) || null;

              if(url.substr(0,6).toLowerCase() == 'a5res:') {
              this.url = url;
              } else {
              this.url = 'a5res:a5wobject/*a5wajax?'+url;
              }
              this.request();
              },
              request: function(){
              this.transport.open(this.method, this.url, this.async);
              var func = this.onChange;
              var context = this;
              this.transport.onreadystatechange = function(){
              return func.call(context);
              };
              if(this.method == 'post'){
              this.transport.setRequestHeader('Content-type', 'application/x-www-form-urlencoded; charset=UTF-8');
              if(this.transport.overrideMimeType){
              this.transport.setRequestHeader('Connection', 'close');
              // this fixes a problem with special characters - will want to update to make more flexible
              this.transport.overrideMimeType('text/html; charset=UTF-8');
              }
              }
              this.transport.send(this.data);
              },
              onChange: function(){
              if(this.transport.readyState == 4 && this.transport.status == 200){
              var func = this.handle;
              var funcContext = this.handleContext || func;
              var context = this;
              if(func) setTimeout(function(){ return func.call(funcContext,context.transport); },10);
              var obj = this.fill;
              if(obj) setTimeout(function(){ return $svs(obj,context.transport.responseText);},10);
              } else if(this.transport.readyState == 4 && this.transport.status != 200){
              var func = this.errorHandle;
              var funcContext = this.errorHandleContext || func;
              var context = this;
              if(func) setTimeout(function(){ return func.call(funcContext,context.transport); },10);
              var obj = this.fill;
              if(obj) setTimeout(function(){ return $svs(obj,context.transport.responseText);},10);
              }
              },
              getTransport: function(){
              if(window.ActiveXObject) return new ActiveXObject('Microsoft.XMLHTTP');
              else if (window.XMLHttpRequest) return new XMLHttpRequest();
              else return false;
              }
              }
              // response handle functions
              $a._rh = {
              _eval: function(obj){
              if(obj.responseText) eval(obj.responseText);
              }
              }
              </script>



              <title></title>
              <style type="text/css">

              </style>
              </head>

              <%a5 ?x_GRID1.Output.Body.Body_Tag %>



              <p><br>

              <input type="hidden" id="GRID1.CMD" value="" />
              <button style="display: none;"
              id="GRID1.CMDBTN"
              onclick="var cmd =$('GRID1.CMD').value; eval(cmd); return false;" ></button>

              <span style="display: none;"
              id="GRID1.CMDSPAN"></span>


              <table><!--Table enclosing Grid component-->
              <tr><!--Table row for Grid Search Part-->
              <td><!--Table cell for Grid Search Part (Will be blank if Grid uses a Master Layout Template)-->
              <%A5 ?x_GRID1.Output.Body.Search_HTML %></td><!--End table cell for Grid Search Part-->
              </tr><!--End table row for Grid Search Part-->
              <tr><!--Table row for Grid Part-->
              <td><%A5 ?x_GRID1.Output.Body.Grid_HTML %></td>
              </tr><!--End table row for Grid Part-->
              <tr><!--Table row for Grid Detail View Part-->
              <td><!--Table cell for Grid Detail View Part (Will be blank if Grid uses a Master Layout Template)-->
              <%A5 ?x_GRID1.Output.Body.DetailView_HTML %></td><!--End table cell for Grid Search Part-->
              </tr><!--End table row for Grid Search Part-->

              </table><!--End table enclosing Grid component--></p>

              <style type="text/css">
              html {overflow: auto;}
              </style>


              </body></html>
              %html%


              DIM testing_var as P
              dim testing_var.object as p
              dim testing_var.class as c
              testing_var.class = "shell.explorer"
              DIM testing_var_url as c
              testing_var_url = "a5res://a5wobject/__hidden__testing_var_GridSettings"
              ok_button_label = "&OK"
              cancel_button_label = "&Cancel"
              ui_modeless_dlg_box(dlgTitle,<<%dlg%
              {background=<Transparent>}
              {startup=init}
              {region}
              | {activex=100,40testing_var};
              {endregion};
              {line=1,0};
              {region}
              <*15=ok_button_label!OK> <15=cancel_button_label!CANCEL>
              {endregion};
              %dlg%,<<%code%
              if a_dlg_button = "init" then
              a_dlg_button = ""
              a_dlg_button = ""
              hourglass_cursor(.t.)
              if testing_var_url <> "" then
              testing_var.object.navigate(testing_var_url)
              on error goto 0
              end if
              hourglass_cursor(.f.)

              end if

              %code%)

              Comment


                #8
                Re: embedded xdialog grid issue

                Try this:
                Code:
                DIM SHARED testing_var as C
                DIM SHARED varC_result as C
                dim global __hidden__testing_var_GridSettings.settings.a5wCode as c
                __hidden__testing_var_GridSettings.settings.a5wCode = <<%html%
                <%a5'A5SYSTEM
                %>
                <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
                <html>
                <head>
                <META HTTP-EQUIV="MSThemeCompatible" content="Yes"/>
                <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
                
                <%a5
                'SYSTEM GENERATED COMMENT - PLEASE DO NOT REMOVE - Start Ajax1----------------------------------
                'Test to see if we are in an Ajax callback............................................................
                dim componentAlias as c
                'The componentAlias MUST be UNIQUE for each component on the page.
                'The componentAlias must not have any spaces in the name. Try to keep the componentAlias as short as possible.
                
                componentAlias = "GRID1"
                dim request.variables.__ajax as c = default ""
                dim request.variables.__formID as c = default ""
                'If it is an ajax callback for another component, then don't run this component.
                dim flagMustExecuteComponent as l = .t.
                if request.variables.__ajax = "true" then
                if word(request.variables.__formID,1,".") <> componentAlias then
                flagMustExecuteComponent = .f.
                end if
                end if
                'End test............................................................................................
                if flagMustExecuteComponent = .t. then
                Delete tmpl_GRID1
                DIM tmpl_GRID1 as P
                
                componentName = "C:\Program Files\a5V10\Samples\WebAppServerDemo\Web_Applications_Demo.WebProjects\Default.WebProject\zaleski_grid.a5wcmp"
                
                
                
                tmpl_GRID1 = a5w_load_component(componentName)
                
                'Following code allows you to override settings in the saved component.
                with tmpl_GRID1
                componentName = componentAlias
                
                EmbeddedMode = .t.
                componentPhysicalName = "C:\Program Files\a5V10\Samples\WebAppServerDemo\Web_Applications_Demo.WebProjects\Default.WebProject\zaleski_grid.a5wcmp"
                end with
                
                '=======================================compute the HTML for the Component=======================================
                delete x_GRID1
                dim x_GRID1 as p
                tmpl_GRID1.request = request
                tmpl_GRID1.session = session
                hourglass_cursor(.t.)
                x_GRID1 = a5_ajax_grid(tmpl_GRID1) 'SYSTEM GENERATED COMMENT - PLEASE DO NOT REMOVE (RUN:tmpl_GRID1)
                hourglass_cursor(.f.)
                
                'SYSTEM GENERATED COMMENT - PLEASE DO NOT REMOVE - Ajax2----------------------------------
                dim x_GRID1.IsAjaxResponse as l = default .f.
                if x_GRID1.IsAjaxResponse = .t. then
                'Discard any pending text in the output buffer.
                *output_rewind()
                ?x_GRID1.Ajaxresponse
                end
                end if
                '=============================================================================================================
                if x_GRID1.RedirectURL <> "" then
                response.redirect(x_GRID1.redirectURL)
                end
                end if
                end if 'end flagMustExecuteComponent test
                'SYSTEM GENERATED COMMENT - PLEASE DO NOT REMOVE - End Ajax1----------------------------------
                
                dim request.variables.__ajax as c = default ""
                'Only emit if not in an Ajax callback.
                if request.variables.__ajax = "" then
                ?x_GRID1.Output.Head.JavaScript
                ?x_GRID1.Output.Head.CSS_Link
                end if
                %>
                
                <script type="text/javascript">
                
                var $a = new Object();
                $a.simple = Class.create();
                $a.simple.prototype = {
                initialize: function(url,options){
                this.transport = this.getTransport();
                this.method = options.method || 'post';
                this.async = options.async || true;
                this.handleGeneric = options.handleGeneric || false;
                this.handleType = options.handleType || 'eval';
                this.handleContext = options.handleContext || false;
                if(this.handleGeneric == true){
                if(this.handleType == 'eval'){
                this.handle = $a._rh._eval;
                }
                } else{
                this.handle = options.handle || null;
                }
                this.errorHandle = options.errorHandle || options.handle;
                this.errorHandleContext = options.errorHandleContext || options.handleContext;
                this.data = options.data || '';
                this.fill = $(options.fill) || null;
                
                if(url.substr(0,6).toLowerCase() == 'a5res:') {
                this.url = url;
                } else {
                this.url = 'a5res:a5wobject/*a5wajax?'+url;
                }
                this.request();
                },
                request: function(){
                this.transport.open(this.method, this.url, this.async);
                var func = this.onChange;
                var context = this;
                this.transport.onreadystatechange = function(){
                return func.call(context);
                };
                if(this.method == 'post'){
                this.transport.setRequestHeader('Content-type', 'application/x-www-form-urlencoded; charset=UTF-8');
                if(this.transport.overrideMimeType){
                this.transport.setRequestHeader('Connection', 'close');
                // this fixes a problem with special characters - will want to update to make more flexible
                this.transport.overrideMimeType('text/html; charset=UTF-8');
                }
                }
                this.transport.send(this.data);
                },
                onChange: function(){
                if(this.transport.readyState == 4 && this.transport.status == 200){
                var func = this.handle;
                var funcContext = this.handleContext || func;
                var context = this;
                if(func) setTimeout(function(){ return func.call(funcContext,context.transport); },10);
                var obj = this.fill;
                if(obj) setTimeout(function(){ return $svs(obj,context.transport.responseText);},10);
                } else if(this.transport.readyState == 4 && this.transport.status != 200){
                var func = this.errorHandle;
                var funcContext = this.errorHandleContext || func;
                var context = this;
                if(func) setTimeout(function(){ return func.call(funcContext,context.transport); },10);
                var obj = this.fill;
                if(obj) setTimeout(function(){ return $svs(obj,context.transport.responseText);},10);
                }
                },
                getTransport: function(){
                if(window.ActiveXObject) return new ActiveXObject('Microsoft.XMLHTTP');
                else if (window.XMLHttpRequest) return new XMLHttpRequest();
                else return false;
                }
                }
                // response handle functions
                $a._rh = {
                _eval: function(obj){
                if(obj.responseText) eval(obj.responseText);
                }
                }
                </script>
                
                
                
                <title></title>
                <style type="text/css">
                
                </style>
                </head>
                
                <%a5 ?x_GRID1.Output.Body.Body_Tag %>
                
                
                
                <p><br>
                
                <input type="hidden" id="GRID1.CMD" value="" />
                <button style="display: none;"
                id="GRID1.CMDBTN"
                onclick="var cmd =$('GRID1.CMD').value; eval(cmd); return false;" ></button>
                
                <span style="display: none;"
                id="GRID1.CMDSPAN"></span>
                
                
                <table><!--Table enclosing Grid component-->
                <tr><!--Table row for Grid Search Part-->
                <td><!--Table cell for Grid Search Part (Will be blank if Grid uses a Master Layout Template)-->
                <%A5 ?x_GRID1.Output.Body.Search_HTML %></td><!--End table cell for Grid Search Part-->
                </tr><!--End table row for Grid Search Part-->
                <tr><!--Table row for Grid Part-->
                <td><%A5 ?x_GRID1.Output.Body.Grid_HTML %></td>
                </tr><!--End table row for Grid Part-->
                <tr><!--Table row for Grid Detail View Part-->
                <td><!--Table cell for Grid Detail View Part (Will be blank if Grid uses a Master Layout Template)-->
                <%A5 ?x_GRID1.Output.Body.DetailView_HTML %></td><!--End table cell for Grid Search Part-->
                </tr><!--End table row for Grid Search Part-->
                
                </table><!--End table enclosing Grid component--></p>
                
                <style type="text/css">
                html {overflow: auto;}
                </style>
                
                
                </body></html>
                %html%
                
                
                DIM testing_var as P
                dim testing_var.object as p
                dim testing_var.class as c
                testing_var.class = "shell.explorer"
                DIM testing_var_url as c
                testing_var_url = "a5res://a5wobject/__hidden__testing_var_GridSettings"
                ok_button_label = "&OK"
                cancel_button_label = "&Cancel"
                ui_modeless_dlg_box(dlgTitle,<<%dlg%
                {background=<Transparent>}
                {startup=init}
                {region}
                | {activex=100,40testing_var};
                {endregion};
                {line=1,0};
                {region}
                <*15=ok_button_label!OK> <15=cancel_button_label!CANCEL>
                {endregion};
                %dlg%,<<%code%
                if a_dlg_button = "init" then
                hourglass_cursor(.t.)
                if testing_var_url <> "" then
                testing_var.object.navigate(testing_var_url)
                on error goto 0
                end if
                hourglass_cursor(.f.)
                end if
                %code%)

                Comment


                  #9
                  Re: embedded xdialog grid issue

                  I'd like to coclude this thread with the following comments.Thanks to those who responded.
                  To anyone who had an interest in this matter let me wrap it up. After posting a bug report, Selwyn informed me at this time using embedded xdialog with grids on a desktop form is not documented or supported .He did mention that they are adding this feature with a friendly genie as a part of a future purchasable value pack, not as a part of a free patch.So I will cease all efforts to incorporate grids on forms in place of browses and wait for the valuepack to be released.
                  John Zaleski

                  Comment


                    #10
                    Re: embedded xdialog grid issue

                    Gabe,
                    Thanks for your efforts.Your code did not work either.
                    I have put this issue to bed, see my previous post.
                    John

                    Comment

                    Working...
                    X