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

setValue not really working

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

  • setValue not really working

    Hi!

    I have a month and a year label as well as a back and a next button in my dialog.
    When clicking the back button the whole thing should change to one month earlier. This works exactly one time for me. If I click a second time on "back" the month and year stays the same. So I added alerts to see what data my JS retrieved. And with each click it always gets the same value with "getValue" although if I do a "getValue" at the end of the function it does have the new value and the UI shows the correct value aswell. Here is the code for the onClickEvent of back button:

    Code:
    var oldMonth = {dialog.Object}.getValue('Month');
    var newMonth = parseInt(oldMonth) -1;
    var oldYear = {dialog.Object}.getValue('Year');
    var newYear = oldYear;
    
    alert('oldMonth: ' + oldMonth);
    
    if (newMonth<1){
    	newMonth = 12;
    	newYear = parseInt(oldYear) - 1;
    }
    
    {dialog.Object}.setValue('Month',newMonth);
    {dialog.Object}.setValue('Year',newYear);
    
    alert('newMonth: ' +newMonth+' newYear: ' +newYear);
    Why does the onClick Event always get the original value instead of the newValue which is shown on the UI?
    Thank you!

  • #2
    Re: setValue not really working

    you would need to send alpha a test case so we could look at it.

    .getValue() reads the value of the control from one of two places:
    a) from the originalValues[] array in the dialog object (if the dialog is not dirty)
    or
    b) from the control itself, if the control is dirty.

    so, this suggest that for some reason, a5 is reading the value from the originalValues[] array in the dialog object and the originalValues[] array does not have the value in it that you expected it to have.
    this could be the result of some other javascript you have previously executed - won't know till we see your component.

    having said all of this, you don't have to use .getValue() to get a control value.
    you can drop down a level in your Javascript, and instead, use the $gvs() function from the alpha five javascript library. $gvs() - short for 'get value single' is a low level function that takes a fully qualified id.

    so, to read the value of the lastname field, you would say

    var ln = $gvs('{dialog.componentname}.V.R1.LASTNAME');

    Comment


    • #3
      Re: setValue not really working

      I saw that the possibility to embed dialogs in dialogs permits to define controls having the same ID on the same page. And in this case, the getValue and setValue methods works weirdly, particularly if you defined some automation to these elements (on click or on change events, one field "watching" another, etc). I suppose it is very logical from a Javascript point of view but it can be indeed confusing if you design complex pages and you "forget" one Id was already defined previously in another component. I hope it helps ...

      Comment


      • #4
        Re: setValue not really working

        Originally posted by Jowell View Post
        I saw that the possibility to embed dialogs in dialogs permits to define controls having the same ID on the same page. And in this case, the getValue and setValue methods works weirdly, particularly if you defined some automation to these elements (on click or on change events, one field "watching" another, etc). I suppose it is very logical from a Javascript point of view but it can be indeed confusing if you design complex pages and you "forget" one Id was already defined previously in another component. I hope it helps ...
        actually, it does not. that's because the control id includes the alias name in it.
        so, if you have a control called 'alpha' and you look at the id of the control you will see that the control id is something like this:

        DLG1.V.R1.ALPHA

        where 'DLG1' is the alias of the component.

        if you then embed another dialog into this dialog and this dialog also has a control called 'ALPHA', the id of that control will end up being something like this:


        DLG1_DIALOG2_124856NVSF.V.R1.ALPHA

        where DIALOG2_124856NVSF is the alias of the embedded dialog (assuming you left the alias at <DefaultAlias> when you embedded the dialog.

        if you set an explicit alias for the embedded dialog (e.g. MYDLG2), then the second 'alpha' will have an Id of

        DLG1_MYDLG2.V.R1.ALPHA


        alpha file will NOT, but default, create controls with conflicting IDs.

        Comment


        • #5
          Re: setValue not really working

          I made a quick video to show the behaviour I was talking about. See http://screencast.com/t/YUrjM8pYDx

          Let's have a first grid containing a checkbox with an Id (I should better say a variable name) defined as 'checkbox1'. I then create a grid containing another checkbox with the same variable name ('checkbox1'). I embed the second grid in the first one and I create an 'on change' event where I display the value of the checkbox in the first grid.

          Look at the video (I also included here the two components), and the clicking on the second checkbox has an influence on the getValue method for the first checkbox ...
          If I further rename my second checkbox, the problem dissappears.

          Well I don't know if it is a bug (I used build 2357-3858, note that it is a pre-release update) ? Maybe I missed something ? Is it normal ?

          BUG5.a5wcmpBUG6.a5wcmp

          Comment


          • #6
            Re: setValue not really working

            I see what you are talking about now. This issue would be particular to checkbox and radio button controls.

            The issue you are seeing would NOT happen with other control types.

            These control types (checkbox and radio buttons) present a special challenge because there can be many checkboxes or radio buttons in a given 'control group'.

            in your case, you have selected a Logical Checkbox, which only has a single box. But in the more general case, a checkbox control can have many boxes (e.g. one for 'red', 'green' 'blue' etc)
            similarly, a radio button control has many radio buttons. (one for each choice).

            each checkbox or radio button has its own unique ID. so getValue(). however, all of the controls in the same 'group' have the same name.

            so, when you use .getValue() on a checkbox, it does not look at the control ID, it looks at the control name and then extracts the values from all of the controls that have the same name.

            so, if you have a checkbox control with choices of red, green and blue. if the user has checked green and blue and you use getValue(), you get green and blue (two values) as the value, because a5 has read the value from each element in the control group.

            so, to summarize, getValue() uses the element name, not the element ID in the case of checkbox and radio button controls.

            element Names, unlike element IDs are NOT qualified with the component alias.

            therefore when you have more than one control on the page with the same name, as you do in your example, there is the potential for confusion.

            in this case, you would have to use a lower level javascript commands to read the value of the control using its unique ID.

            Comment


            • #7
              Re: setValue not really working

              Hi Selwyn,

              Thank you! Your solution with var ln = $gvs('{dialog.componentname}.V.R1.LASTNAME'); works for me. Here is the Component so you can see the Problem I was having with the getValue method.
              TestGetValue.zip
              Thanks also to Jowell but in this case I did not have to controls with the same ID but I will keep it in mind.
              Maybe one of you could help me along a little further: So after I set the value of various controls I do not want the dialog to think it is dirty. I want it to think all the new values are its default values and later on be able to find them under e.oldDataSubmitted. What would the JS for this be? See also http://msgboard.alphasoftware.com/al...402#post595402

              Thanks you for your help!

              Comment


              • #8
                Re: setValue not really working

                Hi again,

                concerning my last post: I additionally have the problem with e.dataSubmitted. Although I had changed the value of the label, when I click the submit button and have a look at e.dataSubmitted.Month I still get the original value and not the new value I had set in JS with setValue(). so how can I make this work? I noticed If I only set the value of the label the dialog does not think it’s dirty and maybe therefore does not contain the altered value in e.dataSubmitted.
                You can test this through adding a submit button to above attached component.

                As well I noticed the same issue of the value not changing when I set the Enable expression in the client side properties of the button. The butten would be always disabled in my case asthe enable expression can never be fullfilled as the month and year values do not change if I use the "Insert Field" otion to use them in an expression like if( Year <2012,true,false)

                I would be very grateful If you could help me to get this work.
                Thank you!
                Last edited by gamma; 01-16-2012, 08:03 AM.

                Comment


                • #9
                  Re: setValue not really working

                  Originally posted by gamma View Post
                  Hi Selwyn,

                  Thank you! Your solution with var ln = $gvs('{dialog.componentname}.V.R1.LASTNAME'); works for me. Here is the Component so you can see the Problem I was having with the getValue method.
                  [ATTACH]30530[/ATTACH]
                  Thanks also to Jowell but in this case I did not have to controls with the same ID but I will keep it in mind.
                  Maybe one of you could help me along a little further: So after I set the value of various controls I do not want the dialog to think it is dirty. I want it to think all the new values are its default values and later on be able to find them under e.oldDataSubmitted. What would the JS for this be? See also http://msgboard.alphasoftware.com/al...402#post595402

                  Thanks you for your help!
                  if you look at the javascript generated when you use the server side actions to populate the dialog with data, you will see that the code that gets executed on the client side uses the .populate() method to set the values of controls on the dialog. you will also see the .populate() method discussed if you define an custom ajax callback and you ask a5 to generate the function prototype. the function prototype discusses the .populate() method in the comments.

                  so, if you wan to set the value in controls and have these values become the new values for the the dialog's 'original' values, you could use code like this:




                  var _d = {};
                  _d.ALPHA = 'this is alpha';
                  _d.BETA = 'this is beta';
                  {dialog.object}.populate(_d);
                  {dialog.object}.refreshClientSideComputations();


                  this code sets the value of two controls, alpha and beta

                  another form of the syntax (javascript syntax, not a5 syntax) would be:


                  var _d = {};
                  _d['ALPHA'] = 'this is alpha';
                  _d['BETA'] = 'this is beta';
                  {dialog.object}.populate(_d);
                  {dialog.object}.refreshClientSideComputations();

                  after the .populate() method the dialog is now 'clean' and the values that were set are the new 'original values' of the dialog. (so if you clicked the dialog reset button after making additional edits, the dialog would return to these values).

                  .populate() has some optional parameters to control if the dialog is set to clean after populating, and if the onChange events on the controls should fire when their value is set.

                  for example:

                  var _d = {};
                  _d.ALPHA = 'this is alpha';
                  _d.BETA = 'this is beta';
                  {dialog.object}.populate(_d,1,flagSetDialogClean,flagFireChangeEvents);
                  {dialog.object}.refreshClientSideComputations();

                  Comment


                  • #10
                    Re: setValue not really working

                    Originally posted by gamma View Post
                    Hi again,

                    concerning my last post: I additionally have the problem with e.dataSubmitted. Although I had changed the value of the label, when I click the submit button and have a look at e.dataSubmitted.Month I still get the original value and not the new value I had set in JS with setValue(). so how can I make this work? I noticed If I only set the value of the label the dialog does not think it’s dirty and maybe therefore does not contain the altered value in e.dataSubmitted.
                    You can test this through adding a submit button to above attached component.

                    As well I noticed the same issue of the value not changing when I set the Enable expression in the client side properties of the button. The butten would be always disabled in my case asthe enable expression can never be fullfilled as the month and year values do not change if I use the "Insert Field" otion to use them in an expression like if( Year <2012,true,false)

                    I would be very grateful If you could help me to get this work.
                    Thank you!
                    i don't understand the question. i suggest that you create a video to help explain the question and include a sample dialog that someone can actually run.

                    Comment


                    • #11
                      Re: setValue not really working

                      Hi Selwyn,

                      Thank you very much for the lovely explanation in your first post yesterday. I had used the {dialog.object}.populate(_d);
                      but had not known about {dialog.object}.refreshClientSideComputations();
                      I hope this will do the trick. But after installing yesterdays patch Build 2365_3859. I am having a error while populating my repeating section. I will try to reproduce the error in a simpler dialog and if I do I will send you that component. UDATE: changing the code to your example in post#9 solved the error.Thank you.

                      But first I want to get to your second post:
                      I Currently cannot create a video so here is hopefully a better step by step explanation.
                      here is a test component I created to show the problem:TestDataSubmitted_20120117.zip
                      Here is what the test dialog looks like: A5_setValue_20120117.JPG

                      So we have a label which shows the current month and one that shows the current year.
                      A back button which should change the values of the label to the previous month and a next button to change the label values to the next month.
                      A textbox in order to enter a value to make the dialog dirty.

                      Here are the problems I am having:

                      1. For this one you already provided a workaround but for sake of completeness and because the issues may all be related here is the issue again:
                      The onClick() event contains following code:
                      Code:
                      var oldMonth = {dialog.Object}.getValue('Month');
                      var newMonth = parseInt(oldMonth) + 1;
                      var oldYear = {dialog.Object}.getValue('Year');
                      var newYear = oldYear;
                      alert('oldMonth: ' + oldMonth);
                      
                      if (newMonth>11){
                      	newMonth = 1;
                      	newYear = parseInt(oldYear) + 1;
                      }
                      alert('newMonth: ' +newMonth+' newYear: ' +newYear);
                      {dialog.Object}.setValue('Month',newMonth);
                      {dialog.Object}.setValue('Year',newYear);

                      When clicking on the next button the value of the labels Month(1) and year(2012) are retrieved and the new value for these controls calculated and set with set value.
                      The preview shows now a month value of "2" and a Year of "2012".
                      Clicking the next button again you will see that getValue does not retrieve the currently shown month value of "2" but rather the initial value of "1".
                      For this you provided a workaround using " $gvs('{dialog.componentname}.V.R1.MONTH');" instead of getValue. This I implemented in the "Back" button and it solves that issue so far.

                      2. Changing the label values with the back or next button does not make the dialog dirty (setValue). You can see this as the submit button is still disabled. This may be a feature, one may want it dirty, but I am thinking this may be connected to my 3rd issue.

                      3. Incorrect value in e.dataSubmitted:
                      • Go to Working preview. There is a debug(1) break in the afterDialogValidate Event.
                      • First hit the back button so you can see a month value of 12 and a year value of 2011.
                      • In order to make this dialog dirty please enter any value in the textbox e.g. "2".
                      • The submit button will be enabled.
                      • Click on the Submit button the XBASIC debugger will open.
                      • enter "e.dataSubmitted" you will see "e.dataSubmitted := {MONTH=1,YEAR=2012,TEXTBOX1=2}" instead of what I would expect MONTH=12,YEAR=2011

                      4. When I then set an simple "enable expression in the client properties of the next button like "if( Year <2012,true,false)" This button will never be enabled as it always thinks the year is "2012"
                      Ok, So I hope this explains better what I mean.
                      Thank you for your help!
                      Last edited by gamma; 01-17-2012, 09:57 AM. Reason: added 4.

                      Comment


                      • #12
                        Re: setValue not really working

                        Hi Selwyn,

                        I have another question concerning your post #9.
                        After clicking on the submit button I process the insert and updates in the server side Event "afterDialogValidate". I want that after the event is finished all data now is in e.oldDataSubmitted. so when the user enters some more data and clicks submit again I only find the fields dirty the user changed since the first submit.
                        I tried adding
                        Code:
                        {dialog.object}.refreshClientSideComputations();
                        in the client side event "afterValidate" but that did not help. In
                        Code:
                        e.repeatingSectionInfo["CONTAINER_1"].dirtyFieldsInSection
                        I always find all fields dirty the user has changed since the first time he opend the Window. is there anything similar to "{dialog.object}.refreshClientSideComputations();" I can use in XBASIC in the afterDialogValidate Server side event in order to achieve the same thing?
                        Thank you!!

                        Comment


                        • #13
                          Re: setValue not really working

                          Originally posted by gamma View Post
                          Hi!

                          I have a month and a year label as well as a back and a next button in my dialog.
                          When clicking the back button the whole thing should change to one month earlier. This works exactly one time for me. If I click a second time on "back" the month and year stays the same. So I added alerts to see what data my JS retrieved. And with each click it always gets the same value with "getValue" although if I do a "getValue" at the end of the function it does have the new value and the UI shows the correct value aswell. Here is the code for the onClickEvent of back button:

                          Code:
                          var oldMonth = {dialog.Object}.getValue('Month');
                          var newMonth = parseInt(oldMonth) -1;
                          var oldYear = {dialog.Object}.getValue('Year');
                          var newYear = oldYear;
                          
                          alert('oldMonth: ' + oldMonth);
                          
                          if (newMonth<1){
                          	newMonth = 12;
                          	newYear = parseInt(oldYear) - 1;
                          }
                          
                          {dialog.Object}.setValue('Month',newMonth);
                          {dialog.Object}.setValue('Year',newYear);
                          
                          alert('newMonth: ' +newMonth+' newYear: ' +newYear);
                          Why does the onClick Event always get the original value instead of the newValue which is shown on the UI?
                          Thank you!
                          In my previous post on this issue I explained why the .getValue() and .setValue() Dialog methods would fail if you used them on Radio Button or Checkbox controls AND you had an embedded Dialog which had Radio Button or Checkbox controls OF THE SAME NAME as controls on the parent Dialog.

                          For example, if your parent and child Dialog both had a control called 'Colors' which was configured as a checkbox.

                          This issue has now been fixed in the latest pre-release build.

                          Last Updated - Jan-17-2012 (Build 2367-3860)

                          Comment


                          • #14
                            Re: setValue not really working

                            Hi Selwyn,

                            Thank you for the info on the new update. I do not have any embedded dialog/grids or controls with the same name in my thread example nor currently in any other Dialog for that matter. I will keep it in mind. I guess you wanted to quote Jowells post #5 instead of my initial one. Thank you for fixing the issue!

                            Comment


                            • #15
                              Re: setValue not really working

                              Originally posted by gamma View Post
                              Hi Selwyn,

                              Thank you very much for the lovely explanation in your first post yesterday. I had used the {dialog.object}.populate(_d);
                              but had not known about {dialog.object}.refreshClientSideComputations();
                              I hope this will do the trick. But after installing yesterdays patch Build 2365_3859. I am having a error while populating my repeating section. I will try to reproduce the error in a simpler dialog and if I do I will send you that component. UDATE: changing the code to your example in post#9 solved the error.Thank you.

                              But first I want to get to your second post:
                              I Currently cannot create a video so here is hopefully a better step by step explanation.
                              here is a test component I created to show the problem:[ATTACH]30540[/ATTACH]
                              Here is what the test dialog looks like: [ATTACH=CONFIG]30541[/ATTACH]

                              So we have a label which shows the current month and one that shows the current year.
                              A back button which should change the values of the label to the previous month and a next button to change the label values to the next month.
                              A textbox in order to enter a value to make the dialog dirty.

                              Here are the problems I am having:

                              1. For this one you already provided a workaround but for sake of completeness and because the issues may all be related here is the issue again:
                              The onClick() event contains following code:
                              Code:
                              var oldMonth = {dialog.Object}.getValue('Month');
                              var newMonth = parseInt(oldMonth) + 1;
                              var oldYear = {dialog.Object}.getValue('Year');
                              var newYear = oldYear;
                              alert('oldMonth: ' + oldMonth);
                              
                              if (newMonth>11){
                              	newMonth = 1;
                              	newYear = parseInt(oldYear) + 1;
                              }
                              alert('newMonth: ' +newMonth+' newYear: ' +newYear);
                              {dialog.Object}.setValue('Month',newMonth);
                              {dialog.Object}.setValue('Year',newYear);

                              When clicking on the next button the value of the labels Month(1) and year(2012) are retrieved and the new value for these controls calculated and set with set value.
                              The preview shows now a month value of "2" and a Year of "2012".
                              Clicking the next button again you will see that getValue does not retrieve the currently shown month value of "2" but rather the initial value of "1".
                              For this you provided a workaround using " $gvs('{dialog.componentname}.V.R1.MONTH');" instead of getValue. This I implemented in the "Back" button and it solves that issue so far.

                              2. Changing the label values with the back or next button does not make the dialog dirty (setValue). You can see this as the submit button is still disabled. This may be a feature, one may want it dirty, but I am thinking this may be connected to my 3rd issue.

                              3. Incorrect value in e.dataSubmitted:
                              • Go to Working preview. There is a debug(1) break in the afterDialogValidate Event.
                              • First hit the back button so you can see a month value of 12 and a year value of 2011.
                              • In order to make this dialog dirty please enter any value in the textbox e.g. "2".
                              • The submit button will be enabled.
                              • Click on the Submit button the XBASIC debugger will open.
                              • enter "e.dataSubmitted" you will see "e.dataSubmitted := {MONTH=1,YEAR=2012,TEXTBOX1=2}" instead of what I would expect MONTH=12,YEAR=2011

                              4. When I then set an simple "enable expression in the client properties of the next button like "if( Year <2012,true,false)" This button will never be enabled as it always thinks the year is "2012"
                              Ok, So I hope this explains better what I mean.
                              Thank you for your help!
                              try changing your two label controls to textbox controls. you will find that your dialog then works.

                              you are assuming that the label control acts like other 'input' controls (textbox, text area, dropdown, checkbox, radio button, etc.) it does not. it was assumed that the values in the label control would be static.

                              i will look into what would be required to give the 'label' the same behavior as the editable controls.

                              in the mean time, you can either convert the labels to input controls and then style them so that they look like labels.
                              or put two additional control with a control type of 'hidden' on the dialog. when you set the value of the label controls, also set the value of the corresponding hidden control.
                              when you submit, look at the submitted value of the hidden control, not the label control.

                              Postscript:

                              After further reflection, the way that the Dialog works now is correct and should not be changed.
                              Label controls are inherently different from input controls in that an input control can be 'dirty' (since by definition you can type into it and make it dirty),
                              but a Label control is NEVER dirty. (i.e. using .setValue() on a Label control does NOT make it dirty).

                              because a label control is NEVER dirty, the getValue() method always reads the label's value from the Dialog object's initialValues[] array.
                              so if you want to read the current value of a label (after its value had been changed with a setValue(), you would have to read the value directly from the control - using $gvs())


                              so, my suggestion of making the Label control into a Textbox, and then styling the textbox so that it looks like a label is the best solution.

                              here is how you can make a textbox look like a label. set the style property to:

                              background-color: transparent;
                              background-image: url(none);
                              border-style: none;
                              Last edited by Selwyn Rabins; 01-17-2012, 11:05 AM. Reason: more information

                              Comment

                              Working...
                              X