Alpha Video Training
Results 1 to 15 of 15

Thread: List Control Fill container & Client-side Show/hide expression

  1. #1
    Member
    Real Name
    Joe Lavely
    Join Date
    Jun 2013
    Posts
    463

    Default List Control Fill container & Client-side Show/hide expression

    Build 6232_5386

    I am attempting to use the Fill container property of a list control, while also using a client-side show/hide expression for the same list control.

    A sample UX is attached.
    It has a simple list control using sample static text. The list is inside a container.
    There is a text control named ShowHide, and a button to toggles the value of the ShowHide control to "Show" or blank.
    The client-side show/hide expression in the list control is: ShowHide = 'Show'
    Initially the Fill container property is unchecked.

    Run the UX as is and it works as expected. The list is rendered and it is hidden or shown when the Toggle Show/Hide button is clicked.

    Next, in the list control field properties, check the Fill container checkbox. Now the list populates but Toggle Show/Hide button has no effect.

    So I thought I could use the same show/hide expression in the container instead of the list control.
    I removed the show/hide expression from the list control and put the same expression in the show/hide expression in the container.
    Now the Toggle Show/Hide button works but the list populates the header only. No rows are populated.

    TestListShowHide.zip

  2. #2
    "Certified" Alphaholic CharlesParker's Avatar
    Real Name
    Charles Parker
    Join Date
    Dec 2012
    Location
    New Orleans, LA
    Posts
    2,121

    Default Re: List Control Fill container & Client-side Show/hide expression

    without looking at it, my guess is that there is a different container wrapping the list control. Use dev tools in chrome to find it and add the same same code to toggle it referencing the additional container.
    NWCOPRO: Nuisance Wildlife Control Software My Application: http://www.nwcopro.com "Without forgetting, we would have no memory at all...now what was I saying?"

  3. #3
    Member
    Real Name
    Joe Lavely
    Join Date
    Jun 2013
    Posts
    463

    Default Re: List Control Fill container & Client-side Show/hide expression

    I can go after the container like this.

    Code:
    $('DLG1.V.R1.CONTAINER_1').style.display='none';
    $('DLG1.V.R1.CONTAINER_1').style.display='inline';
    But it should be easier.

  4. #4
    "Certified" Alphaholic peteconway's Avatar
    Real Name
    Peter Conway
    Join Date
    Oct 2005
    Location
    Melbourne, Australia
    Posts
    2,640

    Default Re: List Control Fill container & Client-side Show/hide expression

    Two options I use are.

    Add a specific List Refresh
    var _x = {dialog.Object}.getValue('ShowHide');
    if(_x == '') {
    {dialog.Object}.setValue('ShowHide','Show');
    }
    else if(_x == 'Show') {
    {dialog.object}.refreshListData('LIST1');
    {dialog.Object}.setValue('ShowHide','');
    }
    or a parent container as placeholder for the child (list) to perform the show/hide, without clearing the data as a result of the hide instruction.

    Capture_ShowHide.PNG

    Cheers Pete
    Insanity: doing the same thing over and over again and expecting different results.
    Albert Einstein, (attributed)
    US (German-born) physicist (1879 - 1955)

  5. #5
    "Certified" Alphaholic
    Real Name
    David Kates
    Join Date
    Apr 2008
    Location
    Unionville, ON
    Posts
    7,757

    Default Re: List Control Fill container & Client-side Show/hide expression

    Leave the Show/Hide expression on both the List control and the Container. Now you should get the results you want.

    This looks like a bug. If you take the expression off the List control (keeping it on the Container) and render the component... and then "show" the List... you will see only the header, as you've reported. Now, resize the browser window... or Inspect the page. Or... if you are already inspecting the page, adjust the Inspection window a bit. You'll find the List now displays.

    You should report this.

  6. #6
    Member
    Real Name
    Joe Lavely
    Join Date
    Jun 2013
    Posts
    463

    Default Re: List Control Fill container & Client-side Show/hide expression

    I never thought to try putting the Show/Hide expression on both the List control and the Container. It kinda makes sense.

    I will send a bug report.

    Thanks again David.

  7. #7
    "Certified" Alphaholic CharlesParker's Avatar
    Real Name
    Charles Parker
    Join Date
    Dec 2012
    Location
    New Orleans, LA
    Posts
    2,121

    Default Re: List Control Fill container & Client-side Show/hide expression

    I really think it comes down to a timing issue on the rendering or "paint" as I have seen a similar issue with panel footers wherein it will show correctly on resizing of the window. Either way, it's a great conversation and perhaps you'll clear up a timing issue that deals with this as well.
    NWCOPRO: Nuisance Wildlife Control Software My Application: http://www.nwcopro.com "Without forgetting, we would have no memory at all...now what was I saying?"

  8. #8
    "Certified" Alphaholic
    Real Name
    David Kates
    Join Date
    Apr 2008
    Location
    Unionville, ON
    Posts
    7,757

    Default Re: List Control Fill container & Client-side Show/hide expression

    What was the result of the bug report you sent regarding the panel footers?

  9. #9
    Member
    Real Name
    Joe Lavely
    Join Date
    Jun 2013
    Posts
    463

    Default Re: List Control Fill container & Client-side Show/hide expression

    I sent a bug report yesterday.

    Selwyn's response:
    put your show/hide on the container and it will work as expected.
    i have changed the help text for the show/hide expression

    Pic.png

    Me:
    Actually, if the Show/Hide expression is in both the list control and the container, it behaves correctly. So saying that you cannot use a Show/Hide expression might be overshooting the mark.

    Selwyn:
    the show/hide in the List does nothing. it is only working because you have a show hide on the container.

    Me:
    What I am seeing in my test UX is that with the Show/Hide expression on the container and not on the list, is when the list is initially shown, the header displays, but not the rows. Resizing the browser causes the rows to display.
    I have tested in Chrome and Edge with the same result.

    Selwyn:
    if it is a columnar list, then you have to call the list's refresh() method. if it is a free-form, then you don't have to do anything.


    That is where the emails ended. The last message about using list's refresh() method is the key. It causes the list to render correctly.

    Interesting that the refresh() method is only needed for columnar list.

    I am wondering what event is best to use to fire the refresh(). If I use the onChange event of the ShowHide control, it requires a timeout, but it works.

  10. #10
    "Certified" Alphaholic
    Real Name
    David Kates
    Join Date
    Apr 2008
    Location
    Unionville, ON
    Posts
    7,757

    Default Re: List Control Fill container & Client-side Show/hide expression

    Like I said... it's a bug... but now it's a bug that Selwyn won't fix. There's no indication anywhere that would lead to the conclusion that a Refresh() is required on a columnar List. And, you're right, a setTimeout is required. I'm afraid you got a half thought out, half answer. Did you send the component with the bug report?

    Sorry, not a bug, an unintended, undocumented behaviour. I'm shaking my head again.

    Why does it work when the expression is placed on both the Container and the List? I'll bet there's a Refresh() going on in there somewhere.
    Why does he say it will work only on the Container... when clearly it doesn't?

    I would suggest leaving the expression on the List... because it works... but... I wouldn't be surprised if Selwyn added code to disable a List Client Show/Hide expression.

    Further, if the List Client Side Show/Hide Expression property has no effect... why does it show up in the property list?

    It's this kind of stuff that kills the Rapid in Rapid Development. Any time you save elsewhere is sucked dry by these bugs.

    Finally, check your console... are you seeing the 26 console errors I'm seeing?

  11. #11
    "Certified" Alphaholic mikeallenbrown's Avatar
    Real Name
    Mike Brown
    Join Date
    Nov 2009
    Location
    United States
    Posts
    1,879

    Default Re: List Control Fill container & Client-side Show/hide expression

    I've become accustomed to using the lists's resize() method when ever I encounter list rendering issues. It's always worked out for my instances. I attached a sample component.

    I set the container show/hide to false (list's show/hide remains empty). The list to fill that container. The button now toggles the display of the container then fires the resize().
    Attached Files Attached Files
    Mike Brown - Contact Me
    Programmatic Technologies, LLC
    Programmatic-Technologies.com
    Independent Developer & Consultant

  12. #12
    Member
    Real Name
    Joe Lavely
    Join Date
    Jun 2013
    Posts
    463

    Default Re: List Control Fill container & Client-side Show/hide expression

    Yes I did send the component with the bug report. I suspect that Selwyn may not have looked at the component.

    And I am seeing console errors.

    Mike - I will definitely look at your sample. I seem to have list rendering issues that have cropped up recently.

  13. #13
    "Certified" Alphaholic
    Real Name
    David Kates
    Join Date
    Apr 2008
    Location
    Unionville, ON
    Posts
    7,757

    Default Re: List Control Fill container & Client-side Show/hide expression

    Not surprised. It seems Alpha is paying as much attention to bug reports as to internal quality control and testing.

  14. #14
    "Certified" Alphaholic peteconway's Avatar
    Real Name
    Peter Conway
    Join Date
    Oct 2005
    Location
    Melbourne, Australia
    Posts
    2,640

    Default Re: List Control Fill container & Client-side Show/hide expression

    Just do what he said - use the refresh and move on. It woks.
    Insanity: doing the same thing over and over again and expecting different results.
    Albert Einstein, (attributed)
    US (German-born) physicist (1879 - 1955)

  15. #15
    "Certified" Alphaholic
    Real Name
    Lee Vasic
    Join Date
    May 2010
    Location
    Salt Lake City
    Posts
    1,216

    Default Re: List Control Fill container & Client-side Show/hide expression

    This absolutely worked before the update.

Similar Threads

  1. Container on UX Client side Show/Hide
    By doula in forum Mobile & Browser Applications
    Replies: 5
    Last Post: 08-17-2017, 09:08 AM
  2. Client Side Show/hide Expression on mouseover
    By Cygnux in forum Application Server Version 11 - Web/Browser Applications
    Replies: 1
    Last Post: 02-18-2016, 01:53 PM
  3. Help with client side show/hide javascript expression
    By WindForce in forum Mobile & Browser Applications
    Replies: 2
    Last Post: 05-27-2014, 07:35 AM
  4. client side show/hide expression to show object when row is dirty
    By Selwyn Rabins in forum Application Server Version 10 - Web/Browser Applications
    Replies: 3
    Last Post: 10-22-2012, 01:41 PM
  5. Client-side show/hide expression's
    By Sparticuz in forum Application Server Version 11 - Web/Browser Applications
    Replies: 4
    Last Post: 10-31-2011, 09:44 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •